Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.vpc.getPublicIpAddressPools
This data source provides the Vpc Public Ip Address Pools of the current Alibaba Cloud user.
NOTE: Available in v1.186.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.vpc.getPublicIpAddressPools({
ids: ["example_id"],
});
export const vpcPublicIpAddressPoolId1 = ids.then(ids => ids.pools?.[0]?.id);
const nameRegex = alicloud.vpc.getPublicIpAddressPools({
nameRegex: "example_name",
});
export const vpcPublicIpAddressPoolId2 = nameRegex.then(nameRegex => nameRegex.pools?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.vpc.get_public_ip_address_pools(ids=["example_id"])
pulumi.export("vpcPublicIpAddressPoolId1", ids.pools[0].id)
name_regex = alicloud.vpc.get_public_ip_address_pools(name_regex="example_name")
pulumi.export("vpcPublicIpAddressPoolId2", name_regex.pools[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.GetPublicIpAddressPools(ctx, &vpc.GetPublicIpAddressPoolsArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("vpcPublicIpAddressPoolId1", ids.Pools[0].Id)
nameRegex, err := vpc.GetPublicIpAddressPools(ctx, &vpc.GetPublicIpAddressPoolsArgs{
NameRegex: pulumi.StringRef("example_name"),
}, nil)
if err != nil {
return err
}
ctx.Export("vpcPublicIpAddressPoolId2", nameRegex.Pools[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.GetPublicIpAddressPools.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.Vpc.GetPublicIpAddressPools.Invoke(new()
{
NameRegex = "example_name",
});
return new Dictionary<string, object?>
{
["vpcPublicIpAddressPoolId1"] = ids.Apply(getPublicIpAddressPoolsResult => getPublicIpAddressPoolsResult.Pools[0]?.Id),
["vpcPublicIpAddressPoolId2"] = nameRegex.Apply(getPublicIpAddressPoolsResult => getPublicIpAddressPoolsResult.Pools[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.GetPublicIpAddressPoolsArgs;
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.getPublicIpAddressPools(GetPublicIpAddressPoolsArgs.builder()
.ids("example_id")
.build());
ctx.export("vpcPublicIpAddressPoolId1", ids.pools()[0].id());
final var nameRegex = VpcFunctions.getPublicIpAddressPools(GetPublicIpAddressPoolsArgs.builder()
.nameRegex("example_name")
.build());
ctx.export("vpcPublicIpAddressPoolId2", nameRegex.pools()[0].id());
}
}
variables:
ids:
fn::invoke:
function: alicloud:vpc:getPublicIpAddressPools
arguments:
ids:
- example_id
nameRegex:
fn::invoke:
function: alicloud:vpc:getPublicIpAddressPools
arguments:
nameRegex: example_name
outputs:
vpcPublicIpAddressPoolId1: ${ids.pools[0].id}
vpcPublicIpAddressPoolId2: ${nameRegex.pools[0].id}
Using getPublicIpAddressPools
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 getPublicIpAddressPools(args: GetPublicIpAddressPoolsArgs, opts?: InvokeOptions): Promise<GetPublicIpAddressPoolsResult>
function getPublicIpAddressPoolsOutput(args: GetPublicIpAddressPoolsOutputArgs, opts?: InvokeOptions): Output<GetPublicIpAddressPoolsResult>
def get_public_ip_address_pools(ids: Optional[Sequence[str]] = None,
isp: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
public_ip_address_pool_ids: Optional[Sequence[str]] = None,
public_ip_address_pool_name: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPublicIpAddressPoolsResult
def get_public_ip_address_pools_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
isp: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
public_ip_address_pool_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
public_ip_address_pool_name: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPublicIpAddressPoolsResult]
func GetPublicIpAddressPools(ctx *Context, args *GetPublicIpAddressPoolsArgs, opts ...InvokeOption) (*GetPublicIpAddressPoolsResult, error)
func GetPublicIpAddressPoolsOutput(ctx *Context, args *GetPublicIpAddressPoolsOutputArgs, opts ...InvokeOption) GetPublicIpAddressPoolsResultOutput
> Note: This function is named GetPublicIpAddressPools
in the Go SDK.
public static class GetPublicIpAddressPools
{
public static Task<GetPublicIpAddressPoolsResult> InvokeAsync(GetPublicIpAddressPoolsArgs args, InvokeOptions? opts = null)
public static Output<GetPublicIpAddressPoolsResult> Invoke(GetPublicIpAddressPoolsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPublicIpAddressPoolsResult> getPublicIpAddressPools(GetPublicIpAddressPoolsArgs args, InvokeOptions options)
public static Output<GetPublicIpAddressPoolsResult> getPublicIpAddressPools(GetPublicIpAddressPoolsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:vpc/getPublicIpAddressPools:getPublicIpAddressPools
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Vpc Public Ip Address Pool IDs.
- Isp string
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - Name
Regex string - A regex string to filter results by Vpc Public Ip Address Pool name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Public
Ip List<string>Address Pool Ids - The IDs of the Vpc Public IP address pools.
- Public
Ip stringAddress Pool Name - The name of the VPC Public IP address pool.
- Status string
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- Ids []string
- A list of Vpc Public Ip Address Pool IDs.
- Isp string
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - Name
Regex string - A regex string to filter results by Vpc Public Ip Address Pool name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Public
Ip []stringAddress Pool Ids - The IDs of the Vpc Public IP address pools.
- Public
Ip stringAddress Pool Name - The name of the VPC Public IP address pool.
- Status string
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- ids List<String>
- A list of Vpc Public Ip Address Pool IDs.
- isp String
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - name
Regex String - A regex string to filter results by Vpc Public Ip Address Pool name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - public
Ip List<String>Address Pool Ids - The IDs of the Vpc Public IP address pools.
- public
Ip StringAddress Pool Name - The name of the VPC Public IP address pool.
- status String
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- ids string[]
- A list of Vpc Public Ip Address Pool IDs.
- isp string
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - name
Regex string - A regex string to filter results by Vpc Public Ip Address Pool name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - public
Ip string[]Address Pool Ids - The IDs of the Vpc Public IP address pools.
- public
Ip stringAddress Pool Name - The name of the VPC Public IP address pool.
- status string
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- ids Sequence[str]
- A list of Vpc Public Ip Address Pool IDs.
- isp str
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - name_
regex str - A regex string to filter results by Vpc Public Ip Address Pool name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - public_
ip_ Sequence[str]address_ pool_ ids - The IDs of the Vpc Public IP address pools.
- public_
ip_ straddress_ pool_ name - The name of the VPC Public IP address pool.
- status str
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- ids List<String>
- A list of Vpc Public Ip Address Pool IDs.
- isp String
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - name
Regex String - A regex string to filter results by Vpc Public Ip Address Pool name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - public
Ip List<String>Address Pool Ids - The IDs of the Vpc Public IP address pools.
- public
Ip StringAddress Pool Name - The name of the VPC Public IP address pool.
- status String
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
getPublicIpAddressPools Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Pools
List<Pulumi.
Ali Cloud. Vpc. Outputs. Get Public Ip Address Pools Pool> - Isp string
- Name
Regex string - Output
File string - Public
Ip List<string>Address Pool Ids - Public
Ip stringAddress Pool Name - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Pools
[]Get
Public Ip Address Pools Pool - Isp string
- Name
Regex string - Output
File string - Public
Ip []stringAddress Pool Ids - Public
Ip stringAddress Pool Name - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- pools
List<Get
Public Ip Address Pools Pool> - isp String
- name
Regex String - output
File String - public
Ip List<String>Address Pool Ids - public
Ip StringAddress Pool Name - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- pools
Get
Public Ip Address Pools Pool[] - isp string
- name
Regex string - output
File string - public
Ip string[]Address Pool Ids - public
Ip stringAddress Pool Name - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- pools
Sequence[Get
Public Ip Address Pools Pool] - isp str
- name_
regex str - output_
file str - public_
ip_ Sequence[str]address_ pool_ ids - public_
ip_ straddress_ pool_ name - status str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- pools List<Property Map>
- isp String
- name
Regex String - output
File String - public
Ip List<String>Address Pool Ids - public
Ip StringAddress Pool Name - status String
Supporting Types
GetPublicIpAddressPoolsPool
- Create
Time string - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- Description string
- The description of the Vpc Public Ip Address Pool.
- Id string
- The ID of the Vpc Public Ip Address Pool.
- Ip
Address boolRemaining - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- Isp string
- The Internet service provider.
- Public
Ip stringAddress Pool Id - The ID of the Vpc Public Ip Address Pool.
- Public
Ip stringAddress Pool Name - The name of the Vpc Public Ip Address Pool.
- Region
Id string - The region ID of the Vpc Public Ip Address Pool.
- Status string
- The status of the Vpc Public Ip Address Pool.
- Total
Ip intNum - The total number of IP addresses in the Vpc Public Ip Address Pool.
- Used
Ip intNum - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- User
Type string - The user type.
- Create
Time string - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- Description string
- The description of the Vpc Public Ip Address Pool.
- Id string
- The ID of the Vpc Public Ip Address Pool.
- Ip
Address boolRemaining - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- Isp string
- The Internet service provider.
- Public
Ip stringAddress Pool Id - The ID of the Vpc Public Ip Address Pool.
- Public
Ip stringAddress Pool Name - The name of the Vpc Public Ip Address Pool.
- Region
Id string - The region ID of the Vpc Public Ip Address Pool.
- Status string
- The status of the Vpc Public Ip Address Pool.
- Total
Ip intNum - The total number of IP addresses in the Vpc Public Ip Address Pool.
- Used
Ip intNum - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- User
Type string - The user type.
- create
Time String - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- description String
- The description of the Vpc Public Ip Address Pool.
- id String
- The ID of the Vpc Public Ip Address Pool.
- ip
Address BooleanRemaining - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- isp String
- The Internet service provider.
- public
Ip StringAddress Pool Id - The ID of the Vpc Public Ip Address Pool.
- public
Ip StringAddress Pool Name - The name of the Vpc Public Ip Address Pool.
- region
Id String - The region ID of the Vpc Public Ip Address Pool.
- status String
- The status of the Vpc Public Ip Address Pool.
- total
Ip IntegerNum - The total number of IP addresses in the Vpc Public Ip Address Pool.
- used
Ip IntegerNum - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- user
Type String - The user type.
- create
Time string - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- description string
- The description of the Vpc Public Ip Address Pool.
- id string
- The ID of the Vpc Public Ip Address Pool.
- ip
Address booleanRemaining - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- isp string
- The Internet service provider.
- public
Ip stringAddress Pool Id - The ID of the Vpc Public Ip Address Pool.
- public
Ip stringAddress Pool Name - The name of the Vpc Public Ip Address Pool.
- region
Id string - The region ID of the Vpc Public Ip Address Pool.
- status string
- The status of the Vpc Public Ip Address Pool.
- total
Ip numberNum - The total number of IP addresses in the Vpc Public Ip Address Pool.
- used
Ip numberNum - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- user
Type string - The user type.
- create_
time str - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- description str
- The description of the Vpc Public Ip Address Pool.
- id str
- The ID of the Vpc Public Ip Address Pool.
- ip_
address_ boolremaining - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- isp str
- The Internet service provider.
- public_
ip_ straddress_ pool_ id - The ID of the Vpc Public Ip Address Pool.
- public_
ip_ straddress_ pool_ name - The name of the Vpc Public Ip Address Pool.
- region_
id str - The region ID of the Vpc Public Ip Address Pool.
- status str
- The status of the Vpc Public Ip Address Pool.
- total_
ip_ intnum - The total number of IP addresses in the Vpc Public Ip Address Pool.
- used_
ip_ intnum - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- user_
type str - The user type.
- create
Time String - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- description String
- The description of the Vpc Public Ip Address Pool.
- id String
- The ID of the Vpc Public Ip Address Pool.
- ip
Address BooleanRemaining - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- isp String
- The Internet service provider.
- public
Ip StringAddress Pool Id - The ID of the Vpc Public Ip Address Pool.
- public
Ip StringAddress Pool Name - The name of the Vpc Public Ip Address Pool.
- region
Id String - The region ID of the Vpc Public Ip Address Pool.
- status String
- The status of the Vpc Public Ip Address Pool.
- total
Ip NumberNum - The total number of IP addresses in the Vpc Public Ip Address Pool.
- used
Ip NumberNum - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- user
Type String - The user type.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.