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:
- Dx
Gateway stringId Identifier of the Direct Connect Gateway.
- Filters
List<Get
Direct Connect Gateway Attachment Filter Args> Configuration block(s) for filtering. Detailed below.
- 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.
- Transit
Gateway stringId Identifier of the EC2 Transit Gateway.
- Dx
Gateway stringId Identifier of the Direct Connect Gateway.
- Filters
[]Get
Direct Connect Gateway Attachment Filter Configuration block(s) for filtering. Detailed below.
- 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.
- Transit
Gateway stringId Identifier of the EC2 Transit Gateway.
- dx
Gateway stringId Identifier of the Direct Connect Gateway.
- filters
Get
Direct Connect Gateway Attachment Filter[] Configuration block(s) for filtering. Detailed below.
- {[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.
- transit
Gateway stringId Identifier of the EC2 Transit Gateway.
- dx_
gateway_ strid Identifier of the Direct Connect Gateway.
- filters
List[Get
Direct Connect Gateway Attachment Filter] Configuration block(s) for filtering. Detailed below.
- 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_ strid 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.
- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway Attachment
- Dx
Gateway stringId - Filters
List<Get
Direct Connect Gateway Attachment Filter> - Transit
Gateway stringId
- Id string
The provider-assigned unique ID for this managed resource.
- map[string]string
Key-value tags for the EC2 Transit Gateway Attachment
- Dx
Gateway stringId - Filters
[]Get
Direct Connect Gateway Attachment Filter - Transit
Gateway stringId
- id string
The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway Attachment
- dx
Gateway stringId - filters
Get
Direct Connect Gateway Attachment Filter[] - transit
Gateway stringId
- id str
The provider-assigned unique ID for this managed resource.
- Dict[str, str]
Key-value tags for the EC2 Transit Gateway Attachment
- dx_
gateway_ strid - filters
List[Get
Direct Connect Gateway Attachment Filter] - transit_
gateway_ strid
Supporting Types
GetDirectConnectGatewayAttachmentFilter
- 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
awsTerraform Provider.