Provides information for multiple EC2 Customer-Owned IP Pools, such as their identifiers.
Example Usage
The following shows outputting all COIP Pool Ids.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
export = async () => {
const foo = await aws.ec2.getCoipPools({});
return {
foo: foo.ids,
};
}
import pulumi
import pulumi_aws as aws
foo = aws.ec2.get_coip_pools()
pulumi.export("foo", foo.ids)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
foo, err := ec2.GetCoipPools(ctx, &ec2.GetCoipPoolsArgs{}, nil)
if err != nil {
return err
}
ctx.Export("foo", foo.Ids)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var foo = Aws.Ec2.GetCoipPools.Invoke();
return new Dictionary<string, object?>
{
["foo"] = foo.Apply(getCoipPoolsResult => getCoipPoolsResult.Ids),
};
});
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.GetCoipPoolsArgs;
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 foo = Ec2Functions.getCoipPools(GetCoipPoolsArgs.builder()
.build());
ctx.export("foo", foo.ids());
}
}
variables:
foo:
fn::invoke:
function: aws:ec2:getCoipPools
arguments: {}
outputs:
foo: ${foo.ids}
Using getCoipPools
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 getCoipPools(args: GetCoipPoolsArgs, opts?: InvokeOptions): Promise<GetCoipPoolsResult>
function getCoipPoolsOutput(args: GetCoipPoolsOutputArgs, opts?: InvokeOptions): Output<GetCoipPoolsResult>def get_coip_pools(filters: Optional[Sequence[GetCoipPoolsFilter]] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetCoipPoolsResult
def get_coip_pools_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetCoipPoolsFilterArgs]]]] = None,
region: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCoipPoolsResult]func GetCoipPools(ctx *Context, args *GetCoipPoolsArgs, opts ...InvokeOption) (*GetCoipPoolsResult, error)
func GetCoipPoolsOutput(ctx *Context, args *GetCoipPoolsOutputArgs, opts ...InvokeOption) GetCoipPoolsResultOutput> Note: This function is named GetCoipPools in the Go SDK.
public static class GetCoipPools
{
public static Task<GetCoipPoolsResult> InvokeAsync(GetCoipPoolsArgs args, InvokeOptions? opts = null)
public static Output<GetCoipPoolsResult> Invoke(GetCoipPoolsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCoipPoolsResult> getCoipPools(GetCoipPoolsArgs args, InvokeOptions options)
public static Output<GetCoipPoolsResult> getCoipPools(GetCoipPoolsArgs args, InvokeOptions options)
fn::invoke:
function: aws:ec2/getCoipPools:getCoipPools
arguments:
# arguments dictionaryThe following arguments are supported:
- Filters
List<Get
Coip Pools Filter> Custom filter block as described below.
More complex filters can be expressed using one or more
filtersub-blocks, which take the following arguments:- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Dictionary<string, string>
- Mapping of tags, each pair of which must exactly match a pair on the desired aws_ec2_coip_pools.
- Filters
[]Get
Coip Pools Filter Custom filter block as described below.
More complex filters can be expressed using one or more
filtersub-blocks, which take the following arguments:- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map[string]string
- Mapping of tags, each pair of which must exactly match a pair on the desired aws_ec2_coip_pools.
- filters
List<Get
Coip Pools Filter> Custom filter block as described below.
More complex filters can be expressed using one or more
filtersub-blocks, which take the following arguments:- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String,String>
- Mapping of tags, each pair of which must exactly match a pair on the desired aws_ec2_coip_pools.
- filters
Get
Coip Pools Filter[] Custom filter block as described below.
More complex filters can be expressed using one or more
filtersub-blocks, which take the following arguments:- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- {[key: string]: string}
- Mapping of tags, each pair of which must exactly match a pair on the desired aws_ec2_coip_pools.
- filters
Sequence[Get
Coip Pools Filter] Custom filter block as described below.
More complex filters can be expressed using one or more
filtersub-blocks, which take the following arguments:- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Mapping[str, str]
- Mapping of tags, each pair of which must exactly match a pair on the desired aws_ec2_coip_pools.
- filters List<Property Map>
Custom filter block as described below.
More complex filters can be expressed using one or more
filtersub-blocks, which take the following arguments:- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String>
- Mapping of tags, each pair of which must exactly match a pair on the desired aws_ec2_coip_pools.
getCoipPools Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Pool
Ids List<string> - Set of COIP Pool Identifiers
- Region string
- Filters
List<Get
Coip Pools Filter> - Dictionary<string, string>
- Id string
- The provider-assigned unique ID for this managed resource.
- Pool
Ids []string - Set of COIP Pool Identifiers
- Region string
- Filters
[]Get
Coip Pools Filter - map[string]string
- id String
- The provider-assigned unique ID for this managed resource.
- pool
Ids List<String> - Set of COIP Pool Identifiers
- region String
- filters
List<Get
Coip Pools Filter> - Map<String,String>
- id string
- The provider-assigned unique ID for this managed resource.
- pool
Ids string[] - Set of COIP Pool Identifiers
- region string
- filters
Get
Coip Pools Filter[] - {[key: string]: string}
- id str
- The provider-assigned unique ID for this managed resource.
- pool_
ids Sequence[str] - Set of COIP Pool Identifiers
- region str
- filters
Sequence[Get
Coip Pools Filter] - Mapping[str, str]
- id String
- The provider-assigned unique ID for this managed resource.
- pool
Ids List<String> - Set of COIP Pool Identifiers
- region String
- filters List<Property Map>
- Map<String>
Supporting Types
GetCoipPoolsFilter
- Name string
- 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
- 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
- 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
- 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
- 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.
- name String
- 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.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
