github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cloud9/environmentEC2.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package cloud9
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides a Cloud9 EC2 Development Environment.
    16  //
    17  // ## Example Usage
    18  //
    19  // Basic usage:
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloud9"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			_, err := cloud9.NewEnvironmentEC2(ctx, "example", &cloud9.EnvironmentEC2Args{
    35  //				InstanceType: pulumi.String("t2.micro"),
    36  //				Name:         pulumi.String("example-env"),
    37  //				ImageId:      pulumi.String("amazonlinux-2023-x86_64"),
    38  //			})
    39  //			if err != nil {
    40  //				return err
    41  //			}
    42  //			return nil
    43  //		})
    44  //	}
    45  //
    46  // ```
    47  // <!--End PulumiCodeChooser -->
    48  //
    49  // Get the URL of the Cloud9 environment after creation:
    50  //
    51  // <!--Start PulumiCodeChooser -->
    52  // ```go
    53  // package main
    54  //
    55  // import (
    56  //
    57  //	"fmt"
    58  //
    59  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloud9"
    60  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    61  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    62  //
    63  // )
    64  //
    65  //	func main() {
    66  //		pulumi.Run(func(ctx *pulumi.Context) error {
    67  //			example, err := cloud9.NewEnvironmentEC2(ctx, "example", &cloud9.EnvironmentEC2Args{
    68  //				InstanceType: pulumi.String("t2.micro"),
    69  //			})
    70  //			if err != nil {
    71  //				return err
    72  //			}
    73  //			_ = ec2.LookupInstanceOutput(ctx, ec2.GetInstanceOutputArgs{
    74  //				Filters: ec2.GetInstanceFilterArray{
    75  //					&ec2.GetInstanceFilterArgs{
    76  //						Name: pulumi.String("tag:aws:cloud9:environment"),
    77  //						Values: pulumi.StringArray{
    78  //							example.ID(),
    79  //						},
    80  //					},
    81  //				},
    82  //			}, nil)
    83  //			ctx.Export("cloud9Url", example.ID().ApplyT(func(id string) (string, error) {
    84  //				return fmt.Sprintf("https://%v.console.aws.amazon.com/cloud9/ide/%v", region, id), nil
    85  //			}).(pulumi.StringOutput))
    86  //			return nil
    87  //		})
    88  //	}
    89  //
    90  // ```
    91  // <!--End PulumiCodeChooser -->
    92  //
    93  // Allocate a static IP to the Cloud9 environment:
    94  //
    95  // <!--Start PulumiCodeChooser -->
    96  // ```go
    97  // package main
    98  //
    99  // import (
   100  //
   101  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloud9"
   102  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
   103  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   104  //
   105  // )
   106  //
   107  //	func main() {
   108  //		pulumi.Run(func(ctx *pulumi.Context) error {
   109  //			example, err := cloud9.NewEnvironmentEC2(ctx, "example", &cloud9.EnvironmentEC2Args{
   110  //				InstanceType: pulumi.String("t2.micro"),
   111  //			})
   112  //			if err != nil {
   113  //				return err
   114  //			}
   115  //			cloud9Instance := ec2.LookupInstanceOutput(ctx, ec2.GetInstanceOutputArgs{
   116  //				Filters: ec2.GetInstanceFilterArray{
   117  //					&ec2.GetInstanceFilterArgs{
   118  //						Name: pulumi.String("tag:aws:cloud9:environment"),
   119  //						Values: pulumi.StringArray{
   120  //							example.ID(),
   121  //						},
   122  //					},
   123  //				},
   124  //			}, nil)
   125  //			cloud9Eip, err := ec2.NewEip(ctx, "cloud9_eip", &ec2.EipArgs{
   126  //				Instance: cloud9Instance.ApplyT(func(cloud9Instance ec2.GetInstanceResult) (*string, error) {
   127  //					return &cloud9Instance.Id, nil
   128  //				}).(pulumi.StringPtrOutput),
   129  //				Domain: pulumi.String("vpc"),
   130  //			})
   131  //			if err != nil {
   132  //				return err
   133  //			}
   134  //			ctx.Export("cloud9PublicIp", cloud9Eip.PublicIp)
   135  //			return nil
   136  //		})
   137  //	}
   138  //
   139  // ```
   140  // <!--End PulumiCodeChooser -->
   141  type EnvironmentEC2 struct {
   142  	pulumi.CustomResourceState
   143  
   144  	// The ARN of the environment.
   145  	Arn pulumi.StringOutput `pulumi:"arn"`
   146  	// The number of minutes until the running instance is shut down after the environment has last been used.
   147  	AutomaticStopTimeMinutes pulumi.IntPtrOutput `pulumi:"automaticStopTimeMinutes"`
   148  	// 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).
   149  	ConnectionType pulumi.StringPtrOutput `pulumi:"connectionType"`
   150  	// The description of the environment.
   151  	Description pulumi.StringPtrOutput `pulumi:"description"`
   152  	// The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are
   153  	// * `amazonlinux-1-x86_64`
   154  	// * `amazonlinux-2-x86_64`
   155  	// * `amazonlinux-2023-x86_64`
   156  	// * `ubuntu-18.04-x86_64`
   157  	// * `ubuntu-22.04-x86_64`
   158  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64`
   159  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64`
   160  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64`
   161  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64`
   162  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64`
   163  	ImageId pulumi.StringOutput `pulumi:"imageId"`
   164  	// The type of instance to connect to the environment, e.g., `t2.micro`.
   165  	InstanceType pulumi.StringOutput `pulumi:"instanceType"`
   166  	// The name of the environment.
   167  	Name pulumi.StringOutput `pulumi:"name"`
   168  	// The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
   169  	OwnerArn pulumi.StringOutput `pulumi:"ownerArn"`
   170  	// The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
   171  	SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"`
   172  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   173  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   174  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   175  	//
   176  	// Deprecated: Please use `tags` instead.
   177  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   178  	// The type of the environment (e.g., `ssh` or `ec2`).
   179  	Type pulumi.StringOutput `pulumi:"type"`
   180  }
   181  
   182  // NewEnvironmentEC2 registers a new resource with the given unique name, arguments, and options.
   183  func NewEnvironmentEC2(ctx *pulumi.Context,
   184  	name string, args *EnvironmentEC2Args, opts ...pulumi.ResourceOption) (*EnvironmentEC2, error) {
   185  	if args == nil {
   186  		return nil, errors.New("missing one or more required arguments")
   187  	}
   188  
   189  	if args.ImageId == nil {
   190  		return nil, errors.New("invalid value for required argument 'ImageId'")
   191  	}
   192  	if args.InstanceType == nil {
   193  		return nil, errors.New("invalid value for required argument 'InstanceType'")
   194  	}
   195  	opts = internal.PkgResourceDefaultOpts(opts)
   196  	var resource EnvironmentEC2
   197  	err := ctx.RegisterResource("aws:cloud9/environmentEC2:EnvironmentEC2", name, args, &resource, opts...)
   198  	if err != nil {
   199  		return nil, err
   200  	}
   201  	return &resource, nil
   202  }
   203  
   204  // GetEnvironmentEC2 gets an existing EnvironmentEC2 resource's state with the given name, ID, and optional
   205  // state properties that are used to uniquely qualify the lookup (nil if not required).
   206  func GetEnvironmentEC2(ctx *pulumi.Context,
   207  	name string, id pulumi.IDInput, state *EnvironmentEC2State, opts ...pulumi.ResourceOption) (*EnvironmentEC2, error) {
   208  	var resource EnvironmentEC2
   209  	err := ctx.ReadResource("aws:cloud9/environmentEC2:EnvironmentEC2", name, id, state, &resource, opts...)
   210  	if err != nil {
   211  		return nil, err
   212  	}
   213  	return &resource, nil
   214  }
   215  
   216  // Input properties used for looking up and filtering EnvironmentEC2 resources.
   217  type environmentEC2State struct {
   218  	// The ARN of the environment.
   219  	Arn *string `pulumi:"arn"`
   220  	// The number of minutes until the running instance is shut down after the environment has last been used.
   221  	AutomaticStopTimeMinutes *int `pulumi:"automaticStopTimeMinutes"`
   222  	// 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).
   223  	ConnectionType *string `pulumi:"connectionType"`
   224  	// The description of the environment.
   225  	Description *string `pulumi:"description"`
   226  	// The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are
   227  	// * `amazonlinux-1-x86_64`
   228  	// * `amazonlinux-2-x86_64`
   229  	// * `amazonlinux-2023-x86_64`
   230  	// * `ubuntu-18.04-x86_64`
   231  	// * `ubuntu-22.04-x86_64`
   232  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64`
   233  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64`
   234  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64`
   235  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64`
   236  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64`
   237  	ImageId *string `pulumi:"imageId"`
   238  	// The type of instance to connect to the environment, e.g., `t2.micro`.
   239  	InstanceType *string `pulumi:"instanceType"`
   240  	// The name of the environment.
   241  	Name *string `pulumi:"name"`
   242  	// The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
   243  	OwnerArn *string `pulumi:"ownerArn"`
   244  	// The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
   245  	SubnetId *string `pulumi:"subnetId"`
   246  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   247  	Tags map[string]string `pulumi:"tags"`
   248  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   249  	//
   250  	// Deprecated: Please use `tags` instead.
   251  	TagsAll map[string]string `pulumi:"tagsAll"`
   252  	// The type of the environment (e.g., `ssh` or `ec2`).
   253  	Type *string `pulumi:"type"`
   254  }
   255  
   256  type EnvironmentEC2State struct {
   257  	// The ARN of the environment.
   258  	Arn pulumi.StringPtrInput
   259  	// The number of minutes until the running instance is shut down after the environment has last been used.
   260  	AutomaticStopTimeMinutes pulumi.IntPtrInput
   261  	// 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).
   262  	ConnectionType pulumi.StringPtrInput
   263  	// The description of the environment.
   264  	Description pulumi.StringPtrInput
   265  	// The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are
   266  	// * `amazonlinux-1-x86_64`
   267  	// * `amazonlinux-2-x86_64`
   268  	// * `amazonlinux-2023-x86_64`
   269  	// * `ubuntu-18.04-x86_64`
   270  	// * `ubuntu-22.04-x86_64`
   271  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64`
   272  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64`
   273  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64`
   274  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64`
   275  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64`
   276  	ImageId pulumi.StringPtrInput
   277  	// The type of instance to connect to the environment, e.g., `t2.micro`.
   278  	InstanceType pulumi.StringPtrInput
   279  	// The name of the environment.
   280  	Name pulumi.StringPtrInput
   281  	// The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
   282  	OwnerArn pulumi.StringPtrInput
   283  	// The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
   284  	SubnetId pulumi.StringPtrInput
   285  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   286  	Tags pulumi.StringMapInput
   287  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   288  	//
   289  	// Deprecated: Please use `tags` instead.
   290  	TagsAll pulumi.StringMapInput
   291  	// The type of the environment (e.g., `ssh` or `ec2`).
   292  	Type pulumi.StringPtrInput
   293  }
   294  
   295  func (EnvironmentEC2State) ElementType() reflect.Type {
   296  	return reflect.TypeOf((*environmentEC2State)(nil)).Elem()
   297  }
   298  
   299  type environmentEC2Args struct {
   300  	// The number of minutes until the running instance is shut down after the environment has last been used.
   301  	AutomaticStopTimeMinutes *int `pulumi:"automaticStopTimeMinutes"`
   302  	// 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).
   303  	ConnectionType *string `pulumi:"connectionType"`
   304  	// The description of the environment.
   305  	Description *string `pulumi:"description"`
   306  	// The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are
   307  	// * `amazonlinux-1-x86_64`
   308  	// * `amazonlinux-2-x86_64`
   309  	// * `amazonlinux-2023-x86_64`
   310  	// * `ubuntu-18.04-x86_64`
   311  	// * `ubuntu-22.04-x86_64`
   312  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64`
   313  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64`
   314  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64`
   315  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64`
   316  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64`
   317  	ImageId string `pulumi:"imageId"`
   318  	// The type of instance to connect to the environment, e.g., `t2.micro`.
   319  	InstanceType string `pulumi:"instanceType"`
   320  	// The name of the environment.
   321  	Name *string `pulumi:"name"`
   322  	// The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
   323  	OwnerArn *string `pulumi:"ownerArn"`
   324  	// The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
   325  	SubnetId *string `pulumi:"subnetId"`
   326  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   327  	Tags map[string]string `pulumi:"tags"`
   328  }
   329  
   330  // The set of arguments for constructing a EnvironmentEC2 resource.
   331  type EnvironmentEC2Args struct {
   332  	// The number of minutes until the running instance is shut down after the environment has last been used.
   333  	AutomaticStopTimeMinutes pulumi.IntPtrInput
   334  	// 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).
   335  	ConnectionType pulumi.StringPtrInput
   336  	// The description of the environment.
   337  	Description pulumi.StringPtrInput
   338  	// The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are
   339  	// * `amazonlinux-1-x86_64`
   340  	// * `amazonlinux-2-x86_64`
   341  	// * `amazonlinux-2023-x86_64`
   342  	// * `ubuntu-18.04-x86_64`
   343  	// * `ubuntu-22.04-x86_64`
   344  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64`
   345  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64`
   346  	// * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64`
   347  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64`
   348  	// * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64`
   349  	ImageId pulumi.StringInput
   350  	// The type of instance to connect to the environment, e.g., `t2.micro`.
   351  	InstanceType pulumi.StringInput
   352  	// The name of the environment.
   353  	Name pulumi.StringPtrInput
   354  	// The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
   355  	OwnerArn pulumi.StringPtrInput
   356  	// The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
   357  	SubnetId pulumi.StringPtrInput
   358  	// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   359  	Tags pulumi.StringMapInput
   360  }
   361  
   362  func (EnvironmentEC2Args) ElementType() reflect.Type {
   363  	return reflect.TypeOf((*environmentEC2Args)(nil)).Elem()
   364  }
   365  
   366  type EnvironmentEC2Input interface {
   367  	pulumi.Input
   368  
   369  	ToEnvironmentEC2Output() EnvironmentEC2Output
   370  	ToEnvironmentEC2OutputWithContext(ctx context.Context) EnvironmentEC2Output
   371  }
   372  
   373  func (*EnvironmentEC2) ElementType() reflect.Type {
   374  	return reflect.TypeOf((**EnvironmentEC2)(nil)).Elem()
   375  }
   376  
   377  func (i *EnvironmentEC2) ToEnvironmentEC2Output() EnvironmentEC2Output {
   378  	return i.ToEnvironmentEC2OutputWithContext(context.Background())
   379  }
   380  
   381  func (i *EnvironmentEC2) ToEnvironmentEC2OutputWithContext(ctx context.Context) EnvironmentEC2Output {
   382  	return pulumi.ToOutputWithContext(ctx, i).(EnvironmentEC2Output)
   383  }
   384  
   385  // EnvironmentEC2ArrayInput is an input type that accepts EnvironmentEC2Array and EnvironmentEC2ArrayOutput values.
   386  // You can construct a concrete instance of `EnvironmentEC2ArrayInput` via:
   387  //
   388  //	EnvironmentEC2Array{ EnvironmentEC2Args{...} }
   389  type EnvironmentEC2ArrayInput interface {
   390  	pulumi.Input
   391  
   392  	ToEnvironmentEC2ArrayOutput() EnvironmentEC2ArrayOutput
   393  	ToEnvironmentEC2ArrayOutputWithContext(context.Context) EnvironmentEC2ArrayOutput
   394  }
   395  
   396  type EnvironmentEC2Array []EnvironmentEC2Input
   397  
   398  func (EnvironmentEC2Array) ElementType() reflect.Type {
   399  	return reflect.TypeOf((*[]*EnvironmentEC2)(nil)).Elem()
   400  }
   401  
   402  func (i EnvironmentEC2Array) ToEnvironmentEC2ArrayOutput() EnvironmentEC2ArrayOutput {
   403  	return i.ToEnvironmentEC2ArrayOutputWithContext(context.Background())
   404  }
   405  
   406  func (i EnvironmentEC2Array) ToEnvironmentEC2ArrayOutputWithContext(ctx context.Context) EnvironmentEC2ArrayOutput {
   407  	return pulumi.ToOutputWithContext(ctx, i).(EnvironmentEC2ArrayOutput)
   408  }
   409  
   410  // EnvironmentEC2MapInput is an input type that accepts EnvironmentEC2Map and EnvironmentEC2MapOutput values.
   411  // You can construct a concrete instance of `EnvironmentEC2MapInput` via:
   412  //
   413  //	EnvironmentEC2Map{ "key": EnvironmentEC2Args{...} }
   414  type EnvironmentEC2MapInput interface {
   415  	pulumi.Input
   416  
   417  	ToEnvironmentEC2MapOutput() EnvironmentEC2MapOutput
   418  	ToEnvironmentEC2MapOutputWithContext(context.Context) EnvironmentEC2MapOutput
   419  }
   420  
   421  type EnvironmentEC2Map map[string]EnvironmentEC2Input
   422  
   423  func (EnvironmentEC2Map) ElementType() reflect.Type {
   424  	return reflect.TypeOf((*map[string]*EnvironmentEC2)(nil)).Elem()
   425  }
   426  
   427  func (i EnvironmentEC2Map) ToEnvironmentEC2MapOutput() EnvironmentEC2MapOutput {
   428  	return i.ToEnvironmentEC2MapOutputWithContext(context.Background())
   429  }
   430  
   431  func (i EnvironmentEC2Map) ToEnvironmentEC2MapOutputWithContext(ctx context.Context) EnvironmentEC2MapOutput {
   432  	return pulumi.ToOutputWithContext(ctx, i).(EnvironmentEC2MapOutput)
   433  }
   434  
   435  type EnvironmentEC2Output struct{ *pulumi.OutputState }
   436  
   437  func (EnvironmentEC2Output) ElementType() reflect.Type {
   438  	return reflect.TypeOf((**EnvironmentEC2)(nil)).Elem()
   439  }
   440  
   441  func (o EnvironmentEC2Output) ToEnvironmentEC2Output() EnvironmentEC2Output {
   442  	return o
   443  }
   444  
   445  func (o EnvironmentEC2Output) ToEnvironmentEC2OutputWithContext(ctx context.Context) EnvironmentEC2Output {
   446  	return o
   447  }
   448  
   449  // The ARN of the environment.
   450  func (o EnvironmentEC2Output) Arn() pulumi.StringOutput {
   451  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   452  }
   453  
   454  // The number of minutes until the running instance is shut down after the environment has last been used.
   455  func (o EnvironmentEC2Output) AutomaticStopTimeMinutes() pulumi.IntPtrOutput {
   456  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.IntPtrOutput { return v.AutomaticStopTimeMinutes }).(pulumi.IntPtrOutput)
   457  }
   458  
   459  // 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).
   460  func (o EnvironmentEC2Output) ConnectionType() pulumi.StringPtrOutput {
   461  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringPtrOutput { return v.ConnectionType }).(pulumi.StringPtrOutput)
   462  }
   463  
   464  // The description of the environment.
   465  func (o EnvironmentEC2Output) Description() pulumi.StringPtrOutput {
   466  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   467  }
   468  
   469  // The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. Valid values are
   470  // * `amazonlinux-1-x86_64`
   471  // * `amazonlinux-2-x86_64`
   472  // * `amazonlinux-2023-x86_64`
   473  // * `ubuntu-18.04-x86_64`
   474  // * `ubuntu-22.04-x86_64`
   475  // * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64`
   476  // * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64`
   477  // * `resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64`
   478  // * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64`
   479  // * `resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64`
   480  func (o EnvironmentEC2Output) ImageId() pulumi.StringOutput {
   481  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringOutput { return v.ImageId }).(pulumi.StringOutput)
   482  }
   483  
   484  // The type of instance to connect to the environment, e.g., `t2.micro`.
   485  func (o EnvironmentEC2Output) InstanceType() pulumi.StringOutput {
   486  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringOutput { return v.InstanceType }).(pulumi.StringOutput)
   487  }
   488  
   489  // The name of the environment.
   490  func (o EnvironmentEC2Output) Name() pulumi.StringOutput {
   491  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   492  }
   493  
   494  // The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
   495  func (o EnvironmentEC2Output) OwnerArn() pulumi.StringOutput {
   496  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringOutput { return v.OwnerArn }).(pulumi.StringOutput)
   497  }
   498  
   499  // The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
   500  func (o EnvironmentEC2Output) SubnetId() pulumi.StringPtrOutput {
   501  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringPtrOutput { return v.SubnetId }).(pulumi.StringPtrOutput)
   502  }
   503  
   504  // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   505  func (o EnvironmentEC2Output) Tags() pulumi.StringMapOutput {
   506  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   507  }
   508  
   509  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   510  //
   511  // Deprecated: Please use `tags` instead.
   512  func (o EnvironmentEC2Output) TagsAll() pulumi.StringMapOutput {
   513  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   514  }
   515  
   516  // The type of the environment (e.g., `ssh` or `ec2`).
   517  func (o EnvironmentEC2Output) Type() pulumi.StringOutput {
   518  	return o.ApplyT(func(v *EnvironmentEC2) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
   519  }
   520  
   521  type EnvironmentEC2ArrayOutput struct{ *pulumi.OutputState }
   522  
   523  func (EnvironmentEC2ArrayOutput) ElementType() reflect.Type {
   524  	return reflect.TypeOf((*[]*EnvironmentEC2)(nil)).Elem()
   525  }
   526  
   527  func (o EnvironmentEC2ArrayOutput) ToEnvironmentEC2ArrayOutput() EnvironmentEC2ArrayOutput {
   528  	return o
   529  }
   530  
   531  func (o EnvironmentEC2ArrayOutput) ToEnvironmentEC2ArrayOutputWithContext(ctx context.Context) EnvironmentEC2ArrayOutput {
   532  	return o
   533  }
   534  
   535  func (o EnvironmentEC2ArrayOutput) Index(i pulumi.IntInput) EnvironmentEC2Output {
   536  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EnvironmentEC2 {
   537  		return vs[0].([]*EnvironmentEC2)[vs[1].(int)]
   538  	}).(EnvironmentEC2Output)
   539  }
   540  
   541  type EnvironmentEC2MapOutput struct{ *pulumi.OutputState }
   542  
   543  func (EnvironmentEC2MapOutput) ElementType() reflect.Type {
   544  	return reflect.TypeOf((*map[string]*EnvironmentEC2)(nil)).Elem()
   545  }
   546  
   547  func (o EnvironmentEC2MapOutput) ToEnvironmentEC2MapOutput() EnvironmentEC2MapOutput {
   548  	return o
   549  }
   550  
   551  func (o EnvironmentEC2MapOutput) ToEnvironmentEC2MapOutputWithContext(ctx context.Context) EnvironmentEC2MapOutput {
   552  	return o
   553  }
   554  
   555  func (o EnvironmentEC2MapOutput) MapIndex(k pulumi.StringInput) EnvironmentEC2Output {
   556  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EnvironmentEC2 {
   557  		return vs[0].(map[string]*EnvironmentEC2)[vs[1].(string)]
   558  	}).(EnvironmentEC2Output)
   559  }
   560  
   561  func init() {
   562  	pulumi.RegisterInputType(reflect.TypeOf((*EnvironmentEC2Input)(nil)).Elem(), &EnvironmentEC2{})
   563  	pulumi.RegisterInputType(reflect.TypeOf((*EnvironmentEC2ArrayInput)(nil)).Elem(), EnvironmentEC2Array{})
   564  	pulumi.RegisterInputType(reflect.TypeOf((*EnvironmentEC2MapInput)(nil)).Elem(), EnvironmentEC2Map{})
   565  	pulumi.RegisterOutputType(EnvironmentEC2Output{})
   566  	pulumi.RegisterOutputType(EnvironmentEC2ArrayOutput{})
   567  	pulumi.RegisterOutputType(EnvironmentEC2MapOutput{})
   568  }