Class Ec2Environment.Builder
java.lang.Object
software.amazon.awscdk.services.cloud9.alpha.Ec2Environment.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Ec2Environment>
- Enclosing class:
Ec2Environment
@Stability(Experimental)
public static final class Ec2Environment.Builder
extends Object
implements software.amazon.jsii.Builder<Ec2Environment>
(experimental) A fluent builder for
Ec2Environment
.-
Method Summary
Modifier and TypeMethodDescriptionautomaticStop
(Duration automaticStop) (experimental) The number of minutes until the running instance is shut down after the environment was last used.build()
clonedRepositories
(List<? extends CloneRepository> clonedRepositories) (experimental) The AWS CodeCommit repository to be cloned.connectionType
(ConnectionType connectionType) (experimental) The connection type used for connecting to an Amazon EC2 environment.static Ec2Environment.Builder
description
(String description) (experimental) Description of the environment.ec2EnvironmentName
(String ec2EnvironmentName) (experimental) Name of the environment.(experimental) The image ID used for creating an Amazon EC2 environment.instanceType
(InstanceType instanceType) (experimental) The type of instance to connect to the environment.(experimental) Owner of the environment.subnetSelection
(SubnetSelection subnetSelection) (experimental) The subnetSelection of the VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.(experimental) The VPC that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.
-
Method Details
-
create
@Stability(Experimental) public static Ec2Environment.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Ec2Environment.Builder
.
-
imageId
(experimental) The image ID used for creating an Amazon EC2 environment.- Parameters:
imageId
- The image ID used for creating an Amazon EC2 environment. This parameter is required.- Returns:
this
-
vpc
(experimental) The VPC that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.- Parameters:
vpc
- The VPC that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance. This parameter is required.- Returns:
this
-
automaticStop
(experimental) The number of minutes until the running instance is shut down after the environment was last used.Setting a value of 0 means the instance will never be automatically shut down."
Default: - The instance will not be shut down automatically.
- Parameters:
automaticStop
- The number of minutes until the running instance is shut down after the environment was last used. This parameter is required.- Returns:
this
-
clonedRepositories
@Stability(Experimental) public Ec2Environment.Builder clonedRepositories(List<? extends CloneRepository> clonedRepositories) (experimental) The AWS CodeCommit repository to be cloned.Default: - do not clone any repository
- Parameters:
clonedRepositories
- The AWS CodeCommit repository to be cloned. This parameter is required.- Returns:
this
-
connectionType
@Stability(Experimental) public Ec2Environment.Builder connectionType(ConnectionType 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_SSH
- Parameters:
connectionType
- The connection type used for connecting to an Amazon EC2 environment. This parameter is required.- Returns:
this
-
description
(experimental) Description of the environment.Default: - no description
- Parameters:
description
- Description of the environment. This parameter is required.- Returns:
this
-
ec2EnvironmentName
@Stability(Experimental) public Ec2Environment.Builder ec2EnvironmentName(String ec2EnvironmentName) (experimental) Name of the environment.Default: - automatically generated name
- Parameters:
ec2EnvironmentName
- Name of the environment. This parameter is required.- Returns:
this
-
instanceType
(experimental) The type of instance to connect to the environment.Default: - t2.micro
- Parameters:
instanceType
- The type of instance to connect to the environment. This parameter is required.- Returns:
this
-
owner
(experimental) Owner of the environment.The owner has full control of the environment and can invite additional members.
Default: - The identity that CloudFormation executes under will be the owner
- Parameters:
owner
- Owner of the environment. This parameter is required.- Returns:
this
-
subnetSelection
@Stability(Experimental) public Ec2Environment.Builder subnetSelection(SubnetSelection 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.
- Parameters:
subnetSelection
- The subnetSelection of the VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Ec2Environment>
- Returns:
- a newly built instance of
Ec2Environment
.
-