Cloud9

Table of Contents

Client

class 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(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is 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").
Returns
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
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the environment to create.

    This name is visible to other IAM users in the same Amazon Web Services account.

  • description (string) -- The description of the environment to create.
  • clientRequestToken (string) --

    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 .

  • instanceType (string) --

    [REQUIRED]

    The type of instance to connect to the environment (for example, t2.micro ).

  • subnetId (string) -- The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with the Amazon EC2 instance.
  • imageId (string) --

    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
    • **Amazon Linux (default): amazonlinux-1-x86_64 **
    • Amazon Linux 2: amazonlinux-2-x86_64
    • Ubuntu 18.04: ubuntu-18.04-x86_64
    SSM paths
    • **Amazon Linux (default): resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64 **
    • Amazon Linux 2: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
    • Ubuntu 18.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64
  • automaticStopTimeMinutes (integer) -- The number of minutes until the running instance is shut down after the environment has last been used.
  • ownerArn (string) -- The Amazon Resource Name (ARN) of the environment owner. This ARN can be the ARN of any IAM principal. If this value is not specified, the ARN defaults to this environment's creator.
  • tags (list) --

    An array of key-value pairs that will be associated with the new Cloud9 development environment.

    • (dict) --

      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.

      • Key (string) -- [REQUIRED]

        The name part of a tag.

      • Value (string) -- [REQUIRED]

        The value part of a tag.

  • connectionType (string) --

    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 .

  • dryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

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'
)
Parameters
  • environmentId (string) --

    [REQUIRED]

    The ID of the environment that contains the environment member you want to add.

  • userArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the environment member you want to add.

  • permissions (string) --

    [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.
Return type

dict

Returns

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'
)
Parameters
environmentId (string) --

[REQUIRED]

The ID of the environment to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

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'
)
Parameters
  • environmentId (string) --

    [REQUIRED]

    The ID of the environment to delete the environment member from.

  • userArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the environment member to delete from the environment.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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
)
Parameters
  • userArn (string) -- The Amazon Resource Name (ARN) of an individual environment member to get information about. If no value is specified, information about all environment members are returned.
  • environmentId (string) -- The ID of the environment to get environment member information about.
  • permissions (list) --

    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.

    • (string) --
  • nextToken (string) -- 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.
  • maxResults (integer) -- The maximum number of environment members to get information about.
Return type

dict

Returns

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'
)
Parameters
environmentId (string) --

[REQUIRED]

The ID of the environment to get status information about.

Return type
dict
Returns
Response Syntax
{
    'status': 'error'|'creating'|'connecting'|'ready'|'stopping'|'stopped'|'deleting',
    'message': 'string'
}

Response Structure

  • (dict) --
    • status (string) --

      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.
    • message (string) --

      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',
    ]
)
Parameters
environmentIds (list) --

[REQUIRED]

The IDs of individual environments to get information about.

  • (string) --
Return type
dict
Returns
Response Syntax
{
    '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

  • (dict) --
    • environments (list) --

      Information about the environments that are returned.

      • (dict) --

        Information about an Cloud9 development environment.

        • id (string) --

          The ID of the environment.

        • name (string) --

          The name of the environment.

        • description (string) --

          The description for the environment.

        • type (string) --

          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.
        • connectionType (string) --

          The connection type used for connecting to an Amazon EC2 environment. CONNECT_SSH is selected by default.

        • arn (string) --

          The Amazon Resource Name (ARN) of the environment.

        • ownerArn (string) --

          The Amazon Resource Name (ARN) of the environment owner.

        • lifecycle (dict) --

          The state of the environment in its creation or deletion lifecycle.

          • status (string) --

            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.
          • reason (string) --

            Any informational message about the lifecycle state of the environment.

          • failureResource (string) --

            If the environment failed to delete, the Amazon Resource Name (ARN) of the related Amazon Web Services resource.

        • managedCredentialsStatus (string) --

          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.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is 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").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
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
)
Parameters
  • nextToken (string) -- 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.
  • maxResults (integer) -- The maximum number of environments to get identifiers for.
Return type

dict

Returns

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.

      • (string) --

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': {
        '...': '...',
    },
}
list_tags_for_resource(**kwargs)

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'
)
Parameters
ResourceARN (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the Cloud9 development environment to get the tags for.

Return type
dict
Returns
Response Syntax
{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • Tags (list) --

      The list of tags associated with the Cloud9 development environment.

      • (dict) --

        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.

        • Key (string) --

          The name part of a tag.

        • Value (string) --

          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'
        },
    ]
)
Parameters
  • ResourceARN (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the Cloud9 development environment to add tags to.

  • Tags (list) --

    [REQUIRED]

    The list of tags to add to the given Cloud9 development environment.

    • (dict) --

      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.

      • Key (string) -- [REQUIRED]

        The name part of a tag.

      • Value (string) -- [REQUIRED]

        The value part of a tag.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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',
    ]
)
Parameters
  • ResourceARN (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the Cloud9 development environment to remove tags from.

  • TagKeys (list) --

    [REQUIRED]

    The tag names of the tags to remove from the given Cloud9 development environment.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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'
)
Parameters
  • environmentId (string) --

    [REQUIRED]

    The ID of the environment to change settings.

  • name (string) -- A replacement name for the environment.
  • description (string) -- Any new or replacement description for the environment.
  • managedCredentialsAction (string) --

    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.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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'
)
Parameters
  • environmentId (string) --

    [REQUIRED]

    The ID of the environment for the environment member whose settings you want to change.

  • userArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the environment member whose settings you want to change.

  • permissions (string) --

    [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.
Return type

dict

Returns

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': {
        '...': '...',
    },
}

Paginators

The available paginators are:

class 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'
    }
)
Parameters
  • userArn (string) -- The Amazon Resource Name (ARN) of an individual environment member to get information about. If no value is specified, information about all environment members are returned.
  • environmentId (string) -- The ID of the environment to get environment member information about.
  • permissions (list) --

    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.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      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.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

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.

class 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'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    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.

  • PageSize (integer) --

    The size of each page.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'environmentIds': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --
    • environmentIds (list) --

      The list of environment identifiers.

      • (string) --
    • NextToken (string) --

      A token to resume pagination.