Class CfnEnvironmentEC2.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEnvironmentEC2>
- Enclosing class:
CfnEnvironmentEC2
CfnEnvironmentEC2
.-
Method Summary
Modifier and TypeMethodDescriptionautomaticStopTimeMinutes
(Number automaticStopTimeMinutes) The number of minutes until the running instance is shut down after the environment was last used.build()
connectionType
(String connectionType) The connection type used for connecting to an Amazon EC2 environment.static CfnEnvironmentEC2.Builder
description
(String description) The description of the environment to create.The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance.instanceType
(String instanceType) The type of instance to connect to the environment (for example,t2.micro
).The name of the environment.The Amazon Resource Name (ARN) of the environment owner.repositories
(List<? extends Object> repositories) Any AWS CodeCommit source code repositories to be cloned into the development environment.repositories
(IResolvable repositories) Any AWS CodeCommit source code repositories to be cloned into the development environment.The ID of the subnet in Amazon Virtual Private Cloud (Amazon VPC) that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.An array of key-value pairs that will be associated with the new AWS Cloud9 development environment.
-
Method Details
-
create
@Stability(Stable) public static CfnEnvironmentEC2.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnEnvironmentEC2.Builder
.
-
imageId
The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance.To choose an AMI for the instance, you must specify a valid AMI alias or a valid AWS Systems Manager path.
From December 04, 2023, you will be required to include the
ImageId
parameter for theCreateEnvironmentEC2
action. This change will be reflected across all direct methods of communicating with the API, such as AWS SDK, AWS CLI and AWS CloudFormation. This change will only affect direct API consumers, and not AWS Cloud9 console users.Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.
AMI aliases
- Amazon Linux 2:
amazonlinux-2-x86_64
- Amazon Linux 2023 (recommended):
amazonlinux-2023-x86_64
- Ubuntu 18.04:
ubuntu-18.04-x86_64
- Ubuntu 22.04:
ubuntu-22.04-x86_64
SSM paths
- Amazon Linux 2:
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
- Amazon Linux 2023 (recommended):
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64
- Ubuntu 18.04:
resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64
- Ubuntu 22.04:
resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64
- Parameters:
imageId
- The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. This parameter is required.- Returns:
this
- See Also:
- Amazon Linux 2:
-
instanceType
The type of instance to connect to the environment (for example,t2.micro
).- Parameters:
instanceType
- The type of instance to connect to the environment (for example,t2.micro
). This parameter is required.- Returns:
this
- See Also:
-
automaticStopTimeMinutes
@Stability(Stable) public CfnEnvironmentEC2.Builder automaticStopTimeMinutes(Number automaticStopTimeMinutes) The number of minutes until the running instance is shut down after the environment was last used.- Parameters:
automaticStopTimeMinutes
- The number of minutes until the running instance is shut down after the environment was last used. This parameter is required.- Returns:
this
- See Also:
-
connectionType
The connection type used for connecting to an Amazon EC2 environment.Valid values are
CONNECT_SSH
(default) andCONNECT_SSM
(connected through AWS Systems Manager ).- Parameters:
connectionType
- The connection type used for connecting to an Amazon EC2 environment. This parameter is required.- Returns:
this
- See Also:
-
description
The description of the environment to create.- Parameters:
description
- The description of the environment to create. This parameter is required.- Returns:
this
- See Also:
-
name
The name of the environment.- Parameters:
name
- The name of the environment. This parameter is required.- Returns:
this
- See Also:
-
ownerArn
The Amazon Resource Name (ARN) of the environment owner.This ARN can be the ARN of any AWS Identity and Access Management principal. If this value is not specified, the ARN defaults to this environment's creator.
- Parameters:
ownerArn
- The Amazon Resource Name (ARN) of the environment owner. This parameter is required.- Returns:
this
- See Also:
-
repositories
Any AWS CodeCommit source code repositories to be cloned into the development environment.- Parameters:
repositories
- Any AWS CodeCommit source code repositories to be cloned into the development environment. This parameter is required.- Returns:
this
- See Also:
-
repositories
@Stability(Stable) public CfnEnvironmentEC2.Builder repositories(List<? extends Object> repositories) Any AWS CodeCommit source code repositories to be cloned into the development environment.- Parameters:
repositories
- Any AWS CodeCommit source code repositories to be cloned into the development environment. This parameter is required.- Returns:
this
- See Also:
-
subnetId
The ID of the subnet in Amazon Virtual Private Cloud (Amazon VPC) that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.- Parameters:
subnetId
- The ID of the subnet in Amazon Virtual Private Cloud (Amazon VPC) that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance. This parameter is required.- Returns:
this
- See Also:
-
tags
An array of key-value pairs that will be associated with the new AWS Cloud9 development environment.- Parameters:
tags
- An array of key-value pairs that will be associated with the new AWS Cloud9 development environment. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnEnvironmentEC2>
- Returns:
- a newly built instance of
CfnEnvironmentEC2
.
-