Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides the PrivateZone Rules of the current Alibaba Cloud user.
NOTE: Available in v1.143.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.pvtz.getRules({});
export const pvtzRuleId1 = ids.then(ids => ids.rules?.[0]?.id);
const nameRegex = alicloud.pvtz.getRules({
nameRegex: "^my-Rule",
});
export const pvtzRuleId2 = nameRegex.then(nameRegex => nameRegex.rules?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.pvtz.get_rules()
pulumi.export("pvtzRuleId1", ids.rules[0].id)
name_regex = alicloud.pvtz.get_rules(name_regex="^my-Rule")
pulumi.export("pvtzRuleId2", name_regex.rules[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/pvtz"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := pvtz.GetRules(ctx, &pvtz.GetRulesArgs{}, nil)
if err != nil {
return err
}
ctx.Export("pvtzRuleId1", ids.Rules[0].Id)
nameRegex, err := pvtz.GetRules(ctx, &pvtz.GetRulesArgs{
NameRegex: pulumi.StringRef("^my-Rule"),
}, nil)
if err != nil {
return err
}
ctx.Export("pvtzRuleId2", nameRegex.Rules[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Pvtz.GetRules.Invoke();
var nameRegex = AliCloud.Pvtz.GetRules.Invoke(new()
{
NameRegex = "^my-Rule",
});
return new Dictionary<string, object?>
{
["pvtzRuleId1"] = ids.Apply(getRulesResult => getRulesResult.Rules[0]?.Id),
["pvtzRuleId2"] = nameRegex.Apply(getRulesResult => getRulesResult.Rules[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.pvtz.PvtzFunctions;
import com.pulumi.alicloud.pvtz.inputs.GetRulesArgs;
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 = PvtzFunctions.getRules(GetRulesArgs.builder()
.build());
ctx.export("pvtzRuleId1", ids.rules()[0].id());
final var nameRegex = PvtzFunctions.getRules(GetRulesArgs.builder()
.nameRegex("^my-Rule")
.build());
ctx.export("pvtzRuleId2", nameRegex.rules()[0].id());
}
}
variables:
ids:
fn::invoke:
function: alicloud:pvtz:getRules
arguments: {}
nameRegex:
fn::invoke:
function: alicloud:pvtz:getRules
arguments:
nameRegex: ^my-Rule
outputs:
pvtzRuleId1: ${ids.rules[0].id}
pvtzRuleId2: ${nameRegex.rules[0].id}
Using getRules
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 getRules(args: GetRulesArgs, opts?: InvokeOptions): Promise<GetRulesResult>
function getRulesOutput(args: GetRulesOutputArgs, opts?: InvokeOptions): Output<GetRulesResult>def get_rules(endpoint_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRulesResult
def get_rules_output(endpoint_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRulesResult]func GetRules(ctx *Context, args *GetRulesArgs, opts ...InvokeOption) (*GetRulesResult, error)
func GetRulesOutput(ctx *Context, args *GetRulesOutputArgs, opts ...InvokeOption) GetRulesResultOutput> Note: This function is named GetRules in the Go SDK.
public static class GetRules
{
public static Task<GetRulesResult> InvokeAsync(GetRulesArgs args, InvokeOptions? opts = null)
public static Output<GetRulesResult> Invoke(GetRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRulesResult> getRules(GetRulesArgs args, InvokeOptions options)
public static Output<GetRulesResult> getRules(GetRulesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:pvtz/getRules:getRules
arguments:
# arguments dictionaryThe following arguments are supported:
- Endpoint
Id string - The ID of the Endpoint.
- Ids List<string>
- A list of Rule IDs.
- Name
Regex string - A regex string to filter results by Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- Endpoint
Id string - The ID of the Endpoint.
- Ids []string
- A list of Rule IDs.
- Name
Regex string - A regex string to filter results by Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- endpoint
Id String - The ID of the Endpoint.
- ids List<String>
- A list of Rule IDs.
- name
Regex String - A regex string to filter results by Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview).
- endpoint
Id string - The ID of the Endpoint.
- ids string[]
- A list of Rule IDs.
- name
Regex string - A regex string to filter results by Rule name.
- output
File string - File name where to save data source results (after running
pulumi preview).
- endpoint_
id str - The ID of the Endpoint.
- ids Sequence[str]
- A list of Rule IDs.
- name_
regex str - A regex string to filter results by Rule name.
- output_
file str - File name where to save data source results (after running
pulumi preview).
- endpoint
Id String - The ID of the Endpoint.
- ids List<String>
- A list of Rule IDs.
- name
Regex String - A regex string to filter results by Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview).
getRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Rules
List<Pulumi.
Ali Cloud. Pvtz. Outputs. Get Rules Rule> - Endpoint
Id string - Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Rules
[]Get
Rules Rule - Endpoint
Id string - Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- rules
List<Get
Rules Rule> - endpoint
Id String - name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- rules
Get
Rules Rule[] - endpoint
Id string - name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- rules
Sequence[Get
Rules Rule] - endpoint_
id str - name_
regex str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- rules List<Property Map>
- endpoint
Id String - name
Regex String - output
File String
Supporting Types
GetRulesRule
- Bind
Vpcs List<Pulumi.Ali Cloud. Pvtz. Inputs. Get Rules Rule Bind Vpc> - The List of the VPC. See the following
Block<span pulumi-lang-nodejs=" bindVpcs" pulumi-lang-dotnet=" BindVpcs" pulumi-lang-go=" bindVpcs" pulumi-lang-python=" bind_vpcs" pulumi-lang-yaml=" bindVpcs" pulumi-lang-java=" bindVpcs"> bind_vpcs. NOTE: Available in v1.158.0+. - Create
Time string - The creation time of the resource.
- Endpoint
Id string - The ID of the Endpoint.
- Endpoint
Name string - The Name of the Endpoint.
- Forward
Ips List<Pulumi.Ali Cloud. Pvtz. Inputs. Get Rules Rule Forward Ip> - Id string
- The ID of the Rule.
- Rule
Id string - The first ID of the resource.
- Rule
Name string - The name of the resource.
- Type string
- The type of the rule.
- Zone
Name string - The name of the forwarding zone.
- Bind
Vpcs []GetRules Rule Bind Vpc - The List of the VPC. See the following
Block<span pulumi-lang-nodejs=" bindVpcs" pulumi-lang-dotnet=" BindVpcs" pulumi-lang-go=" bindVpcs" pulumi-lang-python=" bind_vpcs" pulumi-lang-yaml=" bindVpcs" pulumi-lang-java=" bindVpcs"> bind_vpcs. NOTE: Available in v1.158.0+. - Create
Time string - The creation time of the resource.
- Endpoint
Id string - The ID of the Endpoint.
- Endpoint
Name string - The Name of the Endpoint.
- Forward
Ips []GetRules Rule Forward Ip - Id string
- The ID of the Rule.
- Rule
Id string - The first ID of the resource.
- Rule
Name string - The name of the resource.
- Type string
- The type of the rule.
- Zone
Name string - The name of the forwarding zone.
- bind
Vpcs List<GetRules Rule Bind Vpc> - The List of the VPC. See the following
Block<span pulumi-lang-nodejs=" bindVpcs" pulumi-lang-dotnet=" BindVpcs" pulumi-lang-go=" bindVpcs" pulumi-lang-python=" bind_vpcs" pulumi-lang-yaml=" bindVpcs" pulumi-lang-java=" bindVpcs"> bind_vpcs. NOTE: Available in v1.158.0+. - create
Time String - The creation time of the resource.
- endpoint
Id String - The ID of the Endpoint.
- endpoint
Name String - The Name of the Endpoint.
- forward
Ips List<GetRules Rule Forward Ip> - id String
- The ID of the Rule.
- rule
Id String - The first ID of the resource.
- rule
Name String - The name of the resource.
- type String
- The type of the rule.
- zone
Name String - The name of the forwarding zone.
- bind
Vpcs GetRules Rule Bind Vpc[] - The List of the VPC. See the following
Block<span pulumi-lang-nodejs=" bindVpcs" pulumi-lang-dotnet=" BindVpcs" pulumi-lang-go=" bindVpcs" pulumi-lang-python=" bind_vpcs" pulumi-lang-yaml=" bindVpcs" pulumi-lang-java=" bindVpcs"> bind_vpcs. NOTE: Available in v1.158.0+. - create
Time string - The creation time of the resource.
- endpoint
Id string - The ID of the Endpoint.
- endpoint
Name string - The Name of the Endpoint.
- forward
Ips GetRules Rule Forward Ip[] - id string
- The ID of the Rule.
- rule
Id string - The first ID of the resource.
- rule
Name string - The name of the resource.
- type string
- The type of the rule.
- zone
Name string - The name of the forwarding zone.
- bind_
vpcs Sequence[GetRules Rule Bind Vpc] - The List of the VPC. See the following
Block<span pulumi-lang-nodejs=" bindVpcs" pulumi-lang-dotnet=" BindVpcs" pulumi-lang-go=" bindVpcs" pulumi-lang-python=" bind_vpcs" pulumi-lang-yaml=" bindVpcs" pulumi-lang-java=" bindVpcs"> bind_vpcs. NOTE: Available in v1.158.0+. - create_
time str - The creation time of the resource.
- endpoint_
id str - The ID of the Endpoint.
- endpoint_
name str - The Name of the Endpoint.
- forward_
ips Sequence[GetRules Rule Forward Ip] - id str
- The ID of the Rule.
- rule_
id str - The first ID of the resource.
- rule_
name str - The name of the resource.
- type str
- The type of the rule.
- zone_
name str - The name of the forwarding zone.
- bind
Vpcs List<Property Map> - The List of the VPC. See the following
Block<span pulumi-lang-nodejs=" bindVpcs" pulumi-lang-dotnet=" BindVpcs" pulumi-lang-go=" bindVpcs" pulumi-lang-python=" bind_vpcs" pulumi-lang-yaml=" bindVpcs" pulumi-lang-java=" bindVpcs"> bind_vpcs. NOTE: Available in v1.158.0+. - create
Time String - The creation time of the resource.
- endpoint
Id String - The ID of the Endpoint.
- endpoint
Name String - The Name of the Endpoint.
- forward
Ips List<Property Map> - id String
- The ID of the Rule.
- rule
Id String - The first ID of the resource.
- rule
Name String - The name of the resource.
- type String
- The type of the rule.
- zone
Name String - The name of the forwarding zone.
GetRulesRuleBindVpc
- Region
Id string - The region ID of the vpc.
- Region
Name string - The Region Name of the vpc.
- Vpc
Id string - The ID of the VPC.
- Vpc
Name string - The Name of the VPC.
- Region
Id string - The region ID of the vpc.
- Region
Name string - The Region Name of the vpc.
- Vpc
Id string - The ID of the VPC.
- Vpc
Name string - The Name of the VPC.
- region
Id String - The region ID of the vpc.
- region
Name String - The Region Name of the vpc.
- vpc
Id String - The ID of the VPC.
- vpc
Name String - The Name of the VPC.
- region
Id string - The region ID of the vpc.
- region
Name string - The Region Name of the vpc.
- vpc
Id string - The ID of the VPC.
- vpc
Name string - The Name of the VPC.
- region_
id str - The region ID of the vpc.
- region_
name str - The Region Name of the vpc.
- vpc_
id str - The ID of the VPC.
- vpc_
name str - The Name of the VPC.
- region
Id String - The region ID of the vpc.
- region
Name String - The Region Name of the vpc.
- vpc
Id String - The ID of the VPC.
- vpc
Name String - The Name of the VPC.
GetRulesRuleForwardIp
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
