Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class AddTagsCommandProtected

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.

Example

Use a bare-bones client and the command you need to make an API call.

import { OpenSearchClient, AddTagsCommand } from "@aws-sdk/client-opensearch"; // ES Modules import
// const { OpenSearchClient, AddTagsCommand } = require("@aws-sdk/client-opensearch"); // CommonJS import
const client = new OpenSearchClient(config);
const input = { // AddTagsRequest
ARN: "STRING_VALUE", // required
TagList: [ // TagList // required
{ // Tag
Key: "STRING_VALUE", // required
Value: "STRING_VALUE", // required
},
],
};
const command = new AddTagsCommand(input);
const response = await client.send(command);
// {};

Param

AddTagsCommandInput

Returns

AddTagsCommandOutput

See

Throws

BaseException (client fault)

An error occurred while processing the request.

Throws

InternalException (server fault)

Request processing failed because of an unknown error, exception, or internal failure.

Throws

LimitExceededException (client fault)

An exception for trying to create more than the allowed number of resources or sub-resources.

Throws

ValidationException (client fault)

An exception for accessing or deleting a resource that doesn't exist.

Throws

OpenSearchServiceException

Base exception class for all service exceptions from OpenSearch service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods