github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/getVpcPeeringConnections.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package ec2 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Use this data source to get IDs of Amazon VPC peering connections 15 // To get more details on each connection, use the data resource ec2.VpcPeeringConnection 16 // 17 // Note: To use this data source in a count, the resources should exist before trying to access 18 // the data source. 19 func GetVpcPeeringConnections(ctx *pulumi.Context, args *GetVpcPeeringConnectionsArgs, opts ...pulumi.InvokeOption) (*GetVpcPeeringConnectionsResult, error) { 20 opts = internal.PkgInvokeDefaultOpts(opts) 21 var rv GetVpcPeeringConnectionsResult 22 err := ctx.Invoke("aws:ec2/getVpcPeeringConnections:getVpcPeeringConnections", args, &rv, opts...) 23 if err != nil { 24 return nil, err 25 } 26 return &rv, nil 27 } 28 29 // A collection of arguments for invoking getVpcPeeringConnections. 30 type GetVpcPeeringConnectionsArgs struct { 31 // Custom filter block as described below. 32 Filters []GetVpcPeeringConnectionsFilter `pulumi:"filters"` 33 // Mapping of tags, each pair of which must exactly match 34 // a pair on the desired VPC Peering Connection. 35 // 36 // More complex filters can be expressed using one or more `filter` sub-blocks, 37 // which take the following arguments: 38 Tags map[string]string `pulumi:"tags"` 39 } 40 41 // A collection of values returned by getVpcPeeringConnections. 42 type GetVpcPeeringConnectionsResult struct { 43 Filters []GetVpcPeeringConnectionsFilter `pulumi:"filters"` 44 // The provider-assigned unique ID for this managed resource. 45 Id string `pulumi:"id"` 46 // IDs of the VPC Peering Connections. 47 Ids []string `pulumi:"ids"` 48 Tags map[string]string `pulumi:"tags"` 49 } 50 51 func GetVpcPeeringConnectionsOutput(ctx *pulumi.Context, args GetVpcPeeringConnectionsOutputArgs, opts ...pulumi.InvokeOption) GetVpcPeeringConnectionsResultOutput { 52 return pulumi.ToOutputWithContext(context.Background(), args). 53 ApplyT(func(v interface{}) (GetVpcPeeringConnectionsResult, error) { 54 args := v.(GetVpcPeeringConnectionsArgs) 55 r, err := GetVpcPeeringConnections(ctx, &args, opts...) 56 var s GetVpcPeeringConnectionsResult 57 if r != nil { 58 s = *r 59 } 60 return s, err 61 }).(GetVpcPeeringConnectionsResultOutput) 62 } 63 64 // A collection of arguments for invoking getVpcPeeringConnections. 65 type GetVpcPeeringConnectionsOutputArgs struct { 66 // Custom filter block as described below. 67 Filters GetVpcPeeringConnectionsFilterArrayInput `pulumi:"filters"` 68 // Mapping of tags, each pair of which must exactly match 69 // a pair on the desired VPC Peering Connection. 70 // 71 // More complex filters can be expressed using one or more `filter` sub-blocks, 72 // which take the following arguments: 73 Tags pulumi.StringMapInput `pulumi:"tags"` 74 } 75 76 func (GetVpcPeeringConnectionsOutputArgs) ElementType() reflect.Type { 77 return reflect.TypeOf((*GetVpcPeeringConnectionsArgs)(nil)).Elem() 78 } 79 80 // A collection of values returned by getVpcPeeringConnections. 81 type GetVpcPeeringConnectionsResultOutput struct{ *pulumi.OutputState } 82 83 func (GetVpcPeeringConnectionsResultOutput) ElementType() reflect.Type { 84 return reflect.TypeOf((*GetVpcPeeringConnectionsResult)(nil)).Elem() 85 } 86 87 func (o GetVpcPeeringConnectionsResultOutput) ToGetVpcPeeringConnectionsResultOutput() GetVpcPeeringConnectionsResultOutput { 88 return o 89 } 90 91 func (o GetVpcPeeringConnectionsResultOutput) ToGetVpcPeeringConnectionsResultOutputWithContext(ctx context.Context) GetVpcPeeringConnectionsResultOutput { 92 return o 93 } 94 95 func (o GetVpcPeeringConnectionsResultOutput) Filters() GetVpcPeeringConnectionsFilterArrayOutput { 96 return o.ApplyT(func(v GetVpcPeeringConnectionsResult) []GetVpcPeeringConnectionsFilter { return v.Filters }).(GetVpcPeeringConnectionsFilterArrayOutput) 97 } 98 99 // The provider-assigned unique ID for this managed resource. 100 func (o GetVpcPeeringConnectionsResultOutput) Id() pulumi.StringOutput { 101 return o.ApplyT(func(v GetVpcPeeringConnectionsResult) string { return v.Id }).(pulumi.StringOutput) 102 } 103 104 // IDs of the VPC Peering Connections. 105 func (o GetVpcPeeringConnectionsResultOutput) Ids() pulumi.StringArrayOutput { 106 return o.ApplyT(func(v GetVpcPeeringConnectionsResult) []string { return v.Ids }).(pulumi.StringArrayOutput) 107 } 108 109 func (o GetVpcPeeringConnectionsResultOutput) Tags() pulumi.StringMapOutput { 110 return o.ApplyT(func(v GetVpcPeeringConnectionsResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 111 } 112 113 func init() { 114 pulumi.RegisterOutputType(GetVpcPeeringConnectionsResultOutput{}) 115 }