codestarconnections

package
v4.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 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/v4/go/aws/codepipeline"
"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/codestarconnections"
"github.com/pulumi/pulumi/sdk/v3/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

func (i *Connection) ToConnectionPtrOutput() ConnectionPtrOutput

func (*Connection) ToConnectionPtrOutputWithContext

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

type ConnectionArray []ConnectionInput

func (ConnectionArray) ElementType

func (ConnectionArray) ElementType() reflect.Type

func (ConnectionArray) ToConnectionArrayOutput

func (i ConnectionArray) ToConnectionArrayOutput() ConnectionArrayOutput

func (ConnectionArray) ToConnectionArrayOutputWithContext

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

type ConnectionArrayInput

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

type ConnectionArrayOutput struct{ *pulumi.OutputState }

func (ConnectionArrayOutput) ElementType

func (ConnectionArrayOutput) ElementType() reflect.Type

func (ConnectionArrayOutput) Index

func (ConnectionArrayOutput) ToConnectionArrayOutput

func (o ConnectionArrayOutput) ToConnectionArrayOutput() ConnectionArrayOutput

func (ConnectionArrayOutput) ToConnectionArrayOutputWithContext

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

type ConnectionInput

type ConnectionInput interface {
	pulumi.Input

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

type ConnectionMap

type ConnectionMap map[string]ConnectionInput

func (ConnectionMap) ElementType

func (ConnectionMap) ElementType() reflect.Type

func (ConnectionMap) ToConnectionMapOutput

func (i ConnectionMap) ToConnectionMapOutput() ConnectionMapOutput

func (ConnectionMap) ToConnectionMapOutputWithContext

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

type ConnectionMapInput

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

type ConnectionMapOutput struct{ *pulumi.OutputState }

func (ConnectionMapOutput) ElementType

func (ConnectionMapOutput) ElementType() reflect.Type

func (ConnectionMapOutput) MapIndex

func (ConnectionMapOutput) ToConnectionMapOutput

func (o ConnectionMapOutput) ToConnectionMapOutput() ConnectionMapOutput

func (ConnectionMapOutput) ToConnectionMapOutputWithContext

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

func (o ConnectionOutput) ToConnectionPtrOutput() ConnectionPtrOutput

func (ConnectionOutput) ToConnectionPtrOutputWithContext

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

type ConnectionPtrInput

type ConnectionPtrInput interface {
	pulumi.Input

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

type ConnectionPtrOutput

type ConnectionPtrOutput struct {
	*pulumi.OutputState
}

func (ConnectionPtrOutput) ElementType

func (ConnectionPtrOutput) ElementType() reflect.Type

func (ConnectionPtrOutput) ToConnectionPtrOutput

func (o ConnectionPtrOutput) ToConnectionPtrOutput() ConnectionPtrOutput

func (ConnectionPtrOutput) ToConnectionPtrOutputWithContext

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

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

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

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/v4/go/aws/codestarconnections"
"github.com/pulumi/pulumi/sdk/v3/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