Skip to content

Commit 6922d65

Browse files
Add api spec for tiering of indices from hot to warm
Signed-off-by: Neetika Singhal <neetiks@amazon.com>
1 parent ed3fb4d commit 6922d65

File tree

2 files changed

+101
-0
lines changed

2 files changed

+101
-0
lines changed

spec/namespaces/indices.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,24 @@ paths:
938938
responses:
939939
'200':
940940
$ref: '#/components/responses/indices.delete@200'
941+
/{index}/_tier/warm:
942+
post:
943+
operationId: indices.tier_warm.0
944+
x-operation-group: indices.tier
945+
x-version-added: '1.0'
946+
description: Tier the index from hot to warm in the cluster.
947+
externalDocs:
948+
url: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
949+
parameters:
950+
- $ref: '#/components/parameters/indices.tier_warm::path.index'
951+
- $ref: '#/components/parameters/indices.tier_warm::query.allow_no_indices'
952+
- $ref: '#/components/parameters/indices.tier_warm::query.cluster_manager_timeout'
953+
- $ref: '#/components/parameters/indices.tier_warm::query.ignore_unavailable'
954+
- $ref: '#/components/parameters/indices.tier_warm::query.timeout'
955+
- $ref: '#/components/parameters/indices.tier_warm::query.wait_for_completion'
956+
responses:
957+
'200':
958+
$ref: '#/components/responses/indices.tier_warm@200'
941959
/{index}/_alias:
942960
get:
943961
operationId: indices.get_alias.2
@@ -2602,6 +2620,29 @@ components:
26022620
required:
26032621
- _shards
26042622
- _all
2623+
indices.tier_warm@200:
2624+
description: 'Hot to warm tiering response'
2625+
content:
2626+
application/json:
2627+
schema:
2628+
type: object
2629+
properties:
2630+
acknowledged:
2631+
type: boolean
2632+
failed_indices:
2633+
type: array
2634+
items:
2635+
type: object
2636+
properties:
2637+
key:
2638+
type: string
2639+
value:
2640+
type: string
2641+
required:
2642+
- key
2643+
- value
2644+
required:
2645+
- acknowledged
26052646
indices.update_aliases@200:
26062647
description: ''
26072648
content:
@@ -4953,6 +4994,60 @@ components:
49534994
schema:
49544995
$ref: '../schemas/_common.yaml#/components/schemas/Level'
49554996
style: form
4997+
4998+
indices.tier_warm::path.index:
4999+
in: path
5000+
name: index
5001+
description: |-
5002+
Comma-separated list of data streams, indices, and aliases to tier from hot to warm.
5003+
Supports wildcards (`*`).
5004+
To search all data streams or indices, omit this parameter or use `*` or `_all`.
5005+
required: true
5006+
schema:
5007+
$ref: '../schemas/_common.yaml#/components/schemas/Indices'
5008+
style: simple
5009+
indices.tier_warm::query.allow_no_indices:
5010+
in: query
5011+
name: allow_no_indices
5012+
description: |-
5013+
If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
5014+
This behavior applies even if the request targets other open indices.
5015+
schema:
5016+
type: boolean
5017+
default: false
5018+
style: form
5019+
indices.tier_warm::query.cluster_manager_timeout:
5020+
name: cluster_manager_timeout
5021+
in: query
5022+
description: Operation timeout for connection to cluster-manager node.
5023+
schema:
5024+
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
5025+
x-version-added: 2.0.0
5026+
indices.tier_warm::query.ignore_unavailable:
5027+
in: query
5028+
name: ignore_unavailable
5029+
description: If `false`, the request returns an error if it targets a missing or closed index.
5030+
schema:
5031+
type: boolean
5032+
default: false
5033+
style: form
5034+
indices.tier_warm::query.timeout:
5035+
in: query
5036+
name: timeout
5037+
description: |-
5038+
Period to wait for a response.
5039+
If no response is received before the timeout expires, the request fails and returns an error.
5040+
schema:
5041+
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
5042+
style: form
5043+
indices.tier_warm::query.wait_for_completion:
5044+
name: wait_for_completion
5045+
in: query
5046+
description: Should this request wait until the operation has completed before returning.
5047+
schema:
5048+
type: boolean
5049+
default: true
5050+
description: Should this request wait until the operation has completed before returning.
49565051
indices.update_aliases::query.cluster_manager_timeout:
49575052
name: cluster_manager_timeout
49585053
in: query

tests/indices/index.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ chapters:
6767
parameters:
6868
index: books
6969

70+
- synopsis: Tier the `books` and `games` indices from hot to warm.
71+
path: /{index}/_tier/warm
72+
method: POST
73+
parameters:
74+
index: books,games
75+
7076
- synopsis: Delete the `books` and `games` indices.
7177
path: /{index}
7278
method: DELETE

0 commit comments

Comments
 (0)