Alibaba Cloud v3.88.0 published on Saturday, Nov 1, 2025 by Pulumi
alicloud.dcdn.getWafRules
Start a Neo task
Explain and create an alicloud.dcdn.getWafRules resource
This data source provides Dcdn Waf Rule available to the user.What is Waf Rule
NOTE: Available since v1.201.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.dcdn.getWafRules({
ids: [defaultAlicloudDcdnWafRule.id],
});
export const alicloudDcdnWafRuleExampleId = _default.then(_default => _default.wafRules?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.dcdn.get_waf_rules(ids=[default_alicloud_dcdn_waf_rule["id"]])
pulumi.export("alicloudDcdnWafRuleExampleId", default.waf_rules[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dcdn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := dcdn.GetWafRules(ctx, &dcdn.GetWafRulesArgs{
Ids: interface{}{
defaultAlicloudDcdnWafRule.Id,
},
}, nil);
if err != nil {
return err
}
ctx.Export("alicloudDcdnWafRuleExampleId", _default.WafRules[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Dcdn.GetWafRules.Invoke(new()
{
Ids = new[]
{
defaultAlicloudDcdnWafRule.Id,
},
});
return new Dictionary<string, object?>
{
["alicloudDcdnWafRuleExampleId"] = @default.Apply(@default => @default.Apply(getWafRulesResult => getWafRulesResult.WafRules[0]?.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dcdn.DcdnFunctions;
import com.pulumi.alicloud.dcdn.inputs.GetWafRulesArgs;
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 default = DcdnFunctions.getWafRules(GetWafRulesArgs.builder()
.ids(defaultAlicloudDcdnWafRule.id())
.build());
ctx.export("alicloudDcdnWafRuleExampleId", default_.wafRules()[0].id());
}
}
variables:
default:
fn::invoke:
function: alicloud:dcdn:getWafRules
arguments:
ids:
- ${defaultAlicloudDcdnWafRule.id}
outputs:
alicloudDcdnWafRuleExampleId: ${default.wafRules[0].id}
Using getWafRules
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 getWafRules(args: GetWafRulesArgs, opts?: InvokeOptions): Promise<GetWafRulesResult>
function getWafRulesOutput(args: GetWafRulesOutputArgs, opts?: InvokeOptions): Output<GetWafRulesResult>def get_waf_rules(ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
query_args: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetWafRulesResult
def get_waf_rules_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
query_args: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetWafRulesResult]func GetWafRules(ctx *Context, args *GetWafRulesArgs, opts ...InvokeOption) (*GetWafRulesResult, error)
func GetWafRulesOutput(ctx *Context, args *GetWafRulesOutputArgs, opts ...InvokeOption) GetWafRulesResultOutput> Note: This function is named GetWafRules in the Go SDK.
public static class GetWafRules
{
public static Task<GetWafRulesResult> InvokeAsync(GetWafRulesArgs args, InvokeOptions? opts = null)
public static Output<GetWafRulesResult> Invoke(GetWafRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetWafRulesResult> getWafRules(GetWafRulesArgs args, InvokeOptions options)
public static Output<GetWafRulesResult> getWafRules(GetWafRulesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:dcdn/getWafRules:getWafRules
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Waf Rule IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Page
Size int - Query
Args string - The query conditions. The value is a string in the JSON format.
- Ids []string
- A list of Waf Rule IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Page
Number int - Page
Size int - Query
Args string - The query conditions. The value is a string in the JSON format.
- ids List<String>
- A list of Waf Rule IDs.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Integer - page
Size Integer - query
Args String - The query conditions. The value is a string in the JSON format.
- ids string[]
- A list of Waf Rule IDs.
- output
File string - File name where to save data source results (after running
pulumi preview). - page
Number number - page
Size number - query
Args string - The query conditions. The value is a string in the JSON format.
- ids Sequence[str]
- A list of Waf Rule IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview). - page_
number int - page_
size int - query_
args str - The query conditions. The value is a string in the JSON format.
- ids List<String>
- A list of Waf Rule IDs.
- output
File String - File name where to save data source results (after running
pulumi preview). - page
Number Number - page
Size Number - query
Args String - The query conditions. The value is a string in the JSON format.
getWafRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Waf
Rules List<Pulumi.Ali Cloud. Dcdn. Outputs. Get Waf Rules Waf Rule> - A list of Waf Rule Entries. Each element contains the following attributes:
- Output
File string - Page
Number int - Page
Size int - Query
Args string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Waf
Rules []GetWaf Rules Waf Rule - A list of Waf Rule Entries. Each element contains the following attributes:
- Output
File string - Page
Number int - Page
Size int - Query
Args string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- waf
Rules List<GetWaf Rules Waf Rule> - A list of Waf Rule Entries. Each element contains the following attributes:
- output
File String - page
Number Integer - page
Size Integer - query
Args String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- waf
Rules GetWaf Rules Waf Rule[] - A list of Waf Rule Entries. Each element contains the following attributes:
- output
File string - page
Number number - page
Size number - query
Args string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- waf_
rules Sequence[GetWaf Rules Waf Rule] - A list of Waf Rule Entries. Each element contains the following attributes:
- output_
file str - page_
number int - page_
size int - query_
args str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- waf
Rules List<Property Map> - A list of Waf Rule Entries. Each element contains the following attributes:
- output
File String - page
Number Number - page
Size Number - query
Args String
Supporting Types
GetWafRulesWafRule
- Action string
- Specifies the action of the rule.
- Cc
Status string - Whether to turn on Frequency Control, on/off
- Cn
Region stringList - The blocked regions in the Chinese mainland, separated by commas (,).
- Conditions
List<Pulumi.
Ali Cloud. Dcdn. Inputs. Get Waf Rules Waf Rule Condition> - The trigger condition of the rule.
- Defense
Scene string - The type of protection policy. The following scenarios are supported:-waf_group:Web basic protection-custom_acl: Custom protection policy-whitelist: whitelist
- Effect string
- The effective range of the frequency control blacklist.
- Gmt
Modified string - Revised the time. The date format is based on ISO8601 notation and uses UTC +0 time in the format of yyyy-MM-ddTHH:mm:ssZ.
- Id string
- The ID of the Waf Rule.
- Other
Region stringList - The effective range of the frequency control blacklist.
- Policy
Id string - The protection policy ID.
- Rate
Limits List<Pulumi.Ali Cloud. Dcdn. Inputs. Get Waf Rules Waf Rule Rate Limit> - The rules of rate limiting.
- Regular
Rules List<string> - The regular expression.
- Regular
Types List<string> - The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- Remote
Addrs List<string> - Filter by IP address.
- Rule
Name string - The name of the protection rule.
- Scenes List<string>
- List of protection scenarios
- Status string
- The information about the HTTP status code.
- Waf
Group stringIds - The id of the waf rule group.
- Waf
Rule stringId - The first ID of the resource
- Action string
- Specifies the action of the rule.
- Cc
Status string - Whether to turn on Frequency Control, on/off
- Cn
Region stringList - The blocked regions in the Chinese mainland, separated by commas (,).
- Conditions
[]Get
Waf Rules Waf Rule Condition - The trigger condition of the rule.
- Defense
Scene string - The type of protection policy. The following scenarios are supported:-waf_group:Web basic protection-custom_acl: Custom protection policy-whitelist: whitelist
- Effect string
- The effective range of the frequency control blacklist.
- Gmt
Modified string - Revised the time. The date format is based on ISO8601 notation and uses UTC +0 time in the format of yyyy-MM-ddTHH:mm:ssZ.
- Id string
- The ID of the Waf Rule.
- Other
Region stringList - The effective range of the frequency control blacklist.
- Policy
Id string - The protection policy ID.
- Rate
Limits []GetWaf Rules Waf Rule Rate Limit - The rules of rate limiting.
- Regular
Rules []string - The regular expression.
- Regular
Types []string - The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- Remote
Addrs []string - Filter by IP address.
- Rule
Name string - The name of the protection rule.
- Scenes []string
- List of protection scenarios
- Status string
- The information about the HTTP status code.
- Waf
Group stringIds - The id of the waf rule group.
- Waf
Rule stringId - The first ID of the resource
- action String
- Specifies the action of the rule.
- cc
Status String - Whether to turn on Frequency Control, on/off
- cn
Region StringList - The blocked regions in the Chinese mainland, separated by commas (,).
- conditions
List<Get
Waf Rules Waf Rule Condition> - The trigger condition of the rule.
- defense
Scene String - The type of protection policy. The following scenarios are supported:-waf_group:Web basic protection-custom_acl: Custom protection policy-whitelist: whitelist
- effect String
- The effective range of the frequency control blacklist.
- gmt
Modified String - Revised the time. The date format is based on ISO8601 notation and uses UTC +0 time in the format of yyyy-MM-ddTHH:mm:ssZ.
- id String
- The ID of the Waf Rule.
- other
Region StringList - The effective range of the frequency control blacklist.
- policy
Id String - The protection policy ID.
- rate
Limits List<GetWaf Rules Waf Rule Rate Limit> - The rules of rate limiting.
- regular
Rules List<String> - The regular expression.
- regular
Types List<String> - The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- remote
Addrs List<String> - Filter by IP address.
- rule
Name String - The name of the protection rule.
- scenes List<String>
- List of protection scenarios
- status String
- The information about the HTTP status code.
- waf
Group StringIds - The id of the waf rule group.
- waf
Rule StringId - The first ID of the resource
- action string
- Specifies the action of the rule.
- cc
Status string - Whether to turn on Frequency Control, on/off
- cn
Region stringList - The blocked regions in the Chinese mainland, separated by commas (,).
- conditions
Get
Waf Rules Waf Rule Condition[] - The trigger condition of the rule.
- defense
Scene string - The type of protection policy. The following scenarios are supported:-waf_group:Web basic protection-custom_acl: Custom protection policy-whitelist: whitelist
- effect string
- The effective range of the frequency control blacklist.
- gmt
Modified string - Revised the time. The date format is based on ISO8601 notation and uses UTC +0 time in the format of yyyy-MM-ddTHH:mm:ssZ.
- id string
- The ID of the Waf Rule.
- other
Region stringList - The effective range of the frequency control blacklist.
- policy
Id string - The protection policy ID.
- rate
Limits GetWaf Rules Waf Rule Rate Limit[] - The rules of rate limiting.
- regular
Rules string[] - The regular expression.
- regular
Types string[] - The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- remote
Addrs string[] - Filter by IP address.
- rule
Name string - The name of the protection rule.
- scenes string[]
- List of protection scenarios
- status string
- The information about the HTTP status code.
- waf
Group stringIds - The id of the waf rule group.
- waf
Rule stringId - The first ID of the resource
- action str
- Specifies the action of the rule.
- cc_
status str - Whether to turn on Frequency Control, on/off
- cn_
region_ strlist - The blocked regions in the Chinese mainland, separated by commas (,).
- conditions
Sequence[Get
Waf Rules Waf Rule Condition] - The trigger condition of the rule.
- defense_
scene str - The type of protection policy. The following scenarios are supported:-waf_group:Web basic protection-custom_acl: Custom protection policy-whitelist: whitelist
- effect str
- The effective range of the frequency control blacklist.
- gmt_
modified str - Revised the time. The date format is based on ISO8601 notation and uses UTC +0 time in the format of yyyy-MM-ddTHH:mm:ssZ.
- id str
- The ID of the Waf Rule.
- other_
region_ strlist - The effective range of the frequency control blacklist.
- policy_
id str - The protection policy ID.
- rate_
limits Sequence[GetWaf Rules Waf Rule Rate Limit] - The rules of rate limiting.
- regular_
rules Sequence[str] - The regular expression.
- regular_
types Sequence[str] - The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- remote_
addrs Sequence[str] - Filter by IP address.
- rule_
name str - The name of the protection rule.
- scenes Sequence[str]
- List of protection scenarios
- status str
- The information about the HTTP status code.
- waf_
group_ strids - The id of the waf rule group.
- waf_
rule_ strid - The first ID of the resource
- action String
- Specifies the action of the rule.
- cc
Status String - Whether to turn on Frequency Control, on/off
- cn
Region StringList - The blocked regions in the Chinese mainland, separated by commas (,).
- conditions List<Property Map>
- The trigger condition of the rule.
- defense
Scene String - The type of protection policy. The following scenarios are supported:-waf_group:Web basic protection-custom_acl: Custom protection policy-whitelist: whitelist
- effect String
- The effective range of the frequency control blacklist.
- gmt
Modified String - Revised the time. The date format is based on ISO8601 notation and uses UTC +0 time in the format of yyyy-MM-ddTHH:mm:ssZ.
- id String
- The ID of the Waf Rule.
- other
Region StringList - The effective range of the frequency control blacklist.
- policy
Id String - The protection policy ID.
- rate
Limits List<Property Map> - The rules of rate limiting.
- regular
Rules List<String> - The regular expression.
- regular
Types List<String> - The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- remote
Addrs List<String> - Filter by IP address.
- rule
Name String - The name of the protection rule.
- scenes List<String>
- List of protection scenarios
- status String
- The information about the HTTP status code.
- waf
Group StringIds - The id of the waf rule group.
- waf
Rule StringId - The first ID of the resource
GetWafRulesWafRuleCondition
GetWafRulesWafRuleRateLimit
- Interval int
- The statistical interval. Valid values: 5 to 1800. Unit: seconds.
- Statuses
List<Pulumi.
Ali Cloud. Dcdn. Inputs. Get Waf Rules Waf Rule Rate Limit Status> - The information about the HTTP status code.
- Sub
Key string - The subfield of the target field.
- Target string
- The statistical field for frequency control.
- Threshold int
- The trigger threshold of rate limiting. Valid values: 2 to 500000. Unit: requests.
- Ttl int
- The validity period of the blacklist. Valid values: 60 to 86400. Unit: seconds.
- Interval int
- The statistical interval. Valid values: 5 to 1800. Unit: seconds.
- Statuses
[]Get
Waf Rules Waf Rule Rate Limit Status - The information about the HTTP status code.
- Sub
Key string - The subfield of the target field.
- Target string
- The statistical field for frequency control.
- Threshold int
- The trigger threshold of rate limiting. Valid values: 2 to 500000. Unit: requests.
- Ttl int
- The validity period of the blacklist. Valid values: 60 to 86400. Unit: seconds.
- interval Integer
- The statistical interval. Valid values: 5 to 1800. Unit: seconds.
- statuses
List<Get
Waf Rules Waf Rule Rate Limit Status> - The information about the HTTP status code.
- sub
Key String - The subfield of the target field.
- target String
- The statistical field for frequency control.
- threshold Integer
- The trigger threshold of rate limiting. Valid values: 2 to 500000. Unit: requests.
- ttl Integer
- The validity period of the blacklist. Valid values: 60 to 86400. Unit: seconds.
- interval number
- The statistical interval. Valid values: 5 to 1800. Unit: seconds.
- statuses
Get
Waf Rules Waf Rule Rate Limit Status[] - The information about the HTTP status code.
- sub
Key string - The subfield of the target field.
- target string
- The statistical field for frequency control.
- threshold number
- The trigger threshold of rate limiting. Valid values: 2 to 500000. Unit: requests.
- ttl number
- The validity period of the blacklist. Valid values: 60 to 86400. Unit: seconds.
- interval int
- The statistical interval. Valid values: 5 to 1800. Unit: seconds.
- statuses
Sequence[Get
Waf Rules Waf Rule Rate Limit Status] - The information about the HTTP status code.
- sub_
key str - The subfield of the target field.
- target str
- The statistical field for frequency control.
- threshold int
- The trigger threshold of rate limiting. Valid values: 2 to 500000. Unit: requests.
- ttl int
- The validity period of the blacklist. Valid values: 60 to 86400. Unit: seconds.
- interval Number
- The statistical interval. Valid values: 5 to 1800. Unit: seconds.
- statuses List<Property Map>
- The information about the HTTP status code.
- sub
Key String - The subfield of the target field.
- target String
- The statistical field for frequency control.
- threshold Number
- The trigger threshold of rate limiting. Valid values: 2 to 500000. Unit: requests.
- ttl Number
- The validity period of the blacklist. Valid values: 60 to 86400. Unit: seconds.
GetWafRulesWafRuleRateLimitStatus
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
