getCoipPool

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

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var coipPoolId = config.RequireObject<dynamic>("coipPoolId");
        var selected = Output.Create(Aws.Ec2.GetCoipPool.InvokeAsync(new Aws.Ec2.GetCoipPoolArgs
        {
            Id = coipPoolId,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		coipPoolId := cfg.RequireObject("coipPoolId")
		_, err := ec2.GetCoipPool(ctx, &ec2.GetCoipPoolArgs{
			Id: coipPoolId,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

config = pulumi.Config()
coip_pool_id = config.require_object("coipPoolId")
selected = aws.ec2.get_coip_pool(id=coip_pool_id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const coipPoolId = config.requireObject("coipPoolId");
const selected = aws.ec2.getCoipPool({
    id: coipPoolId,
});

Using getCoipPool

function getCoipPool(args: GetCoipPoolArgs, opts?: InvokeOptions): Promise<GetCoipPoolResult>
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
func GetCoipPool(ctx *Context, args *GetCoipPoolArgs, opts ...InvokeOption) (*GetCoipPoolResult, error)

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

public static class GetCoipPool {
    public static Task<GetCoipPoolResult> InvokeAsync(GetCoipPoolArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetCoipPoolFilter>
LocalGatewayRouteTableId string
Local Gateway Route Table Id assigned to desired COIP Pool
PoolId string
The id of the specific COIP Pool to retrieve.
Tags Dictionary<string, string>
A mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.
Filters []GetCoipPoolFilter
LocalGatewayRouteTableId string
Local Gateway Route Table Id assigned to desired COIP Pool
PoolId string
The id of the specific COIP Pool to retrieve.
Tags map[string]string
A mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.
filters GetCoipPoolFilter[]
localGatewayRouteTableId string
Local Gateway Route Table Id assigned to desired COIP Pool
poolId string
The id of the specific COIP Pool to retrieve.
tags {[key: string]: string}
A mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.
filters Sequence[GetCoipPoolFilter]
local_gateway_route_table_id str
Local Gateway Route Table Id assigned to desired COIP Pool
pool_id str
The id of the specific COIP Pool to retrieve.
tags Mapping[str, str]
A mapping of tags, each pair of which must exactly match a pair on the desired COIP Pool.

getCoipPool Result

The following output properties are available:

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>
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
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[]
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]

Supporting Types

GetCoipPoolFilter

Name string
The name of the field to filter by, as defined by the underlying AWS API.
Values 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 string
The name of the field to filter by, as defined by the underlying AWS API.
Values []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 string
The name of the field to filter by, as defined by the underlying AWS API.
values 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 str
The name of the field to filter by, as defined by the underlying AWS API.
values 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.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.