Files
elasticsearch-js/docs/reference-shared-types-watcher.asciidoc

1677 lines
26 KiB
Plaintext

[[reference-shared-types-watcher]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
== Shared Watcher types
[discrete]
[[WatcherAcknowledgeState]]
=== WatcherAcknowledgeState
[pass]
++++
<pre>
++++
interface WatcherAcknowledgeState {
state: <<WatcherAcknowledgementOptions>>
timestamp: <<DateTime>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherAcknowledgementOptions]]
=== WatcherAcknowledgementOptions
[pass]
++++
<pre>
++++
type WatcherAcknowledgementOptions = 'awaits_successful_execution' | 'ackable' | 'acked'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherAction]]
=== WatcherAction
[pass]
++++
<pre>
++++
interface WatcherAction {
action_type?: <<WatcherActionType>>
condition?: <<WatcherConditionContainer>>
foreach?: string
max_iterations?: <<integer>>
name?: <<Name>>
throttle_period?: <<Duration>>
throttle_period_in_millis?: <<DurationValue>><<<UnitMillis>>>
transform?: <<TransformContainer>>
index?: <<WatcherIndexAction>>
logging?: <<WatcherLoggingAction>>
email?: <<WatcherEmailAction>>
pagerduty?: <<WatcherPagerDutyAction>>
slack?: <<WatcherSlackAction>>
webhook?: <<WatcherWebhookAction>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherActionExecutionMode]]
=== WatcherActionExecutionMode
[pass]
++++
<pre>
++++
type WatcherActionExecutionMode = 'simulate' | 'force_simulate' | 'execute' | 'force_execute' | 'skip'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherActionStatus]]
=== WatcherActionStatus
[pass]
++++
<pre>
++++
interface WatcherActionStatus {
ack: <<WatcherAcknowledgeState>>
last_execution?: <<WatcherExecutionState>>
last_successful_execution?: <<WatcherExecutionState>>
last_throttle?: <<WatcherThrottleState>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherActionStatusOptions]]
=== WatcherActionStatusOptions
[pass]
++++
<pre>
++++
type WatcherActionStatusOptions = 'success' | 'failure' | 'simulated' | 'throttled'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherActionType]]
=== WatcherActionType
[pass]
++++
<pre>
++++
type WatcherActionType = 'email' | 'webhook' | 'index' | 'logging' | 'slack' | 'pagerduty'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherActions]]
=== WatcherActions
[pass]
++++
<pre>
++++
type WatcherActions = Record<<<IndexName>>, <<WatcherActionStatus>>>
[pass]
++++
</pre>
++++
[discrete]
[[WatcherActivationState]]
=== WatcherActivationState
[pass]
++++
<pre>
++++
interface WatcherActivationState {
active: boolean
timestamp: <<DateTime>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherActivationStatus]]
=== WatcherActivationStatus
[pass]
++++
<pre>
++++
interface WatcherActivationStatus {
actions: <<WatcherActions>>
state: <<WatcherActivationState>>
version: <<VersionNumber>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherAlwaysCondition]]
=== WatcherAlwaysCondition
[pass]
++++
<pre>
++++
interface WatcherAlwaysCondition {
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherArrayCompareCondition]]
=== WatcherArrayCompareCondition
[pass]
++++
<pre>
++++
interface WatcherArrayCompareConditionKeys {
path: string
}
type WatcherArrayCompareCondition = WatcherArrayCompareConditionKeys
& { [property: string]: <<WatcherArrayCompareOpParams>> | string }
[pass]
++++
</pre>
++++
[discrete]
[[WatcherArrayCompareOpParams]]
=== WatcherArrayCompareOpParams
[pass]
++++
<pre>
++++
interface WatcherArrayCompareOpParams {
quantifier: <<WatcherQuantifier>>
value: <<FieldValue>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherChainInput]]
=== WatcherChainInput
[pass]
++++
<pre>
++++
interface WatcherChainInput {
inputs: Partial<Record<string, <<WatcherInputContainer>>>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherConditionContainer]]
=== WatcherConditionContainer
[pass]
++++
<pre>
++++
interface WatcherConditionContainer {
always?: <<WatcherAlwaysCondition>>
array_compare?: Partial<Record<string, <<WatcherArrayCompareCondition>>>>
compare?: Partial<Record<string, Partial<Record<<<WatcherConditionOp>>, <<FieldValue>>>>>>
never?: <<WatcherNeverCondition>>
script?: <<WatcherScriptCondition>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherConditionOp]]
=== WatcherConditionOp
[pass]
++++
<pre>
++++
type WatcherConditionOp = 'not_eq' | 'eq' | 'lt' | 'gt' | 'lte' | 'gte'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherConditionType]]
=== WatcherConditionType
[pass]
++++
<pre>
++++
type WatcherConditionType = 'always' | 'never' | 'script' | 'compare' | 'array_compare'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherConnectionScheme]]
=== WatcherConnectionScheme
[pass]
++++
<pre>
++++
type WatcherConnectionScheme = 'http' | 'https'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherCronExpression]]
=== WatcherCronExpression
[pass]
++++
<pre>
++++
type WatcherCronExpression = string
[pass]
++++
</pre>
++++
[discrete]
[[WatcherDailySchedule]]
=== WatcherDailySchedule
[pass]
++++
<pre>
++++
interface WatcherDailySchedule {
at: <<WatcherScheduleTimeOfDay>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherDataAttachmentFormat]]
=== WatcherDataAttachmentFormat
[pass]
++++
<pre>
++++
type WatcherDataAttachmentFormat = 'json' | 'yaml'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherDataEmailAttachment]]
=== WatcherDataEmailAttachment
[pass]
++++
<pre>
++++
interface WatcherDataEmailAttachment {
format?: <<WatcherDataAttachmentFormat>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherDay]]
=== WatcherDay
[pass]
++++
<pre>
++++
type WatcherDay = 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherEmail]]
=== WatcherEmail
[pass]
++++
<pre>
++++
interface WatcherEmail {
id?: <<Id>>
bcc?: string[]
body?: <<WatcherEmailBody>>
cc?: string[]
from?: string
priority?: <<WatcherEmailPriority>>
reply_to?: string[]
sent_date?: <<DateTime>>
subject: string
to: string[]
attachments?: Record<string, <<WatcherEmailAttachmentContainer>>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherEmailAction]]
=== WatcherEmailAction
[pass]
++++
<pre>
++++
interface WatcherEmailAction extends <<WatcherEmail>> {
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherEmailAttachmentContainer]]
=== WatcherEmailAttachmentContainer
[pass]
++++
<pre>
++++
interface WatcherEmailAttachmentContainer {
http?: <<WatcherHttpEmailAttachment>>
reporting?: <<WatcherReportingEmailAttachment>>
data?: <<WatcherDataEmailAttachment>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherEmailBody]]
=== WatcherEmailBody
[pass]
++++
<pre>
++++
interface WatcherEmailBody {
html?: string
text?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherEmailPriority]]
=== WatcherEmailPriority
[pass]
++++
<pre>
++++
type WatcherEmailPriority = 'lowest' | 'low' | 'normal' | 'high' | 'highest'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherEmailResult]]
=== WatcherEmailResult
[pass]
++++
<pre>
++++
interface WatcherEmailResult {
account?: string
message: <<WatcherEmail>>
reason?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherExecutionPhase]]
=== WatcherExecutionPhase
[pass]
++++
<pre>
++++
type WatcherExecutionPhase = 'awaits_execution' | 'started' | 'input' | 'condition' | 'actions' | 'watch_transform' | 'aborted' | 'finished'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherExecutionResult]]
=== WatcherExecutionResult
[pass]
++++
<pre>
++++
interface WatcherExecutionResult {
actions: <<WatcherExecutionResultAction>>[]
condition: <<WatcherExecutionResultCondition>>
execution_duration: <<DurationValue>><<<UnitMillis>>>
execution_time: <<DateTime>>
input: <<WatcherExecutionResultInput>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherExecutionResultAction]]
=== WatcherExecutionResultAction
[pass]
++++
<pre>
++++
interface WatcherExecutionResultAction {
email?: <<WatcherEmailResult>>
id: <<Id>>
index?: <<WatcherIndexResult>>
logging?: <<WatcherLoggingResult>>
pagerduty?: <<WatcherPagerDutyResult>>
reason?: string
slack?: <<WatcherSlackResult>>
status: <<WatcherActionStatusOptions>>
type: <<WatcherActionType>>
webhook?: <<WatcherWebhookResult>>
error?: <<ErrorCause>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherExecutionResultCondition]]
=== WatcherExecutionResultCondition
[pass]
++++
<pre>
++++
interface WatcherExecutionResultCondition {
met: boolean
status: <<WatcherActionStatusOptions>>
type: <<WatcherConditionType>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherExecutionResultInput]]
=== WatcherExecutionResultInput
[pass]
++++
<pre>
++++
interface WatcherExecutionResultInput {
payload: Record<string, any>
status: <<WatcherActionStatusOptions>>
type: <<WatcherInputType>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherExecutionState]]
=== WatcherExecutionState
[pass]
++++
<pre>
++++
interface WatcherExecutionState {
successful: boolean
timestamp: <<DateTime>>
reason?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherExecutionStatus]]
=== WatcherExecutionStatus
[pass]
++++
<pre>
++++
type WatcherExecutionStatus = 'awaits_execution' | 'checking' | 'execution_not_needed' | 'throttled' | 'executed' | 'failed' | 'deleted_while_queued' | 'not_executed_already_queued'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherExecutionThreadPool]]
=== WatcherExecutionThreadPool
[pass]
++++
<pre>
++++
interface WatcherExecutionThreadPool {
max_size: <<long>>
queue_size: <<long>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHourAndMinute]]
=== WatcherHourAndMinute
[pass]
++++
<pre>
++++
interface WatcherHourAndMinute {
hour: <<integer>>[]
minute: <<integer>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHourlySchedule]]
=== WatcherHourlySchedule
[pass]
++++
<pre>
++++
interface WatcherHourlySchedule {
minute: <<integer>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHttpEmailAttachment]]
=== WatcherHttpEmailAttachment
[pass]
++++
<pre>
++++
interface WatcherHttpEmailAttachment {
content_type?: string
inline?: boolean
request?: <<WatcherHttpInputRequestDefinition>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHttpInput]]
=== WatcherHttpInput
[pass]
++++
<pre>
++++
interface WatcherHttpInput {
extract?: string[]
request?: <<WatcherHttpInputRequestDefinition>>
response_content_type?: <<WatcherResponseContentType>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHttpInputAuthentication]]
=== WatcherHttpInputAuthentication
[pass]
++++
<pre>
++++
interface WatcherHttpInputAuthentication {
basic: <<WatcherHttpInputBasicAuthentication>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHttpInputBasicAuthentication]]
=== WatcherHttpInputBasicAuthentication
[pass]
++++
<pre>
++++
interface WatcherHttpInputBasicAuthentication {
password: <<Password>>
username: <<Username>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHttpInputMethod]]
=== WatcherHttpInputMethod
[pass]
++++
<pre>
++++
type WatcherHttpInputMethod = 'head' | 'get' | 'post' | 'put' | 'delete'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHttpInputProxy]]
=== WatcherHttpInputProxy
[pass]
++++
<pre>
++++
interface WatcherHttpInputProxy {
host: <<Host>>
port: <<uint>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHttpInputRequestDefinition]]
=== WatcherHttpInputRequestDefinition
[pass]
++++
<pre>
++++
interface WatcherHttpInputRequestDefinition {
auth?: <<WatcherHttpInputAuthentication>>
body?: string
connection_timeout?: <<Duration>>
headers?: Record<string, string>
host?: <<Host>>
method?: <<WatcherHttpInputMethod>>
params?: Record<string, string>
path?: string
port?: <<uint>>
proxy?: <<WatcherHttpInputProxy>>
read_timeout?: <<Duration>>
scheme?: <<WatcherConnectionScheme>>
url?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHttpInputRequestResult]]
=== WatcherHttpInputRequestResult
[pass]
++++
<pre>
++++
interface WatcherHttpInputRequestResult extends <<WatcherHttpInputRequestDefinition>> {
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherHttpInputResponseResult]]
=== WatcherHttpInputResponseResult
[pass]
++++
<pre>
++++
interface WatcherHttpInputResponseResult {
body: string
headers: <<HttpHeaders>>
status: <<integer>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherIndexAction]]
=== WatcherIndexAction
[pass]
++++
<pre>
++++
interface WatcherIndexAction {
index: <<IndexName>>
doc_id?: <<Id>>
refresh?: <<Refresh>>
op_type?: <<OpType>>
timeout?: <<Duration>>
execution_time_field?: <<Field>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherIndexResult]]
=== WatcherIndexResult
[pass]
++++
<pre>
++++
interface WatcherIndexResult {
response: <<WatcherIndexResultSummary>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherIndexResultSummary]]
=== WatcherIndexResultSummary
[pass]
++++
<pre>
++++
interface WatcherIndexResultSummary {
created: boolean
id: <<Id>>
index: <<IndexName>>
result: <<Result>>
version: <<VersionNumber>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherInputContainer]]
=== WatcherInputContainer
[pass]
++++
<pre>
++++
interface WatcherInputContainer {
chain?: <<WatcherChainInput>>
http?: <<WatcherHttpInput>>
search?: <<WatcherSearchInput>>
simple?: Record<string, any>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherInputType]]
=== WatcherInputType
[pass]
++++
<pre>
++++
type WatcherInputType = 'http' | 'search' | 'simple'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherLoggingAction]]
=== WatcherLoggingAction
[pass]
++++
<pre>
++++
interface WatcherLoggingAction {
level?: string
text: string
category?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherLoggingResult]]
=== WatcherLoggingResult
[pass]
++++
<pre>
++++
interface WatcherLoggingResult {
logged_text: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherMonth]]
=== WatcherMonth
[pass]
++++
<pre>
++++
type WatcherMonth = 'january' | 'february' | 'march' | 'april' | 'may' | 'june' | 'july' | 'august' | 'september' | 'october' | 'november' | 'december'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherNeverCondition]]
=== WatcherNeverCondition
[pass]
++++
<pre>
++++
interface WatcherNeverCondition {
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherPagerDutyAction]]
=== WatcherPagerDutyAction
[pass]
++++
<pre>
++++
interface WatcherPagerDutyAction extends <<WatcherPagerDutyEvent>> {
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherPagerDutyContext]]
=== WatcherPagerDutyContext
[pass]
++++
<pre>
++++
interface WatcherPagerDutyContext {
href?: string
src?: string
type: <<WatcherPagerDutyContextType>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherPagerDutyContextType]]
=== WatcherPagerDutyContextType
[pass]
++++
<pre>
++++
type WatcherPagerDutyContextType = 'link' | 'image'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherPagerDutyEvent]]
=== WatcherPagerDutyEvent
[pass]
++++
<pre>
++++
interface WatcherPagerDutyEvent {
account?: string
attach_payload: boolean
client?: string
client_url?: string
contexts?: <<WatcherPagerDutyContext>>[]
context?: <<WatcherPagerDutyContext>>[]
description: string
event_type?: <<WatcherPagerDutyEventType>>
incident_key: string
proxy?: <<WatcherPagerDutyEventProxy>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherPagerDutyEventProxy]]
=== WatcherPagerDutyEventProxy
[pass]
++++
<pre>
++++
interface WatcherPagerDutyEventProxy {
host?: <<Host>>
port?: <<integer>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherPagerDutyEventType]]
=== WatcherPagerDutyEventType
[pass]
++++
<pre>
++++
type WatcherPagerDutyEventType = 'trigger' | 'resolve' | 'acknowledge'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherPagerDutyResult]]
=== WatcherPagerDutyResult
[pass]
++++
<pre>
++++
interface WatcherPagerDutyResult {
event: <<WatcherPagerDutyEvent>>
reason?: string
request?: <<WatcherHttpInputRequestResult>>
response?: <<WatcherHttpInputResponseResult>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherQuantifier]]
=== WatcherQuantifier
[pass]
++++
<pre>
++++
type WatcherQuantifier = 'some' | 'all'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherQueryWatch]]
=== WatcherQueryWatch
[pass]
++++
<pre>
++++
interface WatcherQueryWatch {
_id: <<Id>>
status?: <<WatcherWatchStatus>>
watch?: <<WatcherWatch>>
_primary_term?: <<integer>>
_seq_no?: <<SequenceNumber>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherReportingEmailAttachment]]
=== WatcherReportingEmailAttachment
[pass]
++++
<pre>
++++
interface WatcherReportingEmailAttachment {
url: string
inline?: boolean
retries?: <<integer>>
interval?: <<Duration>>
request?: <<WatcherHttpInputRequestDefinition>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherResponseContentType]]
=== WatcherResponseContentType
[pass]
++++
<pre>
++++
type WatcherResponseContentType = 'json' | 'yaml' | 'text'
[pass]
++++
</pre>
++++
[discrete]
[[WatcherScheduleContainer]]
=== WatcherScheduleContainer
[pass]
++++
<pre>
++++
interface WatcherScheduleContainer {
cron?: <<WatcherCronExpression>>
daily?: <<WatcherDailySchedule>>
hourly?: <<WatcherHourlySchedule>>
interval?: <<Duration>>
monthly?: <<WatcherTimeOfMonth>> | <<WatcherTimeOfMonth>>[]
weekly?: <<WatcherTimeOfWeek>> | <<WatcherTimeOfWeek>>[]
yearly?: <<WatcherTimeOfYear>> | <<WatcherTimeOfYear>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherScheduleTimeOfDay]]
=== WatcherScheduleTimeOfDay
[pass]
++++
<pre>
++++
type WatcherScheduleTimeOfDay = string | <<WatcherHourAndMinute>>
[pass]
++++
</pre>
++++
[discrete]
[[WatcherScheduleTriggerEvent]]
=== WatcherScheduleTriggerEvent
[pass]
++++
<pre>
++++
interface WatcherScheduleTriggerEvent {
scheduled_time: <<DateTime>>
triggered_time?: <<DateTime>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherScriptCondition]]
=== WatcherScriptCondition
[pass]
++++
<pre>
++++
interface WatcherScriptCondition {
lang?: string
params?: Record<string, any>
source?: string
id?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSearchInput]]
=== WatcherSearchInput
[pass]
++++
<pre>
++++
interface WatcherSearchInput {
extract?: string[]
request: <<WatcherSearchInputRequestDefinition>>
timeout?: <<Duration>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSearchInputRequestBody]]
=== WatcherSearchInputRequestBody
[pass]
++++
<pre>
++++
interface WatcherSearchInputRequestBody {
query: <<QueryDslQueryContainer>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSearchInputRequestDefinition]]
=== WatcherSearchInputRequestDefinition
[pass]
++++
<pre>
++++
interface WatcherSearchInputRequestDefinition {
body?: <<WatcherSearchInputRequestBody>>
indices?: <<IndexName>>[]
indices_options?: <<IndicesOptions>>
search_type?: <<SearchType>>
template?: <<WatcherSearchTemplateRequestBody>>
rest_total_hits_as_int?: boolean
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSearchTemplateRequestBody]]
=== WatcherSearchTemplateRequestBody
[pass]
++++
<pre>
++++
interface WatcherSearchTemplateRequestBody {
explain?: boolean
pass:[/**] @property id ID of the search template to use. If no source is specified, this parameter is required. */
id?: <<Id>>
params?: Record<string, any>
profile?: boolean
pass:[/**] @property source An inline search template. Supports the same parameters as the search API's request body. Also supports Mustache variables. If no id is specified, this parameter is required. */
source?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSimulatedActions]]
=== WatcherSimulatedActions
[pass]
++++
<pre>
++++
interface WatcherSimulatedActions {
actions: string[]
all: <<WatcherSimulatedActions>>
use_all: boolean
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSlackAction]]
=== WatcherSlackAction
[pass]
++++
<pre>
++++
interface WatcherSlackAction {
account?: string
message: <<WatcherSlackMessage>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSlackAttachment]]
=== WatcherSlackAttachment
[pass]
++++
<pre>
++++
interface WatcherSlackAttachment {
author_icon?: string
author_link?: string
author_name: string
color?: string
fallback?: string
fields?: <<WatcherSlackAttachmentField>>[]
footer?: string
footer_icon?: string
image_url?: string
pretext?: string
text?: string
thumb_url?: string
title: string
title_link?: string
ts?: <<EpochTime>><<<UnitSeconds>>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSlackAttachmentField]]
=== WatcherSlackAttachmentField
[pass]
++++
<pre>
++++
interface WatcherSlackAttachmentField {
<<short>>: boolean
title: string
value: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSlackDynamicAttachment]]
=== WatcherSlackDynamicAttachment
[pass]
++++
<pre>
++++
interface WatcherSlackDynamicAttachment {
attachment_template: <<WatcherSlackAttachment>>
list_path: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSlackMessage]]
=== WatcherSlackMessage
[pass]
++++
<pre>
++++
interface WatcherSlackMessage {
attachments: <<WatcherSlackAttachment>>[]
dynamic_attachments?: <<WatcherSlackDynamicAttachment>>
from: string
icon?: string
text: string
to: string[]
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherSlackResult]]
=== WatcherSlackResult
[pass]
++++
<pre>
++++
interface WatcherSlackResult {
account?: string
message: <<WatcherSlackMessage>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherThrottleState]]
=== WatcherThrottleState
[pass]
++++
<pre>
++++
interface WatcherThrottleState {
reason: string
timestamp: <<DateTime>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherTimeOfMonth]]
=== WatcherTimeOfMonth
[pass]
++++
<pre>
++++
interface WatcherTimeOfMonth {
at: string[]
on: <<integer>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherTimeOfWeek]]
=== WatcherTimeOfWeek
[pass]
++++
<pre>
++++
interface WatcherTimeOfWeek {
at: string[]
on: <<WatcherDay>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherTimeOfYear]]
=== WatcherTimeOfYear
[pass]
++++
<pre>
++++
interface WatcherTimeOfYear {
at: string[]
int: <<WatcherMonth>>[]
on: <<integer>>[]
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherTriggerContainer]]
=== WatcherTriggerContainer
[pass]
++++
<pre>
++++
interface WatcherTriggerContainer {
schedule?: <<WatcherScheduleContainer>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherTriggerEventContainer]]
=== WatcherTriggerEventContainer
[pass]
++++
<pre>
++++
interface WatcherTriggerEventContainer {
schedule?: <<WatcherScheduleTriggerEvent>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherTriggerEventResult]]
=== WatcherTriggerEventResult
[pass]
++++
<pre>
++++
interface WatcherTriggerEventResult {
manual: <<WatcherTriggerEventContainer>>
triggered_time: <<DateTime>>
type: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherWatch]]
=== WatcherWatch
[pass]
++++
<pre>
++++
interface WatcherWatch {
actions: Record<<<IndexName>>, <<WatcherAction>>>
condition: <<WatcherConditionContainer>>
input: <<WatcherInputContainer>>
metadata?: <<Metadata>>
status?: <<WatcherWatchStatus>>
throttle_period?: <<Duration>>
throttle_period_in_millis?: <<DurationValue>><<<UnitMillis>>>
transform?: <<TransformContainer>>
trigger: <<WatcherTriggerContainer>>
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherWatchStatus]]
=== WatcherWatchStatus
[pass]
++++
<pre>
++++
interface WatcherWatchStatus {
actions: <<WatcherActions>>
last_checked?: <<DateTime>>
last_met_condition?: <<DateTime>>
state: <<WatcherActivationState>>
version: <<VersionNumber>>
execution_state?: string
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherWebhookAction]]
=== WatcherWebhookAction
[pass]
++++
<pre>
++++
interface WatcherWebhookAction extends <<WatcherHttpInputRequestDefinition>> {
}
[pass]
++++
</pre>
++++
[discrete]
[[WatcherWebhookResult]]
=== WatcherWebhookResult
[pass]
++++
<pre>
++++
interface WatcherWebhookResult {
request: <<WatcherHttpInputRequestResult>>
response?: <<WatcherHttpInputResponseResult>>
}
[pass]
++++
</pre>
++++