GetDirectConnectGatewayAttachment

Get information on an EC2 Transit Gateway’s attachment to a Direct Connect Gateway.

Example Usage

By Transit Gateway and Direct Connect Gateway Identifiers

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetDirectConnectGatewayAttachment.InvokeAsync(new Aws.Ec2TransitGateway.GetDirectConnectGatewayAttachmentArgs
        {
            DxGatewayId = aws_dx_gateway.Example.Id,
            TransitGatewayId = aws_ec2_transit_gateway.Example.Id,
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := aws_dx_gateway.Example.Id
        opt1 := aws_ec2_transit_gateway.Example.Id
        _, err := ec2transitgateway.GetDirectConnectGatewayAttachment(ctx, &ec2transitgateway.GetDirectConnectGatewayAttachmentArgs{
            DxGatewayId:      &opt0,
            TransitGatewayId: &opt1,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.get_direct_connect_gateway_attachment(dx_gateway_id=aws_dx_gateway["example"]["id"],
    transit_gateway_id=aws_ec2_transit_gateway["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.all([aws_dx_gateway_example.id, aws_ec2_transit_gateway_example.id]).apply(([aws_dx_gateway_exampleId, aws_ec2_transit_gateway_exampleId]) => aws.ec2transitgateway.getDirectConnectGatewayAttachment({
    dxGatewayId: aws_dx_gateway_exampleId,
    transitGatewayId: aws_ec2_transit_gateway_exampleId,
}, { async: true }));

Using GetDirectConnectGatewayAttachment

function getDirectConnectGatewayAttachment(args: GetDirectConnectGatewayAttachmentArgs, opts?: InvokeOptions): Promise<GetDirectConnectGatewayAttachmentResult>
function  get_direct_connect_gateway_attachment(dx_gateway_id=None, filters=None, tags=None, transit_gateway_id=None, opts=None)
func GetDirectConnectGatewayAttachment(ctx *Context, args *GetDirectConnectGatewayAttachmentArgs, opts ...InvokeOption) (*GetDirectConnectGatewayAttachmentResult, error)
public static class GetDirectConnectGatewayAttachment {
    public static Task<GetDirectConnectGatewayAttachmentResult> InvokeAsync(GetDirectConnectGatewayAttachmentArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DxGatewayId string

Identifier of the Direct Connect Gateway.

Filters List<GetDirectConnectGatewayAttachmentFilterArgs>

Configuration block(s) for filtering. Detailed below.

Tags Dictionary<string, string>

A map of tags, each pair of which must exactly match a pair on the desired Transit Gateway Direct Connect Gateway Attachment.

TransitGatewayId string

Identifier of the EC2 Transit Gateway.

DxGatewayId string

Identifier of the Direct Connect Gateway.

Filters []GetDirectConnectGatewayAttachmentFilter

Configuration block(s) for filtering. Detailed below.

Tags map[string]string

A map of tags, each pair of which must exactly match a pair on the desired Transit Gateway Direct Connect Gateway Attachment.

TransitGatewayId string

Identifier of the EC2 Transit Gateway.

dxGatewayId string

Identifier of the Direct Connect Gateway.

filters GetDirectConnectGatewayAttachmentFilter[]

Configuration block(s) for filtering. Detailed below.

tags {[key: string]: string}

A map of tags, each pair of which must exactly match a pair on the desired Transit Gateway Direct Connect Gateway Attachment.

transitGatewayId string

Identifier of the EC2 Transit Gateway.

dx_gateway_id str

Identifier of the Direct Connect Gateway.

filters List[GetDirectConnectGatewayAttachmentFilter]

Configuration block(s) for filtering. Detailed below.

tags Dict[str, str]

A map of tags, each pair of which must exactly match a pair on the desired Transit Gateway Direct Connect Gateway Attachment.

transit_gateway_id str

Identifier of the EC2 Transit Gateway.

GetDirectConnectGatewayAttachment Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway Attachment

DxGatewayId string
Filters List<GetDirectConnectGatewayAttachmentFilter>
TransitGatewayId string
Id string

The provider-assigned unique ID for this managed resource.

Tags map[string]string

Key-value tags for the EC2 Transit Gateway Attachment

DxGatewayId string
Filters []GetDirectConnectGatewayAttachmentFilter
TransitGatewayId string
id string

The provider-assigned unique ID for this managed resource.

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway Attachment

dxGatewayId string
filters GetDirectConnectGatewayAttachmentFilter[]
transitGatewayId string
id str

The provider-assigned unique ID for this managed resource.

tags Dict[str, str]

Key-value tags for the EC2 Transit Gateway Attachment

dx_gateway_id str
filters List[GetDirectConnectGatewayAttachmentFilter]
transit_gateway_id str

Supporting Types

GetDirectConnectGatewayAttachmentFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.

Values List<string>

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

Name string

The name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.

Values []string

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

name string

The name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.

values string[]

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

name str

The name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.

values List[str]

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.