GetTagsCommand

Retrieves a list of tags associated with a resource.

Example Syntax

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

import { GlueClient, GetTagsCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, GetTagsCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // GetTagsRequest
  ResourceArn: "STRING_VALUE", // required
};
const command = new GetTagsCommand(input);
const response = await client.send(command);
// { // GetTagsResponse
//   Tags: { // TagsMap
//     "<keys>": "STRING_VALUE",
//   },
// };

GetTagsCommand Input

See GetTagsCommandInput for more details

Parameter
Type
Description
ResourceArn
Required
string | undefined

The Amazon Resource Name (ARN) of the resource for which to retrieve tags.

GetTagsCommand Output

See GetTagsCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Tags
Record<string, string> | undefined

The requested tags.

Throws

Name
Fault
Details
EntityNotFoundException
client

A specified entity does not exist

InternalServiceException
server

An internal service error occurred.

InvalidInputException
client

The input provided was not valid.

OperationTimeoutException
client

The operation timed out.

GlueServiceException
Base exception class for all service exceptions from Glue service.