github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/getCoipPools.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 Customer-Owned IP Pools, such as their identifiers. 15 func GetCoipPools(ctx *pulumi.Context, args *GetCoipPoolsArgs, opts ...pulumi.InvokeOption) (*GetCoipPoolsResult, error) { 16 opts = internal.PkgInvokeDefaultOpts(opts) 17 var rv GetCoipPoolsResult 18 err := ctx.Invoke("aws:ec2/getCoipPools:getCoipPools", 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 getCoipPools. 26 type GetCoipPoolsArgs struct { 27 // Custom filter block as described below. 28 // 29 // More complex filters can be expressed using one or more `filter` sub-blocks, 30 // which take the following arguments: 31 Filters []GetCoipPoolsFilter `pulumi:"filters"` 32 // Mapping of tags, each pair of which must exactly match 33 // a pair on the desired aws_ec2_coip_pools. 34 Tags map[string]string `pulumi:"tags"` 35 } 36 37 // A collection of values returned by getCoipPools. 38 type GetCoipPoolsResult struct { 39 Filters []GetCoipPoolsFilter `pulumi:"filters"` 40 // The provider-assigned unique ID for this managed resource. 41 Id string `pulumi:"id"` 42 // Set of COIP Pool Identifiers 43 PoolIds []string `pulumi:"poolIds"` 44 Tags map[string]string `pulumi:"tags"` 45 } 46 47 func GetCoipPoolsOutput(ctx *pulumi.Context, args GetCoipPoolsOutputArgs, opts ...pulumi.InvokeOption) GetCoipPoolsResultOutput { 48 return pulumi.ToOutputWithContext(context.Background(), args). 49 ApplyT(func(v interface{}) (GetCoipPoolsResult, error) { 50 args := v.(GetCoipPoolsArgs) 51 r, err := GetCoipPools(ctx, &args, opts...) 52 var s GetCoipPoolsResult 53 if r != nil { 54 s = *r 55 } 56 return s, err 57 }).(GetCoipPoolsResultOutput) 58 } 59 60 // A collection of arguments for invoking getCoipPools. 61 type GetCoipPoolsOutputArgs struct { 62 // Custom filter block as described below. 63 // 64 // More complex filters can be expressed using one or more `filter` sub-blocks, 65 // which take the following arguments: 66 Filters GetCoipPoolsFilterArrayInput `pulumi:"filters"` 67 // Mapping of tags, each pair of which must exactly match 68 // a pair on the desired aws_ec2_coip_pools. 69 Tags pulumi.StringMapInput `pulumi:"tags"` 70 } 71 72 func (GetCoipPoolsOutputArgs) ElementType() reflect.Type { 73 return reflect.TypeOf((*GetCoipPoolsArgs)(nil)).Elem() 74 } 75 76 // A collection of values returned by getCoipPools. 77 type GetCoipPoolsResultOutput struct{ *pulumi.OutputState } 78 79 func (GetCoipPoolsResultOutput) ElementType() reflect.Type { 80 return reflect.TypeOf((*GetCoipPoolsResult)(nil)).Elem() 81 } 82 83 func (o GetCoipPoolsResultOutput) ToGetCoipPoolsResultOutput() GetCoipPoolsResultOutput { 84 return o 85 } 86 87 func (o GetCoipPoolsResultOutput) ToGetCoipPoolsResultOutputWithContext(ctx context.Context) GetCoipPoolsResultOutput { 88 return o 89 } 90 91 func (o GetCoipPoolsResultOutput) Filters() GetCoipPoolsFilterArrayOutput { 92 return o.ApplyT(func(v GetCoipPoolsResult) []GetCoipPoolsFilter { return v.Filters }).(GetCoipPoolsFilterArrayOutput) 93 } 94 95 // The provider-assigned unique ID for this managed resource. 96 func (o GetCoipPoolsResultOutput) Id() pulumi.StringOutput { 97 return o.ApplyT(func(v GetCoipPoolsResult) string { return v.Id }).(pulumi.StringOutput) 98 } 99 100 // Set of COIP Pool Identifiers 101 func (o GetCoipPoolsResultOutput) PoolIds() pulumi.StringArrayOutput { 102 return o.ApplyT(func(v GetCoipPoolsResult) []string { return v.PoolIds }).(pulumi.StringArrayOutput) 103 } 104 105 func (o GetCoipPoolsResultOutput) Tags() pulumi.StringMapOutput { 106 return o.ApplyT(func(v GetCoipPoolsResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 107 } 108 109 func init() { 110 pulumi.RegisterOutputType(GetCoipPoolsResultOutput{}) 111 }