getWafRules
Use this data source to look up WAF Rules.
Example Usage
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
class MyStack : Stack
{
public MyStack()
{
var test = Output.Create(Cloudflare.GetWafRules.InvokeAsync(new Cloudflare.GetWafRulesArgs
{
ZoneId = "ae36f999674d196762efcc5abb06b345",
PackageId = "a25a9a7e9c00afc1fb2e0245519d725b",
Filter = new Cloudflare.Inputs.GetWafRulesFilterArgs
{
Description = ".*example.*",
Mode = "on",
GroupId = "de677e5818985db1285d0e80225f06e5",
},
}));
this.WafRules = test.Apply(test => test.Rules);
}
[Output("wafRules")]
public Output<string> WafRules { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v2/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "a25a9a7e9c00afc1fb2e0245519d725b"
test, err := cloudflare.GetWafRules(ctx, &cloudflare.GetWafRulesArgs{
ZoneId: "ae36f999674d196762efcc5abb06b345",
PackageId: &opt0,
Filter: cloudflare.GetWafRulesFilter{
Description: ".*example.*",
Mode: "on",
GroupId: "de677e5818985db1285d0e80225f06e5",
},
}, nil)
if err != nil {
return err
}
ctx.Export("wafRules", test.Rules)
return nil
})
}
import pulumi
import pulumi_cloudflare as cloudflare
test = cloudflare.get_waf_rules(zone_id="ae36f999674d196762efcc5abb06b345",
package_id="a25a9a7e9c00afc1fb2e0245519d725b",
filter=cloudflare.GetWafRulesFilterArgs(
description=".*example.*",
mode="on",
group_id="de677e5818985db1285d0e80225f06e5",
))
pulumi.export("wafRules", test.rules)
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const test = cloudflare.getWafRules({
zoneId: "ae36f999674d196762efcc5abb06b345",
packageId: "a25a9a7e9c00afc1fb2e0245519d725b",
filter: {
description: ".*example.*",
mode: "on",
groupId: "de677e5818985db1285d0e80225f06e5",
},
});
export const wafRules = test.then(test => test.rules);
Using getWafRules
function getWafRules(args: GetWafRulesArgs, opts?: InvokeOptions): Promise<GetWafRulesResult>
def get_waf_rules(filter: Optional[GetWafRulesFilterArgs] = None, package_id: Optional[str] = None, zone_id: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetWafRulesResult
func GetWafRules(ctx *Context, args *GetWafRulesArgs, opts ...InvokeOption) (*GetWafRulesResult, error)
Note: This function is named
GetWafRules
in the Go SDK.
public static class GetWafRules {
public static Task<GetWafRulesResult> InvokeAsync(GetWafRulesArgs args, InvokeOptions? opts = null)
}
The following arguments are supported:
- Zone
Id string The ID of the DNS zone in which to search for the WAF Rules.
- Filter
Get
Waf Rules Filter Args One or more values used to look up WAF Rules. If more than one value is given all values must match in order to be included, see below for full list.
- Package
Id string The ID of the WAF Rule Package in which to search for the WAF Rules.
- Zone
Id string The ID of the DNS zone in which to search for the WAF Rules.
- Filter
Get
Waf Rules Filter One or more values used to look up WAF Rules. If more than one value is given all values must match in order to be included, see below for full list.
- Package
Id string The ID of the WAF Rule Package in which to search for the WAF Rules.
- zone
Id string The ID of the DNS zone in which to search for the WAF Rules.
- filter
Get
Waf Rules Filter One or more values used to look up WAF Rules. If more than one value is given all values must match in order to be included, see below for full list.
- package
Id string The ID of the WAF Rule Package in which to search for the WAF Rules.
- zone_
id str The ID of the DNS zone in which to search for the WAF Rules.
- filter
Get
Waf Rules Filter Args One or more values used to look up WAF Rules. If more than one value is given all values must match in order to be included, see below for full list.
- package_
id str The ID of the WAF Rule Package in which to search for the WAF Rules.
getWafRules Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Rules
List<Get
Waf Rules Rule> A map of WAF Rules details. Full list below:
- Zone
Id string - Filter
Get
Waf Rules Filter - Package
Id string The ID of the WAF Rule Package that contains the WAF Rule
- Id string
The provider-assigned unique ID for this managed resource.
- Rules
[]Get
Waf Rules Rule A map of WAF Rules details. Full list below:
- Zone
Id string - Filter
Get
Waf Rules Filter - Package
Id string The ID of the WAF Rule Package that contains the WAF Rule
- id string
The provider-assigned unique ID for this managed resource.
- rules
Get
Waf Rules Rule[] A map of WAF Rules details. Full list below:
- zone
Id string - filter
Get
Waf Rules Filter - package
Id string The ID of the WAF Rule Package that contains the WAF Rule
- id str
The provider-assigned unique ID for this managed resource.
- rules
Sequence[Get
Waf Rules Rule] A map of WAF Rules details. Full list below:
- zone_
id str - filter
Get
Waf Rules Filter - package_
id str The ID of the WAF Rule Package that contains the WAF Rule
Supporting Types
GetWafRulesFilter
- Description string
A regular expression matching the description of the WAF Rules to lookup.
- Group
Id string The ID of the WAF Rule Group in which the WAF Rules to lookup have to be.
- Mode string
Mode of the WAF Rules to lookup. Valid values: one of [“block”, “challenge”, “default”, “disable”, “simulate”] or [“on”, “off”] depending on the WAF Rule type.
- Description string
A regular expression matching the description of the WAF Rules to lookup.
- Group
Id string The ID of the WAF Rule Group in which the WAF Rules to lookup have to be.
- Mode string
Mode of the WAF Rules to lookup. Valid values: one of [“block”, “challenge”, “default”, “disable”, “simulate”] or [“on”, “off”] depending on the WAF Rule type.
- description string
A regular expression matching the description of the WAF Rules to lookup.
- group
Id string The ID of the WAF Rule Group in which the WAF Rules to lookup have to be.
- mode string
Mode of the WAF Rules to lookup. Valid values: one of [“block”, “challenge”, “default”, “disable”, “simulate”] or [“on”, “off”] depending on the WAF Rule type.
- description str
A regular expression matching the description of the WAF Rules to lookup.
- group_
id str The ID of the WAF Rule Group in which the WAF Rules to lookup have to be.
- mode str
Mode of the WAF Rules to lookup. Valid values: one of [“block”, “challenge”, “default”, “disable”, “simulate”] or [“on”, “off”] depending on the WAF Rule type.
GetWafRulesRule
- Allowed
Modes List<string> The list of allowed
mode
values for the WAF Rule- Description string
A regular expression matching the description of the WAF Rules to lookup.
- Group
Id string The ID of the WAF Rule Group in which the WAF Rules to lookup have to be.
- Group
Name string The Name of the WAF Rule Group that contains the WAF Rule
- Id string
The WAF Rule ID
- Mode string
Mode of the WAF Rules to lookup. Valid values: one of [“block”, “challenge”, “default”, “disable”, “simulate”] or [“on”, “off”] depending on the WAF Rule type.
- Package
Id string The ID of the WAF Rule Package in which to search for the WAF Rules.
- Priority string
The WAF Rule priority
- Allowed
Modes []string The list of allowed
mode
values for the WAF Rule- Description string
A regular expression matching the description of the WAF Rules to lookup.
- Group
Id string The ID of the WAF Rule Group in which the WAF Rules to lookup have to be.
- Group
Name string The Name of the WAF Rule Group that contains the WAF Rule
- Id string
The WAF Rule ID
- Mode string
Mode of the WAF Rules to lookup. Valid values: one of [“block”, “challenge”, “default”, “disable”, “simulate”] or [“on”, “off”] depending on the WAF Rule type.
- Package
Id string The ID of the WAF Rule Package in which to search for the WAF Rules.
- Priority string
The WAF Rule priority
- allowed
Modes string[] The list of allowed
mode
values for the WAF Rule- description string
A regular expression matching the description of the WAF Rules to lookup.
- group
Id string The ID of the WAF Rule Group in which the WAF Rules to lookup have to be.
- group
Name string The Name of the WAF Rule Group that contains the WAF Rule
- id string
The WAF Rule ID
- mode string
Mode of the WAF Rules to lookup. Valid values: one of [“block”, “challenge”, “default”, “disable”, “simulate”] or [“on”, “off”] depending on the WAF Rule type.
- package
Id string The ID of the WAF Rule Package in which to search for the WAF Rules.
- priority string
The WAF Rule priority
- allowed_
modes Sequence[str] The list of allowed
mode
values for the WAF Rule- description str
A regular expression matching the description of the WAF Rules to lookup.
- group_
id str The ID of the WAF Rule Group in which the WAF Rules to lookup have to be.
- group_
name str The Name of the WAF Rule Group that contains the WAF Rule
- id str
The WAF Rule ID
- mode str
Mode of the WAF Rules to lookup. Valid values: one of [“block”, “challenge”, “default”, “disable”, “simulate”] or [“on”, “off”] depending on the WAF Rule type.
- package_
id str The ID of the WAF Rule Package in which to search for the WAF Rules.
- priority str
The WAF Rule priority
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.