AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi
aws.ec2transitgateway.getPeeringAttachments
Explore with Pulumi AI
Get information on EC2 Transit Gateway Peering Attachments.
Example Usage
All Resources
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.ec2transitgateway.getPeeringAttachments({});
import pulumi
import pulumi_aws as aws
test = aws.ec2transitgateway.get_peering_attachments()
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.GetPeeringAttachments(ctx, nil, 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 test = Aws.Ec2TransitGateway.GetPeeringAttachments.Invoke();
});
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.GetPeeringAttachmentsArgs;
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 test = Ec2transitgatewayFunctions.getPeeringAttachments();
}
}
variables:
test:
fn::invoke:
Function: aws:ec2transitgateway:getPeeringAttachments
Arguments: {}
By Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const filtered = aws.ec2transitgateway.getPeeringAttachments({
filters: [{
name: "state",
values: ["pendingAcceptance"],
}],
});
const unit = .map(__index => (aws.ec2transitgateway.getPeeringAttachment({
id: _arg0_.ids[__index],
})));
import pulumi
import pulumi_aws as aws
filtered = aws.ec2transitgateway.get_peering_attachments(filters=[{
"name": "state",
"values": ["pendingAcceptance"],
}])
unit = [aws.ec2transitgateway.get_peering_attachment(id=filtered.ids[__index]) for __index in range(len(filtered.ids))]
Coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var filtered = Aws.Ec2TransitGateway.GetPeeringAttachments.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2TransitGateway.Inputs.GetPeeringAttachmentsFilterInputArgs
{
Name = "state",
Values = new[]
{
"pendingAcceptance",
},
},
},
});
var unit = ;
});
Coming soon!
Coming soon!
Using getPeeringAttachments
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 getPeeringAttachments(args: GetPeeringAttachmentsArgs, opts?: InvokeOptions): Promise<GetPeeringAttachmentsResult>
function getPeeringAttachmentsOutput(args: GetPeeringAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetPeeringAttachmentsResult>
def get_peering_attachments(filters: Optional[Sequence[GetPeeringAttachmentsFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetPeeringAttachmentsResult
def get_peering_attachments_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetPeeringAttachmentsFilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPeeringAttachmentsResult]
func GetPeeringAttachments(ctx *Context, args *GetPeeringAttachmentsArgs, opts ...InvokeOption) (*GetPeeringAttachmentsResult, error)
func GetPeeringAttachmentsOutput(ctx *Context, args *GetPeeringAttachmentsOutputArgs, opts ...InvokeOption) GetPeeringAttachmentsResultOutput
> Note: This function is named GetPeeringAttachments
in the Go SDK.
public static class GetPeeringAttachments
{
public static Task<GetPeeringAttachmentsResult> InvokeAsync(GetPeeringAttachmentsArgs args, InvokeOptions? opts = null)
public static Output<GetPeeringAttachmentsResult> Invoke(GetPeeringAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPeeringAttachmentsResult> getPeeringAttachments(GetPeeringAttachmentsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ec2transitgateway/getPeeringAttachments:getPeeringAttachments
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Peering Attachments Filter> - One or more configuration blocks containing name-values filters. Detailed below.
- Filters
[]Get
Peering Attachments Filter - One or more configuration blocks containing name-values filters. Detailed below.
- filters
List<Get
Peering Attachments Filter> - One or more configuration blocks containing name-values filters. Detailed below.
- filters
Get
Peering Attachments Filter[] - One or more configuration blocks containing name-values filters. Detailed below.
- filters
Sequence[Get
Peering Attachments Filter] - One or more configuration blocks containing name-values filters. Detailed below.
- filters List<Property Map>
- One or more configuration blocks containing name-values filters. Detailed below.
getPeeringAttachments Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.PeeringAttachment][2] data source, searching by identifier.
- Filters
List<Get
Peering Attachments Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.PeeringAttachment][2] data source, searching by identifier.
- Filters
[]Get
Peering Attachments Filter
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.PeeringAttachment][2] data source, searching by identifier.
- filters
List<Get
Peering Attachments Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.PeeringAttachment][2] data source, searching by identifier.
- filters
Get
Peering Attachments Filter[]
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.PeeringAttachment][2] data source, searching by identifier.
- filters
Sequence[Get
Peering Attachments Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.PeeringAttachment][2] data source, searching by identifier.
- filters List<Property Map>
Supporting Types
GetPeeringAttachmentsFilter
- Name string
- Name of the field to filter by, as defined by the underlying AWS API
- Values List<string>
- List of one or more values for the filter.
- Name string
- Name of the field to filter by, as defined by the underlying AWS API
- Values []string
- List of one or more values for the filter.
- name String
- Name of the field to filter by, as defined by the underlying AWS API
- values List<String>
- List of one or more values for the filter.
- name string
- Name of the field to filter by, as defined by the underlying AWS API
- values string[]
- List of one or more values for the filter.
- name str
- Name of the field to filter by, as defined by the underlying AWS API
- values Sequence[str]
- List of one or more values for the filter.
- name String
- Name of the field to filter by, as defined by the underlying AWS API
- values List<String>
- List of one or more values for the filter.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.