AWS Cloud9

2020/08/12 - AWS Cloud9 - 2 updated api methods

Changes  Add ConnectionType input parameter to CreateEnvironmentEC2 endpoint. New parameter enables creation of environments with SSM connection.

CreateEnvironmentEC2 (updated) Link ¶
Changes (request)
{'connectionType': 'CONNECT_SSH | CONNECT_SSM'}

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

client.create_environment_ec2(
    name='string',
    description='string',
    clientRequestToken='string',
    instanceType='string',
    subnetId='string',
    automaticStopTimeMinutes=123,
    ownerArn='string',
    tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    connectionType='CONNECT_SSH'|'CONNECT_SSM'
)
type name

string

param name

[REQUIRED]

The name of the environment to create.

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

type description

string

param description

The description of the environment to create.

type clientRequestToken

string

param clientRequestToken

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 .

type instanceType

string

param instanceType

[REQUIRED]

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

type subnetId

string

param subnetId

The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.

type automaticStopTimeMinutes

integer

param automaticStopTimeMinutes

The number of minutes until the running instance is shut down after the environment has last been used.

type ownerArn

string

param ownerArn

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.

type tags

list

param tags

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

  • (dict) --

    Metadata that is associated with AWS resources. In particular, a name-value pair that can be associated with an AWS 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 AWS 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.

type connectionType

string

param connectionType

The connection type used for connecting to an Amazon EC2 environment.

rtype

dict

returns

Response Syntax

{
    'environmentId': 'string'
}

Response Structure

  • (dict) --

    • environmentId (string) --

      The ID of the environment that was created.

DescribeEnvironments (updated) Link ¶
Changes (response)
{'environments': {'connectionType': 'CONNECT_SSH | CONNECT_SSM'}}

Gets information about AWS Cloud9 development environments.

See also: AWS API Documentation

Request Syntax

client.describe_environments(
    environmentIds=[
        'string',
    ]
)
type environmentIds

list

param environmentIds

[REQUIRED]

The IDs of individual environments to get information about.

  • (string) --

rtype

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'
            }
        },
    ]
}

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.

        • connectionType (string) --

          The connection type used for connecting to an Amazon EC2 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.