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

aws.ec2.getPublicIpv4Pool

Explore with Pulumi AI

Provides details about a specific AWS EC2 Public IPv4 Pool.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.ec2.getPublicIpv4Pool({
    poolId: "ipv4pool-ec2-000df99cff0c1ec10",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.ec2.get_public_ipv4_pool(pool_id="ipv4pool-ec2-000df99cff0c1ec10")
Copy
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.GetPublicIpv4Pool(ctx, &ec2.GetPublicIpv4PoolArgs{
			PoolId: "ipv4pool-ec2-000df99cff0c1ec10",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Ec2.GetPublicIpv4Pool.Invoke(new()
    {
        PoolId = "ipv4pool-ec2-000df99cff0c1ec10",
    });

});
Copy
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.GetPublicIpv4PoolArgs;
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.getPublicIpv4Pool(GetPublicIpv4PoolArgs.builder()
            .poolId("ipv4pool-ec2-000df99cff0c1ec10")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:ec2:getPublicIpv4Pool
      arguments:
        poolId: ipv4pool-ec2-000df99cff0c1ec10
Copy

Using getPublicIpv4Pool

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 getPublicIpv4Pool(args: GetPublicIpv4PoolArgs, opts?: InvokeOptions): Promise<GetPublicIpv4PoolResult>
function getPublicIpv4PoolOutput(args: GetPublicIpv4PoolOutputArgs, opts?: InvokeOptions): Output<GetPublicIpv4PoolResult>
Copy
def get_public_ipv4_pool(pool_id: Optional[str] = None,
                         tags: Optional[Mapping[str, str]] = None,
                         opts: Optional[InvokeOptions] = None) -> GetPublicIpv4PoolResult
def get_public_ipv4_pool_output(pool_id: Optional[pulumi.Input[str]] = None,
                         tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetPublicIpv4PoolResult]
Copy
func GetPublicIpv4Pool(ctx *Context, args *GetPublicIpv4PoolArgs, opts ...InvokeOption) (*GetPublicIpv4PoolResult, error)
func GetPublicIpv4PoolOutput(ctx *Context, args *GetPublicIpv4PoolOutputArgs, opts ...InvokeOption) GetPublicIpv4PoolResultOutput
Copy

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

public static class GetPublicIpv4Pool 
{
    public static Task<GetPublicIpv4PoolResult> InvokeAsync(GetPublicIpv4PoolArgs args, InvokeOptions? opts = null)
    public static Output<GetPublicIpv4PoolResult> Invoke(GetPublicIpv4PoolInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPublicIpv4PoolResult> getPublicIpv4Pool(GetPublicIpv4PoolArgs args, InvokeOptions options)
public static Output<GetPublicIpv4PoolResult> getPublicIpv4Pool(GetPublicIpv4PoolArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:ec2/getPublicIpv4Pool:getPublicIpv4Pool
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

PoolId This property is required. string
AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
Tags Dictionary<string, string>
Any tags for the address pool.
PoolId This property is required. string
AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
Tags map[string]string
Any tags for the address pool.
poolId This property is required. String
AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
tags Map<String,String>
Any tags for the address pool.
poolId This property is required. string
AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
tags {[key: string]: string}
Any tags for the address pool.
pool_id This property is required. str
AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
tags Mapping[str, str]
Any tags for the address pool.
poolId This property is required. String
AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
tags Map<String>
Any tags for the address pool.

getPublicIpv4Pool Result

The following output properties are available:

Description string
Description of the pool, if any.
Id string
The provider-assigned unique ID for this managed resource.
NetworkBorderGroup string
Name of the location from which the address pool is advertised.

  • pool_address_ranges` - List of Address Ranges in the Pool; each address range record contains:
PoolAddressRanges List<GetPublicIpv4PoolPoolAddressRange>
PoolId string
Tags Dictionary<string, string>
Any tags for the address pool.
TotalAddressCount int
Total number of addresses in the pool.
TotalAvailableAddressCount int
Total number of available addresses in the pool.
Description string
Description of the pool, if any.
Id string
The provider-assigned unique ID for this managed resource.
NetworkBorderGroup string
Name of the location from which the address pool is advertised.

  • pool_address_ranges` - List of Address Ranges in the Pool; each address range record contains:
PoolAddressRanges []GetPublicIpv4PoolPoolAddressRange
PoolId string
Tags map[string]string
Any tags for the address pool.
TotalAddressCount int
Total number of addresses in the pool.
TotalAvailableAddressCount int
Total number of available addresses in the pool.
description String
Description of the pool, if any.
id String
The provider-assigned unique ID for this managed resource.
networkBorderGroup String
Name of the location from which the address pool is advertised.

  • pool_address_ranges` - List of Address Ranges in the Pool; each address range record contains:
poolAddressRanges List<GetPublicIpv4PoolPoolAddressRange>
poolId String
tags Map<String,String>
Any tags for the address pool.
totalAddressCount Integer
Total number of addresses in the pool.
totalAvailableAddressCount Integer
Total number of available addresses in the pool.
description string
Description of the pool, if any.
id string
The provider-assigned unique ID for this managed resource.
networkBorderGroup string
Name of the location from which the address pool is advertised.

  • pool_address_ranges` - List of Address Ranges in the Pool; each address range record contains:
poolAddressRanges GetPublicIpv4PoolPoolAddressRange[]
poolId string
tags {[key: string]: string}
Any tags for the address pool.
totalAddressCount number
Total number of addresses in the pool.
totalAvailableAddressCount number
Total number of available addresses in the pool.
description str
Description of the pool, if any.
id str
The provider-assigned unique ID for this managed resource.
network_border_group str
Name of the location from which the address pool is advertised.

  • pool_address_ranges` - List of Address Ranges in the Pool; each address range record contains:
pool_address_ranges Sequence[GetPublicIpv4PoolPoolAddressRange]
pool_id str
tags Mapping[str, str]
Any tags for the address pool.
total_address_count int
Total number of addresses in the pool.
total_available_address_count int
Total number of available addresses in the pool.
description String
Description of the pool, if any.
id String
The provider-assigned unique ID for this managed resource.
networkBorderGroup String
Name of the location from which the address pool is advertised.

  • pool_address_ranges` - List of Address Ranges in the Pool; each address range record contains:
poolAddressRanges List<Property Map>
poolId String
tags Map<String>
Any tags for the address pool.
totalAddressCount Number
Total number of addresses in the pool.
totalAvailableAddressCount Number
Total number of available addresses in the pool.

Supporting Types

GetPublicIpv4PoolPoolAddressRange

AddressCount This property is required. int
Number of addresses in the range.
AvailableAddressCount This property is required. int
Number of available addresses in the range.
FirstAddress This property is required. string
First address in the range.
LastAddress This property is required. string
Last address in the range.
AddressCount This property is required. int
Number of addresses in the range.
AvailableAddressCount This property is required. int
Number of available addresses in the range.
FirstAddress This property is required. string
First address in the range.
LastAddress This property is required. string
Last address in the range.
addressCount This property is required. Integer
Number of addresses in the range.
availableAddressCount This property is required. Integer
Number of available addresses in the range.
firstAddress This property is required. String
First address in the range.
lastAddress This property is required. String
Last address in the range.
addressCount This property is required. number
Number of addresses in the range.
availableAddressCount This property is required. number
Number of available addresses in the range.
firstAddress This property is required. string
First address in the range.
lastAddress This property is required. string
Last address in the range.
address_count This property is required. int
Number of addresses in the range.
available_address_count This property is required. int
Number of available addresses in the range.
first_address This property is required. str
First address in the range.
last_address This property is required. str
Last address in the range.
addressCount This property is required. Number
Number of addresses in the range.
availableAddressCount This property is required. Number
Number of available addresses in the range.
firstAddress This property is required. String
First address in the range.
lastAddress This property is required. String
Last address in the range.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.