Table of Contents
A low-level client representing AWS Cloud9:
import boto3
client = boto3.client('cloud9')
These are the available methods:
Check if an operation can be paginated.
Creates an AWS Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then connects from the instance to the environment.
See also: AWS API Documentation
Request Syntax
response = client.create_environment_ec2(
name='string',
description='string',
clientRequestToken='string',
instanceType='string',
subnetId='string',
automaticStopTimeMinutes=123,
ownerArn='string'
)
[REQUIRED]
The name of the environment to create.
This name is visible to other AWS IAM users in the same AWS account.
A unique, case-sensitive string that helps AWS Cloud9 to ensure this operation completes no more than one time.
For more information, see Client Tokens in the Amazon EC2 API Reference .
[REQUIRED]
The type of instance to connect to the environment (for example, t2.micro ).
dict
Response Syntax
{
'environmentId': 'string'
}
Response Structure
(dict) --
environmentId (string) --
The ID of the environment that was created.
Adds an environment member to an AWS Cloud9 development environment.
See also: AWS API Documentation
Request Syntax
response = client.create_environment_membership(
environmentId='string',
userArn='string',
permissions='read-write'|'read-only'
)
[REQUIRED]
The ID of the environment that contains the environment member you want to add.
[REQUIRED]
The Amazon Resource Name (ARN) of the environment member you want to add.
[REQUIRED]
The type of environment member permissions you want to associate with this environment member. Available values include:
dict
Response Syntax
{
'membership': {
'permissions': 'owner'|'read-write'|'read-only',
'userId': 'string',
'userArn': 'string',
'environmentId': 'string',
'lastAccess': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
membership (dict) --
Information about the environment member that was added.
permissions (string) --
The type of environment member permissions associated with this environment member. Available values include:
userId (string) --
The user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
userArn (string) --
The Amazon Resource Name (ARN) of the environment member.
environmentId (string) --
The ID of the environment for the environment member.
lastAccess (datetime) --
The time, expressed in epoch time format, when the environment member last opened the environment.
Deletes an AWS Cloud9 development environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.
See also: AWS API Documentation
Request Syntax
response = client.delete_environment(
environmentId='string'
)
[REQUIRED]
The ID of the environment to delete.
{}
Response Structure
Deletes an environment member from an AWS Cloud9 development environment.
See also: AWS API Documentation
Request Syntax
response = client.delete_environment_membership(
environmentId='string',
userArn='string'
)
[REQUIRED]
The ID of the environment to delete the environment member from.
[REQUIRED]
The Amazon Resource Name (ARN) of the environment member to delete from the environment.
dict
Response Syntax
{}
Response Structure
Gets information about environment members for an AWS Cloud9 development environment.
See also: AWS API Documentation
Request Syntax
response = client.describe_environment_memberships(
userArn='string',
environmentId='string',
permissions=[
'owner'|'read-write'|'read-only',
],
nextToken='string',
maxResults=123
)
The type of environment member permissions to get information about. Available values include:
If no value is specified, information about all environment members are returned.
dict
Response Syntax
{
'memberships': [
{
'permissions': 'owner'|'read-write'|'read-only',
'userId': 'string',
'userArn': 'string',
'environmentId': 'string',
'lastAccess': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
memberships (list) --
Information about the environment members for the environment.
(dict) --
Information about an environment member for an AWS Cloud9 development environment.
permissions (string) --
The type of environment member permissions associated with this environment member. Available values include:
userId (string) --
The user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
userArn (string) --
The Amazon Resource Name (ARN) of the environment member.
environmentId (string) --
The ID of the environment for the environment member.
lastAccess (datetime) --
The time, expressed in epoch time format, when the environment member last opened the environment.
nextToken (string) --
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.
Gets status information for an AWS Cloud9 development environment.
See also: AWS API Documentation
Request Syntax
response = client.describe_environment_status(
environmentId='string'
)
[REQUIRED]
The ID of the environment to get status information about.
{
'status': 'error'|'creating'|'connecting'|'ready'|'stopping'|'stopped'|'deleting',
'message': 'string'
}
Response Structure
The status of the environment. Available values include:
Any informational message about the status of the environment.
Gets information about AWS 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',
'arn': 'string',
'ownerArn': 'string',
'lifecycle': {
'status': 'CREATED'|'DELETING'|'DELETE_FAILED',
'reason': 'string',
'failureResource': 'string'
}
},
]
}
Response Structure
Information about the environments that are returned.
Information about an AWS 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:
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.
Any informational message about the lifecycle state of the environment.
If the environment failed to delete, the Amazon Resource Name (ARN) of the related AWS resource.
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns an object that can wait for some condition.
Gets a list of AWS Cloud9 development environment identifiers.
See also: AWS API Documentation
Request Syntax
response = client.list_environments(
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'nextToken': 'string',
'environmentIds': [
'string',
]
}
Response Structure
(dict) --
nextToken (string) --
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.
environmentIds (list) --
The list of environment identifiers.
Changes the settings of an existing AWS Cloud9 development environment.
See also: AWS API Documentation
Request Syntax
response = client.update_environment(
environmentId='string',
name='string',
description='string'
)
[REQUIRED]
The ID of the environment to change settings.
dict
Response Syntax
{}
Response Structure
Changes the settings of an existing environment member for an AWS Cloud9 development environment.
See also: AWS API Documentation
Request Syntax
response = client.update_environment_membership(
environmentId='string',
userArn='string',
permissions='read-write'|'read-only'
)
[REQUIRED]
The ID of the environment for the environment member whose settings you want to change.
[REQUIRED]
The Amazon Resource Name (ARN) of the environment member whose settings you want to change.
[REQUIRED]
The replacement type of environment member permissions you want to associate with this environment member. Available values include:
dict
Response Syntax
{
'membership': {
'permissions': 'owner'|'read-write'|'read-only',
'userId': 'string',
'userArn': 'string',
'environmentId': 'string',
'lastAccess': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
membership (dict) --
Information about the environment member whose settings were changed.
permissions (string) --
The type of environment member permissions associated with this environment member. Available values include:
userId (string) --
The user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
userArn (string) --
The Amazon Resource Name (ARN) of the environment member.
environmentId (string) --
The ID of the environment for the environment member.
lastAccess (datetime) --
The time, expressed in epoch time format, when the environment member last opened the environment.
The available paginators are:
paginator = client.get_paginator('describe_environment_memberships')
Creates an iterator that will paginate through responses from Cloud9.Client.describe_environment_memberships().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
userArn='string',
environmentId='string',
permissions=[
'owner'|'read-write'|'read-only',
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
The type of environment member permissions to get information about. Available values include:
If no value is specified, information about all environment members are returned.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'memberships': [
{
'permissions': 'owner'|'read-write'|'read-only',
'userId': 'string',
'userArn': 'string',
'environmentId': 'string',
'lastAccess': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
memberships (list) --
Information about the environment members for the environment.
(dict) --
Information about an environment member for an AWS Cloud9 development environment.
permissions (string) --
The type of environment member permissions associated with this environment member. Available values include:
userId (string) --
The user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
userArn (string) --
The Amazon Resource Name (ARN) of the environment member.
environmentId (string) --
The ID of the environment for the environment member.
lastAccess (datetime) --
The time, expressed in epoch time format, when the environment member last opened the environment.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_environments')
Creates an iterator that will paginate through responses from Cloud9.Client.list_environments().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'environmentIds': [
'string',
],
'NextToken': 'string'
}
Response Structure
The list of environment identifiers.
A token to resume pagination.