aws.ec2.getPublicIpv4Pools
Explore with Pulumi AI
Data source for getting information about AWS EC2 Public IPv4 Pools.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Returns all public IPv4 pools.
const example = aws.ec2.getPublicIpv4Pools({});
import pulumi
import pulumi_aws as aws
# Returns all public IPv4 pools.
example = aws.ec2.get_public_ipv4_pools()
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Returns all public IPv4 pools.
_, err := ec2.GetPublicIpv4Pools(ctx, &ec2.GetPublicIpv4PoolsArgs{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
// Returns all public IPv4 pools.
var example = Aws.Ec2.GetPublicIpv4Pools.Invoke();
});
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.GetPublicIpv4PoolsArgs;
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) {
// Returns all public IPv4 pools.
final var example = Ec2Functions.getPublicIpv4Pools();
}
}
variables:
# Returns all public IPv4 pools.
example:
fn::invoke:
Function: aws:ec2:getPublicIpv4Pools
Arguments: {}
Usage with Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2.getPublicIpv4Pools({
filters: [{
name: "tag-key",
values: ["ExampleTagKey"],
}],
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.get_public_ipv4_pools(filters=[{
"name": "tag-key",
"values": ["ExampleTagKey"],
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.GetPublicIpv4Pools(ctx, &ec2.GetPublicIpv4PoolsArgs{
Filters: []ec2.GetPublicIpv4PoolsFilter{
{
Name: "tag-key",
Values: []string{
"ExampleTagKey",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ec2.GetPublicIpv4Pools.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2.Inputs.GetPublicIpv4PoolsFilterInputArgs
{
Name = "tag-key",
Values = new[]
{
"ExampleTagKey",
},
},
},
});
});
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.GetPublicIpv4PoolsArgs;
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 example = Ec2Functions.getPublicIpv4Pools(GetPublicIpv4PoolsArgs.builder()
.filters(GetPublicIpv4PoolsFilterArgs.builder()
.name("tag-key")
.values("ExampleTagKey")
.build())
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:ec2:getPublicIpv4Pools
Arguments:
filters:
- name: tag-key
values:
- ExampleTagKey
Using getPublicIpv4Pools
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 getPublicIpv4Pools(args: GetPublicIpv4PoolsArgs, opts?: InvokeOptions): Promise<GetPublicIpv4PoolsResult>
function getPublicIpv4PoolsOutput(args: GetPublicIpv4PoolsOutputArgs, opts?: InvokeOptions): Output<GetPublicIpv4PoolsResult>
def get_public_ipv4_pools(filters: Optional[Sequence[GetPublicIpv4PoolsFilter]] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetPublicIpv4PoolsResult
def get_public_ipv4_pools_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetPublicIpv4PoolsFilterArgs]]]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPublicIpv4PoolsResult]
func GetPublicIpv4Pools(ctx *Context, args *GetPublicIpv4PoolsArgs, opts ...InvokeOption) (*GetPublicIpv4PoolsResult, error)
func GetPublicIpv4PoolsOutput(ctx *Context, args *GetPublicIpv4PoolsOutputArgs, opts ...InvokeOption) GetPublicIpv4PoolsResultOutput
> Note: This function is named GetPublicIpv4Pools
in the Go SDK.
public static class GetPublicIpv4Pools
{
public static Task<GetPublicIpv4PoolsResult> InvokeAsync(GetPublicIpv4PoolsArgs args, InvokeOptions? opts = null)
public static Output<GetPublicIpv4PoolsResult> Invoke(GetPublicIpv4PoolsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPublicIpv4PoolsResult> getPublicIpv4Pools(GetPublicIpv4PoolsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ec2/getPublicIpv4Pools:getPublicIpv4Pools
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Public Ipv4Pools Filter> - Custom filter block as described below.
- Dictionary<string, string>
Map of tags, each pair of which must exactly match a pair on the desired pools.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- Filters
[]Get
Public Ipv4Pools Filter - Custom filter block as described below.
- map[string]string
Map of tags, each pair of which must exactly match a pair on the desired pools.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- filters
List<Get
Public Ipv4Pools Filter> - Custom filter block as described below.
- Map<String,String>
Map of tags, each pair of which must exactly match a pair on the desired pools.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- filters
Get
Public Ipv4Pools Filter[] - Custom filter block as described below.
- {[key: string]: string}
Map of tags, each pair of which must exactly match a pair on the desired pools.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- filters
Sequence[Get
Public Ipv4Pools Filter] - Custom filter block as described below.
- Mapping[str, str]
Map of tags, each pair of which must exactly match a pair on the desired pools.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
- filters List<Property Map>
- Custom filter block as described below.
- Map<String>
Map of tags, each pair of which must exactly match a pair on the desired pools.
More complex filters can be expressed using one or more
filter
sub-blocks, which take the following arguments:
getPublicIpv4Pools Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Pool
Ids List<string> - List of all the pool IDs found.
- Dictionary<string, string>
- Filters
List<Get
Public Ipv4Pools Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Pool
Ids []string - List of all the pool IDs found.
- map[string]string
- Filters
[]Get
Public Ipv4Pools Filter
- id String
- The provider-assigned unique ID for this managed resource.
- pool
Ids List<String> - List of all the pool IDs found.
- Map<String,String>
- filters
List<Get
Public Ipv4Pools Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- pool
Ids string[] - List of all the pool IDs found.
- {[key: string]: string}
- filters
Get
Public Ipv4Pools Filter[]
- id str
- The provider-assigned unique ID for this managed resource.
- pool_
ids Sequence[str] - List of all the pool IDs found.
- Mapping[str, str]
- filters
Sequence[Get
Public Ipv4Pools Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- pool
Ids List<String> - List of all the pool IDs found.
- Map<String>
- filters List<Property Map>
Supporting Types
GetPublicIpv4PoolsFilter
- 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. Pool IDs will be selected if any one of the given values match.
- 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. Pool IDs will be selected if any one of the given values match.
- 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. Pool IDs will be selected if any one of the given values match.
- 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. Pool IDs will be selected if any one of the given values match.
- 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. Pool IDs will be selected if any one of the given values match.
- 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. Pool IDs will be selected if any one of the given values match.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.