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.
{'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' )
string
[REQUIRED]
The name of the environment to create.
This name is visible to other AWS IAM users in the same AWS account.
string
The description of the environment to create.
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 .
string
[REQUIRED]
The type of instance to connect to the environment (for example, t2.micro ).
string
The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
integer
The number of minutes until the running instance is shut down after the environment has last been used.
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.
list
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.
string
The connection type used for connecting to an Amazon EC2 environment.
dict
Response Syntax
{ 'environmentId': 'string' }
Response Structure
(dict) --
environmentId (string) --
The ID of the environment that was created.
{'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', ] )
list
[REQUIRED]
The IDs of individual environments to get information about.
(string) --
dict
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.