Jump to Content

Class TagResourceCommandProtected

Deprecated

Creates a tag for the specified resource.

Example

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

import { IoTThingsGraphClient, TagResourceCommand } from "@aws-sdk/client-iotthingsgraph"; // ES Modules import
// const { IoTThingsGraphClient, TagResourceCommand } = require("@aws-sdk/client-iotthingsgraph"); // CommonJS import
const client = new IoTThingsGraphClient(config);
const input = { // TagResourceRequest
resourceArn: "STRING_VALUE", // required
tags: [ // TagList // required
{ // Tag
key: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
};
const command = new TagResourceCommand(input);
const response = await client.send(command);

Param

TagResourceCommandInput

Returns

TagResourceCommandOutput

See

Throws

InternalFailureException (server fault)

Throws

InvalidRequestException (client fault)

Throws

ResourceAlreadyExistsException (client fault)

Throws

ThrottlingException (client fault)

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<TagResourceCommandInput, TagResourceCommandOutput>

Methods