## Get an account or zone entry point ruleset `client.Rulesets.Phases.Get(ctx, rulesetPhase, query) (*PhaseGetResponse, error)` **get** `/{accounts_or_zones}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint` Fetches the latest version of the account or zone entry point ruleset for a given phase. ### Parameters - `RulesetPhase 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"` - `query PhaseGetParams` - `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 PhaseGetResponse 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 []PhaseGetResponseRule` 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 PhaseGetResponseRulesRulesetsChallengeRule 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 PhaseGetResponseRulesRulesetsChallengeRuleAction` The action to perform when the rule matches. - `const PhaseGetResponseRulesRulesetsChallengeRuleActionChallenge PhaseGetResponseRulesRulesetsChallengeRuleAction = "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 PhaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck` 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 PhaseGetResponseRulesRulesetsChallengeRuleRatelimit` 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 PhaseGetResponseRulesRulesetsJSChallengeRule 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 PhaseGetResponseRulesRulesetsJSChallengeRuleAction` The action to perform when the rule matches. - `const PhaseGetResponseRulesRulesetsJSChallengeRuleActionJSChallenge PhaseGetResponseRulesRulesetsJSChallengeRuleAction = "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 PhaseGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck` 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 PhaseGetResponseRulesRulesetsJSChallengeRuleRatelimit` 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 PhaseGetResponseRulesRulesetsSetCacheControlRule 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 PhaseGetResponseRulesRulesetsSetCacheControlRuleAction` The action to perform when the rule matches. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionSetCacheControl PhaseGetResponseRulesRulesetsSetCacheControlRuleAction = "set_cache_control"` - `ActionParameters PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParameters` The parameters configuring the rule's action. - `Immutable PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutable` A cache-control directive configuration. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirective struct{…}` Set the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `MaxAge PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAge` A cache-control directive configuration that accepts a duration value in seconds. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperation = "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 PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `MustRevalidate PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidate` A cache-control directive configuration. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirective struct{…}` Set the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `MustUnderstand PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstand` A cache-control directive configuration. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirective struct{…}` Set the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `NoCache PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCache` A cache-control directive configuration that accepts optional qualifiers (header names). - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirective struct{…}` Set the directive with optional qualifiers. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheSetDirectiveOperation = "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 PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `NoStore PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStore` A cache-control directive configuration. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirective struct{…}` Set the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `NoTransform PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransform` A cache-control directive configuration. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirective struct{…}` Set the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `Private PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivate` A cache-control directive configuration that accepts optional qualifiers (header names). - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirective struct{…}` Set the directive with optional qualifiers. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateSetDirectiveOperation = "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 PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `ProxyRevalidate PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidate` A cache-control directive configuration. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirective struct{…}` Set the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `Public PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublic` A cache-control directive configuration. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirective struct{…}` Set the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicSetDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersPublicRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `SMaxage PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxage` A cache-control directive configuration that accepts a duration value in seconds. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageSetDirectiveOperation = "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 PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `StaleIfError PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfError` A cache-control directive configuration that accepts a duration value in seconds. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperation = "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 PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperation = "remove"` - `CloudflareOnly bool` Whether the directive should only be applied to the Cloudflare CDN cache. - `StaleWhileRevalidate PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidate` A cache-control directive configuration that accepts a duration value in seconds. - `type PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective struct{…}` Set the directive with a duration value in seconds. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperation = "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 PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective struct{…}` Remove the directive. - `Operation PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation` The operation to perform on the cache-control directive. - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperationSet PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = "set"` - `const PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperationRemove PhaseGetResponseRulesRulesetsSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperation = "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 PhaseGetResponseRulesRulesetsSetCacheControlRuleExposedCredentialCheck` 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 PhaseGetResponseRulesRulesetsSetCacheControlRuleRatelimit` 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 PhaseGetResponseRulesRulesetsSetCacheTagsRule 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 PhaseGetResponseRulesRulesetsSetCacheTagsRuleAction` The action to perform when the rule matches. - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionSetCacheTags PhaseGetResponseRulesRulesetsSetCacheTagsRuleAction = "set_cache_tags"` - `ActionParameters PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParameters` The parameters configuring the rule's action. - `type PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValues struct{…}` Add cache tags using a list of values. - `Operation PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation` The operation to perform on the cache tags. - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationAdd PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "add"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationRemove PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "remove"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationSet PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsValuesOperation = "set"` - `Values []string` A list of cache tag values. - `type PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpression struct{…}` Add cache tags using an expression. - `Expression string` An expression that evaluates to an array of cache tag values. - `Operation PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation` The operation to perform on the cache tags. - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationAdd PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "add"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationRemove PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "remove"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationSet PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperation = "set"` - `type PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValues struct{…}` Remove cache tags using a list of values. - `Operation PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation` The operation to perform on the cache tags. - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationAdd PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "add"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationRemove PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "remove"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationSet PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperation = "set"` - `Values []string` A list of cache tag values. - `type PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpression struct{…}` Remove cache tags using an expression. - `Expression string` An expression that evaluates to an array of cache tag values. - `Operation PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation` The operation to perform on the cache tags. - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationAdd PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "add"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationRemove PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "remove"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationSet PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperation = "set"` - `type PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValues struct{…}` Set cache tags using a list of values. - `Operation PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation` The operation to perform on the cache tags. - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationAdd PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "add"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationRemove PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "remove"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationSet PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsValuesOperation = "set"` - `Values []string` A list of cache tag values. - `type PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpression struct{…}` Set cache tags using an expression. - `Expression string` An expression that evaluates to an array of cache tag values. - `Operation PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation` The operation to perform on the cache tags. - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationAdd PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "add"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationRemove PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "remove"` - `const PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationSet PhaseGetResponseRulesRulesetsSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperation = "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 PhaseGetResponseRulesRulesetsSetCacheTagsRuleExposedCredentialCheck` 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 PhaseGetResponseRulesRulesetsSetCacheTagsRuleRatelimit` 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"), ) phase, err := client.Rulesets.Phases.Get( context.TODO(), rulesets.PhaseHTTPRequestFirewallCustom, rulesets.PhaseGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", phase.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 } ```