TagResource - AWS Cloud9

TagResource

Adds tags to an AWS Cloud9 development environment.

Important

Tags that you add to an AWS Cloud9 environment by using this method will NOT be automatically propagated to underlying resources.

Request Syntax

{ "ResourceARN": "string", "Tags": [ { "Key": "string", "Value": "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 add tags to.

Type: String

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

Required: Yes

Tags

The list of tags to add to the given AWS Cloud9 development environment.

Type: Array of Tag objects

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

Required: Yes

Response Elements

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

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

ConcurrentAccessException

A concurrent access issue occurred.

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

Example

The following example shows how to add tags to an AWS Cloud9 development environment.

Sample Request

POST / HTTP/1.1 Host: cloud9.eu-west-1.amazonaws.com Accept-Encoding: identity Content-Type: application/x-amz-json-1.1 X-Amz-Date: 20191218T231127Z User-Agent: aws-cli/1.14.29 Python/3.5.2 Windows/10 botocore/1.8.33 X-Amz-Target: AWSCloud9WorkspaceManagementService.TagResource Content-Length: ... Authorization: AWS4-HMAC-SHA256 Credential=AKIAJ32OEXAMPLE/20191218/eu-west-1/cloud9/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=bb140cb4EXAMPLE { "ResourceARN": "arn:aws:cloud9:eu-west-1:123456789012:environment:8d9967e2f0624182b74e7690ad69ebEX", "Tags": [ {"Key": "key", "Value": "orange"} ] }

Sample Response

HTTP/1.1 200 OK Date: Wed, 18 Dec 2019 23:11:30 GMT Content-Type: application/x-amz-json-1.1 Content-Length: ... x-amzn-RequestId: beecb831-0092-11e8-84fe-c19e871c26EX Connection: Keep-alive {}

See Also

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