1. Packages
  2. AWS Classic
  3. API Docs
  4. cloud9
  5. EnvironmentEC2

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.cloud9.EnvironmentEC2

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Provides a Cloud9 EC2 Development Environment.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.cloud9.EnvironmentEC2("example", {
        instanceType: "t2.micro",
        name: "example-env",
        imageId: "amazonlinux-2023-x86_64",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.cloud9.EnvironmentEC2("example",
        instance_type="t2.micro",
        name="example-env",
        image_id="amazonlinux-2023-x86_64")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloud9"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloud9.NewEnvironmentEC2(ctx, "example", &cloud9.EnvironmentEC2Args{
    			InstanceType: pulumi.String("t2.micro"),
    			Name:         pulumi.String("example-env"),
    			ImageId:      pulumi.String("amazonlinux-2023-x86_64"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Cloud9.EnvironmentEC2("example", new()
        {
            InstanceType = "t2.micro",
            Name = "example-env",
            ImageId = "amazonlinux-2023-x86_64",
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      example:
        type: aws:cloud9:EnvironmentEC2
        properties:
          instanceType: t2.micro
          name: example-env
          imageId: amazonlinux-2023-x86_64
    

    Get the URL of the Cloud9 environment after creation:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.cloud9.EnvironmentEC2("example", {instanceType: "t2.micro"});
    const cloud9Instance = aws.ec2.getInstanceOutput({
        filters: [{
            name: "tag:aws:cloud9:environment",
            values: [example.id],
        }],
    });
    export const cloud9Url = pulumi.interpolate`https://${region}.console.aws.amazon.com/cloud9/ide/${example.id}`;
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.cloud9.EnvironmentEC2("example", instance_type="t2.micro")
    cloud9_instance = aws.ec2.get_instance_output(filters=[aws.ec2.GetInstanceFilterArgs(
        name="tag:aws:cloud9:environment",
        values=[example.id],
    )])
    pulumi.export("cloud9Url", example.id.apply(lambda id: f"https://{region}.console.aws.amazon.com/cloud9/ide/{id}"))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloud9"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := cloud9.NewEnvironmentEC2(ctx, "example", &cloud9.EnvironmentEC2Args{
    			InstanceType: pulumi.String("t2.micro"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = ec2.LookupInstanceOutput(ctx, ec2.GetInstanceOutputArgs{
    			Filters: ec2.GetInstanceFilterArray{
    				&ec2.GetInstanceFilterArgs{
    					Name: pulumi.String("tag:aws:cloud9:environment"),
    					Values: pulumi.StringArray{
    						example.ID(),
    					},
    				},
    			},
    		}, nil)
    		ctx.Export("cloud9Url", example.ID().ApplyT(func(id string) (string, error) {
    			return fmt.Sprintf("https://%v.console.aws.amazon.com/cloud9/ide/%v", region, id), nil
    		}).(pulumi.StringOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Cloud9.EnvironmentEC2("example", new()
        {
            InstanceType = "t2.micro",
        });
    
        var cloud9Instance = Aws.Ec2.GetInstance.Invoke(new()
        {
            Filters = new[]
            {
                new Aws.Ec2.Inputs.GetInstanceFilterInputArgs
                {
                    Name = "tag:aws:cloud9:environment",
                    Values = new[]
                    {
                        example.Id,
                    },
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["cloud9Url"] = example.Id.Apply(id => $"https://{region}.console.aws.amazon.com/cloud9/ide/{id}"),
        };
    });
    
    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)));
        }
    }
    
    resources:
      example:
        type: aws:cloud9:EnvironmentEC2
        properties:
          instanceType: t2.micro
    variables:
      cloud9Instance:
        fn::invoke:
          Function: aws:ec2:getInstance
          Arguments:
            filters:
              - name: tag:aws:cloud9:environment
                values:
                  - ${example.id}
    outputs:
      cloud9Url: https://${region}.console.aws.amazon.com/cloud9/ide/${example.id}
    

    Allocate a static IP to the Cloud9 environment:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.cloud9.EnvironmentEC2("example", {instanceType: "t2.micro"});
    const cloud9Instance = aws.ec2.getInstanceOutput({
        filters: [{
            name: "tag:aws:cloud9:environment",
            values: [example.id],
        }],
    });
    const cloud9Eip = new aws.ec2.Eip("cloud9_eip", {
        instance: cloud9Instance.apply(cloud9Instance => cloud9Instance.id),
        domain: "vpc",
    });
    export const cloud9PublicIp = cloud9Eip.publicIp;
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.cloud9.EnvironmentEC2("example", instance_type="t2.micro")
    cloud9_instance = aws.ec2.get_instance_output(filters=[aws.ec2.GetInstanceFilterArgs(
        name="tag:aws:cloud9:environment",
        values=[example.id],
    )])
    cloud9_eip = aws.ec2.Eip("cloud9_eip",
        instance=cloud9_instance.id,
        domain="vpc")
    pulumi.export("cloud9PublicIp", cloud9_eip.public_ip)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloud9"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := cloud9.NewEnvironmentEC2(ctx, "example", &cloud9.EnvironmentEC2Args{
    			InstanceType: pulumi.String("t2.micro"),
    		})
    		if err != nil {
    			return err
    		}
    		cloud9Instance := ec2.LookupInstanceOutput(ctx, ec2.GetInstanceOutputArgs{
    			Filters: ec2.GetInstanceFilterArray{
    				&ec2.GetInstanceFilterArgs{
    					Name: pulumi.String("tag:aws:cloud9:environment"),
    					Values: pulumi.StringArray{
    						example.ID(),
    					},
    				},
    			},
    		}, nil)
    		cloud9Eip, err := ec2.NewEip(ctx, "cloud9_eip", &ec2.EipArgs{
    			Instance: cloud9Instance.ApplyT(func(cloud9Instance ec2.GetInstanceResult) (*string, error) {
    				return &cloud9Instance.Id, nil
    			}).(pulumi.StringPtrOutput),
    			Domain: pulumi.String("vpc"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("cloud9PublicIp", cloud9Eip.PublicIp)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Cloud9.EnvironmentEC2("example", new()
        {
            InstanceType = "t2.micro",
        });
    
        var cloud9Instance = Aws.Ec2.GetInstance.Invoke(new()
        {
            Filters = new[]
            {
                new Aws.Ec2.Inputs.GetInstanceFilterInputArgs
                {
                    Name = "tag:aws:cloud9:environment",
                    Values = new[]
                    {
                        example.Id,
                    },
                },
            },
        });
    
        var cloud9Eip = new Aws.Ec2.Eip("cloud9_eip", new()
        {
            Instance = cloud9Instance.Apply(getInstanceResult => getInstanceResult.Id),
            Domain = "vpc",
        });
    
        return new Dictionary<string, object?>
        {
            ["cloud9PublicIp"] = cloud9Eip.PublicIp,
        };
    });
    
    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());
        }
    }
    
    resources:
      example:
        type: aws:cloud9:EnvironmentEC2
        properties:
          instanceType: t2.micro
      cloud9Eip:
        type: aws:ec2:Eip
        name: cloud9_eip
        properties:
          instance: ${cloud9Instance.id}
          domain: vpc
    variables:
      cloud9Instance:
        fn::invoke:
          Function: aws:ec2:getInstance
          Arguments:
            filters:
              - name: tag:aws:cloud9:environment
                values:
                  - ${example.id}
    outputs:
      cloud9PublicIp: ${cloud9Eip.publicIp}
    

    Create EnvironmentEC2 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EnvironmentEC2(name: string, args: EnvironmentEC2Args, opts?: CustomResourceOptions);
    @overload
    def EnvironmentEC2(resource_name: str,
                       args: EnvironmentEC2Args,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnvironmentEC2(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       image_id: Optional[str] = None,
                       instance_type: Optional[str] = None,
                       automatic_stop_time_minutes: Optional[int] = None,
                       connection_type: Optional[str] = None,
                       description: Optional[str] = None,
                       name: Optional[str] = None,
                       owner_arn: Optional[str] = None,
                       subnet_id: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None)
    func NewEnvironmentEC2(ctx *Context, name string, args EnvironmentEC2Args, opts ...ResourceOption) (*EnvironmentEC2, error)
    public EnvironmentEC2(string name, EnvironmentEC2Args args, CustomResourceOptions? opts = null)
    public EnvironmentEC2(String name, EnvironmentEC2Args args)
    public EnvironmentEC2(String name, EnvironmentEC2Args args, CustomResourceOptions options)
    
    type: aws:cloud9:EnvironmentEC2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EnvironmentEC2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EnvironmentEC2Args
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EnvironmentEC2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnvironmentEC2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnvironmentEC2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var environmentEC2Resource = new Aws.Cloud9.EnvironmentEC2("environmentEC2Resource", new()
    {
        ImageId = "string",
        InstanceType = "string",
        AutomaticStopTimeMinutes = 0,
        ConnectionType = "string",
        Description = "string",
        Name = "string",
        OwnerArn = "string",
        SubnetId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := cloud9.NewEnvironmentEC2(ctx, "environmentEC2Resource", &cloud9.EnvironmentEC2Args{
    	ImageId:                  pulumi.String("string"),
    	InstanceType:             pulumi.String("string"),
    	AutomaticStopTimeMinutes: pulumi.Int(0),
    	ConnectionType:           pulumi.String("string"),
    	Description:              pulumi.String("string"),
    	Name:                     pulumi.String("string"),
    	OwnerArn:                 pulumi.String("string"),
    	SubnetId:                 pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var environmentEC2Resource = new EnvironmentEC2("environmentEC2Resource", EnvironmentEC2Args.builder()        
        .imageId("string")
        .instanceType("string")
        .automaticStopTimeMinutes(0)
        .connectionType("string")
        .description("string")
        .name("string")
        .ownerArn("string")
        .subnetId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    environment_ec2_resource = aws.cloud9.EnvironmentEC2("environmentEC2Resource",
        image_id="string",
        instance_type="string",
        automatic_stop_time_minutes=0,
        connection_type="string",
        description="string",
        name="string",
        owner_arn="string",
        subnet_id="string",
        tags={
            "string": "string",
        })
    
    const environmentEC2Resource = new aws.cloud9.EnvironmentEC2("environmentEC2Resource", {
        imageId: "string",
        instanceType: "string",
        automaticStopTimeMinutes: 0,
        connectionType: "string",
        description: "string",
        name: "string",
        ownerArn: "string",
        subnetId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:cloud9:EnvironmentEC2
    properties:
        automaticStopTimeMinutes: 0
        connectionType: string
        description: string
        imageId: string
        instanceType: string
        name: string
        ownerArn: string
        subnetId: string
        tags:
            string: string
    

    EnvironmentEC2 Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The EnvironmentEC2 resource accepts the following input properties:

    ImageId string
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    InstanceType string
    The type of instance to connect to the environment, e.g., t2.micro.
    AutomaticStopTimeMinutes int
    The number of minutes until the running instance is shut down after the environment has last been used.
    ConnectionType string
    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.
    Description string
    The description of the environment.
    Name string
    The name of the environment.
    OwnerArn string
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    SubnetId string
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    Tags Dictionary<string, string>
    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.
    ImageId string
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    InstanceType string
    The type of instance to connect to the environment, e.g., t2.micro.
    AutomaticStopTimeMinutes int
    The number of minutes until the running instance is shut down after the environment has last been used.
    ConnectionType string
    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.
    Description string
    The description of the environment.
    Name string
    The name of the environment.
    OwnerArn string
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    SubnetId string
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    Tags map[string]string
    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.
    imageId String
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    instanceType String
    The type of instance to connect to the environment, e.g., t2.micro.
    automaticStopTimeMinutes Integer
    The number of minutes until the running instance is shut down after the environment has last been used.
    connectionType String
    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.
    description String
    The description of the environment.
    name String
    The name of the environment.
    ownerArn String
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    subnetId String
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    tags Map<String,String>
    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.
    imageId string
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    instanceType string
    The type of instance to connect to the environment, e.g., t2.micro.
    automaticStopTimeMinutes number
    The number of minutes until the running instance is shut down after the environment has last been used.
    connectionType string
    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.
    description string
    The description of the environment.
    name string
    The name of the environment.
    ownerArn string
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    subnetId string
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    tags {[key: string]: string}
    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.
    image_id str
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    instance_type str
    The type of instance to connect to the environment, e.g., t2.micro.
    automatic_stop_time_minutes int
    The number of minutes until the running instance is shut down after the environment has last been used.
    connection_type str
    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.
    description str
    The description of the environment.
    name str
    The name of the environment.
    owner_arn str
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    subnet_id str
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    tags Mapping[str, str]
    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.
    imageId String
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    instanceType String
    The type of instance to connect to the environment, e.g., t2.micro.
    automaticStopTimeMinutes Number
    The number of minutes until the running instance is shut down after the environment has last been used.
    connectionType String
    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.
    description String
    The description of the environment.
    name String
    The name of the environment.
    ownerArn String
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    subnetId String
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    tags Map<String>
    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EnvironmentEC2 resource produces the following output properties:

    Arn string
    The ARN of the environment.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    The type of the environment (e.g., ssh or ec2).
    Arn string
    The ARN of the environment.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    The type of the environment (e.g., ssh or ec2).
    arn String
    The ARN of the environment.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    The type of the environment (e.g., ssh or ec2).
    arn string
    The ARN of the environment.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type string
    The type of the environment (e.g., ssh or ec2).
    arn str
    The ARN of the environment.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type str
    The type of the environment (e.g., ssh or ec2).
    arn String
    The ARN of the environment.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    The type of the environment (e.g., ssh or ec2).

    Look up Existing EnvironmentEC2 Resource

    Get an existing EnvironmentEC2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: EnvironmentEC2State, opts?: CustomResourceOptions): EnvironmentEC2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            automatic_stop_time_minutes: Optional[int] = None,
            connection_type: Optional[str] = None,
            description: Optional[str] = None,
            image_id: Optional[str] = None,
            instance_type: Optional[str] = None,
            name: Optional[str] = None,
            owner_arn: Optional[str] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            type: Optional[str] = None) -> EnvironmentEC2
    func GetEnvironmentEC2(ctx *Context, name string, id IDInput, state *EnvironmentEC2State, opts ...ResourceOption) (*EnvironmentEC2, error)
    public static EnvironmentEC2 Get(string name, Input<string> id, EnvironmentEC2State? state, CustomResourceOptions? opts = null)
    public static EnvironmentEC2 get(String name, Output<String> id, EnvironmentEC2State state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The ARN of the environment.
    AutomaticStopTimeMinutes int
    The number of minutes until the running instance is shut down after the environment has last been used.
    ConnectionType string
    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.
    Description string
    The description of the environment.
    ImageId string
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    InstanceType string
    The type of instance to connect to the environment, e.g., t2.micro.
    Name string
    The name of the environment.
    OwnerArn string
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    SubnetId string
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    Tags Dictionary<string, string>
    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.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    The type of the environment (e.g., ssh or ec2).
    Arn string
    The ARN of the environment.
    AutomaticStopTimeMinutes int
    The number of minutes until the running instance is shut down after the environment has last been used.
    ConnectionType string
    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.
    Description string
    The description of the environment.
    ImageId string
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    InstanceType string
    The type of instance to connect to the environment, e.g., t2.micro.
    Name string
    The name of the environment.
    OwnerArn string
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    SubnetId string
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    Tags map[string]string
    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.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    The type of the environment (e.g., ssh or ec2).
    arn String
    The ARN of the environment.
    automaticStopTimeMinutes Integer
    The number of minutes until the running instance is shut down after the environment has last been used.
    connectionType String
    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.
    description String
    The description of the environment.
    imageId String
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    instanceType String
    The type of instance to connect to the environment, e.g., t2.micro.
    name String
    The name of the environment.
    ownerArn String
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    subnetId String
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    tags Map<String,String>
    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.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    The type of the environment (e.g., ssh or ec2).
    arn string
    The ARN of the environment.
    automaticStopTimeMinutes number
    The number of minutes until the running instance is shut down after the environment has last been used.
    connectionType string
    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.
    description string
    The description of the environment.
    imageId string
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    instanceType string
    The type of instance to connect to the environment, e.g., t2.micro.
    name string
    The name of the environment.
    ownerArn string
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    subnetId string
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    tags {[key: string]: string}
    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.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type string
    The type of the environment (e.g., ssh or ec2).
    arn str
    The ARN of the environment.
    automatic_stop_time_minutes int
    The number of minutes until the running instance is shut down after the environment has last been used.
    connection_type str
    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.
    description str
    The description of the environment.
    image_id str
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    instance_type str
    The type of instance to connect to the environment, e.g., t2.micro.
    name str
    The name of the environment.
    owner_arn str
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    subnet_id str
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    tags Mapping[str, str]
    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.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type str
    The type of the environment (e.g., ssh or ec2).
    arn String
    The ARN of the environment.
    automaticStopTimeMinutes Number
    The number of minutes until the running instance is shut down after the environment has last been used.
    connectionType String
    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.
    description String
    The description of the environment.
    imageId String
    The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are

    • amazonlinux-1-x86_64
    • 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-1-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
    instanceType String
    The type of instance to connect to the environment, e.g., t2.micro.
    name String
    The name of the environment.
    ownerArn String
    The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
    subnetId String
    The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
    tags Map<String>
    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.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    The type of the environment (e.g., ssh or ec2).

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi