ListTagsForResource - AWS Cloud9

ListTagsForResource

Gets a list of the tags associated with an AWS Cloud9 development environment.

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 AWS Cloud9 development environment to get the tags for.

Type: String

Pattern: arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):cloud9:([a-z]{2}-[a-z]+-\d{1}):[0-9]{12}:environment:[a-zA-Z0-9]{8,32}

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

The list of tags associated with the AWS Cloud9 development environment.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Errors

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

BadRequestException

The target request is invalid.

HTTP Status Code: 400

InternalServerErrorException

An internal server error occurred.

HTTP Status Code: 500

NotFoundException

The target resource cannot be found.

HTTP Status Code: 400

Examples

Example

The following example shows now to get a list of the tags that are associated with an AWS Cloud9 development environment.

Sample Request

POST / HTTP/1.1 Host: cloud9.<region>.amazonaws.com Accept-Encoding: identity Content-Type: application/x-amz-json-1.1 X-Amz-Date: <Date> User-Agent: <UserAgentString> X-Amz-Target: AWSCloud9WorkspaceManagementService.ListTagsForResource Content-Length: <PayloadSizeBytes> Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature> { "ResourceARN": "arn:aws:cloud9:eu-west-1:123456789012:environment:8d9967e2f0624182b74e7690ad69ebEX", }

Sample Response

HTTP/1.1 200 OK Date: <Date> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> x-amzn-RequestId: <RequestId> Connection: Keep-alive { "Tags": [ { "Key": "key", "Value": "orange" } ] }

See Also

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