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

aws.ec2.getVpcIamPools

Explore with Pulumi AI

AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi
Deprecated: aws.ec2/getvpciampools.getVpcIamPools has been deprecated in favor of aws.ec2/getvpcipampools.getVpcIpamPools

aws.ec2.getVpcIpamPools provides details about IPAM pools.

This resource can prove useful when IPAM pools are created in another root module and you need the pool ids as input variables. For example, pools can be shared via RAM and used to create vpcs with CIDRs from that pool.

Example Usage

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

const test = aws.ec2.getVpcIpamPools({
    filters: [
        {
            name: "description",
            values: ["*test*"],
        },
        {
            name: "address-family",
            values: ["ipv4"],
        },
    ],
});
Copy
import pulumi
import pulumi_aws as aws

test = aws.ec2.get_vpc_ipam_pools(filters=[
    {
        "name": "description",
        "values": ["*test*"],
    },
    {
        "name": "address-family",
        "values": ["ipv4"],
    },
])
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.GetVpcIpamPools(ctx, &ec2.GetVpcIpamPoolsArgs{
			Filters: []ec2.GetVpcIpamPoolsFilter{
				{
					Name: "description",
					Values: []string{
						"*test*",
					},
				},
				{
					Name: "address-family",
					Values: []string{
						"ipv4",
					},
				},
			},
		}, 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 test = Aws.Ec2.GetVpcIpamPools.Invoke(new()
    {
        Filters = new[]
        {
            new Aws.Ec2.Inputs.GetVpcIpamPoolsFilterInputArgs
            {
                Name = "description",
                Values = new[]
                {
                    "*test*",
                },
            },
            new Aws.Ec2.Inputs.GetVpcIpamPoolsFilterInputArgs
            {
                Name = "address-family",
                Values = new[]
                {
                    "ipv4",
                },
            },
        },
    });

});
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.GetVpcIpamPoolsArgs;
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 test = Ec2Functions.getVpcIpamPools(GetVpcIpamPoolsArgs.builder()
            .filters(            
                GetVpcIpamPoolsFilterArgs.builder()
                    .name("description")
                    .values("*test*")
                    .build(),
                GetVpcIpamPoolsFilterArgs.builder()
                    .name("address-family")
                    .values("ipv4")
                    .build())
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: aws:ec2:getVpcIpamPools
      arguments:
        filters:
          - name: description
            values:
              - '*test*'
          - name: address-family
            values:
              - ipv4
Copy

Using getVpcIamPools

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 getVpcIamPools(args: GetVpcIamPoolsArgs, opts?: InvokeOptions): Promise<GetVpcIamPoolsResult>
function getVpcIamPoolsOutput(args: GetVpcIamPoolsOutputArgs, opts?: InvokeOptions): Output<GetVpcIamPoolsResult>
Copy
def get_vpc_iam_pools(filters: Optional[Sequence[GetVpcIamPoolsFilter]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetVpcIamPoolsResult
def get_vpc_iam_pools_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVpcIamPoolsFilterArgs]]]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetVpcIamPoolsResult]
Copy
func GetVpcIamPools(ctx *Context, args *GetVpcIamPoolsArgs, opts ...InvokeOption) (*GetVpcIamPoolsResult, error)
func GetVpcIamPoolsOutput(ctx *Context, args *GetVpcIamPoolsOutputArgs, opts ...InvokeOption) GetVpcIamPoolsResultOutput
Copy

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

public static class GetVpcIamPools 
{
    public static Task<GetVpcIamPoolsResult> InvokeAsync(GetVpcIamPoolsArgs args, InvokeOptions? opts = null)
    public static Output<GetVpcIamPoolsResult> Invoke(GetVpcIamPoolsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetVpcIamPoolsResult> getVpcIamPools(GetVpcIamPoolsArgs args, InvokeOptions options)
public static Output<GetVpcIamPoolsResult> getVpcIamPools(GetVpcIamPoolsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:ec2/getVpcIamPools:getVpcIamPools
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetVpcIamPoolsFilter>
Custom filter block as described below.
Filters []GetVpcIamPoolsFilter
Custom filter block as described below.
filters List<GetVpcIamPoolsFilter>
Custom filter block as described below.
filters GetVpcIamPoolsFilter[]
Custom filter block as described below.
filters Sequence[GetVpcIamPoolsFilter]
Custom filter block as described below.
filters List<Property Map>
Custom filter block as described below.

getVpcIamPools Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
IpamPools List<GetVpcIamPoolsIpamPool>
List of IPAM pools and their attributes. See below for details
Filters List<GetVpcIamPoolsFilter>
Id string
The provider-assigned unique ID for this managed resource.
IpamPools []GetVpcIamPoolsIpamPool
List of IPAM pools and their attributes. See below for details
Filters []GetVpcIamPoolsFilter
id String
The provider-assigned unique ID for this managed resource.
ipamPools List<GetVpcIamPoolsIpamPool>
List of IPAM pools and their attributes. See below for details
filters List<GetVpcIamPoolsFilter>
id string
The provider-assigned unique ID for this managed resource.
ipamPools GetVpcIamPoolsIpamPool[]
List of IPAM pools and their attributes. See below for details
filters GetVpcIamPoolsFilter[]
id str
The provider-assigned unique ID for this managed resource.
ipam_pools Sequence[GetVpcIamPoolsIpamPool]
List of IPAM pools and their attributes. See below for details
filters Sequence[GetVpcIamPoolsFilter]
id String
The provider-assigned unique ID for this managed resource.
ipamPools List<Property Map>
List of IPAM pools and their attributes. See below for details
filters List<Property Map>

Supporting Types

GetVpcIamPoolsFilter

Name This property is required. string
The name of the filter. Filter names are case-sensitive.
Values This property is required. List<string>
The filter values. Filter values are case-sensitive.
Name This property is required. string
The name of the filter. Filter names are case-sensitive.
Values This property is required. []string
The filter values. Filter values are case-sensitive.
name This property is required. String
The name of the filter. Filter names are case-sensitive.
values This property is required. List<String>
The filter values. Filter values are case-sensitive.
name This property is required. string
The name of the filter. Filter names are case-sensitive.
values This property is required. string[]
The filter values. Filter values are case-sensitive.
name This property is required. str
The name of the filter. Filter names are case-sensitive.
values This property is required. Sequence[str]
The filter values. Filter values are case-sensitive.
name This property is required. String
The name of the filter. Filter names are case-sensitive.
values This property is required. List<String>
The filter values. Filter values are case-sensitive.

GetVpcIamPoolsIpamPool

AddressFamily This property is required. string
IP protocol assigned to this pool.
AllocationDefaultNetmaskLength This property is required. int
A default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
AllocationMaxNetmaskLength This property is required. int
The maximum netmask length that will be required for CIDR allocations in this pool.
AllocationMinNetmaskLength This property is required. int
The minimum netmask length that will be required for CIDR allocations in this pool.
AllocationResourceTags This property is required. Dictionary<string, string>
Tags that are required to create resources in using this pool.
Arn This property is required. string
ARN of the pool
AutoImport This property is required. bool
If enabled, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM.
AwsService This property is required. string
Limits which service in AWS that the pool can be used in. ec2 for example, allows users to use space for Elastic IP addresses and VPCs.
Description This property is required. string
Description for the IPAM pool.
Id This property is required. string
ID of the IPAM pool.
IpamScopeId This property is required. string
ID of the scope the pool belongs to.
IpamScopeType This property is required. string
Locale This property is required. string
Locale is the Region where your pool is available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region.
PoolDepth This property is required. int
PubliclyAdvertisable This property is required. bool
Defines whether or not IPv6 pool space is publicly advertisable over the internet.
SourceIpamPoolId This property is required. string
ID of the source IPAM pool.
State This property is required. string
Tags This property is required. Dictionary<string, string>
Map of tags to assigned to the resource.
AddressFamily This property is required. string
IP protocol assigned to this pool.
AllocationDefaultNetmaskLength This property is required. int
A default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
AllocationMaxNetmaskLength This property is required. int
The maximum netmask length that will be required for CIDR allocations in this pool.
AllocationMinNetmaskLength This property is required. int
The minimum netmask length that will be required for CIDR allocations in this pool.
AllocationResourceTags This property is required. map[string]string
Tags that are required to create resources in using this pool.
Arn This property is required. string
ARN of the pool
AutoImport This property is required. bool
If enabled, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM.
AwsService This property is required. string
Limits which service in AWS that the pool can be used in. ec2 for example, allows users to use space for Elastic IP addresses and VPCs.
Description This property is required. string
Description for the IPAM pool.
Id This property is required. string
ID of the IPAM pool.
IpamScopeId This property is required. string
ID of the scope the pool belongs to.
IpamScopeType This property is required. string
Locale This property is required. string
Locale is the Region where your pool is available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region.
PoolDepth This property is required. int
PubliclyAdvertisable This property is required. bool
Defines whether or not IPv6 pool space is publicly advertisable over the internet.
SourceIpamPoolId This property is required. string
ID of the source IPAM pool.
State This property is required. string
Tags This property is required. map[string]string
Map of tags to assigned to the resource.
addressFamily This property is required. String
IP protocol assigned to this pool.
allocationDefaultNetmaskLength This property is required. Integer
A default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
allocationMaxNetmaskLength This property is required. Integer
The maximum netmask length that will be required for CIDR allocations in this pool.
allocationMinNetmaskLength This property is required. Integer
The minimum netmask length that will be required for CIDR allocations in this pool.
allocationResourceTags This property is required. Map<String,String>
Tags that are required to create resources in using this pool.
arn This property is required. String
ARN of the pool
autoImport This property is required. Boolean
If enabled, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM.
awsService This property is required. String
Limits which service in AWS that the pool can be used in. ec2 for example, allows users to use space for Elastic IP addresses and VPCs.
description This property is required. String
Description for the IPAM pool.
id This property is required. String
ID of the IPAM pool.
ipamScopeId This property is required. String
ID of the scope the pool belongs to.
ipamScopeType This property is required. String
locale This property is required. String
Locale is the Region where your pool is available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region.
poolDepth This property is required. Integer
publiclyAdvertisable This property is required. Boolean
Defines whether or not IPv6 pool space is publicly advertisable over the internet.
sourceIpamPoolId This property is required. String
ID of the source IPAM pool.
state This property is required. String
tags This property is required. Map<String,String>
Map of tags to assigned to the resource.
addressFamily This property is required. string
IP protocol assigned to this pool.
allocationDefaultNetmaskLength This property is required. number
A default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
allocationMaxNetmaskLength This property is required. number
The maximum netmask length that will be required for CIDR allocations in this pool.
allocationMinNetmaskLength This property is required. number
The minimum netmask length that will be required for CIDR allocations in this pool.
allocationResourceTags This property is required. {[key: string]: string}
Tags that are required to create resources in using this pool.
arn This property is required. string
ARN of the pool
autoImport This property is required. boolean
If enabled, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM.
awsService This property is required. string
Limits which service in AWS that the pool can be used in. ec2 for example, allows users to use space for Elastic IP addresses and VPCs.
description This property is required. string
Description for the IPAM pool.
id This property is required. string
ID of the IPAM pool.
ipamScopeId This property is required. string
ID of the scope the pool belongs to.
ipamScopeType This property is required. string
locale This property is required. string
Locale is the Region where your pool is available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region.
poolDepth This property is required. number
publiclyAdvertisable This property is required. boolean
Defines whether or not IPv6 pool space is publicly advertisable over the internet.
sourceIpamPoolId This property is required. string
ID of the source IPAM pool.
state This property is required. string
tags This property is required. {[key: string]: string}
Map of tags to assigned to the resource.
address_family This property is required. str
IP protocol assigned to this pool.
allocation_default_netmask_length This property is required. int
A default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
allocation_max_netmask_length This property is required. int
The maximum netmask length that will be required for CIDR allocations in this pool.
allocation_min_netmask_length This property is required. int
The minimum netmask length that will be required for CIDR allocations in this pool.
allocation_resource_tags This property is required. Mapping[str, str]
Tags that are required to create resources in using this pool.
arn This property is required. str
ARN of the pool
auto_import This property is required. bool
If enabled, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM.
aws_service This property is required. str
Limits which service in AWS that the pool can be used in. ec2 for example, allows users to use space for Elastic IP addresses and VPCs.
description This property is required. str
Description for the IPAM pool.
id This property is required. str
ID of the IPAM pool.
ipam_scope_id This property is required. str
ID of the scope the pool belongs to.
ipam_scope_type This property is required. str
locale This property is required. str
Locale is the Region where your pool is available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region.
pool_depth This property is required. int
publicly_advertisable This property is required. bool
Defines whether or not IPv6 pool space is publicly advertisable over the internet.
source_ipam_pool_id This property is required. str
ID of the source IPAM pool.
state This property is required. str
tags This property is required. Mapping[str, str]
Map of tags to assigned to the resource.
addressFamily This property is required. String
IP protocol assigned to this pool.
allocationDefaultNetmaskLength This property is required. Number
A default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
allocationMaxNetmaskLength This property is required. Number
The maximum netmask length that will be required for CIDR allocations in this pool.
allocationMinNetmaskLength This property is required. Number
The minimum netmask length that will be required for CIDR allocations in this pool.
allocationResourceTags This property is required. Map<String>
Tags that are required to create resources in using this pool.
arn This property is required. String
ARN of the pool
autoImport This property is required. Boolean
If enabled, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM.
awsService This property is required. String
Limits which service in AWS that the pool can be used in. ec2 for example, allows users to use space for Elastic IP addresses and VPCs.
description This property is required. String
Description for the IPAM pool.
id This property is required. String
ID of the IPAM pool.
ipamScopeId This property is required. String
ID of the scope the pool belongs to.
ipamScopeType This property is required. String
locale This property is required. String
Locale is the Region where your pool is available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region.
poolDepth This property is required. Number
publiclyAdvertisable This property is required. Boolean
Defines whether or not IPv6 pool space is publicly advertisable over the internet.
sourceIpamPoolId This property is required. String
ID of the source IPAM pool.
state This property is required. String
tags This property is required. Map<String>
Map of tags to assigned to the resource.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi