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; }
}
Coming soon!
import pulumi
import pulumi_cloudflare as cloudflare
test = cloudflare.get_waf_rules(zone_id="ae36f999674d196762efcc5abb06b345",
package_id="a25a9a7e9c00afc1fb2e0245519d725b",
filter={
"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>function get_waf_rules(filter=None, package_id=None, zone_id=None, opts=None)func GetWafRules(ctx *Context, args *GetWafRulesArgs, opts ...InvokeOption) (*GetWafRulesResult, error)public static class GetWafRules {
public static Task<GetWafRulesResult> InvokeAsync(GetWafRulesArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
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> - Zone
Id string - Filter
Get
Waf Rules Filter - Package
Id string
- Id string
The provider-assigned unique ID for this managed resource.
- Rules
[]Get
Waf Rules Rule - Zone
Id string - Filter
Get
Waf Rules Filter - Package
Id string
- id string
The provider-assigned unique ID for this managed resource.
- rules
Get
Waf Rules Rule[] - zone
Id string - filter
Get
Waf Rules Filter - package
Id string
- id str
The provider-assigned unique ID for this managed resource.
- rules
List[Get
Waf Rules Rule] - zone_
id str - filter
Dict[Get
Waf Rules Filter] - package_
id str
Supporting Types
GetWafRulesFilter
GetWafRulesRule
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.