Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class ListTagsForResourceCommandProtected

Displays the tags associated with a CloudWatch Logs resource. Currently, log groups and destinations support tagging.

Example

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

import { CloudWatchLogsClient, ListTagsForResourceCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import
// const { CloudWatchLogsClient, ListTagsForResourceCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import
const client = new CloudWatchLogsClient(config);
const input = { // ListTagsForResourceRequest
resourceArn: "STRING_VALUE", // required
};
const command = new ListTagsForResourceCommand(input);
const response = await client.send(command);
// { // ListTagsForResourceResponse
// tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// };

Param

ListTagsForResourceCommandInput

Returns

ListTagsForResourceCommandOutput

See

Throws

InvalidParameterException (client fault)

A parameter is specified incorrectly.

Throws

ResourceNotFoundException (client fault)

The specified resource does not exist.

Throws

ServiceUnavailableException (server fault)

The service cannot complete the request.

Throws

CloudWatchLogsServiceException

Base exception class for all service exceptions from CloudWatchLogs service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods