com.pulumi.aws.cloud9.EnvironmentEC2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.cloud9;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.cloud9.EnvironmentEC2Args;
import com.pulumi.aws.cloud9.inputs.EnvironmentEC2State;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a Cloud9 EC2 Development Environment.
*
* ## Example Usage
*
* Basic usage:
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.cloud9.EnvironmentEC2;
* import com.pulumi.aws.cloud9.EnvironmentEC2Args;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var example = new EnvironmentEC2("example", EnvironmentEC2Args.builder()
* .instanceType("t2.micro")
* .name("example-env")
* .imageId("amazonlinux-2023-x86_64")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* Get the URL of the Cloud9 environment after creation:
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.cloud9.EnvironmentEC2;
* import com.pulumi.aws.cloud9.EnvironmentEC2Args;
* import com.pulumi.aws.ec2.Ec2Functions;
* import com.pulumi.aws.ec2.inputs.GetInstanceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var example = new EnvironmentEC2("example", EnvironmentEC2Args.builder()
* .instanceType("t2.micro")
* .build());
*
* final var cloud9Instance = Ec2Functions.getInstance(GetInstanceArgs.builder()
* .filters(GetInstanceFilterArgs.builder()
* .name("tag:aws:cloud9:environment")
* .values(example.id())
* .build())
* .build());
*
* ctx.export("cloud9Url", example.id().applyValue(id -> String.format("https://%s.console.aws.amazon.com/cloud9/ide/%s", region,id)));
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* Allocate a static IP to the Cloud9 environment:
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.cloud9.EnvironmentEC2;
* import com.pulumi.aws.cloud9.EnvironmentEC2Args;
* import com.pulumi.aws.ec2.Ec2Functions;
* import com.pulumi.aws.ec2.inputs.GetInstanceArgs;
* import com.pulumi.aws.ec2.Eip;
* import com.pulumi.aws.ec2.EipArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var example = new EnvironmentEC2("example", EnvironmentEC2Args.builder()
* .instanceType("t2.micro")
* .build());
*
* final var cloud9Instance = Ec2Functions.getInstance(GetInstanceArgs.builder()
* .filters(GetInstanceFilterArgs.builder()
* .name("tag:aws:cloud9:environment")
* .values(example.id())
* .build())
* .build());
*
* var cloud9Eip = new Eip("cloud9Eip", EipArgs.builder()
* .instance(cloud9Instance.applyValue(getInstanceResult -> getInstanceResult).applyValue(cloud9Instance -> cloud9Instance.applyValue(getInstanceResult -> getInstanceResult.id())))
* .domain("vpc")
* .build());
*
* ctx.export("cloud9PublicIp", cloud9Eip.publicIp());
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
@ResourceType(type="aws:cloud9/environmentEC2:EnvironmentEC2")
public class EnvironmentEC2 extends com.pulumi.resources.CustomResource {
/**
* The ARN of the environment.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return The ARN of the environment.
*
*/
public Output arn() {
return this.arn;
}
/**
* The number of minutes until the running instance is shut down after the environment has last been used.
*
*/
@Export(name="automaticStopTimeMinutes", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> automaticStopTimeMinutes;
/**
* @return The number of minutes until the running instance is shut down after the environment has last been used.
*
*/
public Output> automaticStopTimeMinutes() {
return Codegen.optional(this.automaticStopTimeMinutes);
}
/**
* The connection type used for connecting to an Amazon EC2 environment. Valid values are `CONNECT_SSH` and `CONNECT_SSM`. For more information please refer [AWS documentation for Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html).
*
*/
@Export(name="connectionType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> connectionType;
/**
* @return The connection type used for connecting to an Amazon EC2 environment. Valid values are `CONNECT_SSH` and `CONNECT_SSM`. For more information please refer [AWS documentation for Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html).
*
*/
public Output> connectionType() {
return Codegen.optional(this.connectionType);
}
/**
* The description of the environment.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return The description of the environment.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are
* * `amazonlinux-2-x86_64`
* * `amazonlinux-2023-x86_64`
* * `ubuntu-18.04-x86_64`
* * `ubuntu-22.04-x86_64`
* * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64`
* * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64`
* * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64`
* * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64`
*
*/
@Export(name="imageId", refs={String.class}, tree="[0]")
private Output imageId;
/**
* @return The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are
* * `amazonlinux-2-x86_64`
* * `amazonlinux-2023-x86_64`
* * `ubuntu-18.04-x86_64`
* * `ubuntu-22.04-x86_64`
* * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64`
* * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64`
* * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64`
* * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64`
*
*/
public Output imageId() {
return this.imageId;
}
/**
* The type of instance to connect to the environment, e.g., `t2.micro`.
*
*/
@Export(name="instanceType", refs={String.class}, tree="[0]")
private Output instanceType;
/**
* @return The type of instance to connect to the environment, e.g., `t2.micro`.
*
*/
public Output instanceType() {
return this.instanceType;
}
/**
* The name of the environment.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the environment.
*
*/
public Output name() {
return this.name;
}
/**
* The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
*
*/
@Export(name="ownerArn", refs={String.class}, tree="[0]")
private Output ownerArn;
/**
* @return The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
*
*/
public Output ownerArn() {
return this.ownerArn;
}
/**
* The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
*
*/
@Export(name="subnetId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> subnetId;
/**
* @return The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
*
*/
public Output> subnetId() {
return Codegen.optional(this.subnetId);
}
/**
* Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy