TagResourceCommand

Tags a resource.

Example Syntax

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

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

TagResourceCommand Input

See TagResourceCommandInput for more details

Parameter
Type
Description
ResourceArn
Required
string | undefined

The resource's ARN.

Tags
Required
Record<string, string> | undefined

Tags for the resource.

TagResourceCommand Output

See TagResourceCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InternalServerException
server

An internal error occurred.

ResourceNotFoundException
client

The target resource was not found.

ValidationException
client

The request contains an invalid parameter value.

PanoramaServiceException
Base exception class for all service exceptions from Panorama service.