1. Packages
  2. AWS Classic
  3. API Docs
  4. ec2transitgateway
  5. getDirectConnectGatewayAttachment

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

AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi

aws.ec2transitgateway.getDirectConnectGatewayAttachment

Explore with Pulumi AI

aws logo

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

AWS Classic v6.30.0 published on Thursday, Apr 11, 2024 by Pulumi

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

    Example Usage

    By Transit Gateway and Direct Connect Gateway Identifiers

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ec2transitgateway.getDirectConnectGatewayAttachment({
        transitGatewayId: exampleAwsEc2TransitGateway.id,
        dxGatewayId: exampleAwsDxGateway.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2transitgateway.get_direct_connect_gateway_attachment(transit_gateway_id=example_aws_ec2_transit_gateway["id"],
        dx_gateway_id=example_aws_dx_gateway["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2transitgateway.GetDirectConnectGatewayAttachment(ctx, &ec2transitgateway.GetDirectConnectGatewayAttachmentArgs{
    			TransitGatewayId: pulumi.StringRef(exampleAwsEc2TransitGateway.Id),
    			DxGatewayId:      pulumi.StringRef(exampleAwsDxGateway.Id),
    		}, 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.Ec2TransitGateway.GetDirectConnectGatewayAttachment.Invoke(new()
        {
            TransitGatewayId = exampleAwsEc2TransitGateway.Id,
            DxGatewayId = exampleAwsDxGateway.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
    import com.pulumi.aws.ec2transitgateway.inputs.GetDirectConnectGatewayAttachmentArgs;
    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 = Ec2transitgatewayFunctions.getDirectConnectGatewayAttachment(GetDirectConnectGatewayAttachmentArgs.builder()
                .transitGatewayId(exampleAwsEc2TransitGateway.id())
                .dxGatewayId(exampleAwsDxGateway.id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:ec2transitgateway:getDirectConnectGatewayAttachment
          Arguments:
            transitGatewayId: ${exampleAwsEc2TransitGateway.id}
            dxGatewayId: ${exampleAwsDxGateway.id}
    

    Using getDirectConnectGatewayAttachment

    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 getDirectConnectGatewayAttachment(args: GetDirectConnectGatewayAttachmentArgs, opts?: InvokeOptions): Promise<GetDirectConnectGatewayAttachmentResult>
    function getDirectConnectGatewayAttachmentOutput(args: GetDirectConnectGatewayAttachmentOutputArgs, opts?: InvokeOptions): Output<GetDirectConnectGatewayAttachmentResult>
    def get_direct_connect_gateway_attachment(dx_gateway_id: Optional[str] = None,
                                              filters: Optional[Sequence[GetDirectConnectGatewayAttachmentFilter]] = None,
                                              tags: Optional[Mapping[str, str]] = None,
                                              transit_gateway_id: Optional[str] = None,
                                              opts: Optional[InvokeOptions] = None) -> GetDirectConnectGatewayAttachmentResult
    def get_direct_connect_gateway_attachment_output(dx_gateway_id: Optional[pulumi.Input[str]] = None,
                                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDirectConnectGatewayAttachmentFilterArgs]]]] = None,
                                              tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                              transit_gateway_id: Optional[pulumi.Input[str]] = None,
                                              opts: Optional[InvokeOptions] = None) -> Output[GetDirectConnectGatewayAttachmentResult]
    func GetDirectConnectGatewayAttachment(ctx *Context, args *GetDirectConnectGatewayAttachmentArgs, opts ...InvokeOption) (*GetDirectConnectGatewayAttachmentResult, error)
    func GetDirectConnectGatewayAttachmentOutput(ctx *Context, args *GetDirectConnectGatewayAttachmentOutputArgs, opts ...InvokeOption) GetDirectConnectGatewayAttachmentResultOutput

    > Note: This function is named GetDirectConnectGatewayAttachment in the Go SDK.

    public static class GetDirectConnectGatewayAttachment 
    {
        public static Task<GetDirectConnectGatewayAttachmentResult> InvokeAsync(GetDirectConnectGatewayAttachmentArgs args, InvokeOptions? opts = null)
        public static Output<GetDirectConnectGatewayAttachmentResult> Invoke(GetDirectConnectGatewayAttachmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDirectConnectGatewayAttachmentResult> getDirectConnectGatewayAttachment(GetDirectConnectGatewayAttachmentArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ec2transitgateway/getDirectConnectGatewayAttachment:getDirectConnectGatewayAttachment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DxGatewayId string
    Identifier of the Direct Connect Gateway.
    Filters List<GetDirectConnectGatewayAttachmentFilter>
    Configuration block(s) for filtering. Detailed below.
    Tags Dictionary<string, string>
    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
    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 List<GetDirectConnectGatewayAttachmentFilter>
    Configuration block(s) for filtering. Detailed below.
    tags Map<String,String>
    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}
    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 Sequence[GetDirectConnectGatewayAttachmentFilter]
    Configuration block(s) for filtering. Detailed below.
    tags Mapping[str, str]
    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.
    dxGatewayId String
    Identifier of the Direct Connect Gateway.
    filters List<Property Map>
    Configuration block(s) for filtering. Detailed below.
    tags Map<String>
    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.

    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 Map<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 {[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 Mapping[str, str]
    Key-value tags for the EC2 Transit Gateway Attachment
    dx_gateway_id str
    filters Sequence[GetDirectConnectGatewayAttachmentFilter]
    transit_gateway_id str
    id String
    The provider-assigned unique ID for this managed resource.
    tags Map<String>
    Key-value tags for the EC2 Transit Gateway Attachment
    dxGatewayId String
    filters List<Property Map>
    transitGatewayId String

    Supporting Types

    GetDirectConnectGatewayAttachmentFilter

    Name string
    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
    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
    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
    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
    Name of the filter field. Valid values can be found in the EC2 DescribeTransitGatewayAttachments API Reference.
    values Sequence[str]
    Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
    name String
    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.

    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.30.0 published on Thursday, Apr 11, 2024 by Pulumi