Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class TagResourceCommandProtected

Assigns metadata to an AppConfig resource. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define. You can specify a maximum of 50 tags for a resource.

Example

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

import { AppConfigClient, TagResourceCommand } from "@aws-sdk/client-appconfig"; // ES Modules import
// const { AppConfigClient, TagResourceCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import
const client = new AppConfigClient(config);
const input = { // TagResourceRequest
ResourceArn: "STRING_VALUE", // required
Tags: { // TagMap // required
"<keys>": "STRING_VALUE",
},
};
const command = new TagResourceCommand(input);
const response = await client.send(command);
// {};

Param

TagResourceCommandInput

Returns

TagResourceCommandOutput

See

Throws

BadRequestException (client fault)

The input fails to satisfy the constraints specified by an Amazon Web Services service.

Throws

InternalServerException (server fault)

There was an internal failure in the AppConfig service.

Throws

ResourceNotFoundException (client fault)

The requested resource could not be found.

Throws

AppConfigServiceException

Base exception class for all service exceptions from AppConfig service.

Example

To tag an application

// The following tag-resource example tags an application resource.
const input = {
"ResourceArn": "arn:aws:appconfig:us-east-1:111122223333:application/339ohji",
"Tags": {
"group1": "1"
}
};
const command = new TagResourceCommand(input);
await client.send(command);
// example id: to-tag-an-application-1632330350645

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<TagResourceCommandInput, TagResourceCommandOutput>

Methods