1. Packages
  2. AWS Classic
  3. API Docs
  4. codestarconnections
  5. getConnection

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi

aws.codestarconnections.getConnection

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi

    Provides details about CodeStar Connection.

    Example Usage

    By ARN

    using System.Collections.Generic;
    using System.Linq;
    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/v6/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 System.Linq;
    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/v6/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.

    NOTE: When both arn and name are specified, arn takes precedence.

    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.

    NOTE: When both arn and name are specified, arn takes precedence.

    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.

    NOTE: When both arn and name are specified, arn takes precedence.

    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.

    NOTE: When both arn and name are specified, arn takes precedence.

    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.

    NOTE: When both arn and name are specified, arn takes precedence.

    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.

    NOTE: When both arn and name are specified, arn takes precedence.

    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

    Name of the external provider where your third-party code repository is configured. Possible values are Bitbucket and GitHub. For connections to a GitHub Enterprise Server instance, you must create an aws.codestarconnections.Host resource and use host_arn instead.

    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

    Name of the external provider where your third-party code repository is configured. Possible values are Bitbucket and GitHub. For connections to a GitHub Enterprise Server instance, you must create an aws.codestarconnections.Host resource and use host_arn instead.

    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

    Name of the external provider where your third-party code repository is configured. Possible values are Bitbucket and GitHub. For connections to a GitHub Enterprise Server instance, you must create an aws.codestarconnections.Host resource and use host_arn instead.

    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

    Name of the external provider where your third-party code repository is configured. Possible values are Bitbucket and GitHub. For connections to a GitHub Enterprise Server instance, you must create an aws.codestarconnections.Host resource and use host_arn instead.

    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

    Name of the external provider where your third-party code repository is configured. Possible values are Bitbucket and GitHub. For connections to a GitHub Enterprise Server instance, you must create an aws.codestarconnections.Host resource and use host_arn instead.

    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

    Name of the external provider where your third-party code repository is configured. Possible values are Bitbucket and GitHub. For connections to a GitHub Enterprise Server instance, you must create an aws.codestarconnections.Host resource and use host_arn instead.

    tags Map<String>

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi