UntagResourceCommand

Removes one or more tags from the specified resource.

Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the oam:ResourceTag permission. The iam:TagResource permission does not allow you to tag and untag links and sinks.

Example Syntax

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

import { OAMClient, UntagResourceCommand } from "@aws-sdk/client-oam"; // ES Modules import
// const { OAMClient, UntagResourceCommand } = require("@aws-sdk/client-oam"); // CommonJS import
const client = new OAMClient(config);
const input = { // UntagResourceInput
  ResourceArn: "STRING_VALUE", // required
  TagKeys: [ // TagKeys // required
    "STRING_VALUE",
  ],
};
const command = new UntagResourceCommand(input);
const response = await client.send(command);
// {};

UntagResourceCommand Input

See UntagResourceCommandInput for more details

Parameter
Type
Description
ResourceArn
Required
string | undefined

The ARN of the resource that you're removing tags from.

The ARN format of a sink is arn:aws:oam:Region:account-id:sink/sink-id

The ARN format of a link is arn:aws:oam:Region:account-id:link/link-id

For more information about ARN format, see CloudWatch Logs resources and operations .

TagKeys
Required
string[] | undefined

The list of tag keys to remove from the resource.

UntagResourceCommand Output

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

Throws

Name
Fault
Details
ResourceNotFoundException
client

The request references a resource that does not exist.

ValidationException
client

The value of a parameter in the request caused an error.

OAMServiceException
Base exception class for all service exceptions from OAM service.