Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class TagResourceCommandProtected

Deprecated

Adds or overwrites one or more tags for the specified resource, such as a fleet. Each tag consists of a key and an optional value. If a resource already has a tag with the same key, this operation updates its value.

Example

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

import { WorkLinkClient, TagResourceCommand } from "@aws-sdk/client-worklink"; // ES Modules import
// const { WorkLinkClient, TagResourceCommand } = require("@aws-sdk/client-worklink"); // CommonJS import
const client = new WorkLinkClient(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

InvalidRequestException (client fault)

The request is not valid.

Throws

WorkLinkServiceException

Base exception class for all service exceptions from WorkLink service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods