ListTagsForResource - AWS Global Accelerator

ListTagsForResource

List all tags for an accelerator.

For more information, see Tagging in AWS Global Accelerator in the AWS Global Accelerator Developer Guide.

Request Syntax

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

ResourceArn

The Amazon Resource Name (ARN) of the accelerator to list tags for. An ARN uniquely identifies an accelerator.

Type: String

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

Required: Yes

Response Syntax

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

Tags

Root level tag for the Tags parameters.

Type: Array of Tag objects

Errors

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

AcceleratorNotFoundException

The accelerator that you specified doesn't exist.

HTTP Status Code: 400

AttachmentNotFoundException

No cross-account attachment was found.

HTTP Status Code: 400

EndpointGroupNotFoundException

The endpoint group that you specified doesn't exist.

HTTP Status Code: 400

InternalServiceErrorException

There was an internal error for AWS Global Accelerator.

HTTP Status Code: 400

InvalidArgumentException

An argument that you specified is invalid.

HTTP Status Code: 400

ListenerNotFoundException

The listener that you specified doesn't exist.

HTTP Status Code: 400

Examples

List tags for an accelerator

The following is an example for listing tags for an accelerator.

aws globalaccelerator list-tags-for-resource --accelerator-arn arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh
{ "Tags": [ { "Key": "Project", "Value": "A123456" } ] }

See Also

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