UntagResourceCommand

Removes a tag assigned to a Amazon GameLift resource. You can use resource tags to organize Amazon Web Services resources for a range of purposes. This operation handles the permissions necessary to manage tags for Amazon GameLift resources that support tagging.

To remove a tag from a resource, specify the unique ARN value for the resource and provide a string list containing one or more tags to remove. This operation succeeds even if the list includes tags that aren't assigned to the resource.

Learn more

Tagging Amazon Web Services Resources  in the Amazon Web Services General Reference

Related actions

Example Syntax

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

import { GameLiftClient, UntagResourceCommand } from "@aws-sdk/client-gamelift"; // ES Modules import
// const { GameLiftClient, UntagResourceCommand } = require("@aws-sdk/client-gamelift"); // CommonJS import
const client = new GameLiftClient(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 ) that uniquely identifies the Amazon GameLift resource that you want to remove tags from. Amazon GameLift includes resource ARNs in the data object for the resource. You can retrieve the ARN by calling a List or Describe operation for the resource type.

TagKeys
Required
string[] | undefined

A list of one or more tag keys to remove from the specified Amazon GameLift resource.

UntagResourceCommand Output

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

Throws

Name
Fault
Details
InternalServiceException
server

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

InvalidRequestException
client

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

NotFoundException
client

The requested resources was not found. The resource was either not created yet or deleted.

TaggingFailedException
client

The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.

UnsupportedRegionException
client

The requested operation is not supported in the Region specified.

GameLiftServiceException
Base exception class for all service exceptions from GameLift service.