AddTags
Attaches tags to an existing Amazon OpenSearch Service domain. Tags are a set of case-sensitive key-value pairs. A domain can have up to 10 tags. For more information, see Tagging Amazon OpenSearch Service domains.
Request Syntax
POST /2021-01-01/tags HTTP/1.1
Content-type: application/json
{
"ARN": "string
",
"TagList": [
{
"Key": "string
",
"Value": "string
"
}
]
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
Response Syntax
HTTP/1.1 200
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors.
- BaseException
-
An error occurred while processing the request.
HTTP Status Code: 400
- InternalException
-
Request processing failed because of an unknown error, exception, or internal failure.
HTTP Status Code: 500
- LimitExceededException
-
An exception for trying to create more than the allowed number of resources or sub-resources.
HTTP Status Code: 409
- ValidationException
-
An exception for accessing or deleting a resource that doesn't exist.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of AddTags.
Sample Request
POST /2021-01-01/tags HTTP/1.1
Host: es.us-east-1.amazonaws.com
Accept-Encoding: identity
Content-Type: application/json
User-Agent: aws-cli/2.15.13 Python/3.11.6 Windows/10 exe/AMD64 prompt/off command/opensearch.add-tags
X-Amz-Date: 20240212T212009Z
X-Amz-Security-Token: IQoJb3JpZ2luX2VjEI3wEaCXVz==
Authorization: AWS4-HMAC-SHA256 Credential=ASIAU/20240212/us-east-1/es/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token, Signature=92f6df10a81b7b553dbdab348594794df6272ea6799e4e9bae8aec96cfa44510
Content-Length: 118
{"ARN": "arn:aws:es:us-east-1:123456789012:domain/marketing", "TagList": [{"Key": "department", "Value": "marketing"}]}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: 6ab4cde74-63fg-4h65-1101-d1112f029bbb
Content-Type: application/json
Content-Length: 0
Date: Mon, 12 Feb 2024 21:20:10 GMT
Connection: keep-alive
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: