- 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
The resource to tag. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { MediaTailorClient, TagResourceCommand } from "@aws-sdk/client-mediatailor"; // ES Modules import
// const { MediaTailorClient, TagResourceCommand } = require("@aws-sdk/client-mediatailor"); // CommonJS import
const client = new MediaTailorClient(config);
const input = { // TagResourceRequest
ResourceArn: "STRING_VALUE", // required
Tags: { // __mapOf__string // required
"<keys>": "STRING_VALUE",
},
};
const command = new TagResourceCommand(input);
const response = await client.send(command);
// {};
TagResourceCommand Input
See TagResourceCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ResourceArn Required | string | undefined | The Amazon Resource Name (ARN) associated with the resource. |
Tags Required | Record<string, string> | undefined | The tags to assign to the resource. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources . |
TagResourceCommand Output
See TagResourceCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
BadRequestException | client | A request contains unexpected data. |
MediaTailorServiceException | Base exception class for all service exceptions from MediaTailor service. |