-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: dblock <dblock@amazon.com>
- Loading branch information
Showing
3 changed files
with
190 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test component templates. | ||
epilogues: | ||
- path: /logs-2020-01-01 | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /_index_template/daily_logs | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /_component_template/component_template1 | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /_component_template/component_template2 | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Create a component template 1. | ||
path: /_component_template/{name} | ||
method: POST | ||
parameters: | ||
name: component_template_1 | ||
request_body: | ||
payload: | ||
template: | ||
mappings: | ||
properties: | ||
'@timestamp': | ||
type: date | ||
response: | ||
status: 200 | ||
- synopsis: Get component template 1. | ||
path: /_component_template/{name} | ||
method: GET | ||
parameters: | ||
name: component_template_1 | ||
response: | ||
status: 200 | ||
- synopsis: Create a component template 2. | ||
path: /_component_template/{name} | ||
method: POST | ||
parameters: | ||
name: component_template_2 | ||
request_body: | ||
payload: | ||
template: | ||
mappings: | ||
properties: | ||
ip_address: | ||
type: ip | ||
response: | ||
status: 200 | ||
- synopsis: Create an index template composed of 2 component templates. | ||
path: /_index_template/{name} | ||
method: POST | ||
parameters: | ||
name: daily_logs | ||
request_body: | ||
payload: | ||
index_patterns: | ||
- "logs*" | ||
template: | ||
aliases: | ||
my_logs: {} | ||
settings: | ||
number_of_shards: 2 | ||
number_of_replicas: 2 | ||
mappings: | ||
properties: | ||
timestamp: | ||
type: date | ||
format: yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis | ||
value: | ||
type: double | ||
priority: 200 | ||
composed_of: | ||
- component_template_1 | ||
- component_template_2 | ||
version: 3 | ||
_meta: | ||
description: Template using component templates. | ||
response: | ||
status: 200 | ||
- synopsis: Create an index using the composite template. | ||
path: /{index} | ||
method: PUT | ||
parameters: | ||
index: logs-2020-01-01 | ||
response: | ||
status: 200 | ||
- synopsis: Get an index using the composite template. | ||
path: /{index} | ||
method: GET | ||
parameters: | ||
index: logs-2020-01-01 | ||
response: | ||
status: 200 | ||
- synopsis: Delete index template. | ||
path: /_index_template/{name} | ||
method: DELETE | ||
parameters: | ||
name: daily_logs | ||
response: | ||
status: 200 | ||
- synopsis: Delete component template 1. | ||
path: /_component_template/{name} | ||
method: DELETE | ||
parameters: | ||
name: component_template_1 | ||
response: | ||
status: 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
$schema: ../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test index templates. | ||
epilogues: | ||
- path: /_index_template/daily_logs | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Create an index template. | ||
path: /_index_template/{name} | ||
method: POST | ||
parameters: | ||
name: daily_logs | ||
request_body: | ||
payload: | ||
index_patterns: | ||
- "logs*" | ||
priority: 0 | ||
template: | ||
settings: | ||
number_of_shards: 2 | ||
number_of_replicas: 2 | ||
response: | ||
status: 200 | ||
- synopsis: Update an index template. | ||
path: /_index_template/{name} | ||
method: PUT | ||
parameters: | ||
name: daily_logs | ||
request_body: | ||
payload: | ||
index_patterns: | ||
- "logs*" | ||
priority: 0 | ||
template: | ||
aliases: | ||
my_logs: {} | ||
settings: | ||
number_of_shards: 4 | ||
number_of_replicas: 4 | ||
mappings: | ||
properties: | ||
timestamp: | ||
type: date | ||
format: yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis | ||
value: | ||
type: double | ||
response: | ||
status: 200 | ||
- synopsis: Retrieve all index templates. | ||
path: /_index_template | ||
method: GET | ||
response: | ||
status: 200 | ||
- synopsis: Retrieve an index template. | ||
path: /_index_template/{name} | ||
method: GET | ||
parameters: | ||
name: daily_logs | ||
response: | ||
status: 200 | ||
payload: | ||
index_templates: | ||
- name: daily_logs | ||
- synopsis: Check that an index template exists. | ||
path: /_index_template/{name} | ||
method: HEAD | ||
parameters: | ||
name: daily_logs | ||
response: | ||
status: 200 | ||
- synopsis: Delete an index template. | ||
path: /_index_template/{name} | ||
method: DELETE | ||
parameters: | ||
name: daily_logs | ||
response: | ||
status: 200 |