Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.dcdn.getWafRules
Explore with Pulumi AI
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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:dcdn/getWafRules:getWafRules
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Waf Rule IDs.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- PageNumber int
- PageSize int
- QueryArgs string
- The query conditions. The value is a string in the JSON format.
- Ids []string
- A list of Waf Rule IDs.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- PageNumber int
- PageSize int
- QueryArgs string
- The query conditions. The value is a string in the JSON format.
- ids List<String>
- A list of Waf Rule IDs.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- pageNumber Integer
- pageSize Integer
- queryArgs String
- The query conditions. The value is a string in the JSON format.
- ids string[]
- A list of Waf Rule IDs.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- pageNumber number
- pageSize number
- queryArgs 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.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- pageNumber Number
- pageSize Number
- queryArgs 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>
- WafRules List<Pulumi.Ali Cloud. Dcdn. Outputs. Get Waf Rules Waf Rule> 
- A list of Waf Rule Entries. Each element contains the following attributes:
- OutputFile string
- PageNumber int
- PageSize int
- QueryArgs string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- WafRules []GetWaf Rules Waf Rule 
- A list of Waf Rule Entries. Each element contains the following attributes:
- OutputFile string
- PageNumber int
- PageSize int
- QueryArgs string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- wafRules List<GetWaf Rules Waf Rule> 
- A list of Waf Rule Entries. Each element contains the following attributes:
- outputFile String
- pageNumber Integer
- pageSize Integer
- queryArgs String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- wafRules GetWaf Rules Waf Rule[] 
- A list of Waf Rule Entries. Each element contains the following attributes:
- outputFile string
- pageNumber number
- pageSize number
- queryArgs 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>
- wafRules List<Property Map>
- A list of Waf Rule Entries. Each element contains the following attributes:
- outputFile String
- pageNumber Number
- pageSize Number
- queryArgs String
Supporting Types
GetWafRulesWafRule    
- Action string
- Specifies the action of the rule.
- CcStatus string
- Whether to turn on Frequency Control, on/off
- CnRegion 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.
- DefenseScene 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.
- GmtModified 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.
- OtherRegion stringList 
- The effective range of the frequency control blacklist.
- PolicyId string
- The protection policy ID.
- RateLimits List<Pulumi.Ali Cloud. Dcdn. Inputs. Get Waf Rules Waf Rule Rate Limit> 
- The rules of rate limiting.
- RegularRules List<string>
- The regular expression.
- RegularTypes List<string>
- The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- RemoteAddrs List<string>
- Filter by IP address.
- RuleName string
- The name of the protection rule.
- Scenes List<string>
- List of protection scenarios
- Status string
- The information about the HTTP status code.
- WafGroup stringIds 
- The id of the waf rule group.
- WafRule stringId 
- The first ID of the resource
- Action string
- Specifies the action of the rule.
- CcStatus string
- Whether to turn on Frequency Control, on/off
- CnRegion stringList 
- The blocked regions in the Chinese mainland, separated by commas (,).
- Conditions
[]GetWaf Rules Waf Rule Condition 
- The trigger condition of the rule.
- DefenseScene 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.
- GmtModified 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.
- OtherRegion stringList 
- The effective range of the frequency control blacklist.
- PolicyId string
- The protection policy ID.
- RateLimits []GetWaf Rules Waf Rule Rate Limit 
- The rules of rate limiting.
- RegularRules []string
- The regular expression.
- RegularTypes []string
- The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- RemoteAddrs []string
- Filter by IP address.
- RuleName string
- The name of the protection rule.
- Scenes []string
- List of protection scenarios
- Status string
- The information about the HTTP status code.
- WafGroup stringIds 
- The id of the waf rule group.
- WafRule stringId 
- The first ID of the resource
- action String
- Specifies the action of the rule.
- ccStatus String
- Whether to turn on Frequency Control, on/off
- cnRegion StringList 
- The blocked regions in the Chinese mainland, separated by commas (,).
- conditions
List<GetWaf Rules Waf Rule Condition> 
- The trigger condition of the rule.
- defenseScene 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.
- gmtModified 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.
- otherRegion StringList 
- The effective range of the frequency control blacklist.
- policyId String
- The protection policy ID.
- rateLimits List<GetWaf Rules Waf Rule Rate Limit> 
- The rules of rate limiting.
- regularRules List<String>
- The regular expression.
- regularTypes List<String>
- The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- remoteAddrs List<String>
- Filter by IP address.
- ruleName String
- The name of the protection rule.
- scenes List<String>
- List of protection scenarios
- status String
- The information about the HTTP status code.
- wafGroup StringIds 
- The id of the waf rule group.
- wafRule StringId 
- The first ID of the resource
- action string
- Specifies the action of the rule.
- ccStatus string
- Whether to turn on Frequency Control, on/off
- cnRegion stringList 
- The blocked regions in the Chinese mainland, separated by commas (,).
- conditions
GetWaf Rules Waf Rule Condition[] 
- The trigger condition of the rule.
- defenseScene 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.
- gmtModified 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.
- otherRegion stringList 
- The effective range of the frequency control blacklist.
- policyId string
- The protection policy ID.
- rateLimits GetWaf Rules Waf Rule Rate Limit[] 
- The rules of rate limiting.
- regularRules string[]
- The regular expression.
- regularTypes string[]
- The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- remoteAddrs string[]
- Filter by IP address.
- ruleName string
- The name of the protection rule.
- scenes string[]
- List of protection scenarios
- status string
- The information about the HTTP status code.
- wafGroup stringIds 
- The id of the waf rule group.
- wafRule 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[GetWaf 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.
- ccStatus String
- Whether to turn on Frequency Control, on/off
- cnRegion StringList 
- The blocked regions in the Chinese mainland, separated by commas (,).
- conditions List<Property Map>
- The trigger condition of the rule.
- defenseScene 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.
- gmtModified 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.
- otherRegion StringList 
- The effective range of the frequency control blacklist.
- policyId String
- The protection policy ID.
- rateLimits List<Property Map>
- The rules of rate limiting.
- regularRules List<String>
- The regular expression.
- regularTypes List<String>
- The type of the regular expression. If the value of the tags field contains waf_group, you can specify this field.
- remoteAddrs List<String>
- Filter by IP address.
- ruleName String
- The name of the protection rule.
- scenes List<String>
- List of protection scenarios
- status String
- The information about the HTTP status code.
- wafGroup StringIds 
- The id of the waf rule group.
- wafRule 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.
- SubKey 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
[]GetWaf Rules Waf Rule Rate Limit Status 
- The information about the HTTP status code.
- SubKey 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<GetWaf Rules Waf Rule Rate Limit Status> 
- The information about the HTTP status code.
- subKey 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
GetWaf Rules Waf Rule Rate Limit Status[] 
- The information about the HTTP status code.
- subKey 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[GetWaf 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.
- subKey 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.