UntagResourceCommand

Removes one or more tags from the specified EventBridge resource. In Amazon EventBridge (CloudWatch Events), rules and event buses can be tagged.

Example Syntax

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

import { CloudWatchEventsClient, UntagResourceCommand } from "@aws-sdk/client-cloudwatch-events"; // ES Modules import
// const { CloudWatchEventsClient, UntagResourceCommand } = require("@aws-sdk/client-cloudwatch-events"); // CommonJS import
const client = new CloudWatchEventsClient(config);
const input = { // UntagResourceRequest
  ResourceARN: "STRING_VALUE", // required
  TagKeys: [ // TagKeyList // 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 EventBridge resource from which you are removing tags.

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
ConcurrentModificationException
client

There is concurrent modification on a rule, target, archive, or replay.

InternalException
server

This exception occurs due to unexpected causes.

ManagedRuleException
client

This rule was created by an Amazon Web Services service on behalf of your account. It is managed by that service. If you see this error in response to DeleteRule or RemoveTargets, you can use the Force parameter in those calls to delete the rule or remove targets from the rule. You cannot modify these managed rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, or UntagResource.

ResourceNotFoundException
client

An entity that you specified does not exist.

CloudWatchEventsServiceException
Base exception class for all service exceptions from CloudWatchEvents service.