1. Packages
  2. AWS
  3. API Docs
  4. directconnect
  5. getConnection
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.directconnect.getConnection

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Retrieve information about a Direct Connect Connection.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.directconnect.getConnection({
        name: "tf-dx-connection",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.directconnect.get_connection(name="tf-dx-connection")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := directconnect.LookupConnection(ctx, &directconnect.LookupConnectionArgs{
    			Name: "tf-dx-connection",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.DirectConnect.GetConnection.Invoke(new()
        {
            Name = "tf-dx-connection",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.directconnect.DirectconnectFunctions;
    import com.pulumi.aws.directconnect.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 = DirectconnectFunctions.getConnection(GetConnectionArgs.builder()
                .name("tf-dx-connection")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:directconnect:getConnection
          Arguments:
            name: tf-dx-connection
    

    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(name: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetConnectionResult
    def get_connection_output(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:directconnect/getConnection:getConnection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the connection to retrieve.
    Tags Dictionary<string, string>
    Map of tags for the resource.
    Name string
    Name of the connection to retrieve.
    Tags map[string]string
    Map of tags for the resource.
    name String
    Name of the connection to retrieve.
    tags Map<String,String>
    Map of tags for the resource.
    name string
    Name of the connection to retrieve.
    tags {[key: string]: string}
    Map of tags for the resource.
    name str
    Name of the connection to retrieve.
    tags Mapping[str, str]
    Map of tags for the resource.
    name String
    Name of the connection to retrieve.
    tags Map<String>
    Map of tags for the resource.

    getConnection Result

    The following output properties are available:

    Arn string
    ARN of the connection.
    AwsDevice string
    Direct Connect endpoint on which the physical connection terminates.
    Bandwidth string
    Bandwidth of the connection.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    AWS Direct Connect location where the connection is located.
    Name string
    OwnerAccountId string
    ID of the AWS account that owns the connection.
    PartnerName string
    The name of the AWS Direct Connect service provider associated with the connection.
    ProviderName string
    Name of the service provider associated with the connection.
    Tags Dictionary<string, string>
    Map of tags for the resource.
    VlanId int
    The VLAN ID.
    Arn string
    ARN of the connection.
    AwsDevice string
    Direct Connect endpoint on which the physical connection terminates.
    Bandwidth string
    Bandwidth of the connection.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    AWS Direct Connect location where the connection is located.
    Name string
    OwnerAccountId string
    ID of the AWS account that owns the connection.
    PartnerName string
    The name of the AWS Direct Connect service provider associated with the connection.
    ProviderName string
    Name of the service provider associated with the connection.
    Tags map[string]string
    Map of tags for the resource.
    VlanId int
    The VLAN ID.
    arn String
    ARN of the connection.
    awsDevice String
    Direct Connect endpoint on which the physical connection terminates.
    bandwidth String
    Bandwidth of the connection.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    AWS Direct Connect location where the connection is located.
    name String
    ownerAccountId String
    ID of the AWS account that owns the connection.
    partnerName String
    The name of the AWS Direct Connect service provider associated with the connection.
    providerName String
    Name of the service provider associated with the connection.
    tags Map<String,String>
    Map of tags for the resource.
    vlanId Integer
    The VLAN ID.
    arn string
    ARN of the connection.
    awsDevice string
    Direct Connect endpoint on which the physical connection terminates.
    bandwidth string
    Bandwidth of the connection.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    AWS Direct Connect location where the connection is located.
    name string
    ownerAccountId string
    ID of the AWS account that owns the connection.
    partnerName string
    The name of the AWS Direct Connect service provider associated with the connection.
    providerName string
    Name of the service provider associated with the connection.
    tags {[key: string]: string}
    Map of tags for the resource.
    vlanId number
    The VLAN ID.
    arn str
    ARN of the connection.
    aws_device str
    Direct Connect endpoint on which the physical connection terminates.
    bandwidth str
    Bandwidth of the connection.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    AWS Direct Connect location where the connection is located.
    name str
    owner_account_id str
    ID of the AWS account that owns the connection.
    partner_name str
    The name of the AWS Direct Connect service provider associated with the connection.
    provider_name str
    Name of the service provider associated with the connection.
    tags Mapping[str, str]
    Map of tags for the resource.
    vlan_id int
    The VLAN ID.
    arn String
    ARN of the connection.
    awsDevice String
    Direct Connect endpoint on which the physical connection terminates.
    bandwidth String
    Bandwidth of the connection.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    AWS Direct Connect location where the connection is located.
    name String
    ownerAccountId String
    ID of the AWS account that owns the connection.
    partnerName String
    The name of the AWS Direct Connect service provider associated with the connection.
    providerName String
    Name of the service provider associated with the connection.
    tags Map<String>
    Map of tags for the resource.
    vlanId Number
    The VLAN ID.

    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
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi