get Direct Connect Gateway Attachment
suspend fun getDirectConnectGatewayAttachment(argument: GetDirectConnectGatewayAttachmentPlainArgs): GetDirectConnectGatewayAttachmentResult
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,
});
Content copied to clipboard
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"])
Content copied to clipboard
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,
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: aws:ec2transitgateway:getDirectConnectGatewayAttachment
arguments:
transitGatewayId: ${exampleAwsEc2TransitGateway.id}
dxGatewayId: ${exampleAwsDxGateway.id}
Content copied to clipboard
Return
A collection of values returned by getDirectConnectGatewayAttachment.
Parameters
argument
A collection of arguments for invoking getDirectConnectGatewayAttachment.
suspend fun getDirectConnectGatewayAttachment(dxGatewayId: String? = null, filters: List<GetDirectConnectGatewayAttachmentFilter>? = null, tags: Map<String, String>? = null, transitGatewayId: String? = null): GetDirectConnectGatewayAttachmentResult
Return
A collection of values returned by getDirectConnectGatewayAttachment.
Parameters
dx Gateway Id
Identifier of the Direct Connect Gateway.
filters
Configuration block(s) for filtering. Detailed below.
tags
Map of tags, each pair of which must exactly match a pair on the desired Transit Gateway Direct Connect Gateway Attachment.
transit Gateway Id
Identifier of the EC2 Transit Gateway.
See also
suspend fun getDirectConnectGatewayAttachment(argument: suspend GetDirectConnectGatewayAttachmentPlainArgsBuilder.() -> Unit): GetDirectConnectGatewayAttachmentResult
Return
A collection of values returned by getDirectConnectGatewayAttachment.
Parameters
argument
Builder for com.pulumi.aws.ec2transitgateway.kotlin.inputs.GetDirectConnectGatewayAttachmentPlainArgs.