Table of Contents
Cloud9.
Client
¶A low-level client representing AWS Cloud9
Cloud9 is a collection of tools that you can use to code, build, run, test, debug, and release software in the cloud.
For more information about Cloud9, see the Cloud9 User Guide.
Cloud9 supports these operations:
CreateEnvironmentEC2
: Creates an Cloud9 development environment, launches an Amazon EC2 instance, and then connects from the instance to the environment.CreateEnvironmentMembership
: Adds an environment member to an environment.DeleteEnvironment
: Deletes an environment. If an Amazon EC2 instance is connected to the environment, also terminates the instance.DeleteEnvironmentMembership
: Deletes an environment member from an environment.DescribeEnvironmentMemberships
: Gets information about environment members for an environment.DescribeEnvironments
: Gets information about environments.DescribeEnvironmentStatus
: Gets status information for an environment.ListEnvironments
: Gets a list of environment identifiers.ListTagsForResource
: Gets the tags for an environment.TagResource
: Adds tags to an environment.UntagResource
: Removes tags from an environment.UpdateEnvironment
: Changes the settings of an existing environment.UpdateEnvironmentMembership
: Changes the settings of an existing environment member for an environment.import boto3
client = boto3.client('cloud9')
These are the available methods:
can_paginate()
close()
create_environment_ec2()
create_environment_membership()
delete_environment()
delete_environment_membership()
describe_environment_memberships()
describe_environment_status()
describe_environments()
get_paginator()
get_waiter()
list_environments()
list_tags_for_resource()
tag_resource()
untag_resource()
update_environment()
update_environment_membership()
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
create_environment_ec2
(**kwargs)¶Creates an 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',
imageId='string',
automaticStopTimeMinutes=123,
ownerArn='string',
tags=[
{
'Key': 'string',
'Value': 'string'
},
],
connectionType='CONNECT_SSH'|'CONNECT_SSM',
dryRun=True|False
)
[REQUIRED]
The name of the environment to create.
This name is visible to other IAM users in the same Amazon Web Services account.
A unique, case-sensitive string that helps 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
).
The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. To choose an AMI for the instance, you must specify a valid AMI alias or a valid Amazon EC2 Systems Manager (SSM) path.
The default Amazon Linux AMI is currently used if the parameter isn't explicitly assigned a value in the request.
In the future the parameter for Amazon Linux will no longer be available when you specify an AMI for your instance. Amazon Linux 2 will then become the default AMI, which is used to launch your instance if no parameter is explicitly defined.
AMI aliases
amazonlinux-1-x86_64
amazonlinux-2-x86_64
ubuntu-18.04-x86_64
SSM paths
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64
An array of key-value pairs that will be associated with the new Cloud9 development environment.
Metadata that is associated with Amazon Web Services resources. In particular, a name-value pair that can be associated with an Cloud9 development environment. There are two types of tags: user tags and system tags . A user tag is created by the user. A system tag is automatically created by Amazon Web Services services. A system tag is prefixed with "aws:"
and cannot be modified by the user.
The name part of a tag.
The value part of a tag.
The connection type used for connecting to an Amazon EC2 environment. Valid values are CONNECT_SSH
(default) and CONNECT_SSM
(connected through Amazon EC2 Systems Manager).
For more information, see Accessing no-ingress EC2 instances with Amazon EC2 Systems Manager in the Cloud9 User Guide .
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.dict
Response Syntax
{
'environmentId': 'string'
}
Response Structure
(dict) --
environmentId (string) --
The ID of the environment that was created.
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.create_environment_ec2(
name='my-demo-environment',
automaticStopTimeMinutes=60,
description='This is my demonstration environment.',
instanceType='t2.micro',
ownerArn='arn:aws:iam::123456789012:user/MyDemoUser',
subnetId='subnet-6300cd1b',
)
print(response)
Expected Output:
{
'environmentId': '8d9967e2f0624182b74e7690ad69ebEX',
'ResponseMetadata': {
'...': '...',
},
}
create_environment_membership
(**kwargs)¶Adds an environment member to an 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:
read-only
: Has read-only access to the environment.read-write
: Has read-write access to the environment.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:
owner
: Owns the environment.read-only
: Has read-only access to the environment.read-write
: Has read-write access to the environment.userId (string) --
The user ID in Identity and Access Management (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.
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.create_environment_membership(
environmentId='8d9967e2f0624182b74e7690ad69ebEX',
permissions='read-write',
userArn='arn:aws:iam::123456789012:user/AnotherDemoUser',
)
print(response)
Expected Output:
{
'membership': {
'environmentId': '8d9967e2f0624182b74e7690ad69ebEX',
'permissions': 'read-write',
'userArn': 'arn:aws:iam::123456789012:user/AnotherDemoUser',
'userId': 'AIDAJ3BA6O2FMJWCWXHEX',
},
'ResponseMetadata': {
'...': '...',
},
}
delete_environment
(**kwargs)¶Deletes an 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
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.delete_environment(
environmentId='8d9967e2f0624182b74e7690ad69ebEX',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
delete_environment_membership
(**kwargs)¶Deletes an environment member from a 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
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.delete_environment_membership(
environmentId='8d9967e2f0624182b74e7690ad69ebEX',
userArn='arn:aws:iam::123456789012:user/AnotherDemoUser',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
describe_environment_memberships
(**kwargs)¶Gets information about environment members for an 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:
owner
: Owns the environment.read-only
: Has read-only access to the environment.read-write
: Has read-write access to the environment.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 Cloud9 development environment.
permissions (string) --
The type of environment member permissions associated with this environment member. Available values include:
owner
: Owns the environment.read-only
: Has read-only access to the environment.read-write
: Has read-write access to the environment.userId (string) --
The user ID in Identity and Access Management (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.
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
The following example gets information about all of the environment members for the specified development environment.
response = client.describe_environment_memberships(
environmentId='8d9967e2f0624182b74e7690ad69ebEX',
)
print(response)
Expected Output:
{
'memberships': [
{
'environmentId': '8d9967e2f0624182b74e7690ad69ebEX',
'permissions': 'read-write',
'userArn': 'arn:aws:iam::123456789012:user/AnotherDemoUser',
'userId': 'AIDAJ3BA6O2FMJWCWXHEX',
},
{
'environmentId': '8d9967e2f0624182b74e7690ad69ebEX',
'permissions': 'owner',
'userArn': 'arn:aws:iam::123456789012:user/MyDemoUser',
'userId': 'AIDAJNUEDQAQWFELJDLEX',
},
],
'ResponseMetadata': {
'...': '...',
},
}
The following example gets information about the owner of the specified development environment.
response = client.describe_environment_memberships(
environmentId='8d9967e2f0624182b74e7690ad69ebEX',
permissions=[
'owner',
],
)
print(response)
Expected Output:
{
'memberships': [
{
'environmentId': '8d9967e2f0624182b74e7690ad69ebEX',
'permissions': 'owner',
'userArn': 'arn:aws:iam::123456789012:user/MyDemoUser',
'userId': 'AIDAJNUEDQAQWFELJDLEX',
},
],
'ResponseMetadata': {
'...': '...',
},
}
The following example gets development environment membership information for the specified user.
response = client.describe_environment_memberships(
userArn='arn:aws:iam::123456789012:user/MyDemoUser',
)
print(response)
Expected Output:
{
'memberships': [
{
'environmentId': '10a75714bd494714929e7f5ec4125aEX',
'lastAccess': datetime(2018, 1, 19, 11, 6, 13, 4, 19, 0),
'permissions': 'owner',
'userArn': 'arn:aws:iam::123456789012:user/MyDemoUser',
'userId': 'AIDAJNUEDQAQWFELJDLEX',
},
{
'environmentId': '12bfc3cd537f41cb9776f8af5525c9EX',
'lastAccess': datetime(2018, 1, 19, 11, 39, 19, 4, 19, 0),
'permissions': 'owner',
'userArn': 'arn:aws:iam::123456789012:user/MyDemoUser',
'userId': 'AIDAJNUEDQAQWFELJDLEX',
},
],
'ResponseMetadata': {
'...': '...',
},
}
describe_environment_status
(**kwargs)¶Gets status information for an 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:
connecting
: The environment is connecting.creating
: The environment is being created.deleting
: The environment is being deleted.error
: The environment is in an error state.ready
: The environment is ready.stopped
: The environment is stopped.stopping
: The environment is stopping.Any informational message about the status of the environment.
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_environment_status(
environmentId='8d9967e2f0624182b74e7690ad69ebEX',
)
print(response)
Expected Output:
{
'message': 'Environment is ready to use',
'status': 'ready',
'ResponseMetadata': {
'...': '...',
},
}
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': {
'...': '...',
},
}
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
list_environments
(**kwargs)¶Gets a list of 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.
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.list_environments(
)
print(response)
Expected Output:
{
'environmentIds': [
'349c86d4579e4e7298d500ff57a6b2EX',
'45a3da47af0840f2b0c0824f5ee232EX',
],
'ResponseMetadata': {
'...': '...',
},
}
Gets a list of the tags associated with an Cloud9 development environment.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceARN='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the Cloud9 development environment to get the tags for.
{
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
The list of tags associated with the Cloud9 development environment.
Metadata that is associated with Amazon Web Services resources. In particular, a name-value pair that can be associated with an Cloud9 development environment. There are two types of tags: user tags and system tags . A user tag is created by the user. A system tag is automatically created by Amazon Web Services services. A system tag is prefixed with "aws:"
and cannot be modified by the user.
The name part of a tag.
The value part of a tag.
Exceptions
Cloud9.Client.exceptions.NotFoundException
Cloud9.Client.exceptions.InternalServerErrorException
Cloud9.Client.exceptions.BadRequestException
tag_resource
(**kwargs)¶Adds tags to an Cloud9 development environment.
Warning
Tags that you add to an Cloud9 environment by using this method will NOT be automatically propagated to underlying resources.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceARN='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the Cloud9 development environment to add tags to.
[REQUIRED]
The list of tags to add to the given Cloud9 development environment.
Metadata that is associated with Amazon Web Services resources. In particular, a name-value pair that can be associated with an Cloud9 development environment. There are two types of tags: user tags and system tags . A user tag is created by the user. A system tag is automatically created by Amazon Web Services services. A system tag is prefixed with "aws:"
and cannot be modified by the user.
The name part of a tag.
The value part of a tag.
dict
Response Syntax
{}
Response Structure
Exceptions
Cloud9.Client.exceptions.NotFoundException
Cloud9.Client.exceptions.InternalServerErrorException
Cloud9.Client.exceptions.BadRequestException
Cloud9.Client.exceptions.ConcurrentAccessException
untag_resource
(**kwargs)¶Removes tags from an Cloud9 development environment.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceARN='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the Cloud9 development environment to remove tags from.
[REQUIRED]
The tag names of the tags to remove from the given Cloud9 development environment.
dict
Response Syntax
{}
Response Structure
Exceptions
Cloud9.Client.exceptions.NotFoundException
Cloud9.Client.exceptions.InternalServerErrorException
Cloud9.Client.exceptions.BadRequestException
Cloud9.Client.exceptions.ConcurrentAccessException
update_environment
(**kwargs)¶Changes the settings of an existing Cloud9 development environment.
See also: AWS API Documentation
Request Syntax
response = client.update_environment(
environmentId='string',
name='string',
description='string',
managedCredentialsAction='ENABLE'|'DISABLE'
)
[REQUIRED]
The ID of the environment to change settings.
Allows the environment owner to turn on or turn off the Amazon Web Services managed temporary credentials for an Cloud9 environment by using one of the following values:
ENABLE
DISABLE
Note
Only the environment owner can change the status of managed temporary credentials. An AccessDeniedException
is thrown if an attempt to turn on or turn off managed temporary credentials is made by an account that's not the environment owner.
dict
Response Syntax
{}
Response Structure
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.update_environment(
name='my-changed-demo-environment',
description='This is my changed demonstration environment.',
environmentId='8d9967e2f0624182b74e7690ad69ebEX',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
update_environment_membership
(**kwargs)¶Changes the settings of an existing environment member for an 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:
read-only
: Has read-only access to the environment.read-write
: Has read-write access to the environment.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:
owner
: Owns the environment.read-only
: Has read-only access to the environment.read-write
: Has read-write access to the environment.userId (string) --
The user ID in Identity and Access Management (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.
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.update_environment_membership(
environmentId='8d9967e2f0624182b74e7690ad69ebEX',
permissions='read-only',
userArn='arn:aws:iam::123456789012:user/AnotherDemoUser',
)
print(response)
Expected Output:
{
'membership': {
'environmentId': '8d9967e2f0624182b74e7690ad69eb31',
'permissions': 'read-only',
'userArn': 'arn:aws:iam::123456789012:user/AnotherDemoUser',
'userId': 'AIDAJ3BA6O2FMJWCWXHEX',
},
'ResponseMetadata': {
'...': '...',
},
}
The available paginators are:
Cloud9.Paginator.
DescribeEnvironmentMemberships
¶paginator = client.get_paginator('describe_environment_memberships')
paginate
(**kwargs)¶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:
owner
: Owns the environment.read-only
: Has read-only access to the environment.read-write
: Has read-write access to the environment.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 Cloud9 development environment.
permissions (string) --
The type of environment member permissions associated with this environment member. Available values include:
owner
: Owns the environment.read-only
: Has read-only access to the environment.read-write
: Has read-write access to the environment.userId (string) --
The user ID in Identity and Access Management (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.
Cloud9.Paginator.
ListEnvironments
¶paginator = client.get_paginator('list_environments')
paginate
(**kwargs)¶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.