@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:22.789Z") public class CfnEnvironmentEC2 extends CfnResource implements IInspectable
The AWS::Cloud9::EnvironmentEC2
resource creates an Amazon EC2 development environment in AWS Cloud9 . For more information, see Creating an Environment in the AWS Cloud9 User Guide .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.cloud9.*; CfnEnvironmentEC2 cfnEnvironmentEC2 = CfnEnvironmentEC2.Builder.create(this, "MyCfnEnvironmentEC2") .instanceType("instanceType") // the properties below are optional .automaticStopTimeMinutes(123) .connectionType("connectionType") .description("description") .imageId("imageId") .name("name") .ownerArn("ownerArn") .repositories(List.of(RepositoryProperty.builder() .pathComponent("pathComponent") .repositoryUrl("repositoryUrl") .build())) .subnetId("subnetId") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnEnvironmentEC2.Builder
A fluent builder for
CfnEnvironmentEC2 . |
static interface |
CfnEnvironmentEC2.RepositoryProperty
The `Repository` property type specifies an AWS CodeCommit source code repository to be cloned into an AWS Cloud9 development environment.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnEnvironmentEC2(Construct scope,
java.lang.String id,
CfnEnvironmentEC2Props props)
Create a new `AWS::Cloud9::EnvironmentEC2`.
|
protected |
CfnEnvironmentEC2(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnEnvironmentEC2(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the development environment, such as `arn:aws:cloud9:us-east-2:123456789012:environment:2bc3642873c342e485f7e0c561234567` .
|
java.lang.String |
getAttrName()
The name of the environment.
|
java.lang.Number |
getAutomaticStopTimeMinutes()
The number of minutes until the running instance is shut down after the environment was last used.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getConnectionType()
The connection type used for connecting to an Amazon EC2 environment.
|
java.lang.String |
getDescription()
The description of the environment to create.
|
java.lang.String |
getImageId()
The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance.
|
java.lang.String |
getInstanceType()
The type of instance to connect to the environment (for example, `t2.micro` ).
|
java.lang.String |
getName()
The name of the environment.
|
java.lang.String |
getOwnerArn()
The Amazon Resource Name (ARN) of the environment owner.
|
java.lang.Object |
getRepositories()
Any AWS CodeCommit source code repositories to be cloned into the development environment.
|
java.lang.String |
getSubnetId()
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.
|
TagManager |
getTags()
An array of key-value pairs that will be associated with the new AWS Cloud9 development environment.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAutomaticStopTimeMinutes(java.lang.Number value)
The number of minutes until the running instance is shut down after the environment was last used.
|
void |
setConnectionType(java.lang.String value)
The connection type used for connecting to an Amazon EC2 environment.
|
void |
setDescription(java.lang.String value)
The description of the environment to create.
|
void |
setImageId(java.lang.String value)
The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance.
|
void |
setInstanceType(java.lang.String value)
The type of instance to connect to the environment (for example, `t2.micro` ).
|
void |
setName(java.lang.String value)
The name of the environment.
|
void |
setOwnerArn(java.lang.String value)
The Amazon Resource Name (ARN) of the environment owner.
|
void |
setRepositories(IResolvable value)
Any AWS CodeCommit source code repositories to be cloned into the development environment.
|
void |
setRepositories(java.util.List<java.lang.Object> value)
Any AWS CodeCommit source code repositories to be cloned into the development environment.
|
void |
setSubnetId(java.lang.String value)
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.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnEnvironmentEC2(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnEnvironmentEC2(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnEnvironmentEC2(Construct scope, java.lang.String id, CfnEnvironmentEC2Props props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getInstanceType()
public void setInstanceType(java.lang.String value)
public java.lang.Number getAutomaticStopTimeMinutes()
public void setAutomaticStopTimeMinutes(java.lang.Number value)
public java.lang.String getConnectionType()
Valid values are CONNECT_SSH
(default) and CONNECT_SSM
(connected through AWS Systems Manager ).
public void setConnectionType(java.lang.String value)
Valid values are CONNECT_SSH
(default) and CONNECT_SSM
(connected through AWS Systems Manager ).
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getImageId()
To choose an AMI for the instance, you must specify a valid AMI alias or a valid AWS Systems Manager path.
The default AMI is used if the parameter isn't explicitly assigned a value in the request.
AMI aliases
amazonlinux-1-x86_64
amazonlinux-2-x86_64
ubuntu-18.04-x86_64
SSM paths
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64
public void setImageId(java.lang.String value)
To choose an AMI for the instance, you must specify a valid AMI alias or a valid AWS Systems Manager path.
The default AMI is used if the parameter isn't explicitly assigned a value in the request.
AMI aliases
amazonlinux-1-x86_64
amazonlinux-2-x86_64
ubuntu-18.04-x86_64
SSM paths
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64
resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getOwnerArn()
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.
public void setOwnerArn(java.lang.String value)
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.
public java.lang.Object getRepositories()
public void setRepositories(IResolvable value)
public void setRepositories(java.util.List<java.lang.Object> value)
public java.lang.String getSubnetId()
public void setSubnetId(java.lang.String value)