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

ListEnvironments

Gets a list of AWS Cloud9 development environment identifiers.

Request Syntax

{ "maxResults": number, "nextToken": "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 environments to get identifiers for.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 25.

Required: No

nextToken

During a previous call, if there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

Type: String

Required: No

Response Syntax

{ "environmentIds": [ "string" ], "nextToken": "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.

environmentIds

The list of environment identifiers.

Type: Array of strings

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

nextToken

If there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call.

Type: String

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 the IDs of available AWS Cloud9 development environments.

Sample Request

POST / HTTP/1.1 Host: cloud9.us-east-2.amazonaws.com Accept-Encoding: identity X-Amz-Target: AWSCloud9WorkspaceManagementService.ListEnvironments Authorization: AWS4-HMAC-SHA256 Credential=AKIAJ32OEXAMPLE/20180123/us-east-2/cloud9/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=17a00c64EXAMPLE X-Amz-Date: 20180123T223531Z User-Agent: aws-cli/1.14.29 Python/3.5.2 Windows/10 botocore/1.8.33 Content-Type: application/x-amz-json-1.1 Content-Length: 2 {}

Sample Response

HTTP/1.1 200 OK Date: Tue, 23 Jan 2018 22:35:34 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 230 x-amzn-RequestId: b9b13fd3-008d-11e8-a65b-093e8a557dEX Connection: Keep-alive { "environmentIds": [ "349c86d4579e4e7298d500ff57a6b2EX", "45a3da47af0840f2b0c0824f5ee232EX" ] }

See Also

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