Ec2EnvironmentProps
- class aws_cdk.aws_cloud9_alpha.Ec2EnvironmentProps(*, image_id, vpc, cloned_repositories=None, connection_type=None, description=None, ec2_environment_name=None, instance_type=None, subnet_selection=None)
Bases:
object
(experimental) Properties for Ec2Environment.
- Parameters
image_id (
ImageId
) – (experimental) The image ID used for creating an Amazon EC2 environment.vpc (
IVpc
) – (experimental) The VPC that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.cloned_repositories (
Optional
[Sequence
[CloneRepository
]]) – (experimental) The AWS CodeCommit repository to be cloned. Default: - do not clone any repositoryconnection_type (
Optional
[ConnectionType
]) – (experimental) 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) Default: - CONNECT_SSHdescription (
Optional
[str
]) – (experimental) Description of the environment. Default: - no descriptionec2_environment_name (
Optional
[str
]) – (experimental) Name of the environment. Default: - automatically generated nameinstance_type (
Optional
[InstanceType
]) – (experimental) The type of instance to connect to the environment. Default: - t2.microsubnet_selection (
Union
[SubnetSelection
,Dict
[str
,Any
],None
]) – (experimental) 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.
- Stability
experimental
- ExampleMetadata
infused
Example:
import aws_cdk.aws_codecommit as codecommit # create a new Cloud9 environment and clone the two repositories # vpc: ec2.Vpc # create a codecommit repository to clone into the cloud9 environment repo_new = codecommit.Repository(self, "RepoNew", repository_name="new-repo" ) # import an existing codecommit repository to clone into the cloud9 environment repo_existing = codecommit.Repository.from_repository_name(self, "RepoExisting", "existing-repo") cloud9.Ec2Environment(self, "C9Env", vpc=vpc, cloned_repositories=[ cloud9.CloneRepository.from_code_commit(repo_new, "/src/new-repo"), cloud9.CloneRepository.from_code_commit(repo_existing, "/src/existing-repo") ], image_id=cloud9.ImageId.AMAZON_LINUX_2 )
Attributes
- cloned_repositories
(experimental) The AWS CodeCommit repository to be cloned.
- Default
do not clone any repository
- Stability
experimental
- connection_type
(experimental) 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)
- Default
CONNECT_SSH
- Stability
experimental
- description
(experimental) Description of the environment.
- Default
no description
- Stability
experimental
- ec2_environment_name
(experimental) Name of the environment.
- Default
automatically generated name
- Stability
experimental
- image_id
(experimental) The image ID used for creating an Amazon EC2 environment.
- Stability
experimental
- instance_type
(experimental) The type of instance to connect to the environment.
- Default
t2.micro
- Stability
experimental
- subnet_selection
(experimental) 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.
- Stability
experimental
- vpc
(experimental) The VPC that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.
- Stability
experimental