github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/getCoipPool.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 details about a specific EC2 Customer-Owned IP Pool. 15 // 16 // This data source can prove useful when a module accepts a coip pool id as 17 // an input variable and needs to, for example, determine the CIDR block of that 18 // COIP Pool. 19 func GetCoipPool(ctx *pulumi.Context, args *GetCoipPoolArgs, opts ...pulumi.InvokeOption) (*GetCoipPoolResult, error) { 20 opts = internal.PkgInvokeDefaultOpts(opts) 21 var rv GetCoipPoolResult 22 err := ctx.Invoke("aws:ec2/getCoipPool:getCoipPool", 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 getCoipPool. 30 type GetCoipPoolArgs struct { 31 Filters []GetCoipPoolFilter `pulumi:"filters"` 32 // Local Gateway Route Table Id assigned to desired COIP Pool 33 LocalGatewayRouteTableId *string `pulumi:"localGatewayRouteTableId"` 34 // ID of the specific COIP Pool to retrieve. 35 PoolId *string `pulumi:"poolId"` 36 // Mapping of tags, each pair of which must exactly match 37 // a pair on the desired COIP Pool. 38 // 39 // More complex filters can be expressed using one or more `filter` sub-blocks, 40 // which take the following arguments: 41 Tags map[string]string `pulumi:"tags"` 42 } 43 44 // A collection of values returned by getCoipPool. 45 type GetCoipPoolResult struct { 46 // ARN of the COIP pool 47 Arn string `pulumi:"arn"` 48 Filters []GetCoipPoolFilter `pulumi:"filters"` 49 // The provider-assigned unique ID for this managed resource. 50 Id string `pulumi:"id"` 51 LocalGatewayRouteTableId string `pulumi:"localGatewayRouteTableId"` 52 // Set of CIDR blocks in pool 53 PoolCidrs []string `pulumi:"poolCidrs"` 54 PoolId string `pulumi:"poolId"` 55 Tags map[string]string `pulumi:"tags"` 56 } 57 58 func GetCoipPoolOutput(ctx *pulumi.Context, args GetCoipPoolOutputArgs, opts ...pulumi.InvokeOption) GetCoipPoolResultOutput { 59 return pulumi.ToOutputWithContext(context.Background(), args). 60 ApplyT(func(v interface{}) (GetCoipPoolResult, error) { 61 args := v.(GetCoipPoolArgs) 62 r, err := GetCoipPool(ctx, &args, opts...) 63 var s GetCoipPoolResult 64 if r != nil { 65 s = *r 66 } 67 return s, err 68 }).(GetCoipPoolResultOutput) 69 } 70 71 // A collection of arguments for invoking getCoipPool. 72 type GetCoipPoolOutputArgs struct { 73 Filters GetCoipPoolFilterArrayInput `pulumi:"filters"` 74 // Local Gateway Route Table Id assigned to desired COIP Pool 75 LocalGatewayRouteTableId pulumi.StringPtrInput `pulumi:"localGatewayRouteTableId"` 76 // ID of the specific COIP Pool to retrieve. 77 PoolId pulumi.StringPtrInput `pulumi:"poolId"` 78 // Mapping of tags, each pair of which must exactly match 79 // a pair on the desired COIP Pool. 80 // 81 // More complex filters can be expressed using one or more `filter` sub-blocks, 82 // which take the following arguments: 83 Tags pulumi.StringMapInput `pulumi:"tags"` 84 } 85 86 func (GetCoipPoolOutputArgs) ElementType() reflect.Type { 87 return reflect.TypeOf((*GetCoipPoolArgs)(nil)).Elem() 88 } 89 90 // A collection of values returned by getCoipPool. 91 type GetCoipPoolResultOutput struct{ *pulumi.OutputState } 92 93 func (GetCoipPoolResultOutput) ElementType() reflect.Type { 94 return reflect.TypeOf((*GetCoipPoolResult)(nil)).Elem() 95 } 96 97 func (o GetCoipPoolResultOutput) ToGetCoipPoolResultOutput() GetCoipPoolResultOutput { 98 return o 99 } 100 101 func (o GetCoipPoolResultOutput) ToGetCoipPoolResultOutputWithContext(ctx context.Context) GetCoipPoolResultOutput { 102 return o 103 } 104 105 // ARN of the COIP pool 106 func (o GetCoipPoolResultOutput) Arn() pulumi.StringOutput { 107 return o.ApplyT(func(v GetCoipPoolResult) string { return v.Arn }).(pulumi.StringOutput) 108 } 109 110 func (o GetCoipPoolResultOutput) Filters() GetCoipPoolFilterArrayOutput { 111 return o.ApplyT(func(v GetCoipPoolResult) []GetCoipPoolFilter { return v.Filters }).(GetCoipPoolFilterArrayOutput) 112 } 113 114 // The provider-assigned unique ID for this managed resource. 115 func (o GetCoipPoolResultOutput) Id() pulumi.StringOutput { 116 return o.ApplyT(func(v GetCoipPoolResult) string { return v.Id }).(pulumi.StringOutput) 117 } 118 119 func (o GetCoipPoolResultOutput) LocalGatewayRouteTableId() pulumi.StringOutput { 120 return o.ApplyT(func(v GetCoipPoolResult) string { return v.LocalGatewayRouteTableId }).(pulumi.StringOutput) 121 } 122 123 // Set of CIDR blocks in pool 124 func (o GetCoipPoolResultOutput) PoolCidrs() pulumi.StringArrayOutput { 125 return o.ApplyT(func(v GetCoipPoolResult) []string { return v.PoolCidrs }).(pulumi.StringArrayOutput) 126 } 127 128 func (o GetCoipPoolResultOutput) PoolId() pulumi.StringOutput { 129 return o.ApplyT(func(v GetCoipPoolResult) string { return v.PoolId }).(pulumi.StringOutput) 130 } 131 132 func (o GetCoipPoolResultOutput) Tags() pulumi.StringMapOutput { 133 return o.ApplyT(func(v GetCoipPoolResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 134 } 135 136 func init() { 137 pulumi.RegisterOutputType(GetCoipPoolResultOutput{}) 138 }