RemoveTagsFromResourceCommand

Removes one or more tags from the specified resource. This operation is supported in storage gateways of all types.

Example Syntax

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

import { StorageGatewayClient, RemoveTagsFromResourceCommand } from "@aws-sdk/client-storage-gateway"; // ES Modules import
// const { StorageGatewayClient, RemoveTagsFromResourceCommand } = require("@aws-sdk/client-storage-gateway"); // CommonJS import
const client = new StorageGatewayClient(config);
const input = { // RemoveTagsFromResourceInput
  ResourceARN: "STRING_VALUE", // required
  TagKeys: [ // TagKeys // required
    "STRING_VALUE",
  ],
};
const command = new RemoveTagsFromResourceCommand(input);
const response = await client.send(command);
// { // RemoveTagsFromResourceOutput
//   ResourceARN: "STRING_VALUE",
// };

Example Usage

 There was an error loading the code editor. Retry

RemoveTagsFromResourceCommand Input

Parameter
Type
Description
ResourceARN
Required
string | undefined

The Amazon Resource Name (ARN) of the resource you want to remove the tags from.

TagKeys
Required
string[] | undefined

The keys of the tags you want to remove from the specified resource. A tag is composed of a key-value pair.

RemoveTagsFromResourceCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ResourceARN
string | undefined

The Amazon Resource Name (ARN) of the resource that the tags were removed from.

Throws

Name
Fault
Details
InternalServerError
server

An internal server error has occurred during the request. For more information, see the error and message fields.

InvalidGatewayRequestException
client

An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

StorageGatewayServiceException
Base exception class for all service exceptions from StorageGateway service.