github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/getManagedPrefixLists.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 // This resource can be useful for getting back a list of managed prefix list ids to be referenced elsewhere. 15 func GetManagedPrefixLists(ctx *pulumi.Context, args *GetManagedPrefixListsArgs, opts ...pulumi.InvokeOption) (*GetManagedPrefixListsResult, error) { 16 opts = internal.PkgInvokeDefaultOpts(opts) 17 var rv GetManagedPrefixListsResult 18 err := ctx.Invoke("aws:ec2/getManagedPrefixLists:getManagedPrefixLists", args, &rv, opts...) 19 if err != nil { 20 return nil, err 21 } 22 return &rv, nil 23 } 24 25 // A collection of arguments for invoking getManagedPrefixLists. 26 type GetManagedPrefixListsArgs struct { 27 // Custom filter block as described below. 28 Filters []GetManagedPrefixListsFilter `pulumi:"filters"` 29 // Map of tags, each pair of which must exactly match 30 // a pair on the desired . 31 // 32 // More complex filters can be expressed using one or more `filter` sub-blocks, 33 // which take the following arguments: 34 Tags map[string]string `pulumi:"tags"` 35 } 36 37 // A collection of values returned by getManagedPrefixLists. 38 type GetManagedPrefixListsResult struct { 39 Filters []GetManagedPrefixListsFilter `pulumi:"filters"` 40 // The provider-assigned unique ID for this managed resource. 41 Id string `pulumi:"id"` 42 // List of all the managed prefix list ids found. 43 Ids []string `pulumi:"ids"` 44 Tags map[string]string `pulumi:"tags"` 45 } 46 47 func GetManagedPrefixListsOutput(ctx *pulumi.Context, args GetManagedPrefixListsOutputArgs, opts ...pulumi.InvokeOption) GetManagedPrefixListsResultOutput { 48 return pulumi.ToOutputWithContext(context.Background(), args). 49 ApplyT(func(v interface{}) (GetManagedPrefixListsResult, error) { 50 args := v.(GetManagedPrefixListsArgs) 51 r, err := GetManagedPrefixLists(ctx, &args, opts...) 52 var s GetManagedPrefixListsResult 53 if r != nil { 54 s = *r 55 } 56 return s, err 57 }).(GetManagedPrefixListsResultOutput) 58 } 59 60 // A collection of arguments for invoking getManagedPrefixLists. 61 type GetManagedPrefixListsOutputArgs struct { 62 // Custom filter block as described below. 63 Filters GetManagedPrefixListsFilterArrayInput `pulumi:"filters"` 64 // Map of tags, each pair of which must exactly match 65 // a pair on the desired . 66 // 67 // More complex filters can be expressed using one or more `filter` sub-blocks, 68 // which take the following arguments: 69 Tags pulumi.StringMapInput `pulumi:"tags"` 70 } 71 72 func (GetManagedPrefixListsOutputArgs) ElementType() reflect.Type { 73 return reflect.TypeOf((*GetManagedPrefixListsArgs)(nil)).Elem() 74 } 75 76 // A collection of values returned by getManagedPrefixLists. 77 type GetManagedPrefixListsResultOutput struct{ *pulumi.OutputState } 78 79 func (GetManagedPrefixListsResultOutput) ElementType() reflect.Type { 80 return reflect.TypeOf((*GetManagedPrefixListsResult)(nil)).Elem() 81 } 82 83 func (o GetManagedPrefixListsResultOutput) ToGetManagedPrefixListsResultOutput() GetManagedPrefixListsResultOutput { 84 return o 85 } 86 87 func (o GetManagedPrefixListsResultOutput) ToGetManagedPrefixListsResultOutputWithContext(ctx context.Context) GetManagedPrefixListsResultOutput { 88 return o 89 } 90 91 func (o GetManagedPrefixListsResultOutput) Filters() GetManagedPrefixListsFilterArrayOutput { 92 return o.ApplyT(func(v GetManagedPrefixListsResult) []GetManagedPrefixListsFilter { return v.Filters }).(GetManagedPrefixListsFilterArrayOutput) 93 } 94 95 // The provider-assigned unique ID for this managed resource. 96 func (o GetManagedPrefixListsResultOutput) Id() pulumi.StringOutput { 97 return o.ApplyT(func(v GetManagedPrefixListsResult) string { return v.Id }).(pulumi.StringOutput) 98 } 99 100 // List of all the managed prefix list ids found. 101 func (o GetManagedPrefixListsResultOutput) Ids() pulumi.StringArrayOutput { 102 return o.ApplyT(func(v GetManagedPrefixListsResult) []string { return v.Ids }).(pulumi.StringArrayOutput) 103 } 104 105 func (o GetManagedPrefixListsResultOutput) Tags() pulumi.StringMapOutput { 106 return o.ApplyT(func(v GetManagedPrefixListsResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 107 } 108 109 func init() { 110 pulumi.RegisterOutputType(GetManagedPrefixListsResultOutput{}) 111 }