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.
Protected
Adds the specified tags to the specified Direct Connect resource. Each resource can have a maximum of 50 tags.
Each tag consists of a key and an optional value. If a tag with the same key is already associated with the resource, this action updates its value.
Use a bare-bones client and the command you need to make an API call.
import { DirectConnectClient, TagResourceCommand } from "@aws-sdk/client-direct-connect"; // ES Modules import// const { DirectConnectClient, TagResourceCommand } = require("@aws-sdk/client-direct-connect"); // CommonJS importconst client = new DirectConnectClient(config);const input = { // TagResourceRequest resourceArn: "STRING_VALUE", // required tags: [ // TagList // required { // Tag key: "STRING_VALUE", // required value: "STRING_VALUE", }, ],};const command = new TagResourceCommand(input);const response = await client.send(command);// {};
TagResourceCommandInput
TagResourceCommandOutput
input
response
config
DirectConnectClientException (client fault)
One or more parameters are not valid.
DirectConnectServerException (server fault)
A server-side error occurred.
DuplicateTagKeysException (client fault)
A tag key was specified more than once.
TooManyTagsException (client fault)
You have reached the limit on the number of tags that can be assigned.
DirectConnectServiceException
Base exception class for all service exceptions from DirectConnect service.
Readonly
Static
Adds the specified tags to the specified Direct Connect resource. Each resource can have a maximum of 50 tags.
Each tag consists of a key and an optional value. If a tag with the same key is already associated with the resource, this action updates its value.
Example
Use a bare-bones client and the command you need to make an API call.
Param
TagResourceCommandInput
Returns
TagResourceCommandOutput
See
input
shape.response
shape.config
shape.Throws
DirectConnectClientException (client fault)
One or more parameters are not valid.
Throws
DirectConnectServerException (server fault)
A server-side error occurred.
Throws
DuplicateTagKeysException (client fault)
A tag key was specified more than once.
Throws
TooManyTagsException (client fault)
You have reached the limit on the number of tags that can be assigned.
Throws
DirectConnectServiceException
Base exception class for all service exceptions from DirectConnect service.