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

Adds one or more tags to the specified resource.

The WorkloadArn parameter can be either a workload ARN or a custom lens ARN.

Example

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

import { WellArchitectedClient, TagResourceCommand } from "@aws-sdk/client-wellarchitected"; // ES Modules import
// const { WellArchitectedClient, TagResourceCommand } = require("@aws-sdk/client-wellarchitected"); // CommonJS import
const client = new WellArchitectedClient(config);
const input = { // TagResourceInput
WorkloadArn: "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

InternalServerException (server fault)

There is a problem with the Well-Architected Tool API service.

Throws

ResourceNotFoundException (client fault)

The requested resource was not found.

Throws

WellArchitectedServiceException

Base exception class for all service exceptions from WellArchitected service.

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<TagResourceCommandInput, TagResourceCommandOutput>

Methods