## Get an account or zone ruleset version `client.Rulesets.Versions.Get(ctx, rulesetID, rulesetVersion, query) (*VersionGetResponse, error)` **get** `/{accounts_or_zones}/{account_or_zone_id}/rulesets/{ruleset_id}/versions/{ruleset_version}` Fetches a specific version of an account or zone ruleset. ### Parameters - `rulesetID string` The unique ID of the ruleset. - `rulesetVersion string` The version of the ruleset. - `query VersionGetParams` - `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 VersionGetResponse 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 []VersionGetResponseRule` 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 VersionGetResponseRulesRulesetsChallengeRule 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 VersionGetResponseRulesRulesetsChallengeRuleAction` The action to perform when the rule matches. - `const VersionGetResponseRulesRulesetsChallengeRuleActionChallenge VersionGetResponseRulesRulesetsChallengeRuleAction = "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 VersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck` 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 VersionGetResponseRulesRulesetsChallengeRuleRatelimit` 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 VersionGetResponseRulesRulesetsJSChallengeRule 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 VersionGetResponseRulesRulesetsJSChallengeRuleAction` The action to perform when the rule matches. - `const VersionGetResponseRulesRulesetsJSChallengeRuleActionJSChallenge VersionGetResponseRulesRulesetsJSChallengeRuleAction = "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 VersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck` 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 VersionGetResponseRulesRulesetsJSChallengeRuleRatelimit` 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 VersionGetResponseRulesRulesetsSetCacheControlRule 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 VersionGetResponseRulesRulesetsSetCacheControlRuleAction` The action to perform when the rule matches. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionSetCacheControl VersionGetResponseRulesRulesetsSetCacheControlRuleAction = "set_cache_control"` - `ActionParameters VersionGetResponseRulesRulesetsSetCacheControlRuleActionParameters` The parameters configuring the rule's action. - `Immutable VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutable` A cache-control directive configuration. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirective struct{…}` Set the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `MaxAge VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAge` A cache-control directive configuration that accepts a duration value in seconds. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = "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 VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `MustRevalidate VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidate` A cache-control directive configuration. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirective struct{…}` Set the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `MustUnderstand VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstand` A cache-control directive configuration. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirective struct{…}` Set the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `NoCache VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCache` A cache-control directive configuration that accepts optional qualifiers (header names). - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirective struct{…}` Set the directive with optional qualifiers. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = "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 VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `NoStore VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStore` A cache-control directive configuration. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirective struct{…}` Set the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `NoTransform VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransform` A cache-control directive configuration. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirective struct{…}` Set the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `Private VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivate` A cache-control directive configuration that accepts optional qualifiers (header names). - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirective struct{…}` Set the directive with optional qualifiers. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperation = "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 VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `ProxyRevalidate VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidate` A cache-control directive configuration. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirective struct{…}` Set the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `Public VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublic` A cache-control directive configuration. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirective struct{…}` Set the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `SMaxage VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxage` A cache-control directive configuration that accepts a duration value in seconds. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = "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 VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `StaleIfError VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfError` A cache-control directive configuration that accepts a duration value in seconds. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = "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 VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `StaleWhileRevalidate VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidate` A cache-control directive configuration that accepts a duration value in seconds. - `type VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = "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 VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective struct{…}` Remove the directive. - `Operation VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperationSet VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = "set"` - `const VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperationRemove VersionGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = "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 VersionGetResponseRulesRulesetsSetCacheControlRuleExposedCredentialCheck` 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 VersionGetResponseRulesRulesetsSetCacheControlRuleRatelimit` 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 VersionGetResponseRulesRulesetsSetCacheTagsRule 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 VersionGetResponseRulesRulesetsSetCacheTagsRuleAction` The action to perform when the rule matches. - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionSetCacheTags VersionGetResponseRulesRulesetsSetCacheTagsRuleAction = "set_cache_tags"` - `ActionParameters VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParameters` The parameters configuring the rule's action. - `type VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValues struct{…}` Add cache tags using a list of values. - `Operation VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation` The operation to perform on the cache tags. - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationAdd VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "add"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationRemove VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "remove"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationSet VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "set"` - `Values []string` A list of cache tag values. - `type VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpression struct{…}` Add cache tags using an expression. - `Expression string` An expression that evaluates to an array of cache tag values. - `Operation VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation` The operation to perform on the cache tags. - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationAdd VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "add"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationRemove VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "remove"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationSet VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "set"` - `type VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValues struct{…}` Remove cache tags using a list of values. - `Operation VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation` The operation to perform on the cache tags. - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationAdd VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "add"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationRemove VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "remove"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationSet VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "set"` - `Values []string` A list of cache tag values. - `type VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpression struct{…}` Remove cache tags using an expression. - `Expression string` An expression that evaluates to an array of cache tag values. - `Operation VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation` The operation to perform on the cache tags. - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationAdd VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "add"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationRemove VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "remove"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationSet VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "set"` - `type VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValues struct{…}` Set cache tags using a list of values. - `Operation VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation` The operation to perform on the cache tags. - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationAdd VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "add"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationRemove VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "remove"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationSet VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "set"` - `Values []string` A list of cache tag values. - `type VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpression struct{…}` Set cache tags using an expression. - `Expression string` An expression that evaluates to an array of cache tag values. - `Operation VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation` The operation to perform on the cache tags. - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationAdd VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "add"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationRemove VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "remove"` - `const VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationSet VersionGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "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 VersionGetResponseRulesRulesetsSetCacheTagsRuleExposedCredentialCheck` 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 VersionGetResponseRulesRulesetsSetCacheTagsRuleRatelimit` 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"), ) version, err := client.Rulesets.Versions.Get( context.TODO(), "2f2feab2026849078ba485f918791bdc", "1", rulesets.VersionGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", version.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 } ```