cloud9

package
v4.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentEC2

type EnvironmentEC2 struct {
	pulumi.CustomResourceState

	// The ARN of the environment.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The number of minutes until the running instance is shut down after the environment has last been used.
	AutomaticStopTimeMinutes pulumi.IntPtrOutput `pulumi:"automaticStopTimeMinutes"`
	// The description of the environment.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The type of instance to connect to the environment, e.g. `t2.micro`.
	InstanceType pulumi.StringOutput `pulumi:"instanceType"`
	// The name of the environment.
	Name pulumi.StringOutput `pulumi:"name"`
	// The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
	OwnerArn pulumi.StringOutput `pulumi:"ownerArn"`
	// The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
	SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"`
	// 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.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// A map of tags assigned to the resource, including those inherited from the provider .
	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
	// The type of the environment (e.g. `ssh` or `ec2`)
	Type pulumi.StringOutput `pulumi:"type"`
}

Provides a Cloud9 EC2 Development Environment.

## Example Usage

Basic usage:

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/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"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

Get the URL of the Cloud9 environment after creation:

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/cloud9"
"github.com/pulumi/pulumi-aws/sdk/v4/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
		}
		ctx.Export("cloud9Url", example.ID().ApplyT(func(id string) (string, error) {
			return fmt.Sprintf("%v%v%v%v", "https://", _var.Region, ".console.aws.amazon.com/cloud9/ide/", id), nil
		}).(pulumi.StringOutput))
		return nil
	})
}

```

Allocate a static IP to the Cloud9 environment:

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/cloud9"
"github.com/pulumi/pulumi-aws/sdk/v4/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
		}
		cloud9Eip, err := ec2.NewEip(ctx, "cloud9Eip", &ec2.EipArgs{
			Instance: cloud9Instance.ApplyT(func(cloud9Instance ec2.GetInstanceResult) (string, error) {
				return cloud9Instance.Id, nil
			}).(pulumi.StringOutput),
			Vpc: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		ctx.Export("cloud9PublicIp", cloud9Eip.PublicIp)
		return nil
	})
}

```

func GetEnvironmentEC2

func GetEnvironmentEC2(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *EnvironmentEC2State, opts ...pulumi.ResourceOption) (*EnvironmentEC2, error)

GetEnvironmentEC2 gets an existing EnvironmentEC2 resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewEnvironmentEC2

func NewEnvironmentEC2(ctx *pulumi.Context,
	name string, args *EnvironmentEC2Args, opts ...pulumi.ResourceOption) (*EnvironmentEC2, error)

NewEnvironmentEC2 registers a new resource with the given unique name, arguments, and options.

func (*EnvironmentEC2) ElementType

func (*EnvironmentEC2) ElementType() reflect.Type

func (*EnvironmentEC2) ToEnvironmentEC2Output

func (i *EnvironmentEC2) ToEnvironmentEC2Output() EnvironmentEC2Output

func (*EnvironmentEC2) ToEnvironmentEC2OutputWithContext

func (i *EnvironmentEC2) ToEnvironmentEC2OutputWithContext(ctx context.Context) EnvironmentEC2Output

func (*EnvironmentEC2) ToEnvironmentEC2PtrOutput

func (i *EnvironmentEC2) ToEnvironmentEC2PtrOutput() EnvironmentEC2PtrOutput

func (*EnvironmentEC2) ToEnvironmentEC2PtrOutputWithContext

func (i *EnvironmentEC2) ToEnvironmentEC2PtrOutputWithContext(ctx context.Context) EnvironmentEC2PtrOutput

type EnvironmentEC2Args

type EnvironmentEC2Args struct {
	// The number of minutes until the running instance is shut down after the environment has last been used.
	AutomaticStopTimeMinutes pulumi.IntPtrInput
	// The description of the environment.
	Description pulumi.StringPtrInput
	// The type of instance to connect to the environment, e.g. `t2.micro`.
	InstanceType pulumi.StringInput
	// The name of the environment.
	Name pulumi.StringPtrInput
	// The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
	OwnerArn pulumi.StringPtrInput
	// The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
	SubnetId pulumi.StringPtrInput
	// 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.
	Tags pulumi.StringMapInput
	// A map of tags assigned to the resource, including those inherited from the provider .
	TagsAll pulumi.StringMapInput
}

The set of arguments for constructing a EnvironmentEC2 resource.

func (EnvironmentEC2Args) ElementType

func (EnvironmentEC2Args) ElementType() reflect.Type

type EnvironmentEC2Array

type EnvironmentEC2Array []EnvironmentEC2Input

func (EnvironmentEC2Array) ElementType

func (EnvironmentEC2Array) ElementType() reflect.Type

func (EnvironmentEC2Array) ToEnvironmentEC2ArrayOutput

func (i EnvironmentEC2Array) ToEnvironmentEC2ArrayOutput() EnvironmentEC2ArrayOutput

func (EnvironmentEC2Array) ToEnvironmentEC2ArrayOutputWithContext

func (i EnvironmentEC2Array) ToEnvironmentEC2ArrayOutputWithContext(ctx context.Context) EnvironmentEC2ArrayOutput

type EnvironmentEC2ArrayInput

type EnvironmentEC2ArrayInput interface {
	pulumi.Input

	ToEnvironmentEC2ArrayOutput() EnvironmentEC2ArrayOutput
	ToEnvironmentEC2ArrayOutputWithContext(context.Context) EnvironmentEC2ArrayOutput
}

EnvironmentEC2ArrayInput is an input type that accepts EnvironmentEC2Array and EnvironmentEC2ArrayOutput values. You can construct a concrete instance of `EnvironmentEC2ArrayInput` via:

EnvironmentEC2Array{ EnvironmentEC2Args{...} }

type EnvironmentEC2ArrayOutput

type EnvironmentEC2ArrayOutput struct{ *pulumi.OutputState }

func (EnvironmentEC2ArrayOutput) ElementType

func (EnvironmentEC2ArrayOutput) ElementType() reflect.Type

func (EnvironmentEC2ArrayOutput) Index

func (EnvironmentEC2ArrayOutput) ToEnvironmentEC2ArrayOutput

func (o EnvironmentEC2ArrayOutput) ToEnvironmentEC2ArrayOutput() EnvironmentEC2ArrayOutput

func (EnvironmentEC2ArrayOutput) ToEnvironmentEC2ArrayOutputWithContext

func (o EnvironmentEC2ArrayOutput) ToEnvironmentEC2ArrayOutputWithContext(ctx context.Context) EnvironmentEC2ArrayOutput

type EnvironmentEC2Input

type EnvironmentEC2Input interface {
	pulumi.Input

	ToEnvironmentEC2Output() EnvironmentEC2Output
	ToEnvironmentEC2OutputWithContext(ctx context.Context) EnvironmentEC2Output
}

type EnvironmentEC2Map

type EnvironmentEC2Map map[string]EnvironmentEC2Input

func (EnvironmentEC2Map) ElementType

func (EnvironmentEC2Map) ElementType() reflect.Type

func (EnvironmentEC2Map) ToEnvironmentEC2MapOutput

func (i EnvironmentEC2Map) ToEnvironmentEC2MapOutput() EnvironmentEC2MapOutput

func (EnvironmentEC2Map) ToEnvironmentEC2MapOutputWithContext

func (i EnvironmentEC2Map) ToEnvironmentEC2MapOutputWithContext(ctx context.Context) EnvironmentEC2MapOutput

type EnvironmentEC2MapInput

type EnvironmentEC2MapInput interface {
	pulumi.Input

	ToEnvironmentEC2MapOutput() EnvironmentEC2MapOutput
	ToEnvironmentEC2MapOutputWithContext(context.Context) EnvironmentEC2MapOutput
}

EnvironmentEC2MapInput is an input type that accepts EnvironmentEC2Map and EnvironmentEC2MapOutput values. You can construct a concrete instance of `EnvironmentEC2MapInput` via:

EnvironmentEC2Map{ "key": EnvironmentEC2Args{...} }

type EnvironmentEC2MapOutput

type EnvironmentEC2MapOutput struct{ *pulumi.OutputState }

func (EnvironmentEC2MapOutput) ElementType

func (EnvironmentEC2MapOutput) ElementType() reflect.Type

func (EnvironmentEC2MapOutput) MapIndex

func (EnvironmentEC2MapOutput) ToEnvironmentEC2MapOutput

func (o EnvironmentEC2MapOutput) ToEnvironmentEC2MapOutput() EnvironmentEC2MapOutput

func (EnvironmentEC2MapOutput) ToEnvironmentEC2MapOutputWithContext

func (o EnvironmentEC2MapOutput) ToEnvironmentEC2MapOutputWithContext(ctx context.Context) EnvironmentEC2MapOutput

type EnvironmentEC2Output

type EnvironmentEC2Output struct{ *pulumi.OutputState }

func (EnvironmentEC2Output) ElementType

func (EnvironmentEC2Output) ElementType() reflect.Type

func (EnvironmentEC2Output) ToEnvironmentEC2Output

func (o EnvironmentEC2Output) ToEnvironmentEC2Output() EnvironmentEC2Output

func (EnvironmentEC2Output) ToEnvironmentEC2OutputWithContext

func (o EnvironmentEC2Output) ToEnvironmentEC2OutputWithContext(ctx context.Context) EnvironmentEC2Output

func (EnvironmentEC2Output) ToEnvironmentEC2PtrOutput

func (o EnvironmentEC2Output) ToEnvironmentEC2PtrOutput() EnvironmentEC2PtrOutput

func (EnvironmentEC2Output) ToEnvironmentEC2PtrOutputWithContext

func (o EnvironmentEC2Output) ToEnvironmentEC2PtrOutputWithContext(ctx context.Context) EnvironmentEC2PtrOutput

type EnvironmentEC2PtrInput

type EnvironmentEC2PtrInput interface {
	pulumi.Input

	ToEnvironmentEC2PtrOutput() EnvironmentEC2PtrOutput
	ToEnvironmentEC2PtrOutputWithContext(ctx context.Context) EnvironmentEC2PtrOutput
}

type EnvironmentEC2PtrOutput

type EnvironmentEC2PtrOutput struct{ *pulumi.OutputState }

func (EnvironmentEC2PtrOutput) Elem added in v4.15.0

func (EnvironmentEC2PtrOutput) ElementType

func (EnvironmentEC2PtrOutput) ElementType() reflect.Type

func (EnvironmentEC2PtrOutput) ToEnvironmentEC2PtrOutput

func (o EnvironmentEC2PtrOutput) ToEnvironmentEC2PtrOutput() EnvironmentEC2PtrOutput

func (EnvironmentEC2PtrOutput) ToEnvironmentEC2PtrOutputWithContext

func (o EnvironmentEC2PtrOutput) ToEnvironmentEC2PtrOutputWithContext(ctx context.Context) EnvironmentEC2PtrOutput

type EnvironmentEC2State

type EnvironmentEC2State struct {
	// The ARN of the environment.
	Arn pulumi.StringPtrInput
	// The number of minutes until the running instance is shut down after the environment has last been used.
	AutomaticStopTimeMinutes pulumi.IntPtrInput
	// The description of the environment.
	Description pulumi.StringPtrInput
	// The type of instance to connect to the environment, e.g. `t2.micro`.
	InstanceType pulumi.StringPtrInput
	// The name of the environment.
	Name pulumi.StringPtrInput
	// The ARN of the environment owner. This can be ARN of any AWS IAM principal. Defaults to the environment's creator.
	OwnerArn pulumi.StringPtrInput
	// The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
	SubnetId pulumi.StringPtrInput
	// 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.
	Tags pulumi.StringMapInput
	// A map of tags assigned to the resource, including those inherited from the provider .
	TagsAll pulumi.StringMapInput
	// The type of the environment (e.g. `ssh` or `ec2`)
	Type pulumi.StringPtrInput
}

func (EnvironmentEC2State) ElementType

func (EnvironmentEC2State) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL