Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.vpc.getPublicIpAddressPools
Explore with Pulumi AI
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.applyValue(getPublicIpAddressPoolsResult -> getPublicIpAddressPoolsResult.pools()[0].id()));
final var nameRegex = VpcFunctions.getPublicIpAddressPools(GetPublicIpAddressPoolsArgs.builder()
.nameRegex("example_name")
.build());
ctx.export("vpcPublicIpAddressPoolId2", nameRegex.applyValue(getPublicIpAddressPoolsResult -> getPublicIpAddressPoolsResult.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
Changes to this property will trigger replacement.
- A list of Vpc Public Ip Address Pool IDs.
- Isp
Changes to this property will trigger replacement.
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - Name
Regex Changes to this property will trigger replacement.
- 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 Address Pool Ids Changes to this property will trigger replacement.
- The IDs of the Vpc Public IP address pools.
- Public
Ip Address Pool Name Changes to this property will trigger replacement.
- The name of the VPC Public IP address pool.
- Status
Changes to this property will trigger replacement.
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- Ids
Changes to this property will trigger replacement.
- A list of Vpc Public Ip Address Pool IDs.
- Isp
Changes to this property will trigger replacement.
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - Name
Regex Changes to this property will trigger replacement.
- 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 Address Pool Ids Changes to this property will trigger replacement.
- The IDs of the Vpc Public IP address pools.
- Public
Ip Address Pool Name Changes to this property will trigger replacement.
- The name of the VPC Public IP address pool.
- Status
Changes to this property will trigger replacement.
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- ids
Changes to this property will trigger replacement.
- A list of Vpc Public Ip Address Pool IDs.
- isp
Changes to this property will trigger replacement.
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - name
Regex Changes to this property will trigger replacement.
- 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 Address Pool Ids Changes to this property will trigger replacement.
- The IDs of the Vpc Public IP address pools.
- public
Ip Address Pool Name Changes to this property will trigger replacement.
- The name of the VPC Public IP address pool.
- status
Changes to this property will trigger replacement.
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- ids
Changes to this property will trigger replacement.
- A list of Vpc Public Ip Address Pool IDs.
- isp
Changes to this property will trigger replacement.
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - name
Regex Changes to this property will trigger replacement.
- 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 Address Pool Ids Changes to this property will trigger replacement.
- The IDs of the Vpc Public IP address pools.
- public
Ip Address Pool Name Changes to this property will trigger replacement.
- The name of the VPC Public IP address pool.
- status
Changes to this property will trigger replacement.
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- ids
Changes to this property will trigger replacement.
- A list of Vpc Public Ip Address Pool IDs.
- isp
Changes to this property will trigger replacement.
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - name_
regex Changes to this property will trigger replacement.
- 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_ address_ pool_ ids Changes to this property will trigger replacement.
- The IDs of the Vpc Public IP address pools.
- public_
ip_ address_ pool_ name Changes to this property will trigger replacement.
- The name of the VPC Public IP address pool.
- status
Changes to this property will trigger replacement.
- The status of the Vpc Public Ip Address Pool. Valid values:
Created
,Deleting
,Modifying
.
- ids
Changes to this property will trigger replacement.
- A list of Vpc Public Ip Address Pool IDs.
- isp
Changes to this property will trigger replacement.
- The Internet service provider. Valid values:
BGP
,BGP_PRO
,ChinaTelecom
,ChinaUnicom
,ChinaMobile
,ChinaTelecom_L2
,ChinaUnicom_L2
,ChinaMobile_L2
,BGP_FinanceCloud
. - name
Regex Changes to this property will trigger replacement.
- 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 Address Pool Ids Changes to this property will trigger replacement.
- The IDs of the Vpc Public IP address pools.
- public
Ip Address Pool Name Changes to this property will trigger replacement.
- The name of the VPC Public IP address pool.
- status
Changes to this property will trigger replacement.
- 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 This property is required. string - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- Description
This property is required. string - The description of the Vpc Public Ip Address Pool.
- Id
This property is required. string - The ID of the Vpc Public Ip Address Pool.
- Ip
Address Remaining This property is required. bool - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- Isp
This property is required. string - The Internet service provider.
- Public
Ip Address Pool Id This property is required. string - The ID of the Vpc Public Ip Address Pool.
- Public
Ip Address Pool Name This property is required. string - The name of the Vpc Public Ip Address Pool.
- Region
Id This property is required. string - The region ID of the Vpc Public Ip Address Pool.
- Status
This property is required. string - The status of the Vpc Public Ip Address Pool.
- Total
Ip Num This property is required. int - The total number of IP addresses in the Vpc Public Ip Address Pool.
- Used
Ip Num This property is required. int - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- User
Type This property is required. string - The user type.
- Create
Time This property is required. string - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- Description
This property is required. string - The description of the Vpc Public Ip Address Pool.
- Id
This property is required. string - The ID of the Vpc Public Ip Address Pool.
- Ip
Address Remaining This property is required. bool - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- Isp
This property is required. string - The Internet service provider.
- Public
Ip Address Pool Id This property is required. string - The ID of the Vpc Public Ip Address Pool.
- Public
Ip Address Pool Name This property is required. string - The name of the Vpc Public Ip Address Pool.
- Region
Id This property is required. string - The region ID of the Vpc Public Ip Address Pool.
- Status
This property is required. string - The status of the Vpc Public Ip Address Pool.
- Total
Ip Num This property is required. int - The total number of IP addresses in the Vpc Public Ip Address Pool.
- Used
Ip Num This property is required. int - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- User
Type This property is required. string - The user type.
- create
Time This property is required. String - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- description
This property is required. String - The description of the Vpc Public Ip Address Pool.
- id
This property is required. String - The ID of the Vpc Public Ip Address Pool.
- ip
Address Remaining This property is required. Boolean - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- isp
This property is required. String - The Internet service provider.
- public
Ip Address Pool Id This property is required. String - The ID of the Vpc Public Ip Address Pool.
- public
Ip Address Pool Name This property is required. String - The name of the Vpc Public Ip Address Pool.
- region
Id This property is required. String - The region ID of the Vpc Public Ip Address Pool.
- status
This property is required. String - The status of the Vpc Public Ip Address Pool.
- total
Ip Num This property is required. Integer - The total number of IP addresses in the Vpc Public Ip Address Pool.
- used
Ip Num This property is required. Integer - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- user
Type This property is required. String - The user type.
- create
Time This property is required. string - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- description
This property is required. string - The description of the Vpc Public Ip Address Pool.
- id
This property is required. string - The ID of the Vpc Public Ip Address Pool.
- ip
Address Remaining This property is required. boolean - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- isp
This property is required. string - The Internet service provider.
- public
Ip Address Pool Id This property is required. string - The ID of the Vpc Public Ip Address Pool.
- public
Ip Address Pool Name This property is required. string - The name of the Vpc Public Ip Address Pool.
- region
Id This property is required. string - The region ID of the Vpc Public Ip Address Pool.
- status
This property is required. string - The status of the Vpc Public Ip Address Pool.
- total
Ip Num This property is required. number - The total number of IP addresses in the Vpc Public Ip Address Pool.
- used
Ip Num This property is required. number - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- user
Type This property is required. string - The user type.
- create_
time This property is required. str - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- description
This property is required. str - The description of the Vpc Public Ip Address Pool.
- id
This property is required. str - The ID of the Vpc Public Ip Address Pool.
- ip_
address_ remaining This property is required. bool - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- isp
This property is required. str - The Internet service provider.
- public_
ip_ address_ pool_ id This property is required. str - The ID of the Vpc Public Ip Address Pool.
- public_
ip_ address_ pool_ name This property is required. str - The name of the Vpc Public Ip Address Pool.
- region_
id This property is required. str - The region ID of the Vpc Public Ip Address Pool.
- status
This property is required. str - The status of the Vpc Public Ip Address Pool.
- total_
ip_ num This property is required. int - The total number of IP addresses in the Vpc Public Ip Address Pool.
- used_
ip_ num This property is required. int - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- user_
type This property is required. str - The user type.
- create
Time This property is required. String - The time when the Vpc Public Ip Address Pool was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.
- description
This property is required. String - The description of the Vpc Public Ip Address Pool.
- id
This property is required. String - The ID of the Vpc Public Ip Address Pool.
- ip
Address Remaining This property is required. Boolean - Indicates whether the Vpc Public Ip Address Pool has idle IP addresses.
- isp
This property is required. String - The Internet service provider.
- public
Ip Address Pool Id This property is required. String - The ID of the Vpc Public Ip Address Pool.
- public
Ip Address Pool Name This property is required. String - The name of the Vpc Public Ip Address Pool.
- region
Id This property is required. String - The region ID of the Vpc Public Ip Address Pool.
- status
This property is required. String - The status of the Vpc Public Ip Address Pool.
- total
Ip Num This property is required. Number - The total number of IP addresses in the Vpc Public Ip Address Pool.
- used
Ip Num This property is required. Number - The number of occupied IP addresses in the Vpc Public Ip Address Pool.
- user
Type This property is required. 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.