TagResourceCommand

Adds the specified tags to the specified resource. The following resources support tagging in License Manager:

  • Licenses

  • Grants

  • License configurations

  • Report generators

Example Syntax

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

import { LicenseManagerClient, TagResourceCommand } from "@aws-sdk/client-license-manager"; // ES Modules import
// const { LicenseManagerClient, TagResourceCommand } = require("@aws-sdk/client-license-manager"); // CommonJS import
const client = new LicenseManagerClient(config);
const input = { // TagResourceRequest
  ResourceArn: "STRING_VALUE", // required
  Tags: [ // TagList // required
    { // Tag
      Key: "STRING_VALUE",
      Value: "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

Amazon Resource Name (ARN) of the resource. The following examples provide an example ARN for each supported resource in License Manager:

  • Licenses - arn:aws:license-manager::111122223333:license:l-EXAMPLE2da7646d6861033667f20e895

  • Grants - arn:aws:license-manager::111122223333:grant:g-EXAMPLE7b19f4a0ab73679b0beb52707

  • License configurations - arn:aws:license-manager:us-east-1:111122223333:license-configuration:lic-EXAMPLE6a788d4c8acd4264ff0ecf2ed2d

  • Report generators - arn:aws:license-manager:us-east-1:111122223333:report-generator:r-EXAMPLE825b4a4f8fe5a3e0c88824e5fc6

Tags
Required
Tag[] | undefined

One or more tags.

TagResourceCommand Output

See TagResourceCommandOutput for details

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

Throws

Name
Fault
Details
AccessDeniedException
client

Access to resource denied.

AuthorizationException
client

The Amazon Web Services user account does not have permission to perform the action. Check the IAM policy associated with this account.

InvalidParameterValueException
client

One or more parameter values are not valid.

RateLimitExceededException
client

Too many requests have been submitted. Try again after a brief wait.

ServerInternalException
server

The server experienced an internal error. Try again.

LicenseManagerServiceException
Base exception class for all service exceptions from LicenseManager service.