浏览代码

[DOCS] Adds filter and calendar attributes (#50566)

Lisa Cawley 5 年之前
父节点
当前提交
dd4ede5c56

+ 0 - 2
docs/reference/ml/anomaly-detection/apis/close-job.asciidoc

@@ -88,8 +88,6 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=allow-no-jobs]
 [[ml-close-job-example]]
 ==== {api-examples-title}
 
-The following example closes the `total-requests` job:
-
 [source,console]
 --------------------------------------------------
 POST _ml/anomaly_detectors/low_request_rate/_close

+ 2 - 1
docs/reference/ml/anomaly-detection/apis/delete-calendar-event.asciidoc

@@ -31,7 +31,8 @@ events and delete the calendar, see the
 ==== {api-path-parms-title}
 
 `<calendar_id>`::
-  (Required, string) Identifier for the calendar.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 `<event_id>`::
   (Required, string) Identifier for the scheduled event. You can obtain this

+ 2 - 1
docs/reference/ml/anomaly-detection/apis/delete-calendar-job.asciidoc

@@ -24,7 +24,8 @@ Deletes {anomaly-jobs} from a calendar.
 ==== {api-path-parms-title}
 
 `<calendar_id>`::
-(Required, string) Identifier for the calendar.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 `<job_id>`::
 (Required, string)

+ 2 - 1
docs/reference/ml/anomaly-detection/apis/delete-calendar.asciidoc

@@ -30,7 +30,8 @@ calendar.
 ==== {api-path-parms-title}
 
 `<calendar_id>`::
-  (Required, string) Identifier for the calendar.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 [[ml-delete-calendar-example]]
 ==== {api-examples-title}

+ 2 - 1
docs/reference/ml/anomaly-detection/apis/delete-filter.asciidoc

@@ -31,7 +31,8 @@ update or delete the job before you can delete the filter.
 ==== {api-path-parms-title}
 
 `<filter_id>`::
-  (Required, string) Identifier for the filter.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
 
 [[ml-delete-filter-example]]
 ==== {api-examples-title}

+ 0 - 27
docs/reference/ml/anomaly-detection/apis/eventresource.asciidoc

@@ -1,27 +0,0 @@
-[role="xpack"]
-[testenv="platinum"]
-[[ml-event-resource]]
-=== Scheduled event resources
-
-An events resource has the following properties:
-
-`calendar_id`::
-  (string) An identifier for the calendar that contains the scheduled
-  event. This property is optional in the <<ml-post-calendar-event>>. 
-
-`description`::
-  (string) A description of the scheduled event.
-
-`end_time`::
-  (date) The timestamp for the end of the scheduled event
-  in milliseconds since the epoch or ISO 8601 format.
-
-`event_id`::
-  (string) An automatically-generated identifier for the scheduled event.
-
-`start_time`::
- (date) The timestamp for the beginning of the scheduled event
- in milliseconds since the epoch or ISO 8601 format.
-
-For more information, see
-{ml-docs}/ml-calendars.html[Calendars and scheduled events].

+ 0 - 17
docs/reference/ml/anomaly-detection/apis/filterresource.asciidoc

@@ -1,17 +0,0 @@
-[role="xpack"]
-[testenv="platinum"]
-[[ml-filter-resource]]
-=== Filter resources
-
-A filter resource has the following properties:
-
-`filter_id`::
-  (string) A string that uniquely identifies the filter.
-
-`description`::
-  (string) A description of the filter.
-
-`items`::
-  (array of strings) An array of strings which is the filter item list.
-  
-For more information, see {ml-docs}/ml-rules.html[Machine learning custom rules].

+ 10 - 9
docs/reference/ml/anomaly-detection/apis/get-calendar-event.asciidoc

@@ -35,7 +35,8 @@ For more information, see
 ==== {api-path-parms-title}
 
 `<calendar_id>`::
-  (Required, string) Identifier for the calendar.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 [[ml-get-calendar-event-request-body]]
 ==== {api-request-body-title}
@@ -60,22 +61,22 @@ The API returns an array of scheduled event resources, which have the
 following properties:
 
 `calendar_id`::
-    (string) An identifier for the calendar that contains the scheduled
-    event. 
+(string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 `description`::
-    (string) A description of the scheduled event.
+(string) A description of the scheduled event.
 
 `end_time`::
-    (date) The timestamp for the end of the scheduled event
-    in milliseconds since the epoch or ISO 8601 format.
+(date) The timestamp for the end of the scheduled event in milliseconds since
+the epoch or ISO 8601 format.
 
 `event_id`::
-    (string) An automatically-generated identifier for the scheduled event.
+(string) An automatically-generated identifier for the scheduled event.
 
 `start_time`::
-   (date) The timestamp for the beginning of the scheduled event
-   in milliseconds since the epoch or ISO 8601 format.
+(date) The timestamp for the beginning of the scheduled event in milliseconds
+since the epoch or ISO 8601 format.
 
 [[ml-get-calendar-event-example]]
 ==== {api-examples-title}

+ 4 - 2
docs/reference/ml/anomaly-detection/apis/get-calendar.asciidoc

@@ -35,7 +35,8 @@ For more information, see
 ==== {api-path-parms-title}
 
 `<calendar_id>`::
-  (Required, string) Identifier for the calendar.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 [[ml-get-calendar-request-body]]
 ==== {api-request-body-title}
@@ -53,7 +54,8 @@ The API returns an array of calendar resources, which have the following
 properties:
 
 `calendar_id`::
-(string) A numerical character string that uniquely identifies the calendar.
+(string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 `job_ids`::
 (array) An array of {anomaly-job} identifiers. For example:

+ 4 - 2
docs/reference/ml/anomaly-detection/apis/get-filter.asciidoc

@@ -32,7 +32,8 @@ You can get a single filter or all filters. For more information, see
 ==== {api-path-parms-title}
 
 `<filter_id>`::
-  (Optional, string) Identifier for the filter.
+(Optional, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
 
 [[ml-get-filter-query-parms]]
 ==== {api-query-parms-title}
@@ -53,7 +54,8 @@ properties:
 (string) A description of the filter.
 
 `filter_id`::
-(string) A string that uniquely identifies the filter.
+(string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
   
 `items`::
 (array of strings) An array of strings which is the filter item list.

+ 12 - 11
docs/reference/ml/anomaly-detection/apis/post-calendar-event.asciidoc

@@ -30,30 +30,31 @@ of which must have a start time, end time, and description.
 ==== {api-path-parms-title}
 
 `<calendar_id>`::
-		(Required, string) Identifier for the calendar.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 [[ml-post-calendar-event-request-body]]
 ==== {api-request-body-title}
 
 `events`::
-  (Required, array) A list of one of more scheduled events. The event's start
-	and end times may be specified as integer milliseconds since the epoch or as a
-	string in ISO 8601 format. An event resource has the following properties:
+(Required, array) A list of one of more scheduled events. The event's start and
+end times may be specified as integer milliseconds since the epoch or as a
+string in ISO 8601 format. An event resource has the following properties:
 
 `events`.`calendar_id`:::
-	  (Optional, string) An identifier for the calendar that contains the scheduled
-	  event.
+(Optional, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 `events`.`description`:::
-	  (Optional, string) A description of the scheduled event.
+(Optional, string) A description of the scheduled event.
 
 `events`.`end_time`:::
-	  (Required, date) The timestamp for the end of the scheduled event
-	  in milliseconds since the epoch or ISO 8601 format.
+(Required, date) The timestamp for the end of the scheduled event in
+milliseconds since the epoch or ISO 8601 format.
 
 `events`.`start_time`:::
-	 (Required, date) The timestamp for the beginning of the scheduled event
-	 in milliseconds since the epoch or ISO 8601 format.
+(Required, date) The timestamp for the beginning of the scheduled event in
+milliseconds since the epoch or ISO 8601 format.
 
 [[ml-post-calendar-event-example]]
 ==== {api-examples-title}

+ 2 - 1
docs/reference/ml/anomaly-detection/apis/put-calendar-job.asciidoc

@@ -24,7 +24,8 @@ Adds an {anomaly-job} to a calendar.
 ==== {api-path-parms-title}
 
 `<calendar_id>`::
-  (Required, string) Identifier for the calendar.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 `<job_id>`::
 (Required, string) 

+ 3 - 2
docs/reference/ml/anomaly-detection/apis/put-calendar.asciidoc

@@ -30,13 +30,14 @@ For more information, see
 ==== {api-path-parms-title}
 
 `<calendar_id>`::
-  (Required, string) Identifier for the calendar.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=calendar-id]
 
 [[ml-put-calendar-request-body]]
 ==== {api-request-body-title}
 
 `description`::
-  (Optional, string) A description of the calendar.
+(Optional, string) A description of the calendar.
 
 [[ml-put-calendar-example]]
 ==== {api-examples-title}

+ 2 - 1
docs/reference/ml/anomaly-detection/apis/put-filter.asciidoc

@@ -31,7 +31,8 @@ the `custom_rules` property of detector configuration objects.
 ==== {api-path-parms-title}
 
 `<filter_id>`::
-  (Required, string) Identifier for the filter.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
 
 [[ml-put-filter-request-body]]
 ==== {api-request-body-title}

+ 2 - 1
docs/reference/ml/anomaly-detection/apis/update-filter.asciidoc

@@ -24,7 +24,8 @@ Updates the description of a filter, adds items, or removes items.
 ==== {api-path-parms-title}
 
 `<filter_id>`::
-		(Required, string) Identifier for the filter.
+(Required, string)
+include::{docdir}/ml/ml-shared.asciidoc[tag=filter-id]
 
 [[ml-update-filter-request-body]]
 ==== {api-request-body-title}

+ 8 - 0
docs/reference/ml/ml-shared.asciidoc

@@ -140,6 +140,10 @@ analyzing the splits with respect to their own history. It is used for finding
 unusual values in the context of the split.
 end::by-field-name[]
 
+tag::calendar-id[]
+A string that uniquely identifies a calendar.
+end::calendar-id[]
+
 tag::categorization-analyzer[]
 If `categorization_field_name` is specified, you can also define the analyzer
 that is used to interpret the categorization field. This property cannot be used
@@ -570,6 +574,10 @@ optional. If it is not specified, no token filters are applied prior to
 categorization.
 end::filter[]
 
+tag::filter-id[]
+A string that uniquely identifies a filter.
+end::filter-id[]
+
 tag::frequency[]
 The interval at which scheduled queries are made while the {dfeed} runs in real
 time. The default value is either the bucket span for short bucket spans, or,