Ec2EnvironmentProps¶
-
class
aws_cdk.aws_cloud9.
Ec2EnvironmentProps
(*, vpc, cloned_repositories=None, description=None, ec2_environment_name=None, instance_type=None, subnet_selection=None)¶ Bases:
object
(experimental) Properties for Ec2Environment.
- Parameters
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 repositorydescription (
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 (
Optional
[SubnetSelection
]) – (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:
# create a cloud9 ec2 environment in a new VPC vpc = ec2.Vpc(self, "VPC", max_azs=3) cloud9.Ec2Environment(self, "Cloud9Env", vpc=vpc) # or create the cloud9 environment in the default VPC with specific instanceType default_vpc = ec2.Vpc.from_lookup(self, "DefaultVPC", is_default=True) cloud9.Ec2Environment(self, "Cloud9Env2", vpc=default_vpc, instance_type=ec2.InstanceType("t3.large") ) # or specify in a different subnetSelection c9env = cloud9.Ec2Environment(self, "Cloud9Env3", vpc=vpc, subnet_selection=ec2.SubnetSelection( subnet_type=ec2.SubnetType.PRIVATE ) ) # print the Cloud9 IDE URL in the output CfnOutput(self, "URL", value=c9env.ide_url)
Attributes
-
cloned_repositories
¶ (experimental) The AWS CodeCommit repository to be cloned.
- Default
do not clone any repository
- Stability
experimental
- Return type
Optional
[List
[CloneRepository
]]
-
description
¶ (experimental) Description of the environment.
- Default
no description
- Stability
experimental
- Return type
Optional
[str
]
-
ec2_environment_name
¶ (experimental) Name of the environment.
- Default
automatically generated name
- Stability
experimental
- Return type
Optional
[str
]
-
instance_type
¶ (experimental) The type of instance to connect to the environment.
- Default
t2.micro
- Stability
experimental
- Return type
Optional
[InstanceType
]
-
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
- Return type
Optional
[SubnetSelection
]