ListTagsForResource - AWS Marketplace Catalog API

ListTagsForResource

Lists all tags that have been added to a resource (either an entity or change set).

Request Syntax

POST /ListTagsForResource HTTP/1.1 Content-type: application/json { "ResourceArn": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

ResourceArn

Required. The Amazon Resource Name (ARN) associated with the resource you want to list tags on.

Type: String

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

Pattern: ^arn:[\w+=/,.@-]+:aws-marketplace:[\w+=/,.@-]*:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)*$

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "ResourceArn": "string", "Tags": [ { "Key": "string", "Value": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ResourceArn

Required. The ARN associated with the resource you want to list tags on.

Type: String

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

Pattern: ^arn:[\w+=/,.@-]+:aws-marketplace:[\w+=/,.@-]*:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)*$

Tags

Required. A list of objects specifying each key name and value. Number of objects allowed: 1-50.

Type: Array of Tag objects

Array Members: Minimum number of 1 item. Maximum number of 200 items.

Errors

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

AccessDeniedException

Access is denied.

HTTP status code: 403

HTTP Status Code: 403

InternalServiceException

There was an internal service exception.

HTTP status code: 500

HTTP Status Code: 500

ResourceNotFoundException

The specified resource wasn't found.

HTTP status code: 404

HTTP Status Code: 404

ThrottlingException

Too many requests.

HTTP status code: 429

HTTP Status Code: 429

ValidationException

An error occurred during validation.

HTTP status code: 422

HTTP Status Code: 422

See Also

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