Cloud9

Table of Contents

Client

class Cloud9.Client

A low-level client representing AWS Cloud9:

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.
create_environment_ec2(**kwargs)

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

    [REQUIRED]

    The name of the environment to create.

    This name is visible to other AWS IAM users in the same AWS account.

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

    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 .

  • 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 AWS Cloud9 will use to communicate with the Amazon EC2 instance.
  • 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 AWS IAM principal. If this value is not specified, the ARN defaults to this environment's creator.
Return type

dict

Returns

Response Syntax

{
    'environmentId': 'string'
}

Response Structure

  • (dict) --

    • environmentId (string) --

      The ID of the environment that was created.

create_environment_membership(**kwargs)

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'
)
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 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.

delete_environment(**kwargs)

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

[REQUIRED]

The ID of the environment to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --
delete_environment_membership(**kwargs)

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'
)
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) --

describe_environment_memberships(**kwargs)

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
)
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 AWS 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 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.

describe_environment_status(**kwargs)

Gets status information for an AWS 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.

describe_environments(**kwargs)

Gets information about AWS 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',
            'arn': 'string',
            'ownerArn': 'string',
            'lifecycle': {
                'status': 'CREATING'|'CREATED'|'CREATE_FAILED'|'DELETING'|'DELETE_FAILED',
                'reason': 'string',
                'failureResource': 'string'
            }
        },
    ]
}

Response Structure

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

      Information about the environments that are returned.

      • (dict) --

        Information about an AWS 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.
        • 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 AWS resource.

generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

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 AWS 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) --

update_environment(**kwargs)

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'
)
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.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

update_environment_membership(**kwargs)

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'
)
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 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.

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 AWS 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 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.

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.