UntagResourceCommand

Remove one or more tags (keys and values) from a specified resource.

Example Syntax

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

import { PinpointEmailClient, UntagResourceCommand } from "@aws-sdk/client-pinpoint-email"; // ES Modules import
// const { PinpointEmailClient, UntagResourceCommand } = require("@aws-sdk/client-pinpoint-email"); // CommonJS import
const client = new PinpointEmailClient(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 Amazon Resource Name (ARN) of the resource that you want to remove one or more tags from.

TagKeys
Required
string[] | undefined

The tags (tag keys) that you want to remove from the resource. When you specify a tag key, the action removes both that key and its associated tag value.

To remove more than one tag from the resource, append the TagKeys parameter and argument for each additional tag to remove, separated by an ampersand. For example: /v1/email/tags?ResourceArn=ResourceArn&TagKeys=Key1&TagKeys=Key2

UntagResourceCommand Output

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

Throws

Name
Fault
Details
BadRequestException
client

The input you provided is invalid.

ConcurrentModificationException
server

The resource is being modified by another operation or thread.

NotFoundException
client

The resource you attempted to access doesn't exist.

TooManyRequestsException
client

Too many requests have been made to the operation.

PinpointEmailServiceException
Base exception class for all service exceptions from PinpointEmail service.