GetPeeringAttachment
Get information on an EC2 Transit Gateway Peering Attachment.
Example Usage
By Filter
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.Ec2TransitGateway.GetPeeringAttachment.InvokeAsync(new Aws.Ec2TransitGateway.GetPeeringAttachmentArgs
{
Filters =
{
new Aws.Ec2TransitGateway.Inputs.GetPeeringAttachmentFilterArgs
{
Name = "transit-gateway-attachment-id",
Values =
{
"tgw-attach-12345678",
},
},
},
}));
}
}
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 {
_, err := ec2transitgateway.LookupPeeringAttachment(ctx, &ec2transitgateway.LookupPeeringAttachmentArgs{
Filters: []ec2transitgateway.GetPeeringAttachmentFilter{
ec2transitgateway.GetPeeringAttachmentFilter{
Name: "transit-gateway-attachment-id",
Values: []string{
"tgw-attach-12345678",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_peering_attachment(filters=[{
"name": "transit-gateway-attachment-id",
"values": ["tgw-attach-12345678"],
}])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.ec2transitgateway.getPeeringAttachment({
filters: [{
name: "transit-gateway-attachment-id",
values: ["tgw-attach-12345678"],
}],
}, { async: true }));By Identifier
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var attachment = Output.Create(Aws.Ec2TransitGateway.GetPeeringAttachment.InvokeAsync(new Aws.Ec2TransitGateway.GetPeeringAttachmentArgs
{
Id = "tgw-attach-12345678",
}));
}
}
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 := "tgw-attach-12345678"
_, err := ec2transitgateway.LookupPeeringAttachment(ctx, &ec2transitgateway.LookupPeeringAttachmentArgs{
Id: &opt0,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
attachment = aws.ec2transitgateway.get_peering_attachment(id="tgw-attach-12345678")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const attachment = pulumi.output(aws.ec2transitgateway.getPeeringAttachment({
id: "tgw-attach-12345678",
}, { async: true }));Using GetPeeringAttachment
function getPeeringAttachment(args: GetPeeringAttachmentArgs, opts?: InvokeOptions): Promise<GetPeeringAttachmentResult>function get_peering_attachment(filters=None, id=None, tags=None, opts=None)func LookupPeeringAttachment(ctx *Context, args *LookupPeeringAttachmentArgs, opts ...InvokeOption) (*LookupPeeringAttachmentResult, error)Note: This function is named
LookupPeeringAttachmentin the Go SDK.
public static class GetPeeringAttachment {
public static Task<GetPeeringAttachmentResult> InvokeAsync(GetPeeringAttachmentArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Get
Peering Attachment Filter Args> One or more configuration blocks containing name-values filters. Detailed below.
- Id string
Identifier of the EC2 Transit Gateway Peering Attachment.
- Dictionary<string, string>
A mapping of tags, each pair of which must exactly match a pair on the specific EC2 Transit Gateway Peering Attachment to retrieve.
- Filters
[]Get
Peering Attachment Filter One or more configuration blocks containing name-values filters. Detailed below.
- Id string
Identifier of the EC2 Transit Gateway Peering Attachment.
- map[string]string
A mapping of tags, each pair of which must exactly match a pair on the specific EC2 Transit Gateway Peering Attachment to retrieve.
- filters
Get
Peering Attachment Filter[] One or more configuration blocks containing name-values filters. Detailed below.
- id string
Identifier of the EC2 Transit Gateway Peering Attachment.
- {[key: string]: string}
A mapping of tags, each pair of which must exactly match a pair on the specific EC2 Transit Gateway Peering Attachment to retrieve.
- filters
List[Get
Peering Attachment Filter] One or more configuration blocks containing name-values filters. Detailed below.
- id str
Identifier of the EC2 Transit Gateway Peering Attachment.
- Dict[str, str]
A mapping of tags, each pair of which must exactly match a pair on the specific EC2 Transit Gateway Peering Attachment to retrieve.
GetPeeringAttachment Result
The following output properties are available:
- Peer
Account stringId Identifier of the peer AWS account
- Peer
Region string Identifier of the peer AWS region
- Peer
Transit stringGateway Id Identifier of the peer EC2 Transit Gateway
- Dictionary<string, string>
- Transit
Gateway stringId Identifier of the local EC2 Transit Gateway
- Filters
List<Get
Peering Attachment Filter> - Id string
- Peer
Account stringId Identifier of the peer AWS account
- Peer
Region string Identifier of the peer AWS region
- Peer
Transit stringGateway Id Identifier of the peer EC2 Transit Gateway
- map[string]string
- Transit
Gateway stringId Identifier of the local EC2 Transit Gateway
- Filters
[]Get
Peering Attachment Filter - Id string
- peer
Account stringId Identifier of the peer AWS account
- peer
Region string Identifier of the peer AWS region
- peer
Transit stringGateway Id Identifier of the peer EC2 Transit Gateway
- {[key: string]: string}
- transit
Gateway stringId Identifier of the local EC2 Transit Gateway
- filters
Get
Peering Attachment Filter[] - id string
- peer_
account_ strid Identifier of the peer AWS account
- peer_
region str Identifier of the peer AWS region
- peer_
transit_ strgateway_ id Identifier of the peer EC2 Transit Gateway
- Dict[str, str]
- transit_
gateway_ strid Identifier of the local EC2 Transit Gateway
- filters
List[Get
Peering Attachment Filter] - id str
Supporting Types
GetPeeringAttachmentFilter
- Name string
The name of the field to filter by, as defined by the underlying AWS API.
- Values List<string>
Set of values that are accepted for the given field. An EC2 Transit Gateway Peering Attachment be selected if any one of the given values matches.
- Name string
The name of the field to filter by, as defined by the underlying AWS API.
- Values []string
Set of values that are accepted for the given field. An EC2 Transit Gateway Peering Attachment be selected if any one of the given values matches.
- name string
The name of the field to filter by, as defined by the underlying AWS API.
- values string[]
Set of values that are accepted for the given field. An EC2 Transit Gateway Peering Attachment be selected if any one of the given values matches.
- name str
The name of the field to filter by, as defined by the underlying AWS API.
- values List[str]
Set of values that are accepted for the given field. An EC2 Transit Gateway Peering Attachment be selected if any one of the given values matches.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.