ListTagsForResource - Amazon Simple Notification Service

ListTagsForResource

List all tags added to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon Simple Notification Service Developer Guide.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ResourceArn

The ARN of the topic for which to list tags.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Required: Yes

Response Elements

The following element is returned by the service.

Tags.member.N

The tags associated with the specified topic.

Type: Array of Tag objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AuthorizationError

Indicates that the user has been denied access to the requested resource.

HTTP Status Code: 403

ConcurrentAccess

Can't perform multiple operations on a tag simultaneously. Perform the operations sequentially.

HTTP Status Code: 400

InvalidParameter

Indicates that a request parameter does not comply with the associated constraints.

HTTP Status Code: 400

ResourceNotFound

Can’t perform the action on the specified resource. Make sure that the resource exists.

HTTP Status Code: 404

TagPolicy

The request doesn't comply with the IAM tag policy. Correct your request and then retry it.

HTTP Status Code: 400

Examples

The structure of AUTHPARAMS depends on the signature of the API request. For more information, see Examples of the complete Signature Version 4 signing process (Python) in the AWS General Reference.

Example

This example illustrates one usage of ListTagsForResource.

Sample Request

http://sns.us-west-2.amazonaws.com/&Action=ListTagsForResource &ResourceArn=arn%3Aaws%3Asns%3Aus-west-2%3A123456789012%3Atagging &Version=2010-03-31 &AUTHPARAMS

Sample Response

<ListTagsForResourceResponse> <ListTagsForResourceResult> <Tags> <member> <Value>tagValue</Value> <Key>tagKey</Key> </member> </Tags> </ListTagsForResourceResult> <ResponseMetadata> <RequestId>123456a7-b8c9-01de-fg2h-3456i7j890k1</RequestId> </ResponseMetadata> </ListTagsForResourceResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: