-
Notifications
You must be signed in to change notification settings - Fork 565
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
Open
Naarcha-AWS
wants to merge
41
commits into
main
Choose a base branch
from
cluster-apis
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
8234ec2
Add markers for cluster APIs.
Naarcha-AWS 9ac0957
Merge branch 'main' into cluster-apis
Naarcha-AWS 7f0f39b
Add rest of cluster inserts
Naarcha-AWS 44d9145
Merge branch 'main' into cluster-apis
Naarcha-AWS 94b4cd1
Adjust tables. Add example requests and responses.
Naarcha-AWS eff3c78
Merge branch 'main' into cluster-apis
Naarcha-AWS 645f9e1
Apply suggestions from code review
Naarcha-AWS b713b3b
Apply suggestions from code review
Naarcha-AWS bab9e3c
Merge branch 'main' into cluster-apis
Naarcha-AWS 5607382
Merge branch 'main' into cluster-apis
Naarcha-AWS 5f60253
Merge branch 'main' into cluster-apis
Naarcha-AWS 7550e90
Remove depracated parameters.
Naarcha-AWS 5fbb2c4
One last deprecated parameter
Naarcha-AWS 19b60e4
Description additions.
Naarcha-AWS ecdce80
Merge branch 'main' into cluster-apis
Naarcha-AWS 7c8ea81
Fix formatting error.
Naarcha-AWS 662c507
Apply suggestions from code review
Naarcha-AWS 403e330
Apply suggestions from code review
Naarcha-AWS 999aef7
Apply suggestions from code review
Naarcha-AWS 9ea5bc7
Apply suggestions from code review
Naarcha-AWS 93cfb7b
Fix other marker items and other feedback
Naarcha-AWS 96a153f
Fix code examples
Naarcha-AWS 437d733
Merge branch 'main' into cluster-apis
Naarcha-AWS 00f78ef
Merge branch 'main' into cluster-apis
Naarcha-AWS 1028bcd
Remove query parameters section
Naarcha-AWS aaaa1d1
Fix example request
Naarcha-AWS 66dd54d
Add incoporated spec feedback
Naarcha-AWS 276d0fe
Update cluster-reroute.md
Naarcha-AWS bb0b96b
Additional feedback
Naarcha-AWS 6862a85
Remove deprecated setting
Naarcha-AWS 605ee18
Merge branch 'main' into cluster-apis
Naarcha-AWS 9f8070c
Add latest spec edits
Naarcha-AWS ec2f046
Merge branch 'main' into cluster-apis
Naarcha-AWS 9bba42f
Merge branch 'main' into cluster-apis
Naarcha-AWS 1abf796
Add updated spec information
Naarcha-AWS f471be0
Merge branch 'main' into cluster-apis
Naarcha-AWS b1651bd
Merge branch 'main' into cluster-apis
Naarcha-AWS 8aeefa5
Apply suggestions from code review
Naarcha-AWS 6b0f332
Merge branch 'main' into cluster-apis
Naarcha-AWS ae591b2
Apply suggestions from code review
Naarcha-AWS fd14571
Apply suggestions from code review
Naarcha-AWS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
142 changes: 142 additions & 0 deletions
142
_api-reference/cluster-api/cluster-component-template.md
This file contains hidden or 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,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 API creates or updates the cluster's component templates. | ||
|
||
# Endpoints | ||
|
||
The `GET` method returns one or more component templates: | ||
|
||
<!-- 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 component template exists: | ||
|
||
<!-- 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: | ||
|
||
<!-- 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: | ||
|
||
<!-- 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`, and `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 Settings API]({{site.url}}{{site.baseurl}}/api-reference/cluster-api/cluster-settings/). | | ||
|
||
<!-- 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 | The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters]({{site.url}}{{site.baseurl}}/api-reference/common-parameters/#time-units). | N/A | | ||
| `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 | | ||
|
||
<!-- 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 | ||
} | ||
``` |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.