Class CfnEnvironmentEC2

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-21T06:34:04.497Z") @Stability(Stable) public class CfnEnvironmentEC2 extends CfnResource implements IInspectable, ITaggable
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")
         .imageId("imageId")
         .instanceType("instanceType")
         // the properties below are optional
         .automaticStopTimeMinutes(123)
         .connectionType("connectionType")
         .description("description")
         .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();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnEnvironmentEC2

      protected CfnEnvironmentEC2(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnEnvironmentEC2

      protected CfnEnvironmentEC2(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnEnvironmentEC2

      @Stability(Stable) public CfnEnvironmentEC2(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnEnvironmentEC2Props props)
      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.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the development environment, such as arn:aws:cloud9:us-east-2:123456789012:environment:2bc3642873c342e485f7e0c561234567 .
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      The name of the environment.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getImageId

      @Stability(Stable) @NotNull public String getImageId()
      The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance.
    • setImageId

      @Stability(Stable) public void setImageId(@NotNull String value)
      The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance.
    • getInstanceType

      @Stability(Stable) @NotNull public String getInstanceType()
      The type of instance to connect to the environment (for example, t2.micro ).
    • setInstanceType

      @Stability(Stable) public void setInstanceType(@NotNull String value)
      The type of instance to connect to the environment (for example, t2.micro ).
    • getAutomaticStopTimeMinutes

      @Stability(Stable) @Nullable public Number getAutomaticStopTimeMinutes()
      The number of minutes until the running instance is shut down after the environment was last used.
    • setAutomaticStopTimeMinutes

      @Stability(Stable) public void setAutomaticStopTimeMinutes(@Nullable Number value)
      The number of minutes until the running instance is shut down after the environment was last used.
    • getConnectionType

      @Stability(Stable) @Nullable public String getConnectionType()
      The connection type used for connecting to an Amazon EC2 environment.
    • setConnectionType

      @Stability(Stable) public void setConnectionType(@Nullable String value)
      The connection type used for connecting to an Amazon EC2 environment.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the environment to create.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the environment to create.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the environment.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the environment.
    • getOwnerArn

      @Stability(Stable) @Nullable public String getOwnerArn()
      The Amazon Resource Name (ARN) of the environment owner.
    • setOwnerArn

      @Stability(Stable) public void setOwnerArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the environment owner.
    • getRepositories

      @Stability(Stable) @Nullable public Object getRepositories()
      Any AWS CodeCommit source code repositories to be cloned into the development environment.
    • setRepositories

      @Stability(Stable) public void setRepositories(@Nullable IResolvable value)
      Any AWS CodeCommit source code repositories to be cloned into the development environment.
    • setRepositories

      @Stability(Stable) public void setRepositories(@Nullable List<Object> value)
      Any AWS CodeCommit source code repositories to be cloned into the development environment.
    • getSubnetId

      @Stability(Stable) @Nullable public 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.
    • setSubnetId

      @Stability(Stable) public void setSubnetId(@Nullable 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.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      An array of key-value pairs that will be associated with the new AWS Cloud9 development environment.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      An array of key-value pairs that will be associated with the new AWS Cloud9 development environment.