codestarconnections

package
v3.38.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 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 Connection

type Connection struct {
	pulumi.CustomResourceState

	// The codestar connection ARN.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The codestar connection status. Possible values are `PENDING`, `AVAILABLE` and `ERROR`.
	ConnectionStatus pulumi.StringOutput `pulumi:"connectionStatus"`
	// The name of the connection to be created. The name must be unique in the calling AWS account. Changing `name` will create a new resource.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the external provider where your third-party code repository is configured. Valid values are `Bitbucket`, `GitHub`, or `GitHubEnterpriseServer`. Changing `providerType` will create a new resource.
	ProviderType pulumi.StringOutput `pulumi:"providerType"`
	// Map of key-value resource tags to associate with the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

Provides a CodeStar Connection.

> **NOTE:** The `codestarconnections.Connection` resource is created in the state `PENDING`. Authentication with the connection provider must be completed in the AWS Console.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/codepipeline"
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/codestarconnections"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleConnection, err := codestarconnections.NewConnection(ctx, "exampleConnection", &codestarconnections.ConnectionArgs{
			ProviderType: pulumi.String("Bitbucket"),
		})
		if err != nil {
			return err
		}
		_, err = codepipeline.NewPipeline(ctx, "examplePipeline", &codepipeline.PipelineArgs{
			RoleArn:       pulumi.Any(aws_iam_role.Codepipeline_role.Arn),
			ArtifactStore: nil,
			Stages: codepipeline.PipelineStageArray{
				&codepipeline.PipelineStageArgs{
					Name: pulumi.String("Source"),
					Actions: codepipeline.PipelineStageActionArray{
						&codepipeline.PipelineStageActionArgs{
							Name:     pulumi.String("Source"),
							Category: pulumi.String("Source"),
							Owner:    pulumi.String("AWS"),
							Provider: pulumi.String("CodeStarSourceConnection"),
							Version:  pulumi.String("1"),
							OutputArtifacts: pulumi.StringArray{
								pulumi.String("source_output"),
							},
							Configuration: pulumi.StringMap{
								"ConnectionArn":    exampleConnection.Arn,
								"FullRepositoryId": pulumi.String("my-organization/test"),
								"BranchName":       pulumi.String("main"),
							},
						},
					},
				},
				&codepipeline.PipelineStageArgs{
					Name: pulumi.String("Build"),
					Actions: codepipeline.PipelineStageActionArray{
						nil,
					},
				},
				&codepipeline.PipelineStageArgs{
					Name: pulumi.String("Deploy"),
					Actions: codepipeline.PipelineStageActionArray{
						nil,
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

CodeStar connections can be imported using the ARN, e.g.

```sh

$ pulumi import aws:codestarconnections/connection:Connection test-connection arn:aws:codestar-connections:us-west-1:0123456789:connection/79d4d357-a2ee-41e4-b350-2fe39ae59448

```

func GetConnection

func GetConnection(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ConnectionState, opts ...pulumi.ResourceOption) (*Connection, error)

GetConnection gets an existing Connection 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 NewConnection

func NewConnection(ctx *pulumi.Context,
	name string, args *ConnectionArgs, opts ...pulumi.ResourceOption) (*Connection, error)

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

func (*Connection) ElementType

func (*Connection) ElementType() reflect.Type

func (*Connection) ToConnectionOutput

func (i *Connection) ToConnectionOutput() ConnectionOutput

func (*Connection) ToConnectionOutputWithContext

func (i *Connection) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput

func (*Connection) ToConnectionPtrOutput added in v3.25.0

func (i *Connection) ToConnectionPtrOutput() ConnectionPtrOutput

func (*Connection) ToConnectionPtrOutputWithContext added in v3.25.0

func (i *Connection) ToConnectionPtrOutputWithContext(ctx context.Context) ConnectionPtrOutput

type ConnectionArgs

type ConnectionArgs struct {
	// The name of the connection to be created. The name must be unique in the calling AWS account. Changing `name` will create a new resource.
	Name pulumi.StringPtrInput
	// The name of the external provider where your third-party code repository is configured. Valid values are `Bitbucket`, `GitHub`, or `GitHubEnterpriseServer`. Changing `providerType` will create a new resource.
	ProviderType pulumi.StringInput
	// Map of key-value resource tags to associate with the resource.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a Connection resource.

func (ConnectionArgs) ElementType

func (ConnectionArgs) ElementType() reflect.Type

type ConnectionArray added in v3.25.0

type ConnectionArray []ConnectionInput

func (ConnectionArray) ElementType added in v3.25.0

func (ConnectionArray) ElementType() reflect.Type

func (ConnectionArray) ToConnectionArrayOutput added in v3.25.0

func (i ConnectionArray) ToConnectionArrayOutput() ConnectionArrayOutput

func (ConnectionArray) ToConnectionArrayOutputWithContext added in v3.25.0

func (i ConnectionArray) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput

type ConnectionArrayInput added in v3.25.0

type ConnectionArrayInput interface {
	pulumi.Input

	ToConnectionArrayOutput() ConnectionArrayOutput
	ToConnectionArrayOutputWithContext(context.Context) ConnectionArrayOutput
}

ConnectionArrayInput is an input type that accepts ConnectionArray and ConnectionArrayOutput values. You can construct a concrete instance of `ConnectionArrayInput` via:

ConnectionArray{ ConnectionArgs{...} }

type ConnectionArrayOutput added in v3.25.0

type ConnectionArrayOutput struct{ *pulumi.OutputState }

func (ConnectionArrayOutput) ElementType added in v3.25.0

func (ConnectionArrayOutput) ElementType() reflect.Type

func (ConnectionArrayOutput) Index added in v3.25.0

func (ConnectionArrayOutput) ToConnectionArrayOutput added in v3.25.0

func (o ConnectionArrayOutput) ToConnectionArrayOutput() ConnectionArrayOutput

func (ConnectionArrayOutput) ToConnectionArrayOutputWithContext added in v3.25.0

func (o ConnectionArrayOutput) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput

type ConnectionInput

type ConnectionInput interface {
	pulumi.Input

	ToConnectionOutput() ConnectionOutput
	ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput
}

type ConnectionMap added in v3.25.0

type ConnectionMap map[string]ConnectionInput

func (ConnectionMap) ElementType added in v3.25.0

func (ConnectionMap) ElementType() reflect.Type

func (ConnectionMap) ToConnectionMapOutput added in v3.25.0

func (i ConnectionMap) ToConnectionMapOutput() ConnectionMapOutput

func (ConnectionMap) ToConnectionMapOutputWithContext added in v3.25.0

func (i ConnectionMap) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput

type ConnectionMapInput added in v3.25.0

type ConnectionMapInput interface {
	pulumi.Input

	ToConnectionMapOutput() ConnectionMapOutput
	ToConnectionMapOutputWithContext(context.Context) ConnectionMapOutput
}

ConnectionMapInput is an input type that accepts ConnectionMap and ConnectionMapOutput values. You can construct a concrete instance of `ConnectionMapInput` via:

ConnectionMap{ "key": ConnectionArgs{...} }

type ConnectionMapOutput added in v3.25.0

type ConnectionMapOutput struct{ *pulumi.OutputState }

func (ConnectionMapOutput) ElementType added in v3.25.0

func (ConnectionMapOutput) ElementType() reflect.Type

func (ConnectionMapOutput) MapIndex added in v3.25.0

func (ConnectionMapOutput) ToConnectionMapOutput added in v3.25.0

func (o ConnectionMapOutput) ToConnectionMapOutput() ConnectionMapOutput

func (ConnectionMapOutput) ToConnectionMapOutputWithContext added in v3.25.0

func (o ConnectionMapOutput) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput

type ConnectionOutput

type ConnectionOutput struct {
	*pulumi.OutputState
}

func (ConnectionOutput) ElementType

func (ConnectionOutput) ElementType() reflect.Type

func (ConnectionOutput) ToConnectionOutput

func (o ConnectionOutput) ToConnectionOutput() ConnectionOutput

func (ConnectionOutput) ToConnectionOutputWithContext

func (o ConnectionOutput) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput

func (ConnectionOutput) ToConnectionPtrOutput added in v3.25.0

func (o ConnectionOutput) ToConnectionPtrOutput() ConnectionPtrOutput

func (ConnectionOutput) ToConnectionPtrOutputWithContext added in v3.25.0

func (o ConnectionOutput) ToConnectionPtrOutputWithContext(ctx context.Context) ConnectionPtrOutput

type ConnectionPtrInput added in v3.25.0

type ConnectionPtrInput interface {
	pulumi.Input

	ToConnectionPtrOutput() ConnectionPtrOutput
	ToConnectionPtrOutputWithContext(ctx context.Context) ConnectionPtrOutput
}

type ConnectionPtrOutput added in v3.25.0

type ConnectionPtrOutput struct {
	*pulumi.OutputState
}

func (ConnectionPtrOutput) ElementType added in v3.25.0

func (ConnectionPtrOutput) ElementType() reflect.Type

func (ConnectionPtrOutput) ToConnectionPtrOutput added in v3.25.0

func (o ConnectionPtrOutput) ToConnectionPtrOutput() ConnectionPtrOutput

func (ConnectionPtrOutput) ToConnectionPtrOutputWithContext added in v3.25.0

func (o ConnectionPtrOutput) ToConnectionPtrOutputWithContext(ctx context.Context) ConnectionPtrOutput

type ConnectionState

type ConnectionState struct {
	// The codestar connection ARN.
	Arn pulumi.StringPtrInput
	// The codestar connection status. Possible values are `PENDING`, `AVAILABLE` and `ERROR`.
	ConnectionStatus pulumi.StringPtrInput
	// The name of the connection to be created. The name must be unique in the calling AWS account. Changing `name` will create a new resource.
	Name pulumi.StringPtrInput
	// The name of the external provider where your third-party code repository is configured. Valid values are `Bitbucket`, `GitHub`, or `GitHubEnterpriseServer`. Changing `providerType` will create a new resource.
	ProviderType pulumi.StringPtrInput
	// Map of key-value resource tags to associate with the resource.
	Tags pulumi.StringMapInput
}

func (ConnectionState) ElementType

func (ConnectionState) ElementType() reflect.Type

type LookupConnectionArgs added in v3.35.0

type LookupConnectionArgs struct {
	// The CodeStar Connection ARN.
	Arn string `pulumi:"arn"`
	// Map of key-value resource tags to associate with the resource.
	Tags map[string]string `pulumi:"tags"`
}

A collection of arguments for invoking getConnection.

type LookupConnectionResult added in v3.35.0

type LookupConnectionResult struct {
	Arn string `pulumi:"arn"`
	// The CodeStar Connection status. Possible values are `PENDING`, `AVAILABLE` and `ERROR`.
	ConnectionStatus string `pulumi:"connectionStatus"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The name of the CodeStar Connection. The name is unique in the calling AWS account.
	Name string `pulumi:"name"`
	// The name of the external provider where your third-party code repository is configured. Possible values are `Bitbucket`, `GitHub`, or `GitHubEnterpriseServer`.
	ProviderType string `pulumi:"providerType"`
	// Map of key-value resource tags to associate with the resource.
	Tags map[string]string `pulumi:"tags"`
}

A collection of values returned by getConnection.

func LookupConnection added in v3.35.0

func LookupConnection(ctx *pulumi.Context, args *LookupConnectionArgs, opts ...pulumi.InvokeOption) (*LookupConnectionResult, error)

Provides details about CodeStar Connection.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/codestarconnections"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := codestarconnections.LookupConnection(ctx, &codestarconnections.LookupConnectionArgs{
			Arn: aws_codestarconnections_connection.Example.Arn,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

Jump to

Keyboard shortcuts

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