alicloud.vpc.getPublicIpAddressPoolCidrBlocks

This data source provides the Vpc Public Ip Address Pool Cidr Blocks of the current Alibaba Cloud user.

NOTE: Available in v1.189.0+.

NOTE: Only users who have the required permissions can use the IP address pool feature of Elastic IP Address (EIP). To apply for the required permissions, submit a ticket.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Vpc.GetPublicIpAddressPoolCidrBlocks.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        PublicIpAddressPoolId = "example_value",
    });

    var cidrBlock = AliCloud.Vpc.GetPublicIpAddressPoolCidrBlocks.Invoke(new()
    {
        PublicIpAddressPoolId = "example_value",
        CidrBlock = "example_value",
    });

    return new Dictionary<string, object?>
    {
        ["vpcPublicIpAddressPoolCidrBlockId1"] = ids.Apply(getPublicIpAddressPoolCidrBlocksResult => getPublicIpAddressPoolCidrBlocksResult.Blocks[0]?.Id),
        ["vpcPublicIpAddressPoolCidrBlockId2"] = cidrBlock.Apply(getPublicIpAddressPoolCidrBlocksResult => getPublicIpAddressPoolCidrBlocksResult.Blocks[0]?.Id),
    };
});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := vpc.GetPublicIpAddressPoolCidrBlocks(ctx, &vpc.GetPublicIpAddressPoolCidrBlocksArgs{
			Ids: []string{
				"example_id",
			},
			PublicIpAddressPoolId: "example_value",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcPublicIpAddressPoolCidrBlockId1", ids.Blocks[0].Id)
		cidrBlock, err := vpc.GetPublicIpAddressPoolCidrBlocks(ctx, &vpc.GetPublicIpAddressPoolCidrBlocksArgs{
			PublicIpAddressPoolId: "example_value",
			CidrBlock:             pulumi.StringRef("example_value"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcPublicIpAddressPoolCidrBlockId2", cidrBlock.Blocks[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetPublicIpAddressPoolCidrBlocksArgs;
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 ids = VpcFunctions.getPublicIpAddressPoolCidrBlocks(GetPublicIpAddressPoolCidrBlocksArgs.builder()
            .ids("example_id")
            .publicIpAddressPoolId("example_value")
            .build());

        ctx.export("vpcPublicIpAddressPoolCidrBlockId1", ids.applyValue(getPublicIpAddressPoolCidrBlocksResult -> getPublicIpAddressPoolCidrBlocksResult.blocks()[0].id()));
        final var cidrBlock = VpcFunctions.getPublicIpAddressPoolCidrBlocks(GetPublicIpAddressPoolCidrBlocksArgs.builder()
            .publicIpAddressPoolId("example_value")
            .cidrBlock("example_value")
            .build());

        ctx.export("vpcPublicIpAddressPoolCidrBlockId2", cidrBlock.applyValue(getPublicIpAddressPoolCidrBlocksResult -> getPublicIpAddressPoolCidrBlocksResult.blocks()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.vpc.get_public_ip_address_pool_cidr_blocks(ids=["example_id"],
    public_ip_address_pool_id="example_value")
pulumi.export("vpcPublicIpAddressPoolCidrBlockId1", ids.blocks[0].id)
cidr_block = alicloud.vpc.get_public_ip_address_pool_cidr_blocks(public_ip_address_pool_id="example_value",
    cidr_block="example_value")
pulumi.export("vpcPublicIpAddressPoolCidrBlockId2", cidr_block.blocks[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.vpc.getPublicIpAddressPoolCidrBlocks({
    ids: ["example_id"],
    publicIpAddressPoolId: "example_value",
});
export const vpcPublicIpAddressPoolCidrBlockId1 = ids.then(ids => ids.blocks?.[0]?.id);
const cidrBlock = alicloud.vpc.getPublicIpAddressPoolCidrBlocks({
    publicIpAddressPoolId: "example_value",
    cidrBlock: "example_value",
});
export const vpcPublicIpAddressPoolCidrBlockId2 = cidrBlock.then(cidrBlock => cidrBlock.blocks?.[0]?.id);
variables:
  ids:
    fn::invoke:
      Function: alicloud:vpc:getPublicIpAddressPoolCidrBlocks
      Arguments:
        ids:
          - example_id
        publicIpAddressPoolId: example_value
  cidrBlock:
    fn::invoke:
      Function: alicloud:vpc:getPublicIpAddressPoolCidrBlocks
      Arguments:
        publicIpAddressPoolId: example_value
        cidrBlock: example_value
outputs:
  vpcPublicIpAddressPoolCidrBlockId1: ${ids.blocks[0].id}
  vpcPublicIpAddressPoolCidrBlockId2: ${cidrBlock.blocks[0].id}

Using getPublicIpAddressPoolCidrBlocks

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 getPublicIpAddressPoolCidrBlocks(args: GetPublicIpAddressPoolCidrBlocksArgs, opts?: InvokeOptions): Promise<GetPublicIpAddressPoolCidrBlocksResult>
function getPublicIpAddressPoolCidrBlocksOutput(args: GetPublicIpAddressPoolCidrBlocksOutputArgs, opts?: InvokeOptions): Output<GetPublicIpAddressPoolCidrBlocksResult>
def get_public_ip_address_pool_cidr_blocks(cidr_block: Optional[str] = None,
                                           ids: Optional[Sequence[str]] = None,
                                           output_file: Optional[str] = None,
                                           public_ip_address_pool_id: Optional[str] = None,
                                           status: Optional[str] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetPublicIpAddressPoolCidrBlocksResult
def get_public_ip_address_pool_cidr_blocks_output(cidr_block: Optional[pulumi.Input[str]] = None,
                                           ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                           output_file: Optional[pulumi.Input[str]] = None,
                                           public_ip_address_pool_id: Optional[pulumi.Input[str]] = None,
                                           status: Optional[pulumi.Input[str]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetPublicIpAddressPoolCidrBlocksResult]
func GetPublicIpAddressPoolCidrBlocks(ctx *Context, args *GetPublicIpAddressPoolCidrBlocksArgs, opts ...InvokeOption) (*GetPublicIpAddressPoolCidrBlocksResult, error)
func GetPublicIpAddressPoolCidrBlocksOutput(ctx *Context, args *GetPublicIpAddressPoolCidrBlocksOutputArgs, opts ...InvokeOption) GetPublicIpAddressPoolCidrBlocksResultOutput

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

public static class GetPublicIpAddressPoolCidrBlocks 
{
    public static Task<GetPublicIpAddressPoolCidrBlocksResult> InvokeAsync(GetPublicIpAddressPoolCidrBlocksArgs args, InvokeOptions? opts = null)
    public static Output<GetPublicIpAddressPoolCidrBlocksResult> Invoke(GetPublicIpAddressPoolCidrBlocksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPublicIpAddressPoolCidrBlocksResult> getPublicIpAddressPoolCidrBlocks(GetPublicIpAddressPoolCidrBlocksArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:vpc/getPublicIpAddressPoolCidrBlocks:getPublicIpAddressPoolCidrBlocks
  arguments:
    # arguments dictionary

The following arguments are supported:

PublicIpAddressPoolId string

The ID of the Vpc Public IP address pool.

CidrBlock string

The CIDR block.

Ids List<string>

A list of Vpc Public Ip Address Pool Cidr Block IDs.

OutputFile string
Status string

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

PublicIpAddressPoolId string

The ID of the Vpc Public IP address pool.

CidrBlock string

The CIDR block.

Ids []string

A list of Vpc Public Ip Address Pool Cidr Block IDs.

OutputFile string
Status string

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

publicIpAddressPoolId String

The ID of the Vpc Public IP address pool.

cidrBlock String

The CIDR block.

ids List<String>

A list of Vpc Public Ip Address Pool Cidr Block IDs.

outputFile String
status String

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

publicIpAddressPoolId string

The ID of the Vpc Public IP address pool.

cidrBlock string

The CIDR block.

ids string[]

A list of Vpc Public Ip Address Pool Cidr Block IDs.

outputFile string
status string

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

public_ip_address_pool_id str

The ID of the Vpc Public IP address pool.

cidr_block str

The CIDR block.

ids Sequence[str]

A list of Vpc Public Ip Address Pool Cidr Block IDs.

output_file str
status str

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

publicIpAddressPoolId String

The ID of the Vpc Public IP address pool.

cidrBlock String

The CIDR block.

ids List<String>

A list of Vpc Public Ip Address Pool Cidr Block IDs.

outputFile String
status String

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

getPublicIpAddressPoolCidrBlocks Result

The following output properties are available:

Blocks List<Pulumi.AliCloud.Vpc.Outputs.GetPublicIpAddressPoolCidrBlocksBlock>

A list of Vpc Public Ip Address Pool Cidr Blocks. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
PublicIpAddressPoolId string

The ID of the Vpc Public IP address pool.

CidrBlock string

The CIDR block.

OutputFile string
Status string

The status of the CIDR block in the Vpc Public IP address pool.

Blocks []GetPublicIpAddressPoolCidrBlocksBlock

A list of Vpc Public Ip Address Pool Cidr Blocks. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids []string
PublicIpAddressPoolId string

The ID of the Vpc Public IP address pool.

CidrBlock string

The CIDR block.

OutputFile string
Status string

The status of the CIDR block in the Vpc Public IP address pool.

blocks List<GetPublicIpAddressPoolCidrBlocksBlock>

A list of Vpc Public Ip Address Pool Cidr Blocks. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

ids List<String>
publicIpAddressPoolId String

The ID of the Vpc Public IP address pool.

cidrBlock String

The CIDR block.

outputFile String
status String

The status of the CIDR block in the Vpc Public IP address pool.

blocks GetPublicIpAddressPoolCidrBlocksBlock[]

A list of Vpc Public Ip Address Pool Cidr Blocks. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

ids string[]
publicIpAddressPoolId string

The ID of the Vpc Public IP address pool.

cidrBlock string

The CIDR block.

outputFile string
status string

The status of the CIDR block in the Vpc Public IP address pool.

blocks Sequence[GetPublicIpAddressPoolCidrBlocksBlock]

A list of Vpc Public Ip Address Pool Cidr Blocks. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
public_ip_address_pool_id str

The ID of the Vpc Public IP address pool.

cidr_block str

The CIDR block.

output_file str
status str

The status of the CIDR block in the Vpc Public IP address pool.

blocks List<Property Map>

A list of Vpc Public Ip Address Pool Cidr Blocks. Each element contains the following attributes:

id String

The provider-assigned unique ID for this managed resource.

ids List<String>
publicIpAddressPoolId String

The ID of the Vpc Public IP address pool.

cidrBlock String

The CIDR block.

outputFile String
status String

The status of the CIDR block in the Vpc Public IP address pool.

Supporting Types

GetPublicIpAddressPoolCidrBlocksBlock

CidrBlock string

The CIDR block.

CreateTime string

The time when the CIDR block was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.

Id string

The ID of the Public Ip Address Pool Cidr Block.

PublicIpAddressPoolId string

The ID of the Vpc Public IP address pool.

Status string

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

TotalIpNum int

The number of occupied IP addresses in the CIDR block.

UsedIpNum int

The total number of available IP addresses in the CIDR block.

CidrBlock string

The CIDR block.

CreateTime string

The time when the CIDR block was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.

Id string

The ID of the Public Ip Address Pool Cidr Block.

PublicIpAddressPoolId string

The ID of the Vpc Public IP address pool.

Status string

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

TotalIpNum int

The number of occupied IP addresses in the CIDR block.

UsedIpNum int

The total number of available IP addresses in the CIDR block.

cidrBlock String

The CIDR block.

createTime String

The time when the CIDR block was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.

id String

The ID of the Public Ip Address Pool Cidr Block.

publicIpAddressPoolId String

The ID of the Vpc Public IP address pool.

status String

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

totalIpNum Integer

The number of occupied IP addresses in the CIDR block.

usedIpNum Integer

The total number of available IP addresses in the CIDR block.

cidrBlock string

The CIDR block.

createTime string

The time when the CIDR block was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.

id string

The ID of the Public Ip Address Pool Cidr Block.

publicIpAddressPoolId string

The ID of the Vpc Public IP address pool.

status string

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

totalIpNum number

The number of occupied IP addresses in the CIDR block.

usedIpNum number

The total number of available IP addresses in the CIDR block.

cidr_block str

The CIDR block.

create_time str

The time when the CIDR block was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.

id str

The ID of the Public Ip Address Pool Cidr Block.

public_ip_address_pool_id str

The ID of the Vpc Public IP address pool.

status str

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

total_ip_num int

The number of occupied IP addresses in the CIDR block.

used_ip_num int

The total number of available IP addresses in the CIDR block.

cidrBlock String

The CIDR block.

createTime String

The time when the CIDR block was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.

id String

The ID of the Public Ip Address Pool Cidr Block.

publicIpAddressPoolId String

The ID of the Vpc Public IP address pool.

status String

The status of the CIDR block in the Vpc Public IP address pool. Valid values: Created, Modifying, Deleting.

totalIpNum Number

The number of occupied IP addresses in the CIDR block.

usedIpNum Number

The total number of available IP addresses in the CIDR block.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.