Skip to content
v2.275.0

Experimental

@aws-cdk/aws-cloud9-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

Ec2EnvironmentProps Struct ​

Properties for Ec2Environment.

Example ​

ts
import * as iam from 'aws-cdk-lib/aws-iam';

const user = new iam.User(this, 'user');
user.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AWSCloud9Administrator'));
declare const vpc: ec2.Vpc;
new cloud9.Ec2Environment(this, 'C9Env', {
  vpc,
  imageId: cloud9.ImageId.AMAZON_LINUX_2,

  owner: cloud9.Owner.user(user)
})

Properties ​

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

Default: The instance will not be shut down automatically.

Setting a value of 0 means the instance will never be automatically shut down."

clonedRepositoriesoptionalCloneRepository[]cloned_repositoriesoptionaltyping.List[CloneRepository]clonedRepositoriesoptionalList<CloneRepository>ClonedRepositoriesoptionalCloneRepository[]ClonedRepositoriesoptional*[]CloneRepository#
The AWS CodeCommit repository to be cloned.

Default: do not clone any repository

connectionTypeoptionalConnectionTypeconnection_typeoptionalConnectionTypeconnectionTypeoptionalConnectionTypeConnectionTypeoptionalConnectionTypeConnectionTypeoptionalConnectionType= CONNECT_SSH#
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)

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
Description of the environment.

Default: no description

ec2EnvironmentNameoptionalstringec2_environment_nameoptionalstrec2EnvironmentNameoptionalStringEc2EnvironmentNameoptionalstringEc2EnvironmentNameoptional*string#
Name of the environment.

Default: automatically generated name

imageIdImageIdimage_idImageIdimageIdImageIdImageIdImageIdImageIdImageIdrequired#
The image ID used for creating an Amazon EC2 environment.
instanceTypeoptionalInstanceTypeinstance_typeoptionalInstanceTypeinstanceTypeoptionalInstanceTypeInstanceTypeoptionalInstanceTypeInstanceTypeoptionalInstanceType= t2.micro#
The type of instance to connect to the environment.
owneroptionalOwnerowneroptionalOwnerowneroptionalOwnerOwneroptionalOwnerOwneroptionalOwner#
Owner of the environment.

Default: The identity that CloudFormation executes under will be the owner

The owner has full control of the environment and can invite additional members.

subnetSelectionoptionalSubnetSelectionsubnet_selectionoptionalSubnetSelectionsubnetSelectionoptionalSubnetSelectionSubnetSelectionoptionalSubnetSelectionSubnetSelectionoptionalSubnetSelection#
The subnetSelection of the VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.

Default: all public subnets of the VPC are selected.

vpcIVpcvpcIVpcvpcIVpcVpcIVpcVpcIVpcrequired#
The VPC that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.