UntagResourceCommand

Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.

Example Syntax

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

import { CostExplorerClient, UntagResourceCommand } from "@aws-sdk/client-cost-explorer"; // ES Modules import
// const { CostExplorerClient, UntagResourceCommand } = require("@aws-sdk/client-cost-explorer"); // CommonJS import
const client = new CostExplorerClient(config);
const input = { // UntagResourceRequest
  ResourceArn: "STRING_VALUE", // required
  ResourceTagKeys: [ // ResourceTagKeyList // 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 Amazon Resource Name (ARN) of the resource. For a list of supported resources, see ResourceTag .

ResourceTagKeys
Required
string[] | undefined

A list of tag keys associated with tags that need to be removed from the resource. If you specify a tag key that doesn't exist, it's ignored. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.

UntagResourceCommand Output

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

Throws

Name
Fault
Details
LimitExceededException
client

You made too many calls in a short period of time. Try again later.

ResourceNotFoundException
client

The specified ARN in the request doesn't exist.

CostExplorerServiceException
Base exception class for all service exceptions from CostExplorer service.