AWS v6.72.0 published on Tuesday, Mar 11, 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:
- PoolId 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.
- PoolId 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.
- poolId 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.
- poolId 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.
- poolId 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.
- NetworkBorder 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:
 
- PoolAddress List<GetRanges Public Ipv4Pool Pool Address Range> 
- PoolId string
- Dictionary<string, string>
- Any tags for the address pool.
- TotalAddress intCount 
- Total number of addresses in the pool.
- TotalAvailable 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.
- NetworkBorder 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:
 
- PoolAddress []GetRanges Public Ipv4Pool Pool Address Range 
- PoolId string
- map[string]string
- Any tags for the address pool.
- TotalAddress intCount 
- Total number of addresses in the pool.
- TotalAvailable 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.
- networkBorder 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:
 
- poolAddress List<GetRanges Public Ipv4Pool Pool Address Range> 
- poolId String
- Map<String,String>
- Any tags for the address pool.
- totalAddress IntegerCount 
- Total number of addresses in the pool.
- totalAvailable 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.
- networkBorder 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:
 
- poolAddress GetRanges Public Ipv4Pool Pool Address Range[] 
- poolId string
- {[key: string]: string}
- Any tags for the address pool.
- totalAddress numberCount 
- Total number of addresses in the pool.
- totalAvailable 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.
- networkBorder 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:
 
- poolAddress List<Property Map>Ranges 
- poolId String
- Map<String>
- Any tags for the address pool.
- totalAddress NumberCount 
- Total number of addresses in the pool.
- totalAvailable NumberAddress Count 
- Total number of available addresses in the pool.
Supporting Types
GetPublicIpv4PoolPoolAddressRange     
- AddressCount int
- Number of addresses in the range.
- AvailableAddress intCount 
- Number of available addresses in the range.
- FirstAddress string
- First address in the range.
- LastAddress string
- Last address in the range.
- AddressCount int
- Number of addresses in the range.
- AvailableAddress intCount 
- Number of available addresses in the range.
- FirstAddress string
- First address in the range.
- LastAddress string
- Last address in the range.
- addressCount Integer
- Number of addresses in the range.
- availableAddress IntegerCount 
- Number of available addresses in the range.
- firstAddress String
- First address in the range.
- lastAddress String
- Last address in the range.
- addressCount number
- Number of addresses in the range.
- availableAddress numberCount 
- Number of available addresses in the range.
- firstAddress string
- First address in the range.
- lastAddress 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.
- addressCount Number
- Number of addresses in the range.
- availableAddress NumberCount 
- Number of available addresses in the range.
- firstAddress String
- First address in the range.
- lastAddress 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.