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",
"connectionType": "string",
"description": "string",
"id": "string",
"lifecycle": {
"failureResource": "string",
"reason": "string",
"status": "string"
},
"managedCredentialsStatus": "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
Examples
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:eu-west-1:5***********:environment:d27b18648f174491be6cc6777f1ee66c",
"description": "foo",
"id": "d27b18648f174491be6cc6777f1ee66c",
"ideTemplateId": "cee38068079f4d399cbab9ecc9f955c2",
"lifecycle":
{"reasonCode": "CREATE_SUCCESS",
"status": "CREATED"},
"managedCredentialsStatus": "DISABLED_BY_COLLABORATOR",
"name": "foo",
"ownerArn": "arn:aws:iam::5***********:user/usname",
"type": "ec2"},
{"arn": "arn:aws:cloud9:eu-west-1:516690746032:environment:588b0e9bc3134815a4f090b4cca49e84",
"description": "",
"id": "588b0e9bc3134815a4f090b4cca49e84",
"ideTemplateId": "cee38068079f4d399cbab9ecc9f955c2",
"lifecycle":
{"reasonCode": "CREATE_SUCCESS",
"status": "CREATED"},
"name": "TestEnv",
"ownerArn": "arn:aws:iam::XXXXXXXXXXXX:user/USERNAME",
"managedCredentialsStatus": "ENABLED_BY_OWNER",
"type": "ec2"}
]
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: