RulesetArgs

data class RulesetArgs(val accountId: Output<String>? = null, val description: Output<String>? = null, val kind: Output<String>? = null, val name: Output<String>? = null, val phase: Output<String>? = null, val rules: Output<List<RulesetRuleArgs>>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<RulesetArgs>

Example Usage

resources:
exampleRuleset:
type: cloudflare:Ruleset
name: example_ruleset
properties:
kind: managed
name: My ruleset
phase: ddos_l4
zoneId: zone_id
description: My ruleset to execute managed rulesets
rules:
- id: 3a03d665bac047339bb530ecb439a90d
action: block
action_parameters:
response:
content: |2
{
"success": false,
"error": "you have been blocked"
}
contentType: application/json
statusCode: 400
description: Block when the IP address is not 1.1.1.1
enabled: true
exposed_credential_check:
passwordExpression: url_decode(http.request.body.form[\"password\"][0])
usernameExpression: url_decode(http.request.body.form[\"username\"][0])
expression: ip.src ne 1.1.1.1
logging:
enabled: true
ratelimit:
characteristics:
- ip.src
period: 10
countingExpression: http.request.body.raw eq "abcd"
mitigationTimeout: 600
requestsPerPeriod: 1000
requestsToOrigin: true
scorePerPeriod: 400
scoreResponseHeaderName: my-score
ref: my_ref

Import

$ pulumi import cloudflare:index/ruleset:Ruleset example '<{accounts|zones}/{account_id|zone_id}>/<ruleset_id>'

Constructors

Link copied to clipboard
constructor(accountId: Output<String>? = null, description: Output<String>? = null, kind: Output<String>? = null, name: Output<String>? = null, phase: Output<String>? = null, rules: Output<List<RulesetRuleArgs>>? = null, zoneId: Output<String>? = null)

Properties

Link copied to clipboard
val accountId: Output<String>? = null

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

Link copied to clipboard
val description: Output<String>? = null

An informative description of the ruleset.

Link copied to clipboard
val kind: Output<String>? = null

The kind of the ruleset. Available values: "managed", "custom", "root", "zone".

Link copied to clipboard
val name: Output<String>? = null

The human-readable name of the ruleset.

Link copied to clipboard
val phase: Output<String>? = null

The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".

Link copied to clipboard
val rules: Output<List<RulesetRuleArgs>>? = null

The list of rules in the ruleset.

Link copied to clipboard
val zoneId: Output<String>? = null

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

Functions

Link copied to clipboard
open override fun toJava(): RulesetArgs