## Get an account or zone ruleset `client.Rulesets.Get(ctx, rulesetID, query) (*RulesetGetResponse, error)` **get** `/{accounts_or_zones}/{account_or_zone_id}/rulesets/{ruleset_id}` Fetches the latest version of an account or zone ruleset. ### Parameters - `rulesetID string` The unique ID of the ruleset. - `query RulesetGetParams` - `AccountID param.Field[string]` The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - `ZoneID param.Field[string]` The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ### Returns - `type RulesetGetResponse struct{…}` A ruleset object. - `ID string` The unique ID of the ruleset. - `Kind Kind` The kind of the ruleset. - `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. - `Name string` The human-readable name of the ruleset. - `Phase Phase` The phase of the ruleset. - `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 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 []RulesetGetResponseRule` The list of rules in the ruleset. - `type BlockRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action BlockRuleAction` The action to perform when the rule matches. - `const BlockRuleActionBlock BlockRuleAction = "block"` - `ActionParameters BlockRuleActionParameters` The parameters configuring the rule's action. - `Response BlockRuleActionParametersResponse` The response to show when the block is applied. - `Content string` The content to return. - `ContentType string` The type of the content to return. - `StatusCode int64` The status code to return. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck BlockRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Enabled bool` Whether to generate a log when the rule matches. - `Ratelimit BlockRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type RulesetGetResponseRulesRulesetsChallengeRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action RulesetGetResponseRulesRulesetsChallengeRuleAction` The action to perform when the rule matches. - `const RulesetGetResponseRulesRulesetsChallengeRuleActionChallenge RulesetGetResponseRulesRulesetsChallengeRuleAction = "challenge"` - `ActionParameters unknown` The parameters configuring the rule's action. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck RulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit RulesetGetResponseRulesRulesetsChallengeRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type CompressResponseRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action CompressResponseRuleAction` The action to perform when the rule matches. - `const CompressResponseRuleActionCompressResponse CompressResponseRuleAction = "compress_response"` - `ActionParameters CompressResponseRuleActionParameters` The parameters configuring the rule's action. - `Algorithms []CompressResponseRuleActionParametersAlgorithm` Custom order for compression algorithms. - `Name CompressResponseRuleActionParametersAlgorithmsName` Name of the compression algorithm to enable. - `const CompressResponseRuleActionParametersAlgorithmsNameNone CompressResponseRuleActionParametersAlgorithmsName = "none"` - `const CompressResponseRuleActionParametersAlgorithmsNameAuto CompressResponseRuleActionParametersAlgorithmsName = "auto"` - `const CompressResponseRuleActionParametersAlgorithmsNameDefault CompressResponseRuleActionParametersAlgorithmsName = "default"` - `const CompressResponseRuleActionParametersAlgorithmsNameGzip CompressResponseRuleActionParametersAlgorithmsName = "gzip"` - `const CompressResponseRuleActionParametersAlgorithmsNameBrotli CompressResponseRuleActionParametersAlgorithmsName = "brotli"` - `const CompressResponseRuleActionParametersAlgorithmsNameZstd CompressResponseRuleActionParametersAlgorithmsName = "zstd"` - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck CompressResponseRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit CompressResponseRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type DDoSDynamicRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action DDoSDynamicRuleAction` The action to perform when the rule matches. - `const DDoSDynamicRuleActionDDoSDynamic DDoSDynamicRuleAction = "ddos_dynamic"` - `ActionParameters unknown` The parameters configuring the rule's action. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck DDoSDynamicRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit DDoSDynamicRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type ExecuteRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action ExecuteRuleAction` The action to perform when the rule matches. - `const ExecuteRuleActionExecute ExecuteRuleAction = "execute"` - `ActionParameters ExecuteRuleActionParameters` The parameters configuring the rule's action. - `ID string` The ID of the ruleset to execute. - `MatchedData ExecuteRuleActionParametersMatchedData` The configuration to use for matched data logging. - `PublicKey string` The public key to encrypt matched data logs with. - `Overrides ExecuteRuleActionParametersOverrides` A set of overrides to apply to the target ruleset. - `Action string` An action to override all rules with. This option has lower precedence than rule and category overrides. - `Categories []ExecuteRuleActionParametersOverridesCategory` A list of category-level overrides. This option has the second-highest precedence after rule-level overrides. - `Category string` The name of the category to override. - `Action string` The action to override rules in the category with. - `Enabled bool` Whether to enable execution of rules in the category. - `SensitivityLevel ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel` The sensitivity level to use for rules in the category. This option is only applicable for DDoS phases. - `const ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelDefault ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "default"` - `const ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelMedium ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "medium"` - `const ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelLow ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "low"` - `const ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelEoff ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "eoff"` - `Enabled bool` Whether to enable execution of all rules. This option has lower precedence than rule and category overrides. - `Rules []ExecuteRuleActionParametersOverridesRule` A list of rule-level overrides. This option has the highest precedence. - `ID string` The ID of the rule to override. - `Action string` The action to override the rule with. - `Enabled bool` Whether to enable execution of the rule. - `ScoreThreshold int64` The score threshold to use for the rule. - `SensitivityLevel ExecuteRuleActionParametersOverridesRulesSensitivityLevel` The sensitivity level to use for the rule. This option is only applicable for DDoS phases. - `const ExecuteRuleActionParametersOverridesRulesSensitivityLevelDefault ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "default"` - `const ExecuteRuleActionParametersOverridesRulesSensitivityLevelMedium ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "medium"` - `const ExecuteRuleActionParametersOverridesRulesSensitivityLevelLow ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "low"` - `const ExecuteRuleActionParametersOverridesRulesSensitivityLevelEoff ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "eoff"` - `SensitivityLevel ExecuteRuleActionParametersOverridesSensitivityLevel` A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases. - `const ExecuteRuleActionParametersOverridesSensitivityLevelDefault ExecuteRuleActionParametersOverridesSensitivityLevel = "default"` - `const ExecuteRuleActionParametersOverridesSensitivityLevelMedium ExecuteRuleActionParametersOverridesSensitivityLevel = "medium"` - `const ExecuteRuleActionParametersOverridesSensitivityLevelLow ExecuteRuleActionParametersOverridesSensitivityLevel = "low"` - `const ExecuteRuleActionParametersOverridesSensitivityLevelEoff ExecuteRuleActionParametersOverridesSensitivityLevel = "eoff"` - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck ExecuteRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit ExecuteRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type ForceConnectionCloseRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action ForceConnectionCloseRuleAction` The action to perform when the rule matches. - `const ForceConnectionCloseRuleActionForceConnectionClose ForceConnectionCloseRuleAction = "force_connection_close"` - `ActionParameters unknown` The parameters configuring the rule's action. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck ForceConnectionCloseRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit ForceConnectionCloseRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type RulesetGetResponseRulesRulesetsJSChallengeRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action RulesetGetResponseRulesRulesetsJSChallengeRuleAction` The action to perform when the rule matches. - `const RulesetGetResponseRulesRulesetsJSChallengeRuleActionJSChallenge RulesetGetResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"` - `ActionParameters unknown` The parameters configuring the rule's action. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck RulesetGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit RulesetGetResponseRulesRulesetsJSChallengeRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type LogRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action LogRuleAction` The action to perform when the rule matches. - `const LogRuleActionLog LogRuleAction = "log"` - `ActionParameters unknown` The parameters configuring the rule's action. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck LogRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit LogRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type LogCustomFieldRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action LogCustomFieldRuleAction` The action to perform when the rule matches. - `const LogCustomFieldRuleActionLogCustomField LogCustomFieldRuleAction = "log_custom_field"` - `ActionParameters LogCustomFieldRuleActionParameters` The parameters configuring the rule's action. - `CookieFields []LogCustomFieldRuleActionParametersCookieField` The cookie fields to log. - `Name string` The name of the cookie. - `RawResponseFields []LogCustomFieldRuleActionParametersRawResponseField` The raw response fields to log. - `Name string` The name of the response header. - `PreserveDuplicates bool` Whether to log duplicate values of the same header. - `RequestFields []LogCustomFieldRuleActionParametersRequestField` The raw request fields to log. - `Name string` The name of the header. - `ResponseFields []LogCustomFieldRuleActionParametersResponseField` The transformed response fields to log. - `Name string` The name of the response header. - `PreserveDuplicates bool` Whether to log duplicate values of the same header. - `TransformedRequestFields []LogCustomFieldRuleActionParametersTransformedRequestField` The transformed request fields to log. - `Name string` The name of the header. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck LogCustomFieldRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit LogCustomFieldRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type ManagedChallengeRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action ManagedChallengeRuleAction` The action to perform when the rule matches. - `const ManagedChallengeRuleActionManagedChallenge ManagedChallengeRuleAction = "managed_challenge"` - `ActionParameters unknown` The parameters configuring the rule's action. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck ManagedChallengeRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit ManagedChallengeRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type RedirectRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action RedirectRuleAction` The action to perform when the rule matches. - `const RedirectRuleActionRedirect RedirectRuleAction = "redirect"` - `ActionParameters RedirectRuleActionParameters` The parameters configuring the rule's action. - `FromList RedirectRuleActionParametersFromList` A redirect based on a bulk list lookup. - `Key string` An expression that evaluates to the list lookup key. - `Name string` The name of the list to match against. - `FromValue RedirectRuleActionParametersFromValue` A redirect based on the request properties. - `TargetURL RedirectRuleActionParametersFromValueTargetURL` A URL to redirect the request to. - `Expression string` An expression that evaluates to a URL to redirect the request to. - `Value string` A URL to redirect the request to. - `PreserveQueryString bool` Whether to keep the query string of the original request. - `StatusCode RedirectRuleActionParametersFromValueStatusCode` The status code to use for the redirect. - `const RedirectRuleActionParametersFromValueStatusCode301 RedirectRuleActionParametersFromValueStatusCode = 301` - `const RedirectRuleActionParametersFromValueStatusCode302 RedirectRuleActionParametersFromValueStatusCode = 302` - `const RedirectRuleActionParametersFromValueStatusCode303 RedirectRuleActionParametersFromValueStatusCode = 303` - `const RedirectRuleActionParametersFromValueStatusCode307 RedirectRuleActionParametersFromValueStatusCode = 307` - `const RedirectRuleActionParametersFromValueStatusCode308 RedirectRuleActionParametersFromValueStatusCode = 308` - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck RedirectRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit RedirectRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type RewriteRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action RewriteRuleAction` The action to perform when the rule matches. - `const RewriteRuleActionRewrite RewriteRuleAction = "rewrite"` - `ActionParameters RewriteRuleActionParameters` The parameters configuring the rule's action. - `Headers map[string, RewriteRuleActionParametersHeader]` A map of headers to rewrite. - `type RewriteRuleActionParametersHeadersAddStaticHeader struct{…}` A header with a static value to add. - `Operation RewriteRuleActionParametersHeadersAddStaticHeaderOperation` The operation to perform on the header. - `const RewriteRuleActionParametersHeadersAddStaticHeaderOperationAdd RewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"` - `Value string` A static value for the header. - `type RewriteRuleActionParametersHeadersAddDynamicHeader struct{…}` A header with a dynamic value to add. - `Expression string` An expression that evaluates to a value for the header. - `Operation RewriteRuleActionParametersHeadersAddDynamicHeaderOperation` The operation to perform on the header. - `const RewriteRuleActionParametersHeadersAddDynamicHeaderOperationAdd RewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"` - `type RewriteRuleActionParametersHeadersSetStaticHeader struct{…}` A header with a static value to set. - `Operation RewriteRuleActionParametersHeadersSetStaticHeaderOperation` The operation to perform on the header. - `const RewriteRuleActionParametersHeadersSetStaticHeaderOperationSet RewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"` - `Value string` A static value for the header. - `type RewriteRuleActionParametersHeadersSetDynamicHeader struct{…}` A header with a dynamic value to set. - `Expression string` An expression that evaluates to a value for the header. - `Operation RewriteRuleActionParametersHeadersSetDynamicHeaderOperation` The operation to perform on the header. - `const RewriteRuleActionParametersHeadersSetDynamicHeaderOperationSet RewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"` - `type RewriteRuleActionParametersHeadersRemoveHeader struct{…}` A header to remove. - `Operation RewriteRuleActionParametersHeadersRemoveHeaderOperation` The operation to perform on the header. - `const RewriteRuleActionParametersHeadersRemoveHeaderOperationRemove RewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"` - `URI RewriteRuleActionParametersURI` A URI path rewrite. - `type RewriteRuleActionParametersURIURIPath struct{…}` A URI path rewrite. - `Path RewriteRuleActionParametersURIURIPathPath` A URI path rewrite. - `Expression string` An expression that evaluates to a value to rewrite the URI path to. - `Value string` A value to rewrite the URI path to. - `Origin bool` Whether to propagate the rewritten URI to origin. - `type RewriteRuleActionParametersURIURIQuery struct{…}` A URI query rewrite. - `Query RewriteRuleActionParametersURIURIQueryQuery` A URI query rewrite. - `Expression string` An expression that evaluates to a value to rewrite the URI query to. - `Value string` A value to rewrite the URI query to. - `Origin bool` Whether to propagate the rewritten URI to origin. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck RewriteRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit RewriteRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type RouteRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action RouteRuleAction` The action to perform when the rule matches. - `const RouteRuleActionRoute RouteRuleAction = "route"` - `ActionParameters RouteRuleActionParameters` The parameters configuring the rule's action. - `HostHeader string` A value to rewrite the HTTP host header to. - `Origin RouteRuleActionParametersOrigin` An origin to route to. - `Host string` A resolved host to route to. - `Port int64` A destination port to route to. - `SNI RouteRuleActionParametersSNI` A Server Name Indication (SNI) override. - `Value string` A value to override the SNI to. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck RouteRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit RouteRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type ScoreRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action ScoreRuleAction` The action to perform when the rule matches. - `const ScoreRuleActionScore ScoreRuleAction = "score"` - `ActionParameters ScoreRuleActionParameters` The parameters configuring the rule's action. - `Increment int64` A delta to change the score by, which can be either positive or negative. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck ScoreRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit ScoreRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type ServeErrorRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action ServeErrorRuleAction` The action to perform when the rule matches. - `const ServeErrorRuleActionServeError ServeErrorRuleAction = "serve_error"` - `ActionParameters ServeErrorRuleActionParameters` The parameters configuring the rule's action. - `type ServeErrorRuleActionParametersActionParametersContent struct{…}` - `Content string` The response content. - `ContentType ServeErrorRuleActionParametersActionParametersContentContentType` The content type header to set with the error response. - `const ServeErrorRuleActionParametersActionParametersContentContentTypeApplicationJson ServeErrorRuleActionParametersActionParametersContentContentType = "application/json"` - `const ServeErrorRuleActionParametersActionParametersContentContentTypeTextHTML ServeErrorRuleActionParametersActionParametersContentContentType = "text/html"` - `const ServeErrorRuleActionParametersActionParametersContentContentTypeTextPlain ServeErrorRuleActionParametersActionParametersContentContentType = "text/plain"` - `const ServeErrorRuleActionParametersActionParametersContentContentTypeTextXml ServeErrorRuleActionParametersActionParametersContentContentType = "text/xml"` - `StatusCode int64` The status code to use for the error. - `type ServeErrorRuleActionParametersActionParametersAsset struct{…}` - `AssetName string` The name of a custom asset to serve as the error response. - `ContentType ServeErrorRuleActionParametersActionParametersAssetContentType` The content type header to set with the error response. - `const ServeErrorRuleActionParametersActionParametersAssetContentTypeApplicationJson ServeErrorRuleActionParametersActionParametersAssetContentType = "application/json"` - `const ServeErrorRuleActionParametersActionParametersAssetContentTypeTextHTML ServeErrorRuleActionParametersActionParametersAssetContentType = "text/html"` - `const ServeErrorRuleActionParametersActionParametersAssetContentTypeTextPlain ServeErrorRuleActionParametersActionParametersAssetContentType = "text/plain"` - `const ServeErrorRuleActionParametersActionParametersAssetContentTypeTextXml ServeErrorRuleActionParametersActionParametersAssetContentType = "text/xml"` - `StatusCode int64` The status code to use for the error. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck ServeErrorRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit ServeErrorRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type RulesetGetResponseRulesRulesetsSetCacheControlRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action RulesetGetResponseRulesRulesetsSetCacheControlRuleAction` The action to perform when the rule matches. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionSetCacheControl RulesetGetResponseRulesRulesetsSetCacheControlRuleAction = "set_cache_control"` - `ActionParameters RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParameters` The parameters configuring the rule's action. - `Immutable RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutable` A cache-control directive configuration. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirective struct{…}` Set the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `MaxAge RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAge` A cache-control directive configuration that accepts a duration value in seconds. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = "remove"` - `Value int64` The duration value in seconds for the directive. - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `MustRevalidate RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidate` A cache-control directive configuration. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirective struct{…}` Set the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `MustUnderstand RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstand` A cache-control directive configuration. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirective struct{…}` Set the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `NoCache RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCache` A cache-control directive configuration that accepts optional qualifiers (header names). - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirective struct{…}` Set the directive with optional qualifiers. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `Qualifiers []string` Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `NoStore RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStore` A cache-control directive configuration. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirective struct{…}` Set the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `NoTransform RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransform` A cache-control directive configuration. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirective struct{…}` Set the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `Private RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivate` A cache-control directive configuration that accepts optional qualifiers (header names). - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirective struct{…}` Set the directive with optional qualifiers. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `Qualifiers []string` Optional list of header names to qualify the directive (e.g., for "private" or "no-cache" directives). - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `ProxyRevalidate RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidate` A cache-control directive configuration. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirective struct{…}` Set the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `Public RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublic` A cache-control directive configuration. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirective struct{…}` Set the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `SMaxage RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxage` A cache-control directive configuration that accepts a duration value in seconds. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = "remove"` - `Value int64` The duration value in seconds for the directive. - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `StaleIfError RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfError` A cache-control directive configuration that accepts a duration value in seconds. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = "remove"` - `Value int64` The duration value in seconds for the directive. - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `StaleWhileRevalidate RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidate` A cache-control directive configuration that accepts a duration value in seconds. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = "remove"` - `Value int64` The duration value in seconds for the directive. - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective struct{…}` Remove the directive. - `Operation RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperationSet RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = "set"` - `const RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperationRemove RulesetGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck RulesetGetResponseRulesRulesetsSetCacheControlRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit RulesetGetResponseRulesRulesetsSetCacheControlRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type SetCacheSettingsRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action SetCacheSettingsRuleAction` The action to perform when the rule matches. - `const SetCacheSettingsRuleActionSetCacheSettings SetCacheSettingsRuleAction = "set_cache_settings"` - `ActionParameters SetCacheSettingsRuleActionParameters` The parameters configuring the rule's action. - `AdditionalCacheablePorts []int64` A list of additional ports that caching should be enabled on. - `BrowserTTL SetCacheSettingsRuleActionParametersBrowserTTL` How long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content. - `Mode SetCacheSettingsRuleActionParametersBrowserTTLMode` The browser TTL mode. - `const SetCacheSettingsRuleActionParametersBrowserTTLModeRespectOrigin SetCacheSettingsRuleActionParametersBrowserTTLMode = "respect_origin"` - `const SetCacheSettingsRuleActionParametersBrowserTTLModeBypassByDefault SetCacheSettingsRuleActionParametersBrowserTTLMode = "bypass_by_default"` - `const SetCacheSettingsRuleActionParametersBrowserTTLModeOverrideOrigin SetCacheSettingsRuleActionParametersBrowserTTLMode = "override_origin"` - `const SetCacheSettingsRuleActionParametersBrowserTTLModeBypass SetCacheSettingsRuleActionParametersBrowserTTLMode = "bypass"` - `Default int64` The browser TTL (in seconds) if you choose the "override_origin" mode. - `Cache bool` Whether the request's response from the origin is eligible for caching. Caching itself will still depend on the cache control header and your other caching configurations. - `CacheKey SetCacheSettingsRuleActionParametersCacheKey` Which components of the request are included in or excluded from the cache key Cloudflare uses to store the response in cache. - `CacheByDeviceType bool` Whether to separate cached content based on the visitor's device type. - `CacheDeceptionArmor bool` Whether to protect from web cache deception attacks, while allowing static assets to be cached. - `CustomKey SetCacheSettingsRuleActionParametersCacheKeyCustomKey` Which components of the request are included or excluded from the cache key. - `Cookie SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie` Which cookies to include in the cache key. - `CheckPresence []string` A list of cookies to check for the presence of. The presence of these cookies is included in the cache key. - `Include []string` A list of cookies to include in the cache key. - `Header SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader` Which headers to include in the cache key. - `CheckPresence []string` A list of headers to check for the presence of. The presence of these headers is included in the cache key. - `Contains map[string, []string]` A mapping of header names to a list of values. If a header is present in the request and contains any of the values provided, its value is included in the cache key. - `ExcludeOrigin bool` Whether to exclude the origin header in the cache key. - `Include []string` A list of headers to include in the cache key. - `Host SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost` How to use the host in the cache key. - `Resolved bool` Whether to use the resolved host in the cache key. - `QueryString SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString` Which query string parameters to include in or exclude from the cache key. - `Exclude SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude` Which query string parameters to exclude from the cache key. - `All SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeAll` Whether to exclude all query string parameters from the cache key. - `const SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeAllTrue SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeAll = true` - `List []string` A list of query string parameters to exclude from the cache key. - `Include SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude` Which query string parameters to include in the cache key. - `All SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeAll` Whether to include all query string parameters in the cache key. - `const SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeAllTrue SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeAll = true` - `List []string` A list of query string parameters to include in the cache key. - `User SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser` How to use characteristics of the request user agent in the cache key. - `DeviceType bool` Whether to use the user agent's device type in the cache key. - `Geo bool` Whether to use the user agents's country in the cache key. - `Lang bool` Whether to use the user agent's language in the cache key. - `IgnoreQueryStringsOrder bool` Whether to treat requests with the same query parameters the same, regardless of the order those query parameters are in. - `CacheReserve SetCacheSettingsRuleActionParametersCacheReserve` Settings to determine whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan). - `Eligible bool` Whether Cache Reserve is enabled. If this is true and a request meets eligibility criteria, Cloudflare will write the resource to Cache Reserve. - `MinimumFileSize int64` The minimum file size eligible for storage in Cache Reserve. - `EdgeTTL SetCacheSettingsRuleActionParametersEdgeTTL` How long the Cloudflare edge network should cache the response. - `Mode SetCacheSettingsRuleActionParametersEdgeTTLMode` The edge TTL mode. - `const SetCacheSettingsRuleActionParametersEdgeTTLModeRespectOrigin SetCacheSettingsRuleActionParametersEdgeTTLMode = "respect_origin"` - `const SetCacheSettingsRuleActionParametersEdgeTTLModeBypassByDefault SetCacheSettingsRuleActionParametersEdgeTTLMode = "bypass_by_default"` - `const SetCacheSettingsRuleActionParametersEdgeTTLModeOverrideOrigin SetCacheSettingsRuleActionParametersEdgeTTLMode = "override_origin"` - `Default int64` The edge TTL (in seconds) if you choose the "override_origin" mode. - `StatusCodeTTL []SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL` A list of TTLs to apply to specific status codes or status code ranges. - `Value int64` The time to cache the response for (in seconds). A value of 0 is equivalent to setting the cache control header with the value "no-cache". A value of -1 is equivalent to setting the cache control header with the value of "no-store". - `StatusCode int64` A single status code to apply the TTL to. - `StatusCodeRange SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange` A range of status codes to apply the TTL to. - `From int64` The lower bound of the range. - `To int64` The upper bound of the range. - `OriginCacheControl bool` Whether Cloudflare will aim to strictly adhere to RFC 7234. - `OriginErrorPagePassthru bool` Whether to generate Cloudflare error pages for issues from the origin server. - `ReadTimeout int64` A timeout value between two successive read operations to use for your origin server. Historically, the timeout value between two read options from Cloudflare to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 errors because of timeouts from an origin server, try increasing this timeout value. - `RespectStrongEtags bool` Whether Cloudflare should respect strong ETag (entity tag) headers. If false, Cloudflare converts strong ETag headers to weak ETag headers. - `ServeStale SetCacheSettingsRuleActionParametersServeStale` When to serve stale content from cache. - `DisableStaleWhileUpdating bool` Whether Cloudflare should disable serving stale content while getting the latest content from the origin. - `SharedDictionary SetCacheSettingsRuleActionParametersSharedDictionary` Configuration for shared dictionary compression. When set, Cloudflare injects Use-As-Dictionary headers on matching cacheable responses. - `MatchPattern string` URL pattern for the Use-As-Dictionary match field. This pattern specifies which URLs can use this response as a dictionary. - `StripEtags bool` Whether to strip ETag headers from the origin response before caching. - `StripLastModified bool` Whether to strip Last-Modified headers from the origin response before caching. - `StripSetCookie bool` Whether to strip Set-Cookie headers from the origin response before caching. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck SetCacheSettingsRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit SetCacheSettingsRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type RulesetGetResponseRulesRulesetsSetCacheTagsRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action RulesetGetResponseRulesRulesetsSetCacheTagsRuleAction` The action to perform when the rule matches. - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionSetCacheTags RulesetGetResponseRulesRulesetsSetCacheTagsRuleAction = "set_cache_tags"` - `ActionParameters RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParameters` The parameters configuring the rule's action. - `type RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValues struct{…}` Add cache tags using a list of values. - `Operation RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation` The operation to perform on the cache tags. - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationAdd RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "add"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationRemove RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "remove"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationSet RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "set"` - `Values []string` A list of cache tag values. - `type RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpression struct{…}` Add cache tags using an expression. - `Expression string` An expression that evaluates to an array of cache tag values. - `Operation RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation` The operation to perform on the cache tags. - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationAdd RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "add"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationRemove RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "remove"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationSet RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "set"` - `type RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValues struct{…}` Remove cache tags using a list of values. - `Operation RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation` The operation to perform on the cache tags. - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationAdd RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "add"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationRemove RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "remove"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationSet RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "set"` - `Values []string` A list of cache tag values. - `type RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpression struct{…}` Remove cache tags using an expression. - `Expression string` An expression that evaluates to an array of cache tag values. - `Operation RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation` The operation to perform on the cache tags. - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationAdd RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "add"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationRemove RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "remove"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationSet RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "set"` - `type RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValues struct{…}` Set cache tags using a list of values. - `Operation RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation` The operation to perform on the cache tags. - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationAdd RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "add"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationRemove RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "remove"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationSet RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "set"` - `Values []string` A list of cache tag values. - `type RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpression struct{…}` Set cache tags using an expression. - `Expression string` An expression that evaluates to an array of cache tag values. - `Operation RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation` The operation to perform on the cache tags. - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationAdd RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "add"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationRemove RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "remove"` - `const RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationSet RulesetGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "set"` - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck RulesetGetResponseRulesRulesetsSetCacheTagsRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit RulesetGetResponseRulesRulesetsSetCacheTagsRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type SetConfigRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action SetConfigRuleAction` The action to perform when the rule matches. - `const SetConfigRuleActionSetConfig SetConfigRuleAction = "set_config"` - `ActionParameters SetConfigRuleActionParameters` The parameters configuring the rule's action. - `AutomaticHTTPSRewrites bool` Whether to enable Automatic HTTPS Rewrites. - `Autominify SetConfigRuleActionParametersAutominify` Which file extensions to minify automatically. - `CSS bool` Whether to minify CSS files. - `HTML bool` Whether to minify HTML files. - `JS bool` Whether to minify JavaScript files. - `BIC bool` Whether to enable Browser Integrity Check (BIC). - `ContentConverter bool` Whether to enable content conversion (e.g., HTML to Markdown). - `DisableApps SetConfigRuleActionParametersDisableApps` Whether to disable Cloudflare Apps. - `const SetConfigRuleActionParametersDisableAppsTrue SetConfigRuleActionParametersDisableApps = true` - `DisablePayPerCrawl SetConfigRuleActionParametersDisablePayPerCrawl` Whether to disable Pay Per Crawl. - `const SetConfigRuleActionParametersDisablePayPerCrawlTrue SetConfigRuleActionParametersDisablePayPerCrawl = true` - `DisableRUM SetConfigRuleActionParametersDisableRUM` Whether to disable Real User Monitoring (RUM). - `const SetConfigRuleActionParametersDisableRUMTrue SetConfigRuleActionParametersDisableRUM = true` - `DisableZaraz SetConfigRuleActionParametersDisableZaraz` Whether to disable Zaraz. - `const SetConfigRuleActionParametersDisableZarazTrue SetConfigRuleActionParametersDisableZaraz = true` - `EmailObfuscation bool` Whether to enable Email Obfuscation. - `Fonts bool` Whether to enable Cloudflare Fonts. - `HotlinkProtection bool` Whether to enable Hotlink Protection. - `Mirage bool` Whether to enable Mirage. - `OpportunisticEncryption bool` Whether to enable Opportunistic Encryption. - `Polish SetConfigRuleActionParametersPolish` The Polish level to configure. - `const SetConfigRuleActionParametersPolishOff SetConfigRuleActionParametersPolish = "off"` - `const SetConfigRuleActionParametersPolishLossless SetConfigRuleActionParametersPolish = "lossless"` - `const SetConfigRuleActionParametersPolishLossy SetConfigRuleActionParametersPolish = "lossy"` - `const SetConfigRuleActionParametersPolishWebP SetConfigRuleActionParametersPolish = "webp"` - `RedirectsForAITraining bool` Whether to redirect verified AI training crawlers to canonical URLs found in the HTML response. - `RequestBodyBuffering SetConfigRuleActionParametersRequestBodyBuffering` The request body buffering mode. - `const SetConfigRuleActionParametersRequestBodyBufferingNone SetConfigRuleActionParametersRequestBodyBuffering = "none"` - `const SetConfigRuleActionParametersRequestBodyBufferingStandard SetConfigRuleActionParametersRequestBodyBuffering = "standard"` - `const SetConfigRuleActionParametersRequestBodyBufferingFull SetConfigRuleActionParametersRequestBodyBuffering = "full"` - `ResponseBodyBuffering SetConfigRuleActionParametersResponseBodyBuffering` The response body buffering mode. - `const SetConfigRuleActionParametersResponseBodyBufferingNone SetConfigRuleActionParametersResponseBodyBuffering = "none"` - `const SetConfigRuleActionParametersResponseBodyBufferingStandard SetConfigRuleActionParametersResponseBodyBuffering = "standard"` - `RocketLoader bool` Whether to enable Rocket Loader. - `SecurityLevel SetConfigRuleActionParametersSecurityLevel` The Security Level to configure. - `const SetConfigRuleActionParametersSecurityLevelOff SetConfigRuleActionParametersSecurityLevel = "off"` - `const SetConfigRuleActionParametersSecurityLevelEssentiallyOff SetConfigRuleActionParametersSecurityLevel = "essentially_off"` - `const SetConfigRuleActionParametersSecurityLevelLow SetConfigRuleActionParametersSecurityLevel = "low"` - `const SetConfigRuleActionParametersSecurityLevelMedium SetConfigRuleActionParametersSecurityLevel = "medium"` - `const SetConfigRuleActionParametersSecurityLevelHigh SetConfigRuleActionParametersSecurityLevel = "high"` - `const SetConfigRuleActionParametersSecurityLevelUnderAttack SetConfigRuleActionParametersSecurityLevel = "under_attack"` - `ServerSideExcludes bool` Whether to enable Server-Side Excludes. - `SSL SetConfigRuleActionParametersSSL` The SSL level to configure. - `const SetConfigRuleActionParametersSSLOff SetConfigRuleActionParametersSSL = "off"` - `const SetConfigRuleActionParametersSSLFlexible SetConfigRuleActionParametersSSL = "flexible"` - `const SetConfigRuleActionParametersSSLFull SetConfigRuleActionParametersSSL = "full"` - `const SetConfigRuleActionParametersSSLStrict SetConfigRuleActionParametersSSL = "strict"` - `const SetConfigRuleActionParametersSSLOriginPull SetConfigRuleActionParametersSSL = "origin_pull"` - `SXG bool` Whether to enable Signed Exchanges (SXG). - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck SetConfigRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit SetConfigRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `type SkipRule struct{…}` - `LastUpdated Time` The timestamp of when the rule was last modified. - `Version string` The version of the rule. - `ID string` The unique ID of the rule. - `Action SkipRuleAction` The action to perform when the rule matches. - `const SkipRuleActionSkip SkipRuleAction = "skip"` - `ActionParameters SkipRuleActionParameters` The parameters configuring the rule's action. - `Phase SkipRuleActionParametersPhase` A phase to skip the execution of. This option is only compatible with the products option. - `const SkipRuleActionParametersPhaseCurrent SkipRuleActionParametersPhase = "current"` - `Phases []Phase` A list of phases to skip the execution of. This option is incompatible with the rulesets option. - `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 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"` - `Products []SkipRuleActionParametersProduct` A list of legacy security products to skip the execution of. - `const SkipRuleActionParametersProductBIC SkipRuleActionParametersProduct = "bic"` - `const SkipRuleActionParametersProductHot SkipRuleActionParametersProduct = "hot"` - `const SkipRuleActionParametersProductRateLimit SkipRuleActionParametersProduct = "rateLimit"` - `const SkipRuleActionParametersProductSecurityLevel SkipRuleActionParametersProduct = "securityLevel"` - `const SkipRuleActionParametersProductUABlock SkipRuleActionParametersProduct = "uaBlock"` - `const SkipRuleActionParametersProductWAF SkipRuleActionParametersProduct = "waf"` - `const SkipRuleActionParametersProductZoneLockdown SkipRuleActionParametersProduct = "zoneLockdown"` - `Rules map[string, []string]` A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the execution of. This option is incompatible with the ruleset option. - `Ruleset SkipRuleActionParametersRuleset` A ruleset to skip the execution of. This option is incompatible with the rulesets option. - `const SkipRuleActionParametersRulesetCurrent SkipRuleActionParametersRuleset = "current"` - `Rulesets []string` A list of ruleset IDs to skip the execution of. This option is incompatible with the ruleset and phases options. - `Categories []string` The categories of the rule. - `Description string` An informative description of the rule. - `Enabled bool` Whether the rule should be executed. - `ExposedCredentialCheck SkipRuleExposedCredentialCheck` Configuration for exposed credential checking. - `PasswordExpression string` An expression that selects the password used in the credentials check. - `UsernameExpression string` An expression that selects the user ID used in the credentials check. - `Expression string` The expression defining which traffic will match the rule. - `Logging Logging` An object configuring the rule's logging behavior. - `Ratelimit SkipRuleRatelimit` 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. - `CountingExpression string` An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule's expression. - `MitigationTimeout int64` Period of time in seconds after which the action will be disabled following its first execution. - `RequestsPerPeriod int64` The threshold of requests per period after which the action will be executed for the first time. - `RequestsToOrigin bool` Whether counting is only performed when an origin is reached. - `ScorePerPeriod int64` The score threshold per period for which the action will be executed the first time. - `ScoreResponseHeaderName string` A response header name provided by the origin, which contains the score to increment rate limit counter with. - `Ref string` The reference of the rule (the rule's ID by default). - `Version string` The version of the ruleset. - `Description string` An informative description of the ruleset. ### Example ```go 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"), ) ruleset, err := client.Rulesets.Get( context.TODO(), "2f2feab2026849078ba485f918791bdc", rulesets.RulesetGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", ruleset.ID) } ``` #### Response ```json { "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": { "id": "2f2feab2026849078ba485f918791bdc", "kind": "root", "last_updated": "2000-01-01T00:00:00.000000Z", "name": "My ruleset", "phase": "http_request_firewall_custom", "rules": [ { "last_updated": "2000-01-01T00:00:00.000000Z", "version": "1", "id": "3a03d665bac047339bb530ecb439a90d", "action": "block", "action_parameters": { "response": { "content": "{\n \"success\": false,\n \"error\": \"you have been blocked\"\n}", "content_type": "application/json", "status_code": 400 } }, "categories": [ "directory-traversal" ], "description": "Block the request.", "enabled": true, "exposed_credential_check": { "password_expression": "url_decode(http.request.body.form[\\\"password\\\"][0])", "username_expression": "url_decode(http.request.body.form[\\\"username\\\"][0])" }, "expression": "ip.src eq 1.1.1.1", "logging": { "enabled": true }, "ratelimit": { "characteristics": [ "cf.colo.id" ], "period": 60, "counting_expression": "http.request.body.raw eq \"abcd\"", "mitigation_timeout": 600, "requests_per_period": 1000, "requests_to_origin": true, "score_per_period": 400, "score_response_header_name": "my-score" }, "ref": "my_ref" } ], "version": "1", "description": "A description for my ruleset." }, "success": true } ```