CfnEnvironmentEC2Props

class aws_cdk.aws_cloud9.CfnEnvironmentEC2Props(*, image_id, instance_type, automatic_stop_time_minutes=None, connection_type=None, description=None, name=None, owner_arn=None, repositories=None, subnet_id=None, tags=None)

Bases: object

Properties for defining a CfnEnvironmentEC2.

Parameters:
  • image_id (str) – 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 AWS Systems Manager path. From December 04, 2023, you will be required to include the ImageId parameter for the CreateEnvironmentEC2 action. This change will be reflected across all direct methods of communicating with the API, such as AWS SDK, AWS CLI and AWS CloudFormation. This change will only affect direct API consumers, and not AWS Cloud9 console users. Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04. AMI aliases - Amazon Linux 2: amazonlinux-2-x86_64 - Amazon Linux 2023 (recommended): amazonlinux-2023-x86_64 - Ubuntu 18.04: ubuntu-18.04-x86_64 - Ubuntu 22.04: ubuntu-22.04-x86_64 SSM paths - Amazon Linux 2: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64 - Amazon Linux 2023 (recommended): resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64 - Ubuntu 18.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64 - Ubuntu 22.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64

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

  • automatic_stop_time_minutes (Union[int, float, None]) – The number of minutes until the running instance is shut down after the environment was last used.

  • connection_type (Optional[str]) – The connection type used for connecting to an Amazon EC2 environment. Valid values are CONNECT_SSH (default) and CONNECT_SSM (connected through AWS Systems Manager ).

  • description (Optional[str]) – The description of the environment to create.

  • name (Optional[str]) – The name of the environment.

  • owner_arn (Optional[str]) – The Amazon Resource Name (ARN) of the environment owner. This ARN can be the ARN of any AWS Identity and Access Management principal. If this value is not specified, the ARN defaults to this environment’s creator.

  • repositories (Union[IResolvable, Sequence[Union[IResolvable, RepositoryProperty, Dict[str, Any]]], None]) – Any AWS CodeCommit source code repositories to be cloned into the development environment.

  • subnet_id (Optional[str]) – The ID of the subnet in Amazon Virtual Private Cloud (Amazon VPC) that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of key-value pairs that will be associated with the new AWS Cloud9 development environment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloud9 as cloud9

cfn_environment_eC2_props = cloud9.CfnEnvironmentEC2Props(
    image_id="imageId",
    instance_type="instanceType",

    # the properties below are optional
    automatic_stop_time_minutes=123,
    connection_type="connectionType",
    description="description",
    name="name",
    owner_arn="ownerArn",
    repositories=[cloud9.CfnEnvironmentEC2.RepositoryProperty(
        path_component="pathComponent",
        repository_url="repositoryUrl"
    )],
    subnet_id="subnetId",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

automatic_stop_time_minutes

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-automaticstoptimeminutes

connection_type

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

Valid values are CONNECT_SSH (default) and CONNECT_SSM (connected through AWS Systems Manager ).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-connectiontype

description

The description of the environment to create.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-description

image_id

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 AWS Systems Manager path.

From December 04, 2023, you will be required to include the ImageId parameter for the CreateEnvironmentEC2 action. This change will be reflected across all direct methods of communicating with the API, such as AWS SDK, AWS CLI and AWS CloudFormation. This change will only affect direct API consumers, and not AWS Cloud9 console users.

Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.

AMI aliases

  • Amazon Linux 2: amazonlinux-2-x86_64

  • Amazon Linux 2023 (recommended): amazonlinux-2023-x86_64

  • Ubuntu 18.04: ubuntu-18.04-x86_64

  • Ubuntu 22.04: ubuntu-22.04-x86_64

SSM paths

  • Amazon Linux 2: resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64

  • Amazon Linux 2023 (recommended): resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64

  • Ubuntu 18.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64

  • Ubuntu 22.04: resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-imageid

instance_type

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-instancetype

name

The name of the environment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-name

owner_arn

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

This ARN can be the ARN of any AWS Identity and Access Management principal. If this value is not specified, the ARN defaults to this environment’s creator.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-ownerarn

repositories

Any AWS CodeCommit source code repositories to be cloned into the development environment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-repositories

subnet_id

The ID of the subnet in Amazon Virtual Private Cloud (Amazon VPC) that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-subnetid

tags

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloud9-environmentec2.html#cfn-cloud9-environmentec2-tags