Class Ec2Environment
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.cloud9.Ec2Environment
- All Implemented Interfaces:
IConstruct,IDependable,IResource,IEc2Environment,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:40.077Z")
@Stability(Experimental)
public class Ec2Environment
extends Resource
implements IEc2Environment
(experimental) A Cloud9 Environment with Amazon EC2.
Example:
// create a cloud9 ec2 environment in a new VPC
Vpc vpc = Vpc.Builder.create(this, "VPC").maxAzs(3).build();
Ec2Environment.Builder.create(this, "Cloud9Env").vpc(vpc).build();
// or create the cloud9 environment in the default VPC with specific instanceType
IVpc defaultVpc = Vpc.fromLookup(this, "DefaultVPC", VpcLookupOptions.builder().isDefault(true).build());
Ec2Environment.Builder.create(this, "Cloud9Env2")
.vpc(defaultVpc)
.instanceType(new InstanceType("t3.large"))
.build();
// or specify in a different subnetSelection
Ec2Environment c9env = Ec2Environment.Builder.create(this, "Cloud9Env3")
.vpc(vpc)
.subnetSelection(SubnetSelection.builder()
.subnetType(SubnetType.PRIVATE_WITH_NAT)
.build())
.build();
// print the Cloud9 IDE URL in the output
// print the Cloud9 IDE URL in the output
CfnOutput.Builder.create(this, "URL").value(c9env.getIdeUrl()).build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forEc2Environment.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.cloud9.IEc2Environment
IEc2Environment.Jsii$Default, IEc2Environment.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEc2Environment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedEc2Environment(software.amazon.jsii.JsiiObjectRef objRef) Ec2Environment(software.constructs.Construct scope, String id, Ec2EnvironmentProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IEc2EnvironmentfromEc2EnvironmentName(software.constructs.Construct scope, String id, String ec2EnvironmentName) (experimental) import from EnvironmentEc2Name.(experimental) The environment ARN of this Cloud9 environment.(experimental) The environment name of this Cloud9 environment.(experimental) The environment ID of this Cloud9 environment.(experimental) The complete IDE URL of this Cloud9 environment.getVpc()(experimental) VPC ID.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Ec2Environment
protected Ec2Environment(software.amazon.jsii.JsiiObjectRef objRef) -
Ec2Environment
protected Ec2Environment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Ec2Environment
@Stability(Experimental) public Ec2Environment(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull Ec2EnvironmentProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromEc2EnvironmentName
@Stability(Experimental) @NotNull public static IEc2Environment fromEc2EnvironmentName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String ec2EnvironmentName) (experimental) import from EnvironmentEc2Name.- Parameters:
scope- This parameter is required.id- This parameter is required.ec2EnvironmentName- This parameter is required.
-
getEc2EnvironmentArn
(experimental) The environment ARN of this Cloud9 environment.- Specified by:
getEc2EnvironmentArnin interfaceIEc2Environment
-
getEc2EnvironmentName
(experimental) The environment name of this Cloud9 environment.- Specified by:
getEc2EnvironmentNamein interfaceIEc2Environment
-
getEnvironmentId
(experimental) The environment ID of this Cloud9 environment. -
getIdeUrl
(experimental) The complete IDE URL of this Cloud9 environment. -
getVpc
(experimental) VPC ID.
-