AWS CodePipeline
API Reference (API Version 2015-07-09)

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

ListTagsForResource

Gets the set of key-value pairs (metadata) that are used to manage the resource.

Request Syntax

{ "maxResults": number, "nextToken": "string", "resourceArn": "string" }

Request Parameters

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

The request accepts the following data in JSON format.

maxResults

The maximum number of results to return in a single call.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

nextToken

The token that was returned from the previous API call, which would be used to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.

Type: String

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

Required: No

resourceArn

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

Type: String

Pattern: arn:aws(-[\w]+)*:codepipeline:.+:[0-9]{12}:.+

Required: Yes

Response Syntax

{ "nextToken": "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.

nextToken

If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent API call to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.

Type: String

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

tags

The tags for the resource.

Type: Array of Tag objects

Errors

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

InvalidArnException

The specified resource ARN is invalid.

HTTP Status Code: 400

InvalidNextTokenException

The next token was specified in an invalid format. Make sure that the next token you provide is the token returned by a previous call.

HTTP Status Code: 400

ResourceNotFoundException

The resource was specified in an invalid format.

HTTP Status Code: 400

ValidationException

The validation was specified in an invalid format.

HTTP Status Code: 400

See Also

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