- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
TagResourceCommand
Add a tag to a Amazon SWF domain.
Amazon SWF supports a maximum of 50 tags per resource.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SWFClient, TagResourceCommand } from "@aws-sdk/client-swf"; // ES Modules import
// const { SWFClient, TagResourceCommand } = require("@aws-sdk/client-swf"); // CommonJS import
const client = new SWFClient(config);
const input = { // TagResourceInput
resourceArn: "STRING_VALUE", // required
tags: [ // ResourceTagList // required
{ // ResourceTag
key: "STRING_VALUE", // required
value: "STRING_VALUE",
},
],
};
const command = new TagResourceCommand(input);
const response = await client.send(command);
// {};
TagResourceCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
resourceArn Required | string | undefined | The Amazon Resource Name (ARN) for the Amazon SWF domain. |
tags Required | ResourceTag[] | undefined | The list of tags to add to a domain. Tags may only contain unicode letters, digits, whitespace, or these symbols: |
TagResourceCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
LimitExceededFault | client | Returned by any operation if a system imposed limitation has been reached. To address this fault you should either clean up unused resources or increase the limit by contacting AWS. |
OperationNotPermittedFault | client | Returned when the caller doesn't have sufficient permissions to invoke the action. |
TooManyTagsFault | client | You've exceeded the number of tags allowed for a domain. |
UnknownResourceFault | client | Returned when the named resource cannot be found with in the scope of this operation (region or domain). This could happen if the named resource was never created or is no longer available for this operation. |
SWFServiceException | Base exception class for all service exceptions from SWF service. |