Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class ListTagsForResourceCommandProtected

Retrieves the list of key-value tags assigned to the resource.

Example

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

import { AppConfigClient, ListTagsForResourceCommand } from "@aws-sdk/client-appconfig"; // ES Modules import
// const { AppConfigClient, ListTagsForResourceCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import
const client = new AppConfigClient(config);
const input = { // ListTagsForResourceRequest
ResourceArn: "STRING_VALUE", // required
};
const command = new ListTagsForResourceCommand(input);
const response = await client.send(command);
// { // ResourceTags
// Tags: { // TagMap
// "<keys>": "STRING_VALUE",
// },
// };

Param

ListTagsForResourceCommandInput

Returns

ListTagsForResourceCommandOutput

See

Throws

BadRequestException (client fault)

The input fails to satisfy the constraints specified by an Amazon Web Services service.

Throws

InternalServerException (server fault)

There was an internal failure in the AppConfig service.

Throws

ResourceNotFoundException (client fault)

The requested resource could not be found.

Throws

AppConfigServiceException

Base exception class for all service exceptions from AppConfig service.

Example

To list the tags of an application

// The following list-tags-for-resource example lists the tags of a specified application.
const input = {
"ResourceArn": "arn:aws:appconfig:us-east-1:111122223333:application/339ohji"
};
const command = new ListTagsForResourceCommand(input);
const response = await client.send(command);
/* response ==
{
"Tags": {
"group1": "1"
}
}
*/
// example id: to-list-the-tags-of-an-application-1632328796560

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods