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 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

      @Stability(Experimental) public Ec2Environment.Builder imageId(ImageId 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

      @Stability(Experimental) public Ec2Environment.Builder vpc(IVpc 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

      @Stability(Experimental) public Ec2Environment.Builder automaticStop(Duration 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

      @Stability(Experimental) public Ec2Environment.Builder description(String 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

      @Stability(Experimental) public Ec2Environment.Builder instanceType(InstanceType 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

      @Stability(Experimental) public Ec2Environment.Builder owner(Owner 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

      @Stability(Experimental) public Ec2Environment build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Ec2Environment>
      Returns:
      a newly built instance of Ec2Environment.