alicloud.vpc.getPublicIpAddressPoolCidrBlocks
Explore with Pulumi AI
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
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);
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)
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
})
}
using System.Collections.Generic;
using System.Linq;
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 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()));
}
}
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:
- Public
Ip stringAddress Pool Id - The ID of the Vpc Public IP address pool.
- Cidr
Block string - The CIDR block.
- Ids List<string>
- A list of Vpc Public Ip Address Pool Cidr Block IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the CIDR block in the Vpc Public IP address pool. Valid values:
Created
,Modifying
,Deleting
.
- Public
Ip stringAddress Pool Id - The ID of the Vpc Public IP address pool.
- Cidr
Block string - The CIDR block.
- Ids []string
- A list of Vpc Public Ip Address Pool Cidr Block IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the CIDR block in the Vpc Public IP address pool. Valid values:
Created
,Modifying
,Deleting
.
- public
Ip StringAddress Pool Id - The ID of the Vpc Public IP address pool.
- cidr
Block String - The CIDR block.
- ids List<String>
- A list of Vpc Public Ip Address Pool Cidr Block IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the CIDR block in the Vpc Public IP address pool. Valid values:
Created
,Modifying
,Deleting
.
- public
Ip stringAddress Pool Id - The ID of the Vpc Public IP address pool.
- cidr
Block string - The CIDR block.
- ids string[]
- A list of Vpc Public Ip Address Pool Cidr Block IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- The status of the CIDR block in the Vpc Public IP address pool. Valid values:
Created
,Modifying
,Deleting
.
- public_
ip_ straddress_ pool_ id - 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 - File name where to save data source results (after running
pulumi preview
). - status str
- The status of the CIDR block in the Vpc Public IP address pool. Valid values:
Created
,Modifying
,Deleting
.
- public
Ip StringAddress Pool Id - The ID of the Vpc Public IP address pool.
- cidr
Block String - The CIDR block.
- ids List<String>
- A list of Vpc Public Ip Address Pool Cidr Block IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - 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.
Ali Cloud. Vpc. Outputs. Get Public Ip Address Pool Cidr Blocks Block> - 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>
- Public
Ip stringAddress Pool Id - The ID of the Vpc Public IP address pool.
- Cidr
Block string - The CIDR block.
- Output
File string - Status string
- The status of the CIDR block in the Vpc Public IP address pool.
- Blocks
[]Get
Public Ip Address Pool Cidr Blocks Block - 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
- Public
Ip stringAddress Pool Id - The ID of the Vpc Public IP address pool.
- Cidr
Block string - The CIDR block.
- Output
File string - Status string
- The status of the CIDR block in the Vpc Public IP address pool.
- blocks
List<Get
Public Ip Address Pool Cidr Blocks Block> - 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>
- public
Ip StringAddress Pool Id - The ID of the Vpc Public IP address pool.
- cidr
Block String - The CIDR block.
- output
File String - status String
- The status of the CIDR block in the Vpc Public IP address pool.
- blocks
Get
Public Ip Address Pool Cidr Blocks Block[] - 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[]
- public
Ip stringAddress Pool Id - The ID of the Vpc Public IP address pool.
- cidr
Block string - The CIDR block.
- output
File string - status string
- The status of the CIDR block in the Vpc Public IP address pool.
- blocks
Sequence[Get
Public Ip Address Pool Cidr Blocks Block] - 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_ straddress_ pool_ id - 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>
- public
Ip StringAddress Pool Id - The ID of the Vpc Public IP address pool.
- cidr
Block String - The CIDR block.
- output
File String - status String
- The status of the CIDR block in the Vpc Public IP address pool.
Supporting Types
GetPublicIpAddressPoolCidrBlocksBlock
- Cidr
Block string - The CIDR block.
- Create
Time 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.
- Public
Ip stringAddress Pool Id - 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
. - Total
Ip intNum - The number of occupied IP addresses in the CIDR block.
- Used
Ip intNum - The total number of available IP addresses in the CIDR block.
- Cidr
Block string - The CIDR block.
- Create
Time 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.
- Public
Ip stringAddress Pool Id - 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
. - Total
Ip intNum - The number of occupied IP addresses in the CIDR block.
- Used
Ip intNum - The total number of available IP addresses in the CIDR block.
- cidr
Block String - The CIDR block.
- create
Time 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.
- public
Ip StringAddress Pool Id - 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
. - total
Ip IntegerNum - The number of occupied IP addresses in the CIDR block.
- used
Ip IntegerNum - The total number of available IP addresses in the CIDR block.
- cidr
Block string - The CIDR block.
- create
Time 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.
- public
Ip stringAddress Pool Id - 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
. - total
Ip numberNum - The number of occupied IP addresses in the CIDR block.
- used
Ip numberNum - 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_ straddress_ pool_ id - 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_ intnum - The number of occupied IP addresses in the CIDR block.
- used_
ip_ intnum - The total number of available IP addresses in the CIDR block.
- cidr
Block String - The CIDR block.
- create
Time 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.
- public
Ip StringAddress Pool Id - 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
. - total
Ip NumberNum - The number of occupied IP addresses in the CIDR block.
- used
Ip NumberNum - 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.