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",
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.get_public_ipv4_pool(pool_id="ipv4pool-ec2-000df99cff0c1ec10")
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
	})
}
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",
    });
});
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());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:ec2:getPublicIpv4Pool
      arguments:
        poolId: ipv4pool-ec2-000df99cff0c1ec10
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>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]func GetPublicIpv4Pool(ctx *Context, args *GetPublicIpv4PoolArgs, opts ...InvokeOption) (*GetPublicIpv4PoolResult, error)
func GetPublicIpv4PoolOutput(ctx *Context, args *GetPublicIpv4PoolOutputArgs, opts ...InvokeOption) GetPublicIpv4PoolResultOutput> 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)
}public static CompletableFuture<GetPublicIpv4PoolResult> getPublicIpv4Pool(GetPublicIpv4PoolArgs args, InvokeOptions options)
public static Output<GetPublicIpv4PoolResult> getPublicIpv4Pool(GetPublicIpv4PoolArgs args, InvokeOptions options)
fn::invoke:
  function: aws:ec2/getPublicIpv4Pool:getPublicIpv4Pool
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Pool
Id string - AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
 - Dictionary<string, string>
 - Any tags for the address pool.
 
- Pool
Id string - AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
 - map[string]string
 - Any tags for the address pool.
 
- pool
Id String - AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
 - Map<String,String>
 - Any tags for the address pool.
 
- pool
Id string - AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
 - {[key: string]: string}
 - Any tags for the address pool.
 
- pool_
id str - AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
 - Mapping[str, str]
 - Any tags for the address pool.
 
- pool
Id String - AWS resource IDs of a public IPv4 pool (as a string) for which this data source will fetch detailed information.
 - 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.
 - Network
Border stringGroup  - 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 List<GetRanges Public Ipv4Pool Pool Address Range>  - Pool
Id string - Dictionary<string, string>
 - Any tags for the address pool.
 - Total
Address intCount  - Total number of addresses in the pool.
 - Total
Available intAddress Count  - 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.
 - Network
Border stringGroup  - 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 []GetRanges Public Ipv4Pool Pool Address Range  - Pool
Id string - map[string]string
 - Any tags for the address pool.
 - Total
Address intCount  - Total number of addresses in the pool.
 - Total
Available intAddress Count  - 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.
 - network
Border StringGroup  - 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 List<GetRanges Public Ipv4Pool Pool Address Range>  - pool
Id String - Map<String,String>
 - Any tags for the address pool.
 - total
Address IntegerCount  - Total number of addresses in the pool.
 - total
Available IntegerAddress Count  - 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.
 - network
Border stringGroup  - 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 GetRanges Public Ipv4Pool Pool Address Range[]  - pool
Id string - {[key: string]: string}
 - Any tags for the address pool.
 - total
Address numberCount  - Total number of addresses in the pool.
 - total
Available numberAddress Count  - 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_ strgroup  - 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_ Sequence[Getranges Public Ipv4Pool Pool Address Range]  - pool_
id str - Mapping[str, str]
 - Any tags for the address pool.
 - total_
address_ intcount  - Total number of addresses in the pool.
 - total_
available_ intaddress_ count  - 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.
 - network
Border StringGroup  - 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 List<Property Map>Ranges  - pool
Id String - Map<String>
 - Any tags for the address pool.
 - total
Address NumberCount  - Total number of addresses in the pool.
 - total
Available NumberAddress Count  - Total number of available addresses in the pool.
 
Supporting Types
GetPublicIpv4PoolPoolAddressRange     
- Address
Count int - Number of addresses in the range.
 - Available
Address intCount  - Number of available addresses in the range.
 - First
Address string - First address in the range.
 - Last
Address string - Last address in the range.
 
- Address
Count int - Number of addresses in the range.
 - Available
Address intCount  - Number of available addresses in the range.
 - First
Address string - First address in the range.
 - Last
Address string - Last address in the range.
 
- address
Count Integer - Number of addresses in the range.
 - available
Address IntegerCount  - Number of available addresses in the range.
 - first
Address String - First address in the range.
 - last
Address String - Last address in the range.
 
- address
Count number - Number of addresses in the range.
 - available
Address numberCount  - Number of available addresses in the range.
 - first
Address string - First address in the range.
 - last
Address string - Last address in the range.
 
- address_
count int - Number of addresses in the range.
 - available_
address_ intcount  - Number of available addresses in the range.
 - first_
address str - First address in the range.
 - last_
address str - Last address in the range.
 
- address
Count Number - Number of addresses in the range.
 - available
Address NumberCount  - Number of available addresses in the range.
 - first
Address String - First address in the range.
 - last
Address 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 
awsTerraform Provider.