github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/getLocalGatewayRouteTables.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 // Provides information for multiple EC2 Local Gateway Route Tables, such as their identifiers. 15 // 16 // ## Example Usage 17 // 18 // The following shows outputting all Local Gateway Route Table Ids. 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // foo, err := ec2.GetLocalGatewayRouteTables(ctx, nil, nil) 34 // if err != nil { 35 // return err 36 // } 37 // ctx.Export("foo", foo.Ids) 38 // return nil 39 // }) 40 // } 41 // 42 // ``` 43 // <!--End PulumiCodeChooser --> 44 func GetLocalGatewayRouteTables(ctx *pulumi.Context, args *GetLocalGatewayRouteTablesArgs, opts ...pulumi.InvokeOption) (*GetLocalGatewayRouteTablesResult, error) { 45 opts = internal.PkgInvokeDefaultOpts(opts) 46 var rv GetLocalGatewayRouteTablesResult 47 err := ctx.Invoke("aws:ec2/getLocalGatewayRouteTables:getLocalGatewayRouteTables", args, &rv, opts...) 48 if err != nil { 49 return nil, err 50 } 51 return &rv, nil 52 } 53 54 // A collection of arguments for invoking getLocalGatewayRouteTables. 55 type GetLocalGatewayRouteTablesArgs struct { 56 // Custom filter block as described below. 57 // 58 // More complex filters can be expressed using one or more `filter` sub-blocks, 59 // which take the following arguments: 60 Filters []GetLocalGatewayRouteTablesFilter `pulumi:"filters"` 61 // Mapping of tags, each pair of which must exactly match 62 // a pair on the desired local gateway route table. 63 Tags map[string]string `pulumi:"tags"` 64 } 65 66 // A collection of values returned by getLocalGatewayRouteTables. 67 type GetLocalGatewayRouteTablesResult struct { 68 Filters []GetLocalGatewayRouteTablesFilter `pulumi:"filters"` 69 // The provider-assigned unique ID for this managed resource. 70 Id string `pulumi:"id"` 71 // Set of Local Gateway Route Table identifiers 72 Ids []string `pulumi:"ids"` 73 Tags map[string]string `pulumi:"tags"` 74 } 75 76 func GetLocalGatewayRouteTablesOutput(ctx *pulumi.Context, args GetLocalGatewayRouteTablesOutputArgs, opts ...pulumi.InvokeOption) GetLocalGatewayRouteTablesResultOutput { 77 return pulumi.ToOutputWithContext(context.Background(), args). 78 ApplyT(func(v interface{}) (GetLocalGatewayRouteTablesResult, error) { 79 args := v.(GetLocalGatewayRouteTablesArgs) 80 r, err := GetLocalGatewayRouteTables(ctx, &args, opts...) 81 var s GetLocalGatewayRouteTablesResult 82 if r != nil { 83 s = *r 84 } 85 return s, err 86 }).(GetLocalGatewayRouteTablesResultOutput) 87 } 88 89 // A collection of arguments for invoking getLocalGatewayRouteTables. 90 type GetLocalGatewayRouteTablesOutputArgs struct { 91 // Custom filter block as described below. 92 // 93 // More complex filters can be expressed using one or more `filter` sub-blocks, 94 // which take the following arguments: 95 Filters GetLocalGatewayRouteTablesFilterArrayInput `pulumi:"filters"` 96 // Mapping of tags, each pair of which must exactly match 97 // a pair on the desired local gateway route table. 98 Tags pulumi.StringMapInput `pulumi:"tags"` 99 } 100 101 func (GetLocalGatewayRouteTablesOutputArgs) ElementType() reflect.Type { 102 return reflect.TypeOf((*GetLocalGatewayRouteTablesArgs)(nil)).Elem() 103 } 104 105 // A collection of values returned by getLocalGatewayRouteTables. 106 type GetLocalGatewayRouteTablesResultOutput struct{ *pulumi.OutputState } 107 108 func (GetLocalGatewayRouteTablesResultOutput) ElementType() reflect.Type { 109 return reflect.TypeOf((*GetLocalGatewayRouteTablesResult)(nil)).Elem() 110 } 111 112 func (o GetLocalGatewayRouteTablesResultOutput) ToGetLocalGatewayRouteTablesResultOutput() GetLocalGatewayRouteTablesResultOutput { 113 return o 114 } 115 116 func (o GetLocalGatewayRouteTablesResultOutput) ToGetLocalGatewayRouteTablesResultOutputWithContext(ctx context.Context) GetLocalGatewayRouteTablesResultOutput { 117 return o 118 } 119 120 func (o GetLocalGatewayRouteTablesResultOutput) Filters() GetLocalGatewayRouteTablesFilterArrayOutput { 121 return o.ApplyT(func(v GetLocalGatewayRouteTablesResult) []GetLocalGatewayRouteTablesFilter { return v.Filters }).(GetLocalGatewayRouteTablesFilterArrayOutput) 122 } 123 124 // The provider-assigned unique ID for this managed resource. 125 func (o GetLocalGatewayRouteTablesResultOutput) Id() pulumi.StringOutput { 126 return o.ApplyT(func(v GetLocalGatewayRouteTablesResult) string { return v.Id }).(pulumi.StringOutput) 127 } 128 129 // Set of Local Gateway Route Table identifiers 130 func (o GetLocalGatewayRouteTablesResultOutput) Ids() pulumi.StringArrayOutput { 131 return o.ApplyT(func(v GetLocalGatewayRouteTablesResult) []string { return v.Ids }).(pulumi.StringArrayOutput) 132 } 133 134 func (o GetLocalGatewayRouteTablesResultOutput) Tags() pulumi.StringMapOutput { 135 return o.ApplyT(func(v GetLocalGatewayRouteTablesResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 136 } 137 138 func init() { 139 pulumi.RegisterOutputType(GetLocalGatewayRouteTablesResultOutput{}) 140 }