Try AWS Native preview for resources not in the classic version.
AWS Classic v6.51.0 published on Friday, Sep 6, 2024 by Pulumi
aws.ec2transitgateway.getDirectConnectGatewayAttachment
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.51.0 published on Friday, Sep 6, 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:
- Dx
Gateway stringId - Identifier of the Direct Connect Gateway.
- Filters
List<Get
Direct Connect Gateway Attachment Filter> - Configuration block(s) for filtering. Detailed below.
- Dictionary<string, string>
- 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
- 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
List<Get
Direct Connect Gateway Attachment Filter> - Configuration block(s) for filtering. Detailed below.
- Map<String,String>
- 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}
- 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
Sequence[Get
Direct Connect Gateway Attachment Filter] - Configuration block(s) for filtering. Detailed below.
- 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_ strid - Identifier of the EC2 Transit Gateway.
- dx
Gateway StringId - Identifier of the Direct Connect Gateway.
- filters List<Property Map>
- Configuration block(s) for filtering. Detailed below.
- Map<String>
- 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.
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.
- Map<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.
- {[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.
- Mapping[str, str]
- Key-value tags for the EC2 Transit Gateway Attachment
- dx_
gateway_ strid - filters
Sequence[Get
Direct Connect Gateway Attachment Filter] - transit_
gateway_ strid
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- Key-value tags for the EC2 Transit Gateway Attachment
- dx
Gateway StringId - filters List<Property Map>
- transit
Gateway StringId
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.
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.51.0 published on Friday, Sep 6, 2024 by Pulumi