- 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.
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
Parameter | Type | Description |
---|
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 The ARN format of a link is 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 |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
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. |