describe_environments
(**kwargs)¶Gets information about Cloud9 development environments.
See also: AWS API Documentation
Request Syntax
response = client.describe_environments(
environmentIds=[
'string',
]
)
[REQUIRED]
The IDs of individual environments to get information about.
{
'environments': [
{
'id': 'string',
'name': 'string',
'description': 'string',
'type': 'ssh'|'ec2',
'connectionType': 'CONNECT_SSH'|'CONNECT_SSM',
'arn': 'string',
'ownerArn': 'string',
'lifecycle': {
'status': 'CREATING'|'CREATED'|'CREATE_FAILED'|'DELETING'|'DELETE_FAILED',
'reason': 'string',
'failureResource': 'string'
},
'managedCredentialsStatus': 'ENABLED_ON_CREATE'|'ENABLED_BY_OWNER'|'DISABLED_BY_DEFAULT'|'DISABLED_BY_OWNER'|'DISABLED_BY_COLLABORATOR'|'PENDING_REMOVAL_BY_COLLABORATOR'|'PENDING_START_REMOVAL_BY_COLLABORATOR'|'PENDING_REMOVAL_BY_OWNER'|'PENDING_START_REMOVAL_BY_OWNER'|'FAILED_REMOVAL_BY_COLLABORATOR'|'FAILED_REMOVAL_BY_OWNER'
},
]
}
Response Structure
Information about the environments that are returned.
Information about an Cloud9 development environment.
The ID of the environment.
The name of the environment.
The description for the environment.
The type of environment. Valid values include the following:
ec2
: An Amazon Elastic Compute Cloud (Amazon EC2) instance connects to the environment.ssh
: Your own server connects to the environment.The connection type used for connecting to an Amazon EC2 environment. CONNECT_SSH
is selected by default.
The Amazon Resource Name (ARN) of the environment.
The Amazon Resource Name (ARN) of the environment owner.
The state of the environment in its creation or deletion lifecycle.
The current creation or deletion lifecycle state of the environment.
CREATING
: The environment is in the process of being created.CREATED
: The environment was successfully created.CREATE_FAILED
: The environment failed to be created.DELETING
: The environment is in the process of being deleted.DELETE_FAILED
: The environment failed to delete.Any informational message about the lifecycle state of the environment.
If the environment failed to delete, the Amazon Resource Name (ARN) of the related Amazon Web Services resource.
Describes the status of Amazon Web Services managed temporary credentials for the Cloud9 environment. Available values are:
ENABLED_ON_CREATE
ENABLED_BY_OWNER
DISABLED_BY_DEFAULT
DISABLED_BY_OWNER
DISABLED_BY_COLLABORATOR
PENDING_REMOVAL_BY_COLLABORATOR
PENDING_REMOVAL_BY_OWNER
FAILED_REMOVAL_BY_COLLABORATOR
ENABLED_BY_OWNER
DISABLED_BY_DEFAULT
Exceptions
Cloud9.Client.exceptions.BadRequestException
Cloud9.Client.exceptions.ConflictException
Cloud9.Client.exceptions.NotFoundException
Cloud9.Client.exceptions.ForbiddenException
Cloud9.Client.exceptions.TooManyRequestsException
Cloud9.Client.exceptions.LimitExceededException
Cloud9.Client.exceptions.InternalServerErrorException
Examples
response = client.describe_environments(
environmentIds=[
'8d9967e2f0624182b74e7690ad69ebEX',
'349c86d4579e4e7298d500ff57a6b2EX',
],
)
print(response)
Expected Output:
{
'environments': [
{
'name': 'my-demo-environment',
'type': 'ec2',
'arn': 'arn:aws:cloud9:us-east-2:123456789012:environment:8d9967e2f0624182b74e7690ad69ebEX',
'description': 'This is my demonstration environment.',
'id': '8d9967e2f0624182b74e7690ad69ebEX',
'lifecycle': {
'status': 'CREATED',
},
'ownerArn': 'arn:aws:iam::123456789012:user/MyDemoUser',
},
{
'name': 'another-demo-environment',
'type': 'ssh',
'arn': 'arn:aws:cloud9:us-east-2:123456789012:environment:349c86d4579e4e7298d500ff57a6b2EX',
'description': '',
'id': '349c86d4579e4e7298d500ff57a6b2EX',
'lifecycle': {
'status': 'CREATED',
},
'ownerArn': 'arn:aws:sts::123456789012:assumed-role/AnotherDemoUser/AnotherDemoUser',
},
],
'ResponseMetadata': {
'...': '...',
},
}