Class WafRule
Provides a Cloudflare WAF rule resource for a particular zone. This can be used to configure firewall behaviour for pre-defined firewall rules.
Example Usage
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
class MyStack : Stack
{
public MyStack()
{
var _00000 = new Cloudflare.WafRule("100000", new Cloudflare.WafRuleArgs
{
Mode = "simulate",
RuleId = "100000",
ZoneId = "ae36f999674d196762efcc5abb06b345",
});
}
}
Inherited Members
Namespace: Pulumi.Cloudflare
Assembly: Pulumi.Cloudflare.dll
Syntax
public class WafRule : CustomResource
Constructors
View SourceWafRule(String, WafRuleArgs, CustomResourceOptions)
Create a WafRule resource with the given unique name, arguments, and options.
Declaration
public WafRule(string name, WafRuleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| WafRuleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceGroupId
The ID of the WAF Rule Group that contains the rule.
Declaration
public Output<string> GroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Mode
The mode of the rule, can be one of ["block", "challenge", "default", "disable", "simulate"].
Declaration
public Output<string> Mode { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PackageId
The ID of the WAF Rule Package that contains the rule.
Declaration
public Output<string> PackageId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RuleId
The WAF Rule ID.
Declaration
public Output<string> RuleId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ZoneId
The DNS zone ID to apply to.
Declaration
public Output<string> ZoneId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, WafRuleState, CustomResourceOptions)
Get an existing WafRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static WafRule Get(string name, Input<string> id, WafRuleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| WafRuleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| WafRule |