Class Ec2EnvironmentProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloud9.alpha.Ec2EnvironmentProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Ec2EnvironmentProps>
- Enclosing interface:
Ec2EnvironmentProps
@Stability(Experimental)
public static final class Ec2EnvironmentProps.Builder
extends Object
implements software.amazon.jsii.Builder<Ec2EnvironmentProps>
A builder for
Ec2EnvironmentProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautomaticStop
(Duration automaticStop) Sets the value ofEc2EnvironmentProps.getAutomaticStop()
build()
Builds the configured instance.clonedRepositories
(List<? extends CloneRepository> clonedRepositories) Sets the value ofEc2EnvironmentProps.getClonedRepositories()
connectionType
(ConnectionType connectionType) Sets the value ofEc2EnvironmentProps.getConnectionType()
description
(String description) Sets the value ofEc2EnvironmentProps.getDescription()
ec2EnvironmentName
(String ec2EnvironmentName) Sets the value ofEc2EnvironmentProps.getEc2EnvironmentName()
Sets the value ofEc2EnvironmentProps.getImageId()
instanceType
(InstanceType instanceType) Sets the value ofEc2EnvironmentProps.getInstanceType()
Sets the value ofEc2EnvironmentProps.getOwner()
subnetSelection
(SubnetSelection subnetSelection) Sets the value ofEc2EnvironmentProps.getSubnetSelection()
Sets the value ofEc2EnvironmentProps.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
imageId
Sets the value ofEc2EnvironmentProps.getImageId()
- Parameters:
imageId
- The image ID used for creating an Amazon EC2 environment. This parameter is required.- Returns:
this
-
vpc
Sets the value ofEc2EnvironmentProps.getVpc()
- 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
Sets the value ofEc2EnvironmentProps.getAutomaticStop()
- Parameters:
automaticStop
- 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."- Returns:
this
-
clonedRepositories
@Stability(Experimental) public Ec2EnvironmentProps.Builder clonedRepositories(List<? extends CloneRepository> clonedRepositories) Sets the value ofEc2EnvironmentProps.getClonedRepositories()
- Parameters:
clonedRepositories
- The AWS CodeCommit repository to be cloned.- Returns:
this
-
connectionType
@Stability(Experimental) public Ec2EnvironmentProps.Builder connectionType(ConnectionType connectionType) Sets the value ofEc2EnvironmentProps.getConnectionType()
- Parameters:
connectionType
- 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)- Returns:
this
-
description
Sets the value ofEc2EnvironmentProps.getDescription()
- Parameters:
description
- Description of the environment.- Returns:
this
-
ec2EnvironmentName
@Stability(Experimental) public Ec2EnvironmentProps.Builder ec2EnvironmentName(String ec2EnvironmentName) Sets the value ofEc2EnvironmentProps.getEc2EnvironmentName()
- Parameters:
ec2EnvironmentName
- Name of the environment.- Returns:
this
-
instanceType
Sets the value ofEc2EnvironmentProps.getInstanceType()
- Parameters:
instanceType
- The type of instance to connect to the environment.- Returns:
this
-
owner
Sets the value ofEc2EnvironmentProps.getOwner()
- Parameters:
owner
- Owner of the environment. The owner has full control of the environment and can invite additional members.- Returns:
this
-
subnetSelection
@Stability(Experimental) public Ec2EnvironmentProps.Builder subnetSelection(SubnetSelection subnetSelection) Sets the value ofEc2EnvironmentProps.getSubnetSelection()
- Parameters:
subnetSelection
- The subnetSelection of the VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Ec2EnvironmentProps>
- Returns:
- a new instance of
Ec2EnvironmentProps
- Throws:
NullPointerException
- if any required attribute was not provided
-