1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. getCoipPool
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

aws.ec2.getCoipPool

Explore with Pulumi AI

AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

Provides details about a specific EC2 Customer-Owned IP Pool.

This data source can prove useful when a module accepts a coip pool id as an input variable and needs to, for example, determine the CIDR block of that COIP Pool.

Example Usage

The following example returns a specific coip pool ID

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetCoipPoolArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var coipPoolId = config.get("coipPoolId");
        final var selected = Ec2Functions.getCoipPool(GetCoipPoolArgs.builder()
            .id(coipPoolId)
            .build());

    }
}
Copy
configuration:
  coipPoolId:
    type: dynamic
variables:
  selected:
    fn::invoke:
      function: aws:ec2:getCoipPool
      arguments:
        id: ${coipPoolId}
Copy

Using getCoipPool

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getCoipPool(args: GetCoipPoolArgs, opts?: InvokeOptions): Promise<GetCoipPoolResult>
function getCoipPoolOutput(args: GetCoipPoolOutputArgs, opts?: InvokeOptions): Output<GetCoipPoolResult>
Copy
def get_coip_pool(filters: Optional[Sequence[GetCoipPoolFilter]] = None,
                  local_gateway_route_table_id: Optional[str] = None,
                  pool_id: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetCoipPoolResult
def get_coip_pool_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetCoipPoolFilterArgs]]]] = None,
                  local_gateway_route_table_id: Optional[pulumi.Input[str]] = None,
                  pool_id: Optional[pulumi.Input[str]] = None,
                  tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetCoipPoolResult]
Copy
func GetCoipPool(ctx *Context, args *GetCoipPoolArgs, opts ...InvokeOption) (*GetCoipPoolResult, error)
func GetCoipPoolOutput(ctx *Context, args *GetCoipPoolOutputArgs, opts ...InvokeOption) GetCoipPoolResultOutput
Copy

> Note: This function is named GetCoipPool in the Go SDK.

public static class GetCoipPool 
{
    public static Task<GetCoipPoolResult> InvokeAsync(GetCoipPoolArgs args, InvokeOptions? opts = null)
    public static Output<GetCoipPoolResult> Invoke(GetCoipPoolInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCoipPoolResult> getCoipPool(GetCoipPoolArgs args, InvokeOptions options)
public static Output<GetCoipPoolResult> getCoipPool(GetCoipPoolArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:ec2/getCoipPool:getCoipPool
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetCoipPoolFilter>
LocalGatewayRouteTableId string
Local Gateway Route Table Id assigned to desired COIP Pool
PoolId string
ID of the specific COIP Pool to retrieve.
Tags Dictionary<string, string>

Mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

Filters []GetCoipPoolFilter
LocalGatewayRouteTableId string
Local Gateway Route Table Id assigned to desired COIP Pool
PoolId string
ID of the specific COIP Pool to retrieve.
Tags map[string]string

Mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

filters List<GetCoipPoolFilter>
localGatewayRouteTableId String
Local Gateway Route Table Id assigned to desired COIP Pool
poolId String
ID of the specific COIP Pool to retrieve.
tags Map<String,String>

Mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

filters GetCoipPoolFilter[]
localGatewayRouteTableId string
Local Gateway Route Table Id assigned to desired COIP Pool
poolId string
ID of the specific COIP Pool to retrieve.
tags {[key: string]: string}

Mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

filters Sequence[GetCoipPoolFilter]
local_gateway_route_table_id str
Local Gateway Route Table Id assigned to desired COIP Pool
pool_id str
ID of the specific COIP Pool to retrieve.
tags Mapping[str, str]

Mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

filters List<Property Map>
localGatewayRouteTableId String
Local Gateway Route Table Id assigned to desired COIP Pool
poolId String
ID of the specific COIP Pool to retrieve.
tags Map<String>

Mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

getCoipPool Result

The following output properties are available:

Arn string
ARN of the COIP pool
Id string
The provider-assigned unique ID for this managed resource.
LocalGatewayRouteTableId string
PoolCidrs List<string>
Set of CIDR blocks in pool
PoolId string
Tags Dictionary<string, string>
Filters List<GetCoipPoolFilter>
Arn string
ARN of the COIP pool
Id string
The provider-assigned unique ID for this managed resource.
LocalGatewayRouteTableId string
PoolCidrs []string
Set of CIDR blocks in pool
PoolId string
Tags map[string]string
Filters []GetCoipPoolFilter
arn String
ARN of the COIP pool
id String
The provider-assigned unique ID for this managed resource.
localGatewayRouteTableId String
poolCidrs List<String>
Set of CIDR blocks in pool
poolId String
tags Map<String,String>
filters List<GetCoipPoolFilter>
arn string
ARN of the COIP pool
id string
The provider-assigned unique ID for this managed resource.
localGatewayRouteTableId string
poolCidrs string[]
Set of CIDR blocks in pool
poolId string
tags {[key: string]: string}
filters GetCoipPoolFilter[]
arn str
ARN of the COIP pool
id str
The provider-assigned unique ID for this managed resource.
local_gateway_route_table_id str
pool_cidrs Sequence[str]
Set of CIDR blocks in pool
pool_id str
tags Mapping[str, str]
filters Sequence[GetCoipPoolFilter]
arn String
ARN of the COIP pool
id String
The provider-assigned unique ID for this managed resource.
localGatewayRouteTableId String
poolCidrs List<String>
Set of CIDR blocks in pool
poolId String
tags Map<String>
filters List<Property Map>

Supporting Types

GetCoipPoolFilter

Name This property is required. string
Name of the field to filter by, as defined by the underlying AWS API.
Values This property is required. List<string>
Set of values that are accepted for the given field. A COIP Pool will be selected if any one of the given values matches.
Name This property is required. string
Name of the field to filter by, as defined by the underlying AWS API.
Values This property is required. []string
Set of values that are accepted for the given field. A COIP Pool will be selected if any one of the given values matches.
name This property is required. String
Name of the field to filter by, as defined by the underlying AWS API.
values This property is required. List<String>
Set of values that are accepted for the given field. A COIP Pool will be selected if any one of the given values matches.
name This property is required. string
Name of the field to filter by, as defined by the underlying AWS API.
values This property is required. string[]
Set of values that are accepted for the given field. A COIP Pool will be selected if any one of the given values matches.
name This property is required. str
Name of the field to filter by, as defined by the underlying AWS API.
values This property is required. Sequence[str]
Set of values that are accepted for the given field. A COIP Pool will be selected if any one of the given values matches.
name This property is required. String
Name of the field to filter by, as defined by the underlying AWS API.
values This property is required. List<String>
Set of values that are accepted for the given field. A COIP Pool will be selected if any one of the given values matches.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi