AWS Classic

v5.16.0 published on Saturday, Sep 24, 2022 by Pulumi

getConnection

Provides details about CodeStar Connection.

Example Usage

By ARN

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.CodeStarConnections.GetConnection.Invoke(new()
    {
        Arn = aws_codestarconnections_connection.Example.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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: pulumi.StringRef(aws_codestarconnections_connection.Example.Arn),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.codestarconnections.CodestarconnectionsFunctions;
import com.pulumi.aws.codestarconnections.inputs.GetConnectionArgs;
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) {
        final var example = CodestarconnectionsFunctions.getConnection(GetConnectionArgs.builder()
            .arn(aws_codestarconnections_connection.example().arn())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.codestarconnections.get_connection(arn=aws_codestarconnections_connection["example"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.codestarconnections.getConnection({
    arn: aws_codestarconnections_connection.example.arn,
});
variables:
  example:
    Fn::Invoke:
      Function: aws:codestarconnections:getConnection
      Arguments:
        arn: ${aws_codestarconnections_connection.example.arn}

By Name

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.CodeStarConnections.GetConnection.Invoke(new()
    {
        Name = aws_codestarconnections_connection.Example.Name,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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{
			Name: pulumi.StringRef(aws_codestarconnections_connection.Example.Name),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.codestarconnections.CodestarconnectionsFunctions;
import com.pulumi.aws.codestarconnections.inputs.GetConnectionArgs;
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) {
        final var example = CodestarconnectionsFunctions.getConnection(GetConnectionArgs.builder()
            .name(aws_codestarconnections_connection.example().name())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.codestarconnections.get_connection(name=aws_codestarconnections_connection["example"]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.codestarconnections.getConnection({
    name: aws_codestarconnections_connection.example.name,
});
variables:
  example:
    Fn::Invoke:
      Function: aws:codestarconnections:getConnection
      Arguments:
        name: ${aws_codestarconnections_connection.example.name}

Using getConnection

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getConnection(args: GetConnectionArgs, opts?: InvokeOptions): Promise<GetConnectionResult>
function getConnectionOutput(args: GetConnectionOutputArgs, opts?: InvokeOptions): Output<GetConnectionResult>
def get_connection(arn: Optional[str] = None,
                   name: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetConnectionResult
def get_connection_output(arn: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetConnectionResult]
func LookupConnection(ctx *Context, args *LookupConnectionArgs, opts ...InvokeOption) (*LookupConnectionResult, error)
func LookupConnectionOutput(ctx *Context, args *LookupConnectionOutputArgs, opts ...InvokeOption) LookupConnectionResultOutput

> Note: This function is named LookupConnection in the Go SDK.

public static class GetConnection 
{
    public static Task<GetConnectionResult> InvokeAsync(GetConnectionArgs args, InvokeOptions? opts = null)
    public static Output<GetConnectionResult> Invoke(GetConnectionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:codestarconnections/getConnection:getConnection
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Arn string

CodeStar Connection ARN.

Name string

CodeStar Connection name.

Tags Dictionary<string, string>

Map of key-value resource tags to associate with the resource.

Arn string

CodeStar Connection ARN.

Name string

CodeStar Connection name.

Tags map[string]string

Map of key-value resource tags to associate with the resource.

arn String

CodeStar Connection ARN.

name String

CodeStar Connection name.

tags Map<String,String>

Map of key-value resource tags to associate with the resource.

arn string

CodeStar Connection ARN.

name string

CodeStar Connection name.

tags {[key: string]: string}

Map of key-value resource tags to associate with the resource.

arn str

CodeStar Connection ARN.

name str

CodeStar Connection name.

tags Mapping[str, str]

Map of key-value resource tags to associate with the resource.

arn String

CodeStar Connection ARN.

name String

CodeStar Connection name.

tags Map<String>

Map of key-value resource tags to associate with the resource.

getConnection Result

The following output properties are available:

Arn string
ConnectionStatus string

CodeStar Connection status. Possible values are PENDING, AVAILABLE and ERROR.

HostArn string

ARN of the host associated with the connection.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Name of the CodeStar Connection. The name is unique in the calling AWS account.

ProviderType string
Tags Dictionary<string, string>

Map of key-value resource tags to associate with the resource.

Arn string
ConnectionStatus string

CodeStar Connection status. Possible values are PENDING, AVAILABLE and ERROR.

HostArn string

ARN of the host associated with the connection.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Name of the CodeStar Connection. The name is unique in the calling AWS account.

ProviderType string
Tags map[string]string

Map of key-value resource tags to associate with the resource.

arn String
connectionStatus String

CodeStar Connection status. Possible values are PENDING, AVAILABLE and ERROR.

hostArn String

ARN of the host associated with the connection.

id String

The provider-assigned unique ID for this managed resource.

name String

Name of the CodeStar Connection. The name is unique in the calling AWS account.

providerType String
tags Map<String,String>

Map of key-value resource tags to associate with the resource.

arn string
connectionStatus string

CodeStar Connection status. Possible values are PENDING, AVAILABLE and ERROR.

hostArn string

ARN of the host associated with the connection.

id string

The provider-assigned unique ID for this managed resource.

name string

Name of the CodeStar Connection. The name is unique in the calling AWS account.

providerType string
tags {[key: string]: string}

Map of key-value resource tags to associate with the resource.

arn str
connection_status str

CodeStar Connection status. Possible values are PENDING, AVAILABLE and ERROR.

host_arn str

ARN of the host associated with the connection.

id str

The provider-assigned unique ID for this managed resource.

name str

Name of the CodeStar Connection. The name is unique in the calling AWS account.

provider_type str
tags Mapping[str, str]

Map of key-value resource tags to associate with the resource.

arn String
connectionStatus String

CodeStar Connection status. Possible values are PENDING, AVAILABLE and ERROR.

hostArn String

ARN of the host associated with the connection.

id String

The provider-assigned unique ID for this managed resource.

name String

Name of the CodeStar Connection. The name is unique in the calling AWS account.

providerType String
tags Map<String>

Map of key-value resource tags to associate with the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.