AWS v6.77.1 published on Friday, Apr 18, 2025 by Pulumi
aws.directconnect.getConnection
Explore with Pulumi AI
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)
public static Output<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
fn::invoke:
  function: aws:directconnect/getConnection:getConnection
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
 - Name of the connection to retrieve.
 - Dictionary<string, string>
 - Map of tags for the resource.
 
- Name string
 - Name of the connection to retrieve.
 - map[string]string
 - Map of tags for the resource.
 
- name String
 - Name of the connection to retrieve.
 - Map<String,String>
 - Map of tags for the resource.
 
- name string
 - Name of the connection to retrieve.
 - {[key: string]: string}
 - Map of tags for the resource.
 
- name str
 - Name of the connection to retrieve.
 - Mapping[str, str]
 - Map of tags for the resource.
 
- name String
 - Name of the connection to retrieve.
 - Map<String>
 - Map of tags for the resource.
 
getConnection Result
The following output properties are available:
- Arn string
 - ARN of the connection.
 - Aws
Device 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
 - Owner
Account stringId  - ID of the AWS account that owns the connection.
 - Partner
Name string - The name of the AWS Direct Connect service provider associated with the connection.
 - Provider
Name string - Name of the service provider associated with the connection.
 - State string
 - State of the connection.
 - Dictionary<string, string>
 - Map of tags for the resource.
 - Vlan
Id int - The VLAN ID.
 
- Arn string
 - ARN of the connection.
 - Aws
Device 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
 - Owner
Account stringId  - ID of the AWS account that owns the connection.
 - Partner
Name string - The name of the AWS Direct Connect service provider associated with the connection.
 - Provider
Name string - Name of the service provider associated with the connection.
 - State string
 - State of the connection.
 - map[string]string
 - Map of tags for the resource.
 - Vlan
Id int - The VLAN ID.
 
- arn String
 - ARN of the connection.
 - aws
Device 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
 - owner
Account StringId  - ID of the AWS account that owns the connection.
 - partner
Name String - The name of the AWS Direct Connect service provider associated with the connection.
 - provider
Name String - Name of the service provider associated with the connection.
 - state String
 - State of the connection.
 - Map<String,String>
 - Map of tags for the resource.
 - vlan
Id Integer - The VLAN ID.
 
- arn string
 - ARN of the connection.
 - aws
Device 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
 - owner
Account stringId  - ID of the AWS account that owns the connection.
 - partner
Name string - The name of the AWS Direct Connect service provider associated with the connection.
 - provider
Name string - Name of the service provider associated with the connection.
 - state string
 - State of the connection.
 - {[key: string]: string}
 - Map of tags for the resource.
 - vlan
Id 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_ strid  - 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.
 - state str
 - State of the connection.
 - Mapping[str, str]
 - Map of tags for the resource.
 - vlan_
id int - The VLAN ID.
 
- arn String
 - ARN of the connection.
 - aws
Device 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
 - owner
Account StringId  - ID of the AWS account that owns the connection.
 - partner
Name String - The name of the AWS Direct Connect service provider associated with the connection.
 - provider
Name String - Name of the service provider associated with the connection.
 - state String
 - State of the connection.
 - Map<String>
 - Map of tags for the resource.
 - vlan
Id Number - The VLAN ID.
 
Package Details
- Repository
 - AWS Classic pulumi/pulumi-aws
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
awsTerraform Provider.