Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class AddTagsCommandProtected

Adds tags to an Amazon EMR resource, such as a cluster or an Amazon EMR Studio. Tags make it easier to associate resources in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.

Example

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

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

Param

AddTagsCommandInput

Returns

AddTagsCommandOutput

See

Throws

InternalServerException (server fault)

This exception occurs when there is an internal failure in the Amazon EMR service.

Throws

InvalidRequestException (client fault)

This exception occurs when there is something wrong with user input.

Throws

EMRServiceException

Base exception class for all service exceptions from EMR service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods