get Attachments
Get information on EC2 Transit Gateway Attachments.
Example Usage
By Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const filtered = aws.ec2transitgateway.getAttachments({
filters: [
{
name: "state",
values: ["pendingAcceptance"],
},
{
name: "resource-type",
values: ["vpc"],
},
],
});
const unit = .map(__index => (aws.ec2transitgateway.getAttachment({
transitGatewayAttachmentId: _arg0_.ids[__index],
})));
Content copied to clipboard
import pulumi
import pulumi_aws as aws
filtered = aws.ec2transitgateway.get_attachments(filters=[
{
"name": "state",
"values": ["pendingAcceptance"],
},
{
"name": "resource-type",
"values": ["vpc"],
},
])
unit = [aws.ec2transitgateway.get_attachment(transit_gateway_attachment_id=filtered.ids[__index]) for __index in range(len(filtered.ids))]
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var filtered = Aws.Ec2TransitGateway.GetAttachments.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2TransitGateway.Inputs.GetAttachmentsFilterInputArgs
{
Name = "state",
Values = new[]
{
"pendingAcceptance",
},
},
new Aws.Ec2TransitGateway.Inputs.GetAttachmentsFilterInputArgs
{
Name = "resource-type",
Values = new[]
{
"vpc",
},
},
},
});
var unit = ;
});
Content copied to clipboard
Return
A collection of values returned by getAttachments.
Parameters
argument
A collection of arguments for invoking getAttachments.
suspend fun getAttachments(filters: List<GetAttachmentsFilter>? = null, tags: Map<String, String>? = null): GetAttachmentsResult
Return
A collection of values returned by getAttachments.
Parameters
filters
One or more configuration blocks containing name-values filters. Detailed below.
tags
See also
suspend fun getAttachments(argument: suspend GetAttachmentsPlainArgsBuilder.() -> Unit): GetAttachmentsResult
Return
A collection of values returned by getAttachments.
Parameters
argument
Builder for com.pulumi.aws.ec2transitgateway.kotlin.inputs.GetAttachmentsPlainArgs.