Skip to content
Start here

Delete an account or zone ruleset rule

client.Rulesets.Rules.Delete(ctx, rulesetID, ruleID, params) (*RuleDeleteResponseUnion, error)
DELETE/{accounts_or_zones}/{account_or_zone_id}/rulesets/{ruleset_id}/rules/{rule_id}

Deletes an existing rule from an account or zone ruleset.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Mass URL Redirects WriteMagic Firewall WriteL4 DDoS Managed Ruleset WriteTransform Rules WriteSelect Configuration WriteAccount WAF WriteAccount Rulesets WriteLogs Write
ParametersExpand Collapse
rulesetID string

The unique ID of the ruleset.

ruleID string

The unique ID of the rule.

params RuleDeleteParams
AccountID param.Field[string]Optional

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

ZoneID param.Field[string]Optional

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

DryRun param.Field[bool]Optional

Query param: Validates the request without persisting changes when set to true. Responses that normally return 200 return result: null; endpoints that normally return 204 continue to return 204.

ReturnsExpand Collapse
type RuleDeleteResponseUnion interface{…}

A result.

One of the following:
type RuleDeleteResponseArray []unknown
UnionString
UnionFloat
UnionBool
type RuleDeleteResponseRuleset struct{…}

A ruleset object.

ID string

The unique ID of the ruleset.

Kind Kind

The kind of the ruleset.

One of the following:
const KindManaged Kind = "managed"
const KindCustom Kind = "custom"
const KindRoot Kind = "root"
const KindZone Kind = "zone"
LastUpdated Time

The timestamp of when the ruleset was last modified.

formatdate-time
Name string

The human-readable name of the ruleset.

minLength1
Phase Phase

The phase of the ruleset.

One of the following:
const PhaseDDoSL4 Phase = "ddos_l4"
const PhaseDDoSL7 Phase = "ddos_l7"
const PhaseHTTPConfigSettings Phase = "http_config_settings"
const PhaseHTTPCustomErrors Phase = "http_custom_errors"
const PhaseHTTPLogCustomFields Phase = "http_log_custom_fields"
const PhaseHTTPRatelimit Phase = "http_ratelimit"
const PhaseHTTPRequestCacheSettings Phase = "http_request_cache_settings"
const PhaseHTTPRequestDynamicRedirect Phase = "http_request_dynamic_redirect"
const PhaseHTTPRequestFirewallCustom Phase = "http_request_firewall_custom"
const PhaseHTTPRequestFirewallManaged Phase = "http_request_firewall_managed"
const PhaseHTTPRequestLateTransform Phase = "http_request_late_transform"
const PhaseHTTPRequestOrigin Phase = "http_request_origin"
const PhaseHTTPRequestRedirect Phase = "http_request_redirect"
const PhaseHTTPRequestSanitize Phase = "http_request_sanitize"
const PhaseHTTPRequestSBFM Phase = "http_request_sbfm"
const PhaseHTTPRequestTransform Phase = "http_request_transform"
const PhaseHTTPResponseCacheSettings Phase = "http_response_cache_settings"
const PhaseHTTPResponseCompression Phase = "http_response_compression"
const PhaseHTTPResponseFirewallCustom Phase = "http_response_firewall_custom"
const PhaseHTTPResponseFirewallManaged Phase = "http_response_firewall_managed"
const PhaseHTTPResponseHeadersTransform Phase = "http_response_headers_transform"
const PhaseMagicTransit Phase = "magic_transit"
const PhaseMagicTransitIDsManaged Phase = "magic_transit_ids_managed"
const PhaseMagicTransitManaged Phase = "magic_transit_managed"
const PhaseMagicTransitRatelimit Phase = "magic_transit_ratelimit"
Rules []RuleDeleteResponseRulesetRule

The list of rules in the ruleset.

One of the following:
type RuleDeleteResponseRulesetRulesBlockRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesChallengeRule struct{…}
ID string

The unique ID of the rule.

Action RuleDeleteResponseRulesetRulesChallengeRuleAction

The action to perform when the rule matches.

Enabled bool

Whether the rule should be executed.

Expression string

The expression defining which traffic will match the rule.

minLength1
LastUpdated Time

The timestamp of when the rule was last modified.

formatdate-time
Ref string

The reference of the rule (the rule’s ID by default).

minLength1
Version string

The version of the rule.

ActionParameters unknownOptional

The parameters configuring the rule’s action.

Categories []stringOptional

The categories of the rule.

Description stringOptional

An informative description of the rule.

ExposedCredentialCheck RuleDeleteResponseRulesetRulesChallengeRuleExposedCredentialCheckOptional

Configuration for exposed credential checking.

PasswordExpression string

An expression that selects the password used in the credentials check.

minLength1
UsernameExpression string

An expression that selects the user ID used in the credentials check.

minLength1
Logging LoggingOptional

An object configuring the rule’s logging behavior.

Enabled bool

Whether to generate a log when the rule matches.

Ratelimit RuleDeleteResponseRulesetRulesChallengeRuleRatelimitOptional

An object configuring the rule’s rate limit behavior.

Characteristics []string

Characteristics of the request on which the rate limit counter will be incremented.

Period int64

Period in seconds over which the counter is being incremented.

minimum0
CountingExpression stringOptional

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
MitigationTimeout int64Optional

Period of time in seconds after which the action will be disabled following its first execution.

RequestsPerPeriod int64Optional

The threshold of requests per period after which the action will be executed for the first time.

minimum1
RequestsToOrigin boolOptional

Whether counting is only performed when an origin is reached.

ScorePerPeriod int64Optional

The score threshold per period for which the action will be executed the first time.

ScoreResponseHeaderName stringOptional

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
type RuleDeleteResponseRulesetRulesResponseCompressionRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesDDoSDynamicRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesExecuteRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesForceConnectionCloseRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesJavaScriptChallengeRule struct{…}
ID string

The unique ID of the rule.

Action RuleDeleteResponseRulesetRulesJavaScriptChallengeRuleAction

The action to perform when the rule matches.

Enabled bool

Whether the rule should be executed.

Expression string

The expression defining which traffic will match the rule.

minLength1
LastUpdated Time

The timestamp of when the rule was last modified.

formatdate-time
Ref string

The reference of the rule (the rule’s ID by default).

minLength1
Version string

The version of the rule.

ActionParameters unknownOptional

The parameters configuring the rule’s action.

Categories []stringOptional

The categories of the rule.

Description stringOptional

An informative description of the rule.

ExposedCredentialCheck RuleDeleteResponseRulesetRulesJavaScriptChallengeRuleExposedCredentialCheckOptional

Configuration for exposed credential checking.

PasswordExpression string

An expression that selects the password used in the credentials check.

minLength1
UsernameExpression string

An expression that selects the user ID used in the credentials check.

minLength1
Logging LoggingOptional

An object configuring the rule’s logging behavior.

Enabled bool

Whether to generate a log when the rule matches.

Ratelimit RuleDeleteResponseRulesetRulesJavaScriptChallengeRuleRatelimitOptional

An object configuring the rule’s rate limit behavior.

Characteristics []string

Characteristics of the request on which the rate limit counter will be incremented.

Period int64

Period in seconds over which the counter is being incremented.

minimum0
CountingExpression stringOptional

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
MitigationTimeout int64Optional

Period of time in seconds after which the action will be disabled following its first execution.

RequestsPerPeriod int64Optional

The threshold of requests per period after which the action will be executed for the first time.

minimum1
RequestsToOrigin boolOptional

Whether counting is only performed when an origin is reached.

ScorePerPeriod int64Optional

The score threshold per period for which the action will be executed the first time.

ScoreResponseHeaderName stringOptional

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
type RuleDeleteResponseRulesetRulesLogRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesLogCustomFieldRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesManagedChallengeRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesRedirectRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesRewriteRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesRouteRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesScoreRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesServeErrorRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesSetCacheControlRule struct{…}
ID string

The unique ID of the rule.

Action RuleDeleteResponseRulesetRulesSetCacheControlRuleAction

The action to perform when the rule matches.

Enabled bool
Expression string

The expression defining which traffic will match the rule.

minLength1
LastUpdated Time

The timestamp of when the rule was last modified.

formatdate-time
Ref string

The reference of the rule (the rule’s ID by default).

minLength1
Version string

The version of the rule.

ActionParameters RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersOptional

The parameters configuring the rule’s action.

Immutable RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableOptional

A cache-control directive configuration.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableSetDirective struct{…}

Set the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableSetDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

MaxAge RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeOptional

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeSetDirective struct{…}

Set the directive with a duration value in seconds.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = "remove"
Value int64

The duration value in seconds for the directive.

minimum0
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

MustRevalidate RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateOptional

A cache-control directive configuration.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateSetDirective struct{…}

Set the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

MustUnderstand RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandOptional

A cache-control directive configuration.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandSetDirective struct{…}

Set the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

NoCache RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheOptional

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheSetDirective struct{…}

Set the directive with optional qualifiers.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

Qualifiers []stringOptional

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

NoStore RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreOptional

A cache-control directive configuration.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreSetDirective struct{…}

Set the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

NoTransform RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformOptional

A cache-control directive configuration.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformSetDirective struct{…}

Set the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

Private RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateOptional

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateSetDirective struct{…}

Set the directive with optional qualifiers.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateSetDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

Qualifiers []stringOptional

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

ProxyRevalidate RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateOptional

A cache-control directive configuration.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateSetDirective struct{…}

Set the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

Public RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicOptional

A cache-control directive configuration.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicSetDirective struct{…}

Set the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicSetDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

SMaxage RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageOptional

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageSetDirective struct{…}

Set the directive with a duration value in seconds.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = "remove"
Value int64

The duration value in seconds for the directive.

minimum0
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

StaleIfError RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorOptional

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorSetDirective struct{…}

Set the directive with a duration value in seconds.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = "remove"
Value int64

The duration value in seconds for the directive.

minimum0
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

StaleWhileRevalidate RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateOptional

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective struct{…}

Set the directive with a duration value in seconds.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = "remove"
Value int64

The duration value in seconds for the directive.

minimum0
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

type RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective struct{…}

Remove the directive.

Operation RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation

The operation to perform on the cache-control directive.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperationSet RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = "set"
const RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperationRemove RuleDeleteResponseRulesetRulesSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = "remove"
CloudflareOnly boolOptional

Whether the directive should only be applied to the Cloudflare CDN cache.

Categories []stringOptional

The categories of the rule.

Description stringOptional

An informative description of the rule.

ExposedCredentialCheck RuleDeleteResponseRulesetRulesSetCacheControlRuleExposedCredentialCheckOptional

Configuration for exposed credential checking.

PasswordExpression string

An expression that selects the password used in the credentials check.

minLength1
UsernameExpression string

An expression that selects the user ID used in the credentials check.

minLength1
Logging LoggingOptional

An object configuring the rule’s logging behavior.

Enabled bool

Whether to generate a log when the rule matches.

Ratelimit RuleDeleteResponseRulesetRulesSetCacheControlRuleRatelimitOptional

An object configuring the rule’s rate limit behavior.

Characteristics []string

Characteristics of the request on which the rate limit counter will be incremented.

Period int64

Period in seconds over which the counter is being incremented.

minimum0
CountingExpression stringOptional

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
MitigationTimeout int64Optional

Period of time in seconds after which the action will be disabled following its first execution.

RequestsPerPeriod int64Optional

The threshold of requests per period after which the action will be executed for the first time.

minimum1
RequestsToOrigin boolOptional

Whether counting is only performed when an origin is reached.

ScorePerPeriod int64Optional

The score threshold per period for which the action will be executed the first time.

ScoreResponseHeaderName stringOptional

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
type RuleDeleteResponseRulesetRulesSetCacheSettingsRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesSetCacheTagsRule struct{…}
ID string

The unique ID of the rule.

Action RuleDeleteResponseRulesetRulesSetCacheTagsRuleAction

The action to perform when the rule matches.

Enabled bool
Expression string

The expression defining which traffic will match the rule.

minLength1
LastUpdated Time

The timestamp of when the rule was last modified.

formatdate-time
Ref string

The reference of the rule (the rule’s ID by default).

minLength1
Version string

The version of the rule.

ActionParameters RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersOptional

The parameters configuring the rule’s action.

One of the following:
type RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsValues struct{…}

Add cache tags using a list of values.

Operation RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation

The operation to perform on the cache tags.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationAdd RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "add"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationRemove RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "remove"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationSet RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "set"
Values []string

A list of cache tag values.

type RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsExpression struct{…}

Add cache tags using an expression.

Expression string

An expression that evaluates to an array of cache tag values.

minLength1
Operation RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation

The operation to perform on the cache tags.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationAdd RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "add"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationRemove RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "remove"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationSet RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "set"
type RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValues struct{…}

Remove cache tags using a list of values.

Operation RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation

The operation to perform on the cache tags.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationAdd RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "add"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationRemove RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "remove"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationSet RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "set"
Values []string

A list of cache tag values.

type RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpression struct{…}

Remove cache tags using an expression.

Expression string

An expression that evaluates to an array of cache tag values.

minLength1
Operation RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation

The operation to perform on the cache tags.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationAdd RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "add"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationRemove RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "remove"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationSet RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "set"
type RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsValues struct{…}

Set cache tags using a list of values.

Operation RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation

The operation to perform on the cache tags.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationAdd RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "add"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationRemove RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "remove"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationSet RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "set"
Values []string

A list of cache tag values.

type RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsExpression struct{…}

Set cache tags using an expression.

Expression string

An expression that evaluates to an array of cache tag values.

minLength1
Operation RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation

The operation to perform on the cache tags.

One of the following:
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationAdd RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "add"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationRemove RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "remove"
const RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationSet RuleDeleteResponseRulesetRulesSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "set"
Categories []stringOptional

The categories of the rule.

Description stringOptional

An informative description of the rule.

ExposedCredentialCheck RuleDeleteResponseRulesetRulesSetCacheTagsRuleExposedCredentialCheckOptional

Configuration for exposed credential checking.

PasswordExpression string

An expression that selects the password used in the credentials check.

minLength1
UsernameExpression string

An expression that selects the user ID used in the credentials check.

minLength1
Logging LoggingOptional

An object configuring the rule’s logging behavior.

Enabled bool

Whether to generate a log when the rule matches.

Ratelimit RuleDeleteResponseRulesetRulesSetCacheTagsRuleRatelimitOptional

An object configuring the rule’s rate limit behavior.

Characteristics []string

Characteristics of the request on which the rate limit counter will be incremented.

Period int64

Period in seconds over which the counter is being incremented.

minimum0
CountingExpression stringOptional

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
MitigationTimeout int64Optional

Period of time in seconds after which the action will be disabled following its first execution.

RequestsPerPeriod int64Optional

The threshold of requests per period after which the action will be executed for the first time.

minimum1
RequestsToOrigin boolOptional

Whether counting is only performed when an origin is reached.

ScorePerPeriod int64Optional

The score threshold per period for which the action will be executed the first time.

ScoreResponseHeaderName stringOptional

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
type RuleDeleteResponseRulesetRulesSetConfigurationRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesSkipRule struct{…}
ID string
Action string
Enabled bool
Expression string
Ref string
type RuleDeleteResponseRulesetRulesTransformResponseHTMLRule struct{…}
ID string

The unique ID of the rule.

Action RuleDeleteResponseRulesetRulesTransformResponseHTMLRuleAction

The action to perform when the rule matches.

Enabled bool
Expression string

The expression defining which traffic will match the rule.

minLength1
LastUpdated Time

The timestamp of when the rule was last modified.

formatdate-time
Ref string

The reference of the rule (the rule’s ID by default).

minLength1
Version string

The version of the rule.

ActionParameters RuleDeleteResponseRulesetRulesTransformResponseHTMLRuleActionParametersOptional

The parameters configuring the rule’s action.

Categories []stringOptional

The categories of the rule.

Description stringOptional

An informative description of the rule.

ExposedCredentialCheck RuleDeleteResponseRulesetRulesTransformResponseHTMLRuleExposedCredentialCheckOptional

Configuration for exposed credential checking.

PasswordExpression string

An expression that selects the password used in the credentials check.

minLength1
UsernameExpression string

An expression that selects the user ID used in the credentials check.

minLength1
Logging LoggingOptional

An object configuring the rule’s logging behavior.

Enabled bool

Whether to generate a log when the rule matches.

Ratelimit RuleDeleteResponseRulesetRulesTransformResponseHTMLRuleRatelimitOptional

An object configuring the rule’s rate limit behavior.

Characteristics []string

Characteristics of the request on which the rate limit counter will be incremented.

Period int64

Period in seconds over which the counter is being incremented.

minimum0
CountingExpression stringOptional

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
MitigationTimeout int64Optional

Period of time in seconds after which the action will be disabled following its first execution.

RequestsPerPeriod int64Optional

The threshold of requests per period after which the action will be executed for the first time.

minimum1
RequestsToOrigin boolOptional

Whether counting is only performed when an origin is reached.

ScorePerPeriod int64Optional

The score threshold per period for which the action will be executed the first time.

ScoreResponseHeaderName stringOptional

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
Version string

The version of the ruleset.

Description stringOptional

An informative description of the ruleset.

Delete an account or zone ruleset rule

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/rulesets"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  rule, err := client.Rulesets.Rules.Delete(
    context.TODO(),
    "2f2feab2026849078ba485f918791bdc",
    "3a03d665bac047339bb530ecb439a90d",
    rulesets.RuleDeleteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", rule)
}
{
  "errors": [
    {
      "message": "something bad happened",
      "code": 10000,
      "source": {
        "pointer": "/rules/0/action"
      }
    }
  ],
  "messages": [
    {
      "message": "something bad happened",
      "code": 10000,
      "source": {
        "pointer": "/rules/0/action"
      }
    }
  ],
  "result": {},
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "message": "something bad happened",
      "code": 10000,
      "source": {
        "pointer": "/rules/0/action"
      }
    }
  ],
  "messages": [
    {
      "message": "something bad happened",
      "code": 10000,
      "source": {
        "pointer": "/rules/0/action"
      }
    }
  ],
  "result": {},
  "success": true
}