-
Notifications
You must be signed in to change notification settings - Fork 561
Add markers for cluster APIs. #9110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 16 commits
8234ec2
9ac0957
7f0f39b
44d9145
94b4cd1
eff3c78
645f9e1
b713b3b
bab9e3c
5607382
5f60253
7550e90
5fbb2c4
19b60e4
ecdce80
7c8ea81
662c507
403e330
999aef7
9ea5bc7
93cfb7b
96a153f
437d733
00f78ef
1028bcd
aaaa1d1
66dd54d
276d0fe
bb0b96b
6862a85
605ee18
9f8070c
ec2f046
9bba42f
1abf796
f471be0
b1651bd
8aeefa5
6b0f332
ae591b2
fd14571
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
--- | ||
layout: default | ||
title: Cluster component template | ||
nav_order: 25 | ||
parent: Cluster APIs | ||
--- | ||
|
||
# Cluster component template | ||
**Introduced 1.0** | ||
{: .label .label-purple } | ||
|
||
The Cluster component template APIs creates and updates the cluster's component templates | ||
Naarcha-AWS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Endpoints | ||
|
||
The `GET` method returns one or more component templates. | ||
Naarcha-AWS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<!-- spec_insert_start | ||
api: cluster.get_component_template | ||
component: endpoints | ||
omit_header: true | ||
--> | ||
```json | ||
GET /_component_template | ||
GET /_component_template/{name} | ||
``` | ||
<!-- spec_insert_end --> | ||
|
||
The `EXISTS` method returns information about whether a particular component template exist. | ||
Naarcha-AWS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<!-- spec_insert_start | ||
api: cluster.exists_component_template | ||
component: endpoints | ||
omit_header: true | ||
--> | ||
```json | ||
HEAD /_component_template/{name} | ||
``` | ||
<!-- spec_insert_end --> | ||
|
||
The `PUT` method creates or updates a component template. | ||
Naarcha-AWS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<!-- spec_insert_start | ||
api: cluster.put_component_template | ||
component: endpoints | ||
omit_header: true | ||
--> | ||
```json | ||
POST /_component_template/{name} | ||
PUT /_component_template/{name} | ||
``` | ||
<!-- spec_insert_end --> | ||
|
||
The `DELETE` method deletes a component template. | ||
Naarcha-AWS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<!-- spec_insert_start | ||
api: cluster.delete_component_template | ||
component: endpoints | ||
omit_header: true | ||
--> | ||
```json | ||
DELETE /_component_template/{name} | ||
``` | ||
<!-- spec_insert_end --> | ||
|
||
<!-- spec_insert_start | ||
api: cluster.put_component_template | ||
component: path_parameters | ||
--> | ||
## Path parameters | ||
|
||
The following table lists the available path parameters. | ||
|
||
| Parameter | Required | Data type | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| `name` | **Required** | String | The name of the component template to create. OpenSearch includes the following built-in component templates: `logs-mappings`; `logs-settings`; `metrics-mappings`; `metrics-settings`; `synthetics-mapping`; `synthetics-settings`. OpenSearch uses these templates to configure backing indexes for its data streams. If you want to overwrite one of these templates, set the replacement template `version` to a higher value than the current version. If you want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the Cluster Update Settings API. | | ||
Naarcha-AWS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<!-- spec_insert_end --> | ||
|
||
<!-- spec_insert_start | ||
api: cluster.put_component_template | ||
columns: Parameter, Data type, Description, Default | ||
include_deprecated: false | ||
component: query_parameters | ||
--> | ||
## Query parameters | ||
|
||
The following table lists the available query parameters. All query parameters are optional. | ||
|
||
| Parameter | Data type | Description | Default | | ||
| :--- | :--- | :--- | :--- | | ||
| `cluster_manager_timeout` | String | A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. | N/A | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Several comments on
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Time unit" is not a supported data type, according to the list of supported Data Types for OpenAPI. https://swagger.io/docs/specification/v3_0/data-models/data-types/ Not sure if there's a way to change the Data type manually beyond editing the table directly. That being said, I wouldn't advise it, since "String" matches what's in the API spec. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can keep it as "string" but still change the description and link to the valid units. As is, it's not apparent how one would form a string consisting of a value and units. The valid units link contains examples. |
||
| `create` | Boolean | When `true`, this request cannot replace or update existing component templates. | `false` | | ||
| `timeout` | String | A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. | N/A | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as
Naarcha-AWS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<!-- spec_insert_end --> | ||
|
||
## Example request | ||
|
||
```json | ||
POST /_component_template/logs_template | ||
{ | ||
"template": { | ||
"settings": { | ||
"number_of_shards": 1, | ||
"number_of_replicas": 1 | ||
}, | ||
"mappings": { | ||
"properties": { | ||
"timestamp": { | ||
"type": "date" | ||
}, | ||
"message": { | ||
"type": "text" | ||
}, | ||
"level": { | ||
"type": "keyword" | ||
}, | ||
"service": { | ||
"type": "keyword" | ||
} | ||
} | ||
}, | ||
"aliases": { | ||
"logs_alias": {} | ||
} | ||
}, | ||
"version": 1, | ||
"meta": { | ||
"description": "Component template for log data" | ||
} | ||
} | ||
``` | ||
{% include copy-curl.html %} | ||
|
||
## Example response | ||
|
||
```json | ||
{ | ||
"acknowledged": true | ||
} | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,25 +13,55 @@ redirect_from: | |
**Introduced 1.0** | ||
{: .label .label-purple } | ||
|
||
The cluster decommission operation adds support decommissioning based on awareness. It greatly benefits multi-zone deployments, where awareness attributes, such as `zones`, can aid in applying new upgrades to a cluster in a controlled fashion. This is especially useful during outages, in which case, you can decommission the unhealthy zone to prevent replication requests from stalling and prevent your request backlog from becoming too large. | ||
The Cluster decommission API adds support decommissioning based on awareness. It greatly benefits multi-zone deployments, where awareness attributes, such as `zones`, can aid in applying new upgrades to a cluster in a controlled fashion. This is especially useful during outages, in which case, you can decommission the unhealthy zone to prevent replication requests from stalling and prevent your request backlog from becoming too large. | ||
Naarcha-AWS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
For more information about allocation awareness, see [Shard allocation awareness]({{site.url}}{{site.baseurl}}//opensearch/cluster/#shard-allocation-awareness). | ||
|
||
|
||
<!-- spec_insert_start | ||
api: cluster.get_decommission_awareness | ||
component: endpoints | ||
--> | ||
## Endpoints | ||
```json | ||
GET /_cluster/decommission/awareness/{awareness_attribute_name}/_status | ||
``` | ||
<!-- spec_insert_end --> | ||
|
||
<!-- spec_insert_start | ||
api: cluster.put_decommission_awareness | ||
component: endpoints | ||
omit_header: true | ||
--> | ||
```json | ||
PUT /_cluster/decommission/awareness/{awareness_attribute_name}/{awareness_attribute_value} | ||
``` | ||
<!-- spec_insert_end --> | ||
|
||
<!-- spec_insert_start | ||
api: cluster.delete_decommission_awareness | ||
component: endpoints | ||
omit_header: true | ||
--> | ||
```json | ||
PUT /_cluster/decommission/awareness/{awareness_attribute_name}/{awareness_attribute_value} | ||
GET /_cluster/decommission/awareness/{awareness_attribute_name}/_status | ||
DELETE /_cluster/decommission/awareness | ||
``` | ||
<!-- spec_insert_end --> | ||
|
||
<!-- spec_insert_start | ||
api: cluster.put_decommission_awareness | ||
component: path_parameters | ||
--> | ||
## Path parameters | ||
|
||
Parameter | Type | Description | ||
:--- | :--- | :--- | ||
awareness_attribute_name | String | The name of awareness attribute, usually `zone`. | ||
awareness_attribute_value | String | The value of the awareness attribute. For example, if you have shards allocated in two different zones, you can give each zone a value of `zone-a` or `zoneb`. The cluster decommission operation decommissions the zone listed in the method. | ||
The following table lists the available path parameters. | ||
|
||
| Parameter | Required | Data type | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| `awareness_attribute_name` | **Required** | String | The name of the awareness attribute. | | ||
Naarcha-AWS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| `awareness_attribute_value` | **Required** | String | The value of the awareness attribute. | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The old descriptions for both of these parameters were more descriptive. Could we propagate them to the api-spec repo? |
||
|
||
<!-- spec_insert_end --> | ||
|
||
## Example requests | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.