TagResourceCommand

Applies tag values to a behavior graph.

Example Syntax

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

import { DetectiveClient, TagResourceCommand } from "@aws-sdk/client-detective"; // ES Modules import
// const { DetectiveClient, TagResourceCommand } = require("@aws-sdk/client-detective"); // CommonJS import
const client = new DetectiveClient(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 ARN of the behavior graph to assign the tags to.

Tags
Required
Record<string, string> | undefined

The tags to assign to the behavior graph. You can add up to 50 tags. For each tag, you provide the tag key and the tag value. Each tag key can contain up to 128 characters. Each tag value can contain up to 256 characters.

TagResourceCommand Output

See TagResourceCommandOutput for details

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

Throws

Name
Fault
Details
AccessDeniedException
client

The request issuer does not have permission to access this resource or perform this operation.

InternalServerException
server

The request was valid but failed because of a problem with the service.

ResourceNotFoundException
client

The request refers to a nonexistent resource.

ValidationException
client

The request parameters are invalid.

DetectiveServiceException
Base exception class for all service exceptions from Detective service.