AWS Cloud9
API Reference (API Version 2017-09-23)

DescribeEnvironments

Gets information about AWS Cloud9 development environments.

Request Syntax

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

environmentIds

The IDs of individual environments to get information about.

Type: Array of strings

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

Pattern: ^[a-zA-Z0-9]{8,32}$

Required: Yes

Response Syntax

{ "environments": [ { "arn": "string", "description": "string", "id": "string", "name": "string", "ownerArn": "string", "type": "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.

environments

Information about the environments that are returned.

Type: Array of Environment objects

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

ConflictException

A conflict occurred.

HTTP Status Code: 400

ForbiddenException

An access permissions issue occurred.

HTTP Status Code: 400

InternalServerErrorException

An internal server error occurred.

HTTP Status Code: 500

LimitExceededException

A service limit was exceeded.

HTTP Status Code: 400

NotFoundException

The target resource cannot be found.

HTTP Status Code: 400

TooManyRequestsException

Too many service requests were made over the given time period.

HTTP Status Code: 400

Example

The following example gets information about the specified AWS Cloud9 development environments.

Sample Request

POST / HTTP/1.1 Host: cloud9.us-east-2.amazonaws.com Accept-Encoding: identity X-Amz-Date: 20180123T225030Z Content-Length: 92 Authorization: AWS4-HMAC-SHA256 Credential=AKIAJ32OEXAMPLE/20180123/us-east-2/cloud9/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=ca32a303EXAMPLE Content-Type: application/x-amz-json-1.1 X-Amz-Target: AWSCloud9WorkspaceManagementService.DescribeEnvironments User-Agent: aws-cli/1.14.29 Python/3.5.2 Windows/10 botocore/1.8.33 { "environmentIds": [ "8d9967e2f0624182b74e7690ad69ebEX", "349c86d4579e4e7298d500ff57a6b2EX" ] }

Sample Response

HTTP/1.1 200 OK Date: Tue, 23 Jan 2018 22:50:31 GMT Content-Type: application/x-amz-json-1.1 Content-Length: ... x-amzn-RequestId: d06763f8-008f-11e8-801f-9b144f0315EX Connection: Keep-alive { "environments": [ { "arn":"arn:aws:cloud9:us-east-2:123456789012:environment:8d9967e2f0624182b74e7690ad69ebEX", "description": "This is my demonstration environment.", "id": "8d9967e2f0624182b74e7690ad69ebEX", "name": "my-demo-environment", "ownerArn": "arn:aws:iam::123456789012:user/MyDemoUser", "type": "ec2" }, { "arn": "arn:aws:cloud9:us-east-2:123456789012:environment:349c86d4579e4e7298d500ff57a6b2EX", "id": "349c86d4579e4e7298d500ff57a6b2EX", "name": "another-demo-environment", "ownerArn": "arn:aws:sts::123456789012:assumed-role/AnotherDemoUser/AnotherDemoUser", "type": "ssh" } ] }

See Also

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