rulesets

package
v2.0.0-beta.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type PhaseGetParams

type PhaseGetParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type PhaseGetParamsRulesetPhase

type PhaseGetParamsRulesetPhase string

The phase of the ruleset.

const (
	PhaseGetParamsRulesetPhaseDDOSL4                         PhaseGetParamsRulesetPhase = "ddos_l4"
	PhaseGetParamsRulesetPhaseDDOSL7                         PhaseGetParamsRulesetPhase = "ddos_l7"
	PhaseGetParamsRulesetPhaseHTTPConfigSettings             PhaseGetParamsRulesetPhase = "http_config_settings"
	PhaseGetParamsRulesetPhaseHTTPCustomErrors               PhaseGetParamsRulesetPhase = "http_custom_errors"
	PhaseGetParamsRulesetPhaseHTTPLogCustomFields            PhaseGetParamsRulesetPhase = "http_log_custom_fields"
	PhaseGetParamsRulesetPhaseHTTPRatelimit                  PhaseGetParamsRulesetPhase = "http_ratelimit"
	PhaseGetParamsRulesetPhaseHTTPRequestCacheSettings       PhaseGetParamsRulesetPhase = "http_request_cache_settings"
	PhaseGetParamsRulesetPhaseHTTPRequestDynamicRedirect     PhaseGetParamsRulesetPhase = "http_request_dynamic_redirect"
	PhaseGetParamsRulesetPhaseHTTPRequestFirewallCustom      PhaseGetParamsRulesetPhase = "http_request_firewall_custom"
	PhaseGetParamsRulesetPhaseHTTPRequestFirewallManaged     PhaseGetParamsRulesetPhase = "http_request_firewall_managed"
	PhaseGetParamsRulesetPhaseHTTPRequestLateTransform       PhaseGetParamsRulesetPhase = "http_request_late_transform"
	PhaseGetParamsRulesetPhaseHTTPRequestOrigin              PhaseGetParamsRulesetPhase = "http_request_origin"
	PhaseGetParamsRulesetPhaseHTTPRequestRedirect            PhaseGetParamsRulesetPhase = "http_request_redirect"
	PhaseGetParamsRulesetPhaseHTTPRequestSanitize            PhaseGetParamsRulesetPhase = "http_request_sanitize"
	PhaseGetParamsRulesetPhaseHTTPRequestSbfm                PhaseGetParamsRulesetPhase = "http_request_sbfm"
	PhaseGetParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseGetParamsRulesetPhase = "http_request_select_configuration"
	PhaseGetParamsRulesetPhaseHTTPRequestTransform           PhaseGetParamsRulesetPhase = "http_request_transform"
	PhaseGetParamsRulesetPhaseHTTPResponseCompression        PhaseGetParamsRulesetPhase = "http_response_compression"
	PhaseGetParamsRulesetPhaseHTTPResponseFirewallManaged    PhaseGetParamsRulesetPhase = "http_response_firewall_managed"
	PhaseGetParamsRulesetPhaseHTTPResponseHeadersTransform   PhaseGetParamsRulesetPhase = "http_response_headers_transform"
	PhaseGetParamsRulesetPhaseMagicTransit                   PhaseGetParamsRulesetPhase = "magic_transit"
	PhaseGetParamsRulesetPhaseMagicTransitIDsManaged         PhaseGetParamsRulesetPhase = "magic_transit_ids_managed"
	PhaseGetParamsRulesetPhaseMagicTransitManaged            PhaseGetParamsRulesetPhase = "magic_transit_managed"
)

func (PhaseGetParamsRulesetPhase) IsKnown

func (r PhaseGetParamsRulesetPhase) IsKnown() bool

type PhaseGetResponseEnvelope

type PhaseGetResponseEnvelope struct {
	// A list of error messages.
	Errors []PhaseGetResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []PhaseGetResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success PhaseGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    phaseGetResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*PhaseGetResponseEnvelope) UnmarshalJSON

func (r *PhaseGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type PhaseGetResponseEnvelopeErrors

type PhaseGetResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source PhaseGetResponseEnvelopeErrorsSource `json:"source"`
	JSON   phaseGetResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*PhaseGetResponseEnvelopeErrors) UnmarshalJSON

func (r *PhaseGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type PhaseGetResponseEnvelopeErrorsSource

type PhaseGetResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                   `json:"pointer,required"`
	JSON    phaseGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*PhaseGetResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *PhaseGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type PhaseGetResponseEnvelopeMessages

type PhaseGetResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source PhaseGetResponseEnvelopeMessagesSource `json:"source"`
	JSON   phaseGetResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*PhaseGetResponseEnvelopeMessages) UnmarshalJSON

func (r *PhaseGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type PhaseGetResponseEnvelopeMessagesSource

type PhaseGetResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                     `json:"pointer,required"`
	JSON    phaseGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*PhaseGetResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *PhaseGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type PhaseGetResponseEnvelopeSuccess

type PhaseGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	PhaseGetResponseEnvelopeSuccessTrue PhaseGetResponseEnvelopeSuccess = true
)

func (PhaseGetResponseEnvelopeSuccess) IsKnown

type PhaseService

type PhaseService struct {
	Options  []option.RequestOption
	Versions *PhaseVersionService
}

PhaseService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPhaseService method instead.

func NewPhaseService

func NewPhaseService(opts ...option.RequestOption) (r *PhaseService)

NewPhaseService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PhaseService) Get

Fetches the latest version of the account or zone entry point ruleset for a given phase.

func (*PhaseService) Update

Updates an account or zone entry point ruleset, creating a new version.

type PhaseUpdateParams

type PhaseUpdateParams struct {
	// The unique ID of the ruleset.
	ID param.Field[string] `json:"id,required"`
	// The list of rules in the ruleset.
	Rules param.Field[[]PhaseUpdateParamsRule] `json:"rules,required"`
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// An informative description of the ruleset.
	Description param.Field[string] `json:"description"`
	// The kind of the ruleset.
	Kind param.Field[PhaseUpdateParamsKind] `json:"kind"`
	// The human-readable name of the ruleset.
	Name param.Field[string] `json:"name"`
	// The phase of the ruleset.
	Phase param.Field[PhaseUpdateParamsPhase] `json:"phase"`
}

func (PhaseUpdateParams) MarshalJSON

func (r PhaseUpdateParams) MarshalJSON() (data []byte, err error)

type PhaseUpdateParamsKind

type PhaseUpdateParamsKind string

The kind of the ruleset.

const (
	PhaseUpdateParamsKindManaged PhaseUpdateParamsKind = "managed"
	PhaseUpdateParamsKindCustom  PhaseUpdateParamsKind = "custom"
	PhaseUpdateParamsKindRoot    PhaseUpdateParamsKind = "root"
	PhaseUpdateParamsKindZone    PhaseUpdateParamsKind = "zone"
)

func (PhaseUpdateParamsKind) IsKnown

func (r PhaseUpdateParamsKind) IsKnown() bool

type PhaseUpdateParamsPhase

type PhaseUpdateParamsPhase string

The phase of the ruleset.

const (
	PhaseUpdateParamsPhaseDDOSL4                         PhaseUpdateParamsPhase = "ddos_l4"
	PhaseUpdateParamsPhaseDDOSL7                         PhaseUpdateParamsPhase = "ddos_l7"
	PhaseUpdateParamsPhaseHTTPConfigSettings             PhaseUpdateParamsPhase = "http_config_settings"
	PhaseUpdateParamsPhaseHTTPCustomErrors               PhaseUpdateParamsPhase = "http_custom_errors"
	PhaseUpdateParamsPhaseHTTPLogCustomFields            PhaseUpdateParamsPhase = "http_log_custom_fields"
	PhaseUpdateParamsPhaseHTTPRatelimit                  PhaseUpdateParamsPhase = "http_ratelimit"
	PhaseUpdateParamsPhaseHTTPRequestCacheSettings       PhaseUpdateParamsPhase = "http_request_cache_settings"
	PhaseUpdateParamsPhaseHTTPRequestDynamicRedirect     PhaseUpdateParamsPhase = "http_request_dynamic_redirect"
	PhaseUpdateParamsPhaseHTTPRequestFirewallCustom      PhaseUpdateParamsPhase = "http_request_firewall_custom"
	PhaseUpdateParamsPhaseHTTPRequestFirewallManaged     PhaseUpdateParamsPhase = "http_request_firewall_managed"
	PhaseUpdateParamsPhaseHTTPRequestLateTransform       PhaseUpdateParamsPhase = "http_request_late_transform"
	PhaseUpdateParamsPhaseHTTPRequestOrigin              PhaseUpdateParamsPhase = "http_request_origin"
	PhaseUpdateParamsPhaseHTTPRequestRedirect            PhaseUpdateParamsPhase = "http_request_redirect"
	PhaseUpdateParamsPhaseHTTPRequestSanitize            PhaseUpdateParamsPhase = "http_request_sanitize"
	PhaseUpdateParamsPhaseHTTPRequestSbfm                PhaseUpdateParamsPhase = "http_request_sbfm"
	PhaseUpdateParamsPhaseHTTPRequestSelectConfiguration PhaseUpdateParamsPhase = "http_request_select_configuration"
	PhaseUpdateParamsPhaseHTTPRequestTransform           PhaseUpdateParamsPhase = "http_request_transform"
	PhaseUpdateParamsPhaseHTTPResponseCompression        PhaseUpdateParamsPhase = "http_response_compression"
	PhaseUpdateParamsPhaseHTTPResponseFirewallManaged    PhaseUpdateParamsPhase = "http_response_firewall_managed"
	PhaseUpdateParamsPhaseHTTPResponseHeadersTransform   PhaseUpdateParamsPhase = "http_response_headers_transform"
	PhaseUpdateParamsPhaseMagicTransit                   PhaseUpdateParamsPhase = "magic_transit"
	PhaseUpdateParamsPhaseMagicTransitIDsManaged         PhaseUpdateParamsPhase = "magic_transit_ids_managed"
	PhaseUpdateParamsPhaseMagicTransitManaged            PhaseUpdateParamsPhase = "magic_transit_managed"
)

func (PhaseUpdateParamsPhase) IsKnown

func (r PhaseUpdateParamsPhase) IsKnown() bool

type PhaseUpdateParamsRulesRulesetsBlockRule

type PhaseUpdateParamsRulesRulesetsBlockRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[PhaseUpdateParamsRulesRulesetsBlockRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[PhaseUpdateParamsRulesRulesetsBlockRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[PhaseUpdateParamsRulesRulesetsBlockRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (PhaseUpdateParamsRulesRulesetsBlockRule) MarshalJSON

func (r PhaseUpdateParamsRulesRulesetsBlockRule) MarshalJSON() (data []byte, err error)

type PhaseUpdateParamsRulesRulesetsBlockRuleAction

type PhaseUpdateParamsRulesRulesetsBlockRuleAction string

The action to perform when the rule matches.

const (
	PhaseUpdateParamsRulesRulesetsBlockRuleActionBlock PhaseUpdateParamsRulesRulesetsBlockRuleAction = "block"
)

func (PhaseUpdateParamsRulesRulesetsBlockRuleAction) IsKnown

type PhaseUpdateParamsRulesRulesetsBlockRuleActionParameters

type PhaseUpdateParamsRulesRulesetsBlockRuleActionParameters struct {
	// The response to show when the block is applied.
	Response param.Field[PhaseUpdateParamsRulesRulesetsBlockRuleActionParametersResponse] `json:"response"`
}

The parameters configuring the rule's action.

func (PhaseUpdateParamsRulesRulesetsBlockRuleActionParameters) MarshalJSON

type PhaseUpdateParamsRulesRulesetsBlockRuleActionParametersResponse

type PhaseUpdateParamsRulesRulesetsBlockRuleActionParametersResponse struct {
	// The content to return.
	Content param.Field[string] `json:"content,required"`
	// The type of the content to return.
	ContentType param.Field[string] `json:"content_type,required"`
	// The status code to return.
	StatusCode param.Field[int64] `json:"status_code,required"`
}

The response to show when the block is applied.

func (PhaseUpdateParamsRulesRulesetsBlockRuleActionParametersResponse) MarshalJSON

type PhaseUpdateParamsRulesRulesetsBlockRuleLogging

type PhaseUpdateParamsRulesRulesetsBlockRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (PhaseUpdateParamsRulesRulesetsBlockRuleLogging) MarshalJSON

func (r PhaseUpdateParamsRulesRulesetsBlockRuleLogging) MarshalJSON() (data []byte, err error)

type PhaseUpdateParamsRulesRulesetsExecuteRule

type PhaseUpdateParamsRulesRulesetsExecuteRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[PhaseUpdateParamsRulesRulesetsExecuteRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[PhaseUpdateParamsRulesRulesetsExecuteRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[PhaseUpdateParamsRulesRulesetsExecuteRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (PhaseUpdateParamsRulesRulesetsExecuteRule) MarshalJSON

func (r PhaseUpdateParamsRulesRulesetsExecuteRule) MarshalJSON() (data []byte, err error)

type PhaseUpdateParamsRulesRulesetsExecuteRuleAction

type PhaseUpdateParamsRulesRulesetsExecuteRuleAction string

The action to perform when the rule matches.

const (
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionExecute PhaseUpdateParamsRulesRulesetsExecuteRuleAction = "execute"
)

func (PhaseUpdateParamsRulesRulesetsExecuteRuleAction) IsKnown

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParameters

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParameters struct {
	// The ID of the ruleset to execute.
	ID param.Field[string] `json:"id,required"`
	// The configuration to use for matched data logging.
	MatchedData param.Field[PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersMatchedData] `json:"matched_data"`
	// A set of overrides to apply to the target ruleset.
	Overrides param.Field[PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverrides] `json:"overrides"`
}

The parameters configuring the rule's action.

func (PhaseUpdateParamsRulesRulesetsExecuteRuleActionParameters) MarshalJSON

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersMatchedData

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersMatchedData struct {
	// The public key to encrypt matched data logs with.
	PublicKey param.Field[string] `json:"public_key,required"`
}

The configuration to use for matched data logging.

func (PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersMatchedData) MarshalJSON

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverrides

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverrides struct {
	// An action to override all rules with. This option has lower precedence than rule
	// and category overrides.
	Action param.Field[string] `json:"action"`
	// A list of category-level overrides. This option has the second-highest
	// precedence after rule-level overrides.
	Categories param.Field[[]PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory] `json:"categories"`
	// Whether to enable execution of all rules. This option has lower precedence than
	// rule and category overrides.
	Enabled param.Field[bool] `json:"enabled"`
	// A list of rule-level overrides. This option has the highest precedence.
	Rules param.Field[[]PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRule] `json:"rules"`
	// 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.
	SensitivityLevel param.Field[PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel] `json:"sensitivity_level"`
}

A set of overrides to apply to the target ruleset.

func (PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverrides) MarshalJSON

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel string

The sensitivity level to use for rules in the category.

const (
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelDefault PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "default"
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelMedium  PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "medium"
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelLow     PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "low"
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelEoff    PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "eoff"
)

func (PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory struct {
	// The name of the category to override.
	Category param.Field[string] `json:"category,required"`
	// The action to override rules in the category with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of rules in the category.
	Enabled param.Field[bool] `json:"enabled"`
	// The sensitivity level to use for rules in the category.
	SensitivityLevel param.Field[PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel] `json:"sensitivity_level"`
}

A category-level override

func (PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory) MarshalJSON

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRule

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRule struct {
	// The ID of the rule to override.
	ID param.Field[string] `json:"id,required"`
	// The action to override the rule with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of the rule.
	Enabled param.Field[bool] `json:"enabled"`
	// The score threshold to use for the rule.
	ScoreThreshold param.Field[int64] `json:"score_threshold"`
	// The sensitivity level to use for the rule.
	SensitivityLevel param.Field[PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel] `json:"sensitivity_level"`
}

A rule-level override

func (PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRule) MarshalJSON

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel string

The sensitivity level to use for the rule.

const (
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelDefault PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "default"
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelMedium  PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "medium"
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelLow     PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "low"
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelEoff    PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "eoff"
)

func (PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel

type PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel string

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 (
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelDefault PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "default"
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelMedium  PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "medium"
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelLow     PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "low"
	PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelEoff    PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "eoff"
)

func (PhaseUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown

type PhaseUpdateParamsRulesRulesetsExecuteRuleLogging

type PhaseUpdateParamsRulesRulesetsExecuteRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (PhaseUpdateParamsRulesRulesetsExecuteRuleLogging) MarshalJSON

func (r PhaseUpdateParamsRulesRulesetsExecuteRuleLogging) MarshalJSON() (data []byte, err error)

type PhaseUpdateParamsRulesRulesetsLogRule

type PhaseUpdateParamsRulesRulesetsLogRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[PhaseUpdateParamsRulesRulesetsLogRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[interface{}] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[PhaseUpdateParamsRulesRulesetsLogRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (PhaseUpdateParamsRulesRulesetsLogRule) MarshalJSON

func (r PhaseUpdateParamsRulesRulesetsLogRule) MarshalJSON() (data []byte, err error)

type PhaseUpdateParamsRulesRulesetsLogRuleAction

type PhaseUpdateParamsRulesRulesetsLogRuleAction string

The action to perform when the rule matches.

const (
	PhaseUpdateParamsRulesRulesetsLogRuleActionLog PhaseUpdateParamsRulesRulesetsLogRuleAction = "log"
)

func (PhaseUpdateParamsRulesRulesetsLogRuleAction) IsKnown

type PhaseUpdateParamsRulesRulesetsLogRuleLogging

type PhaseUpdateParamsRulesRulesetsLogRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (PhaseUpdateParamsRulesRulesetsLogRuleLogging) MarshalJSON

func (r PhaseUpdateParamsRulesRulesetsLogRuleLogging) MarshalJSON() (data []byte, err error)

type PhaseUpdateParamsRulesRulesetsSkipRule

type PhaseUpdateParamsRulesRulesetsSkipRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[PhaseUpdateParamsRulesRulesetsSkipRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[PhaseUpdateParamsRulesRulesetsSkipRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[PhaseUpdateParamsRulesRulesetsSkipRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (PhaseUpdateParamsRulesRulesetsSkipRule) MarshalJSON

func (r PhaseUpdateParamsRulesRulesetsSkipRule) MarshalJSON() (data []byte, err error)

type PhaseUpdateParamsRulesRulesetsSkipRuleAction

type PhaseUpdateParamsRulesRulesetsSkipRuleAction string

The action to perform when the rule matches.

const (
	PhaseUpdateParamsRulesRulesetsSkipRuleActionSkip PhaseUpdateParamsRulesRulesetsSkipRuleAction = "skip"
)

func (PhaseUpdateParamsRulesRulesetsSkipRuleAction) IsKnown

type PhaseUpdateParamsRulesRulesetsSkipRuleActionParameters

type PhaseUpdateParamsRulesRulesetsSkipRuleActionParameters struct {
	// A list of phases to skip the execution of. This option is incompatible with the
	// ruleset and rulesets options.
	Phases param.Field[[]PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase] `json:"phases"`
	// A list of legacy security products to skip the execution of.
	Products param.Field[[]PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct] `json:"products"`
	// 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.
	Rules param.Field[map[string][]string] `json:"rules"`
	// A ruleset to skip the execution of. This option is incompatible with the
	// rulesets, rules and phases options.
	Ruleset param.Field[PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset] `json:"ruleset"`
	// A list of ruleset IDs to skip the execution of. This option is incompatible with
	// the ruleset and phases options.
	Rulesets param.Field[[]string] `json:"rulesets"`
}

The parameters configuring the rule's action.

func (PhaseUpdateParamsRulesRulesetsSkipRuleActionParameters) MarshalJSON

type PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase

type PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase string

A phase to skip the execution of.

const (
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseDDOSL4                         PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "ddos_l4"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseDDOSL7                         PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "ddos_l7"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPConfigSettings             PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_config_settings"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPCustomErrors               PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_custom_errors"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPLogCustomFields            PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_log_custom_fields"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRatelimit                  PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_ratelimit"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestCacheSettings       PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_cache_settings"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestDynamicRedirect     PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_dynamic_redirect"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallCustom      PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_firewall_custom"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallManaged     PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_firewall_managed"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestLateTransform       PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_late_transform"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestOrigin              PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_origin"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestRedirect            PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_redirect"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSanitize            PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_sanitize"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSbfm                PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_sbfm"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSelectConfiguration PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_select_configuration"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestTransform           PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_transform"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseCompression        PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_response_compression"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseFirewallManaged    PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_response_firewall_managed"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseHeadersTransform   PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_response_headers_transform"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseMagicTransit                   PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "magic_transit"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseMagicTransitIDsManaged         PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "magic_transit_ids_managed"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseMagicTransitManaged            PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "magic_transit_managed"
)

func (PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersPhase) IsKnown

type PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct

type PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct string

The name of a legacy security product to skip the execution of.

const (
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProductBic           PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "bic"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProductHot           PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "hot"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProductRateLimit     PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "rateLimit"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProductSecurityLevel PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "securityLevel"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProductUABlock       PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "uaBlock"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProductWAF           PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "waf"
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProductZoneLockdown  PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "zoneLockdown"
)

func (PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersProduct) IsKnown

type PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset

type PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset string

A ruleset to skip the execution of. This option is incompatible with the rulesets, rules and phases options.

const (
	PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersRulesetCurrent PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset = "current"
)

func (PhaseUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset) IsKnown

type PhaseUpdateParamsRulesRulesetsSkipRuleLogging

type PhaseUpdateParamsRulesRulesetsSkipRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (PhaseUpdateParamsRulesRulesetsSkipRuleLogging) MarshalJSON

func (r PhaseUpdateParamsRulesRulesetsSkipRuleLogging) MarshalJSON() (data []byte, err error)

type PhaseUpdateParamsRulesetPhase

type PhaseUpdateParamsRulesetPhase string

The phase of the ruleset.

const (
	PhaseUpdateParamsRulesetPhaseDDOSL4                         PhaseUpdateParamsRulesetPhase = "ddos_l4"
	PhaseUpdateParamsRulesetPhaseDDOSL7                         PhaseUpdateParamsRulesetPhase = "ddos_l7"
	PhaseUpdateParamsRulesetPhaseHTTPConfigSettings             PhaseUpdateParamsRulesetPhase = "http_config_settings"
	PhaseUpdateParamsRulesetPhaseHTTPCustomErrors               PhaseUpdateParamsRulesetPhase = "http_custom_errors"
	PhaseUpdateParamsRulesetPhaseHTTPLogCustomFields            PhaseUpdateParamsRulesetPhase = "http_log_custom_fields"
	PhaseUpdateParamsRulesetPhaseHTTPRatelimit                  PhaseUpdateParamsRulesetPhase = "http_ratelimit"
	PhaseUpdateParamsRulesetPhaseHTTPRequestCacheSettings       PhaseUpdateParamsRulesetPhase = "http_request_cache_settings"
	PhaseUpdateParamsRulesetPhaseHTTPRequestDynamicRedirect     PhaseUpdateParamsRulesetPhase = "http_request_dynamic_redirect"
	PhaseUpdateParamsRulesetPhaseHTTPRequestFirewallCustom      PhaseUpdateParamsRulesetPhase = "http_request_firewall_custom"
	PhaseUpdateParamsRulesetPhaseHTTPRequestFirewallManaged     PhaseUpdateParamsRulesetPhase = "http_request_firewall_managed"
	PhaseUpdateParamsRulesetPhaseHTTPRequestLateTransform       PhaseUpdateParamsRulesetPhase = "http_request_late_transform"
	PhaseUpdateParamsRulesetPhaseHTTPRequestOrigin              PhaseUpdateParamsRulesetPhase = "http_request_origin"
	PhaseUpdateParamsRulesetPhaseHTTPRequestRedirect            PhaseUpdateParamsRulesetPhase = "http_request_redirect"
	PhaseUpdateParamsRulesetPhaseHTTPRequestSanitize            PhaseUpdateParamsRulesetPhase = "http_request_sanitize"
	PhaseUpdateParamsRulesetPhaseHTTPRequestSbfm                PhaseUpdateParamsRulesetPhase = "http_request_sbfm"
	PhaseUpdateParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseUpdateParamsRulesetPhase = "http_request_select_configuration"
	PhaseUpdateParamsRulesetPhaseHTTPRequestTransform           PhaseUpdateParamsRulesetPhase = "http_request_transform"
	PhaseUpdateParamsRulesetPhaseHTTPResponseCompression        PhaseUpdateParamsRulesetPhase = "http_response_compression"
	PhaseUpdateParamsRulesetPhaseHTTPResponseFirewallManaged    PhaseUpdateParamsRulesetPhase = "http_response_firewall_managed"
	PhaseUpdateParamsRulesetPhaseHTTPResponseHeadersTransform   PhaseUpdateParamsRulesetPhase = "http_response_headers_transform"
	PhaseUpdateParamsRulesetPhaseMagicTransit                   PhaseUpdateParamsRulesetPhase = "magic_transit"
	PhaseUpdateParamsRulesetPhaseMagicTransitIDsManaged         PhaseUpdateParamsRulesetPhase = "magic_transit_ids_managed"
	PhaseUpdateParamsRulesetPhaseMagicTransitManaged            PhaseUpdateParamsRulesetPhase = "magic_transit_managed"
)

func (PhaseUpdateParamsRulesetPhase) IsKnown

func (r PhaseUpdateParamsRulesetPhase) IsKnown() bool

type PhaseUpdateResponseEnvelope

type PhaseUpdateResponseEnvelope struct {
	// A list of error messages.
	Errors []PhaseUpdateResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []PhaseUpdateResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success PhaseUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    phaseUpdateResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*PhaseUpdateResponseEnvelope) UnmarshalJSON

func (r *PhaseUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type PhaseUpdateResponseEnvelopeErrors

type PhaseUpdateResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source PhaseUpdateResponseEnvelopeErrorsSource `json:"source"`
	JSON   phaseUpdateResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*PhaseUpdateResponseEnvelopeErrors) UnmarshalJSON

func (r *PhaseUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type PhaseUpdateResponseEnvelopeErrorsSource

type PhaseUpdateResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                      `json:"pointer,required"`
	JSON    phaseUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*PhaseUpdateResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *PhaseUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type PhaseUpdateResponseEnvelopeMessages

type PhaseUpdateResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source PhaseUpdateResponseEnvelopeMessagesSource `json:"source"`
	JSON   phaseUpdateResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*PhaseUpdateResponseEnvelopeMessages) UnmarshalJSON

func (r *PhaseUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type PhaseUpdateResponseEnvelopeMessagesSource

type PhaseUpdateResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                        `json:"pointer,required"`
	JSON    phaseUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*PhaseUpdateResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *PhaseUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type PhaseUpdateResponseEnvelopeSuccess

type PhaseUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	PhaseUpdateResponseEnvelopeSuccessTrue PhaseUpdateResponseEnvelopeSuccess = true
)

func (PhaseUpdateResponseEnvelopeSuccess) IsKnown

type PhaseVersionGetParams

type PhaseVersionGetParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type PhaseVersionGetParamsRulesetPhase

type PhaseVersionGetParamsRulesetPhase string

The phase of the ruleset.

const (
	PhaseVersionGetParamsRulesetPhaseDDOSL4                         PhaseVersionGetParamsRulesetPhase = "ddos_l4"
	PhaseVersionGetParamsRulesetPhaseDDOSL7                         PhaseVersionGetParamsRulesetPhase = "ddos_l7"
	PhaseVersionGetParamsRulesetPhaseHTTPConfigSettings             PhaseVersionGetParamsRulesetPhase = "http_config_settings"
	PhaseVersionGetParamsRulesetPhaseHTTPCustomErrors               PhaseVersionGetParamsRulesetPhase = "http_custom_errors"
	PhaseVersionGetParamsRulesetPhaseHTTPLogCustomFields            PhaseVersionGetParamsRulesetPhase = "http_log_custom_fields"
	PhaseVersionGetParamsRulesetPhaseHTTPRatelimit                  PhaseVersionGetParamsRulesetPhase = "http_ratelimit"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestCacheSettings       PhaseVersionGetParamsRulesetPhase = "http_request_cache_settings"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestDynamicRedirect     PhaseVersionGetParamsRulesetPhase = "http_request_dynamic_redirect"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestFirewallCustom      PhaseVersionGetParamsRulesetPhase = "http_request_firewall_custom"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestFirewallManaged     PhaseVersionGetParamsRulesetPhase = "http_request_firewall_managed"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestLateTransform       PhaseVersionGetParamsRulesetPhase = "http_request_late_transform"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestOrigin              PhaseVersionGetParamsRulesetPhase = "http_request_origin"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestRedirect            PhaseVersionGetParamsRulesetPhase = "http_request_redirect"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestSanitize            PhaseVersionGetParamsRulesetPhase = "http_request_sanitize"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestSbfm                PhaseVersionGetParamsRulesetPhase = "http_request_sbfm"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseVersionGetParamsRulesetPhase = "http_request_select_configuration"
	PhaseVersionGetParamsRulesetPhaseHTTPRequestTransform           PhaseVersionGetParamsRulesetPhase = "http_request_transform"
	PhaseVersionGetParamsRulesetPhaseHTTPResponseCompression        PhaseVersionGetParamsRulesetPhase = "http_response_compression"
	PhaseVersionGetParamsRulesetPhaseHTTPResponseFirewallManaged    PhaseVersionGetParamsRulesetPhase = "http_response_firewall_managed"
	PhaseVersionGetParamsRulesetPhaseHTTPResponseHeadersTransform   PhaseVersionGetParamsRulesetPhase = "http_response_headers_transform"
	PhaseVersionGetParamsRulesetPhaseMagicTransit                   PhaseVersionGetParamsRulesetPhase = "magic_transit"
	PhaseVersionGetParamsRulesetPhaseMagicTransitIDsManaged         PhaseVersionGetParamsRulesetPhase = "magic_transit_ids_managed"
	PhaseVersionGetParamsRulesetPhaseMagicTransitManaged            PhaseVersionGetParamsRulesetPhase = "magic_transit_managed"
)

func (PhaseVersionGetParamsRulesetPhase) IsKnown

type PhaseVersionGetResponseEnvelope

type PhaseVersionGetResponseEnvelope struct {
	// A list of error messages.
	Errors []PhaseVersionGetResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []PhaseVersionGetResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success PhaseVersionGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    phaseVersionGetResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*PhaseVersionGetResponseEnvelope) UnmarshalJSON

func (r *PhaseVersionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type PhaseVersionGetResponseEnvelopeErrors

type PhaseVersionGetResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source PhaseVersionGetResponseEnvelopeErrorsSource `json:"source"`
	JSON   phaseVersionGetResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*PhaseVersionGetResponseEnvelopeErrors) UnmarshalJSON

func (r *PhaseVersionGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type PhaseVersionGetResponseEnvelopeErrorsSource

type PhaseVersionGetResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                          `json:"pointer,required"`
	JSON    phaseVersionGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*PhaseVersionGetResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *PhaseVersionGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type PhaseVersionGetResponseEnvelopeMessages

type PhaseVersionGetResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source PhaseVersionGetResponseEnvelopeMessagesSource `json:"source"`
	JSON   phaseVersionGetResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*PhaseVersionGetResponseEnvelopeMessages) UnmarshalJSON

func (r *PhaseVersionGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type PhaseVersionGetResponseEnvelopeMessagesSource

type PhaseVersionGetResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                            `json:"pointer,required"`
	JSON    phaseVersionGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*PhaseVersionGetResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *PhaseVersionGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type PhaseVersionGetResponseEnvelopeSuccess

type PhaseVersionGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	PhaseVersionGetResponseEnvelopeSuccessTrue PhaseVersionGetResponseEnvelopeSuccess = true
)

func (PhaseVersionGetResponseEnvelopeSuccess) IsKnown

type PhaseVersionListParams

type PhaseVersionListParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type PhaseVersionListParamsRulesetPhase

type PhaseVersionListParamsRulesetPhase string

The phase of the ruleset.

const (
	PhaseVersionListParamsRulesetPhaseDDOSL4                         PhaseVersionListParamsRulesetPhase = "ddos_l4"
	PhaseVersionListParamsRulesetPhaseDDOSL7                         PhaseVersionListParamsRulesetPhase = "ddos_l7"
	PhaseVersionListParamsRulesetPhaseHTTPConfigSettings             PhaseVersionListParamsRulesetPhase = "http_config_settings"
	PhaseVersionListParamsRulesetPhaseHTTPCustomErrors               PhaseVersionListParamsRulesetPhase = "http_custom_errors"
	PhaseVersionListParamsRulesetPhaseHTTPLogCustomFields            PhaseVersionListParamsRulesetPhase = "http_log_custom_fields"
	PhaseVersionListParamsRulesetPhaseHTTPRatelimit                  PhaseVersionListParamsRulesetPhase = "http_ratelimit"
	PhaseVersionListParamsRulesetPhaseHTTPRequestCacheSettings       PhaseVersionListParamsRulesetPhase = "http_request_cache_settings"
	PhaseVersionListParamsRulesetPhaseHTTPRequestDynamicRedirect     PhaseVersionListParamsRulesetPhase = "http_request_dynamic_redirect"
	PhaseVersionListParamsRulesetPhaseHTTPRequestFirewallCustom      PhaseVersionListParamsRulesetPhase = "http_request_firewall_custom"
	PhaseVersionListParamsRulesetPhaseHTTPRequestFirewallManaged     PhaseVersionListParamsRulesetPhase = "http_request_firewall_managed"
	PhaseVersionListParamsRulesetPhaseHTTPRequestLateTransform       PhaseVersionListParamsRulesetPhase = "http_request_late_transform"
	PhaseVersionListParamsRulesetPhaseHTTPRequestOrigin              PhaseVersionListParamsRulesetPhase = "http_request_origin"
	PhaseVersionListParamsRulesetPhaseHTTPRequestRedirect            PhaseVersionListParamsRulesetPhase = "http_request_redirect"
	PhaseVersionListParamsRulesetPhaseHTTPRequestSanitize            PhaseVersionListParamsRulesetPhase = "http_request_sanitize"
	PhaseVersionListParamsRulesetPhaseHTTPRequestSbfm                PhaseVersionListParamsRulesetPhase = "http_request_sbfm"
	PhaseVersionListParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseVersionListParamsRulesetPhase = "http_request_select_configuration"
	PhaseVersionListParamsRulesetPhaseHTTPRequestTransform           PhaseVersionListParamsRulesetPhase = "http_request_transform"
	PhaseVersionListParamsRulesetPhaseHTTPResponseCompression        PhaseVersionListParamsRulesetPhase = "http_response_compression"
	PhaseVersionListParamsRulesetPhaseHTTPResponseFirewallManaged    PhaseVersionListParamsRulesetPhase = "http_response_firewall_managed"
	PhaseVersionListParamsRulesetPhaseHTTPResponseHeadersTransform   PhaseVersionListParamsRulesetPhase = "http_response_headers_transform"
	PhaseVersionListParamsRulesetPhaseMagicTransit                   PhaseVersionListParamsRulesetPhase = "magic_transit"
	PhaseVersionListParamsRulesetPhaseMagicTransitIDsManaged         PhaseVersionListParamsRulesetPhase = "magic_transit_ids_managed"
	PhaseVersionListParamsRulesetPhaseMagicTransitManaged            PhaseVersionListParamsRulesetPhase = "magic_transit_managed"
)

func (PhaseVersionListParamsRulesetPhase) IsKnown

type PhaseVersionListResponse added in v2.3.0

type PhaseVersionListResponse struct {
	// The kind of the ruleset.
	Kind PhaseVersionListResponseKind `json:"kind,required"`
	// The human-readable name of the ruleset.
	Name string `json:"name,required"`
	// The phase of the ruleset.
	Phase PhaseVersionListResponsePhase `json:"phase,required"`
	// The unique ID of the ruleset.
	ID string `json:"id"`
	// An informative description of the ruleset.
	Description string `json:"description"`
	// The timestamp of when the ruleset was last modified.
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// The version of the ruleset.
	Version string                       `json:"version"`
	JSON    phaseVersionListResponseJSON `json:"-"`
}

A ruleset object.

func (*PhaseVersionListResponse) UnmarshalJSON added in v2.3.0

func (r *PhaseVersionListResponse) UnmarshalJSON(data []byte) (err error)

type PhaseVersionListResponseEnvelope

type PhaseVersionListResponseEnvelope struct {
	// A list of error messages.
	Errors []PhaseVersionListResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []PhaseVersionListResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetsResponse `json:"result,required"`
	// Whether the API call was successful.
	Success PhaseVersionListResponseEnvelopeSuccess `json:"success,required"`
	JSON    phaseVersionListResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*PhaseVersionListResponseEnvelope) UnmarshalJSON

func (r *PhaseVersionListResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type PhaseVersionListResponseEnvelopeErrors

type PhaseVersionListResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source PhaseVersionListResponseEnvelopeErrorsSource `json:"source"`
	JSON   phaseVersionListResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*PhaseVersionListResponseEnvelopeErrors) UnmarshalJSON

func (r *PhaseVersionListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type PhaseVersionListResponseEnvelopeErrorsSource

type PhaseVersionListResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                           `json:"pointer,required"`
	JSON    phaseVersionListResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*PhaseVersionListResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *PhaseVersionListResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type PhaseVersionListResponseEnvelopeMessages

type PhaseVersionListResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source PhaseVersionListResponseEnvelopeMessagesSource `json:"source"`
	JSON   phaseVersionListResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*PhaseVersionListResponseEnvelopeMessages) UnmarshalJSON

func (r *PhaseVersionListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type PhaseVersionListResponseEnvelopeMessagesSource

type PhaseVersionListResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                             `json:"pointer,required"`
	JSON    phaseVersionListResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*PhaseVersionListResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *PhaseVersionListResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type PhaseVersionListResponseEnvelopeSuccess

type PhaseVersionListResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	PhaseVersionListResponseEnvelopeSuccessTrue PhaseVersionListResponseEnvelopeSuccess = true
)

func (PhaseVersionListResponseEnvelopeSuccess) IsKnown

type PhaseVersionListResponseKind

type PhaseVersionListResponseKind string

The kind of the ruleset.

const (
	PhaseVersionListResponseKindManaged PhaseVersionListResponseKind = "managed"
	PhaseVersionListResponseKindCustom  PhaseVersionListResponseKind = "custom"
	PhaseVersionListResponseKindRoot    PhaseVersionListResponseKind = "root"
	PhaseVersionListResponseKindZone    PhaseVersionListResponseKind = "zone"
)

func (PhaseVersionListResponseKind) IsKnown

func (r PhaseVersionListResponseKind) IsKnown() bool

type PhaseVersionListResponsePhase

type PhaseVersionListResponsePhase string

The phase of the ruleset.

const (
	PhaseVersionListResponsePhaseDDOSL4                         PhaseVersionListResponsePhase = "ddos_l4"
	PhaseVersionListResponsePhaseDDOSL7                         PhaseVersionListResponsePhase = "ddos_l7"
	PhaseVersionListResponsePhaseHTTPConfigSettings             PhaseVersionListResponsePhase = "http_config_settings"
	PhaseVersionListResponsePhaseHTTPCustomErrors               PhaseVersionListResponsePhase = "http_custom_errors"
	PhaseVersionListResponsePhaseHTTPLogCustomFields            PhaseVersionListResponsePhase = "http_log_custom_fields"
	PhaseVersionListResponsePhaseHTTPRatelimit                  PhaseVersionListResponsePhase = "http_ratelimit"
	PhaseVersionListResponsePhaseHTTPRequestCacheSettings       PhaseVersionListResponsePhase = "http_request_cache_settings"
	PhaseVersionListResponsePhaseHTTPRequestDynamicRedirect     PhaseVersionListResponsePhase = "http_request_dynamic_redirect"
	PhaseVersionListResponsePhaseHTTPRequestFirewallCustom      PhaseVersionListResponsePhase = "http_request_firewall_custom"
	PhaseVersionListResponsePhaseHTTPRequestFirewallManaged     PhaseVersionListResponsePhase = "http_request_firewall_managed"
	PhaseVersionListResponsePhaseHTTPRequestLateTransform       PhaseVersionListResponsePhase = "http_request_late_transform"
	PhaseVersionListResponsePhaseHTTPRequestOrigin              PhaseVersionListResponsePhase = "http_request_origin"
	PhaseVersionListResponsePhaseHTTPRequestRedirect            PhaseVersionListResponsePhase = "http_request_redirect"
	PhaseVersionListResponsePhaseHTTPRequestSanitize            PhaseVersionListResponsePhase = "http_request_sanitize"
	PhaseVersionListResponsePhaseHTTPRequestSbfm                PhaseVersionListResponsePhase = "http_request_sbfm"
	PhaseVersionListResponsePhaseHTTPRequestSelectConfiguration PhaseVersionListResponsePhase = "http_request_select_configuration"
	PhaseVersionListResponsePhaseHTTPRequestTransform           PhaseVersionListResponsePhase = "http_request_transform"
	PhaseVersionListResponsePhaseHTTPResponseCompression        PhaseVersionListResponsePhase = "http_response_compression"
	PhaseVersionListResponsePhaseHTTPResponseFirewallManaged    PhaseVersionListResponsePhase = "http_response_firewall_managed"
	PhaseVersionListResponsePhaseHTTPResponseHeadersTransform   PhaseVersionListResponsePhase = "http_response_headers_transform"
	PhaseVersionListResponsePhaseMagicTransit                   PhaseVersionListResponsePhase = "magic_transit"
	PhaseVersionListResponsePhaseMagicTransitIDsManaged         PhaseVersionListResponsePhase = "magic_transit_ids_managed"
	PhaseVersionListResponsePhaseMagicTransitManaged            PhaseVersionListResponsePhase = "magic_transit_managed"
)

func (PhaseVersionListResponsePhase) IsKnown

func (r PhaseVersionListResponsePhase) IsKnown() bool

type PhaseVersionService

type PhaseVersionService struct {
	Options []option.RequestOption
}

PhaseVersionService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPhaseVersionService method instead.

func NewPhaseVersionService

func NewPhaseVersionService(opts ...option.RequestOption) (r *PhaseVersionService)

NewPhaseVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PhaseVersionService) Get

Fetches a specific version of an account or zone entry point ruleset.

func (*PhaseVersionService) List

Fetches the versions of an account or zone entry point ruleset.

type RuleDeleteParams

type RuleDeleteParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type RuleDeleteResponseEnvelope

type RuleDeleteResponseEnvelope struct {
	// A list of error messages.
	Errors []RuleDeleteResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []RuleDeleteResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success RuleDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleDeleteResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*RuleDeleteResponseEnvelope) UnmarshalJSON

func (r *RuleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseEnvelopeErrors

type RuleDeleteResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RuleDeleteResponseEnvelopeErrorsSource `json:"source"`
	JSON   ruleDeleteResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*RuleDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *RuleDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseEnvelopeErrorsSource

type RuleDeleteResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                     `json:"pointer,required"`
	JSON    ruleDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*RuleDeleteResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *RuleDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseEnvelopeMessages

type RuleDeleteResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RuleDeleteResponseEnvelopeMessagesSource `json:"source"`
	JSON   ruleDeleteResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*RuleDeleteResponseEnvelopeMessages) UnmarshalJSON

func (r *RuleDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseEnvelopeMessagesSource

type RuleDeleteResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                       `json:"pointer,required"`
	JSON    ruleDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*RuleDeleteResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *RuleDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseEnvelopeSuccess

type RuleDeleteResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	RuleDeleteResponseEnvelopeSuccessTrue RuleDeleteResponseEnvelopeSuccess = true
)

func (RuleDeleteResponseEnvelopeSuccess) IsKnown

type RuleEditParams

type RuleEditParams interface {
	ImplementsRuleEditParams()
	// contains filtered or unexported methods
}

This interface is a union satisfied by one of the following: RuleEditParamsRulesetsBlockRule, RuleEditParamsRulesetsExecuteRule, RuleEditParamsRulesetsLogRule, RuleEditParamsRulesetsSkipRule.

type RuleEditParamsRulesetsBlockRule

type RuleEditParamsRulesetsBlockRule struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RuleEditParamsRulesetsBlockRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RuleEditParamsRulesetsBlockRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RuleEditParamsRulesetsBlockRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RuleEditParamsRulesetsBlockRule) ImplementsRuleEditParams

func (RuleEditParamsRulesetsBlockRule) ImplementsRuleEditParams()

func (RuleEditParamsRulesetsBlockRule) MarshalJSON

func (r RuleEditParamsRulesetsBlockRule) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsBlockRuleAction

type RuleEditParamsRulesetsBlockRuleAction string

The action to perform when the rule matches.

const (
	RuleEditParamsRulesetsBlockRuleActionBlock RuleEditParamsRulesetsBlockRuleAction = "block"
)

func (RuleEditParamsRulesetsBlockRuleAction) IsKnown

type RuleEditParamsRulesetsBlockRuleActionParameters

type RuleEditParamsRulesetsBlockRuleActionParameters struct {
	// The response to show when the block is applied.
	Response param.Field[RuleEditParamsRulesetsBlockRuleActionParametersResponse] `json:"response"`
}

The parameters configuring the rule's action.

func (RuleEditParamsRulesetsBlockRuleActionParameters) MarshalJSON

func (r RuleEditParamsRulesetsBlockRuleActionParameters) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsBlockRuleActionParametersResponse

type RuleEditParamsRulesetsBlockRuleActionParametersResponse struct {
	// The content to return.
	Content param.Field[string] `json:"content,required"`
	// The type of the content to return.
	ContentType param.Field[string] `json:"content_type,required"`
	// The status code to return.
	StatusCode param.Field[int64] `json:"status_code,required"`
}

The response to show when the block is applied.

func (RuleEditParamsRulesetsBlockRuleActionParametersResponse) MarshalJSON

type RuleEditParamsRulesetsBlockRuleLogging

type RuleEditParamsRulesetsBlockRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RuleEditParamsRulesetsBlockRuleLogging) MarshalJSON

func (r RuleEditParamsRulesetsBlockRuleLogging) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsExecuteRule

type RuleEditParamsRulesetsExecuteRule struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RuleEditParamsRulesetsExecuteRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RuleEditParamsRulesetsExecuteRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RuleEditParamsRulesetsExecuteRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RuleEditParamsRulesetsExecuteRule) ImplementsRuleEditParams

func (RuleEditParamsRulesetsExecuteRule) ImplementsRuleEditParams()

func (RuleEditParamsRulesetsExecuteRule) MarshalJSON

func (r RuleEditParamsRulesetsExecuteRule) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsExecuteRuleAction

type RuleEditParamsRulesetsExecuteRuleAction string

The action to perform when the rule matches.

const (
	RuleEditParamsRulesetsExecuteRuleActionExecute RuleEditParamsRulesetsExecuteRuleAction = "execute"
)

func (RuleEditParamsRulesetsExecuteRuleAction) IsKnown

type RuleEditParamsRulesetsExecuteRuleActionParameters

type RuleEditParamsRulesetsExecuteRuleActionParameters struct {
	// The ID of the ruleset to execute.
	ID param.Field[string] `json:"id,required"`
	// The configuration to use for matched data logging.
	MatchedData param.Field[RuleEditParamsRulesetsExecuteRuleActionParametersMatchedData] `json:"matched_data"`
	// A set of overrides to apply to the target ruleset.
	Overrides param.Field[RuleEditParamsRulesetsExecuteRuleActionParametersOverrides] `json:"overrides"`
}

The parameters configuring the rule's action.

func (RuleEditParamsRulesetsExecuteRuleActionParameters) MarshalJSON

func (r RuleEditParamsRulesetsExecuteRuleActionParameters) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsExecuteRuleActionParametersMatchedData

type RuleEditParamsRulesetsExecuteRuleActionParametersMatchedData struct {
	// The public key to encrypt matched data logs with.
	PublicKey param.Field[string] `json:"public_key,required"`
}

The configuration to use for matched data logging.

func (RuleEditParamsRulesetsExecuteRuleActionParametersMatchedData) MarshalJSON

type RuleEditParamsRulesetsExecuteRuleActionParametersOverrides

type RuleEditParamsRulesetsExecuteRuleActionParametersOverrides struct {
	// An action to override all rules with. This option has lower precedence than rule
	// and category overrides.
	Action param.Field[string] `json:"action"`
	// A list of category-level overrides. This option has the second-highest
	// precedence after rule-level overrides.
	Categories param.Field[[]RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategory] `json:"categories"`
	// Whether to enable execution of all rules. This option has lower precedence than
	// rule and category overrides.
	Enabled param.Field[bool] `json:"enabled"`
	// A list of rule-level overrides. This option has the highest precedence.
	Rules param.Field[[]RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRule] `json:"rules"`
	// 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.
	SensitivityLevel param.Field[RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel] `json:"sensitivity_level"`
}

A set of overrides to apply to the target ruleset.

func (RuleEditParamsRulesetsExecuteRuleActionParametersOverrides) MarshalJSON

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel string

The sensitivity level to use for rules in the category.

const (
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelDefault RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "default"
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelMedium  RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "medium"
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelLow     RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "low"
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelEoff    RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "eoff"
)

func (RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategory

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategory struct {
	// The name of the category to override.
	Category param.Field[string] `json:"category,required"`
	// The action to override rules in the category with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of rules in the category.
	Enabled param.Field[bool] `json:"enabled"`
	// The sensitivity level to use for rules in the category.
	SensitivityLevel param.Field[RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel] `json:"sensitivity_level"`
}

A category-level override

func (RuleEditParamsRulesetsExecuteRuleActionParametersOverridesCategory) MarshalJSON

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRule

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRule struct {
	// The ID of the rule to override.
	ID param.Field[string] `json:"id,required"`
	// The action to override the rule with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of the rule.
	Enabled param.Field[bool] `json:"enabled"`
	// The score threshold to use for the rule.
	ScoreThreshold param.Field[int64] `json:"score_threshold"`
	// The sensitivity level to use for the rule.
	SensitivityLevel param.Field[RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel] `json:"sensitivity_level"`
}

A rule-level override

func (RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRule) MarshalJSON

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel string

The sensitivity level to use for the rule.

const (
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelDefault RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "default"
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelMedium  RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "medium"
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelLow     RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "low"
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelEoff    RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "eoff"
)

func (RuleEditParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel

type RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel string

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 (
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevelDefault RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "default"
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevelMedium  RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "medium"
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevelLow     RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "low"
	RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevelEoff    RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "eoff"
)

func (RuleEditParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown

type RuleEditParamsRulesetsExecuteRuleLogging

type RuleEditParamsRulesetsExecuteRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RuleEditParamsRulesetsExecuteRuleLogging) MarshalJSON

func (r RuleEditParamsRulesetsExecuteRuleLogging) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsLogRule

type RuleEditParamsRulesetsLogRule struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RuleEditParamsRulesetsLogRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[interface{}] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RuleEditParamsRulesetsLogRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RuleEditParamsRulesetsLogRule) ImplementsRuleEditParams

func (RuleEditParamsRulesetsLogRule) ImplementsRuleEditParams()

func (RuleEditParamsRulesetsLogRule) MarshalJSON

func (r RuleEditParamsRulesetsLogRule) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsLogRuleAction

type RuleEditParamsRulesetsLogRuleAction string

The action to perform when the rule matches.

const (
	RuleEditParamsRulesetsLogRuleActionLog RuleEditParamsRulesetsLogRuleAction = "log"
)

func (RuleEditParamsRulesetsLogRuleAction) IsKnown

type RuleEditParamsRulesetsLogRuleLogging

type RuleEditParamsRulesetsLogRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RuleEditParamsRulesetsLogRuleLogging) MarshalJSON

func (r RuleEditParamsRulesetsLogRuleLogging) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsSkipRule

type RuleEditParamsRulesetsSkipRule struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RuleEditParamsRulesetsSkipRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RuleEditParamsRulesetsSkipRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RuleEditParamsRulesetsSkipRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RuleEditParamsRulesetsSkipRule) ImplementsRuleEditParams

func (RuleEditParamsRulesetsSkipRule) ImplementsRuleEditParams()

func (RuleEditParamsRulesetsSkipRule) MarshalJSON

func (r RuleEditParamsRulesetsSkipRule) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsSkipRuleAction

type RuleEditParamsRulesetsSkipRuleAction string

The action to perform when the rule matches.

const (
	RuleEditParamsRulesetsSkipRuleActionSkip RuleEditParamsRulesetsSkipRuleAction = "skip"
)

func (RuleEditParamsRulesetsSkipRuleAction) IsKnown

type RuleEditParamsRulesetsSkipRuleActionParameters

type RuleEditParamsRulesetsSkipRuleActionParameters struct {
	// A list of phases to skip the execution of. This option is incompatible with the
	// ruleset and rulesets options.
	Phases param.Field[[]RuleEditParamsRulesetsSkipRuleActionParametersPhase] `json:"phases"`
	// A list of legacy security products to skip the execution of.
	Products param.Field[[]RuleEditParamsRulesetsSkipRuleActionParametersProduct] `json:"products"`
	// 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.
	Rules param.Field[map[string][]string] `json:"rules"`
	// A ruleset to skip the execution of. This option is incompatible with the
	// rulesets, rules and phases options.
	Ruleset param.Field[RuleEditParamsRulesetsSkipRuleActionParametersRuleset] `json:"ruleset"`
	// A list of ruleset IDs to skip the execution of. This option is incompatible with
	// the ruleset and phases options.
	Rulesets param.Field[[]string] `json:"rulesets"`
}

The parameters configuring the rule's action.

func (RuleEditParamsRulesetsSkipRuleActionParameters) MarshalJSON

func (r RuleEditParamsRulesetsSkipRuleActionParameters) MarshalJSON() (data []byte, err error)

type RuleEditParamsRulesetsSkipRuleActionParametersPhase

type RuleEditParamsRulesetsSkipRuleActionParametersPhase string

A phase to skip the execution of.

const (
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseDDOSL4                         RuleEditParamsRulesetsSkipRuleActionParametersPhase = "ddos_l4"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseDDOSL7                         RuleEditParamsRulesetsSkipRuleActionParametersPhase = "ddos_l7"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPConfigSettings             RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_config_settings"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPCustomErrors               RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_custom_errors"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPLogCustomFields            RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_log_custom_fields"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRatelimit                  RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_ratelimit"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestCacheSettings       RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_cache_settings"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestDynamicRedirect     RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_dynamic_redirect"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallCustom      RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_firewall_custom"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallManaged     RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_firewall_managed"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestLateTransform       RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_late_transform"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestOrigin              RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_origin"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestRedirect            RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_redirect"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestSanitize            RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_sanitize"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestSbfm                RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_sbfm"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestSelectConfiguration RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_select_configuration"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestTransform           RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_request_transform"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPResponseCompression        RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_response_compression"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPResponseFirewallManaged    RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_response_firewall_managed"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseHTTPResponseHeadersTransform   RuleEditParamsRulesetsSkipRuleActionParametersPhase = "http_response_headers_transform"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseMagicTransit                   RuleEditParamsRulesetsSkipRuleActionParametersPhase = "magic_transit"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseMagicTransitIDsManaged         RuleEditParamsRulesetsSkipRuleActionParametersPhase = "magic_transit_ids_managed"
	RuleEditParamsRulesetsSkipRuleActionParametersPhaseMagicTransitManaged            RuleEditParamsRulesetsSkipRuleActionParametersPhase = "magic_transit_managed"
)

func (RuleEditParamsRulesetsSkipRuleActionParametersPhase) IsKnown

type RuleEditParamsRulesetsSkipRuleActionParametersProduct

type RuleEditParamsRulesetsSkipRuleActionParametersProduct string

The name of a legacy security product to skip the execution of.

const (
	RuleEditParamsRulesetsSkipRuleActionParametersProductBic           RuleEditParamsRulesetsSkipRuleActionParametersProduct = "bic"
	RuleEditParamsRulesetsSkipRuleActionParametersProductHot           RuleEditParamsRulesetsSkipRuleActionParametersProduct = "hot"
	RuleEditParamsRulesetsSkipRuleActionParametersProductRateLimit     RuleEditParamsRulesetsSkipRuleActionParametersProduct = "rateLimit"
	RuleEditParamsRulesetsSkipRuleActionParametersProductSecurityLevel RuleEditParamsRulesetsSkipRuleActionParametersProduct = "securityLevel"
	RuleEditParamsRulesetsSkipRuleActionParametersProductUABlock       RuleEditParamsRulesetsSkipRuleActionParametersProduct = "uaBlock"
	RuleEditParamsRulesetsSkipRuleActionParametersProductWAF           RuleEditParamsRulesetsSkipRuleActionParametersProduct = "waf"
	RuleEditParamsRulesetsSkipRuleActionParametersProductZoneLockdown  RuleEditParamsRulesetsSkipRuleActionParametersProduct = "zoneLockdown"
)

func (RuleEditParamsRulesetsSkipRuleActionParametersProduct) IsKnown

type RuleEditParamsRulesetsSkipRuleActionParametersRuleset

type RuleEditParamsRulesetsSkipRuleActionParametersRuleset string

A ruleset to skip the execution of. This option is incompatible with the rulesets, rules and phases options.

const (
	RuleEditParamsRulesetsSkipRuleActionParametersRulesetCurrent RuleEditParamsRulesetsSkipRuleActionParametersRuleset = "current"
)

func (RuleEditParamsRulesetsSkipRuleActionParametersRuleset) IsKnown

type RuleEditParamsRulesetsSkipRuleLogging

type RuleEditParamsRulesetsSkipRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RuleEditParamsRulesetsSkipRuleLogging) MarshalJSON

func (r RuleEditParamsRulesetsSkipRuleLogging) MarshalJSON() (data []byte, err error)

type RuleEditResponseEnvelope

type RuleEditResponseEnvelope struct {
	// A list of error messages.
	Errors []RuleEditResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []RuleEditResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success RuleEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleEditResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*RuleEditResponseEnvelope) UnmarshalJSON

func (r *RuleEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RuleEditResponseEnvelopeErrors

type RuleEditResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RuleEditResponseEnvelopeErrorsSource `json:"source"`
	JSON   ruleEditResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*RuleEditResponseEnvelopeErrors) UnmarshalJSON

func (r *RuleEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RuleEditResponseEnvelopeErrorsSource

type RuleEditResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                   `json:"pointer,required"`
	JSON    ruleEditResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*RuleEditResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *RuleEditResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type RuleEditResponseEnvelopeMessages

type RuleEditResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RuleEditResponseEnvelopeMessagesSource `json:"source"`
	JSON   ruleEditResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*RuleEditResponseEnvelopeMessages) UnmarshalJSON

func (r *RuleEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RuleEditResponseEnvelopeMessagesSource

type RuleEditResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                     `json:"pointer,required"`
	JSON    ruleEditResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*RuleEditResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *RuleEditResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type RuleEditResponseEnvelopeSuccess

type RuleEditResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	RuleEditResponseEnvelopeSuccessTrue RuleEditResponseEnvelopeSuccess = true
)

func (RuleEditResponseEnvelopeSuccess) IsKnown

type RuleNewParams

type RuleNewParams interface {
	ImplementsRuleNewParams()
	// contains filtered or unexported methods
}

This interface is a union satisfied by one of the following: RuleNewParamsRulesetsBlockRule, RuleNewParamsRulesetsExecuteRule, RuleNewParamsRulesetsLogRule, RuleNewParamsRulesetsSkipRule.

type RuleNewParamsRulesetsBlockRule

type RuleNewParamsRulesetsBlockRule struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RuleNewParamsRulesetsBlockRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RuleNewParamsRulesetsBlockRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RuleNewParamsRulesetsBlockRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RuleNewParamsRulesetsBlockRule) ImplementsRuleNewParams

func (RuleNewParamsRulesetsBlockRule) ImplementsRuleNewParams()

func (RuleNewParamsRulesetsBlockRule) MarshalJSON

func (r RuleNewParamsRulesetsBlockRule) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsBlockRuleAction

type RuleNewParamsRulesetsBlockRuleAction string

The action to perform when the rule matches.

const (
	RuleNewParamsRulesetsBlockRuleActionBlock RuleNewParamsRulesetsBlockRuleAction = "block"
)

func (RuleNewParamsRulesetsBlockRuleAction) IsKnown

type RuleNewParamsRulesetsBlockRuleActionParameters

type RuleNewParamsRulesetsBlockRuleActionParameters struct {
	// The response to show when the block is applied.
	Response param.Field[RuleNewParamsRulesetsBlockRuleActionParametersResponse] `json:"response"`
}

The parameters configuring the rule's action.

func (RuleNewParamsRulesetsBlockRuleActionParameters) MarshalJSON

func (r RuleNewParamsRulesetsBlockRuleActionParameters) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsBlockRuleActionParametersResponse

type RuleNewParamsRulesetsBlockRuleActionParametersResponse struct {
	// The content to return.
	Content param.Field[string] `json:"content,required"`
	// The type of the content to return.
	ContentType param.Field[string] `json:"content_type,required"`
	// The status code to return.
	StatusCode param.Field[int64] `json:"status_code,required"`
}

The response to show when the block is applied.

func (RuleNewParamsRulesetsBlockRuleActionParametersResponse) MarshalJSON

type RuleNewParamsRulesetsBlockRuleLogging

type RuleNewParamsRulesetsBlockRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RuleNewParamsRulesetsBlockRuleLogging) MarshalJSON

func (r RuleNewParamsRulesetsBlockRuleLogging) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsExecuteRule

type RuleNewParamsRulesetsExecuteRule struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RuleNewParamsRulesetsExecuteRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RuleNewParamsRulesetsExecuteRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RuleNewParamsRulesetsExecuteRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RuleNewParamsRulesetsExecuteRule) ImplementsRuleNewParams

func (RuleNewParamsRulesetsExecuteRule) ImplementsRuleNewParams()

func (RuleNewParamsRulesetsExecuteRule) MarshalJSON

func (r RuleNewParamsRulesetsExecuteRule) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsExecuteRuleAction

type RuleNewParamsRulesetsExecuteRuleAction string

The action to perform when the rule matches.

const (
	RuleNewParamsRulesetsExecuteRuleActionExecute RuleNewParamsRulesetsExecuteRuleAction = "execute"
)

func (RuleNewParamsRulesetsExecuteRuleAction) IsKnown

type RuleNewParamsRulesetsExecuteRuleActionParameters

type RuleNewParamsRulesetsExecuteRuleActionParameters struct {
	// The ID of the ruleset to execute.
	ID param.Field[string] `json:"id,required"`
	// The configuration to use for matched data logging.
	MatchedData param.Field[RuleNewParamsRulesetsExecuteRuleActionParametersMatchedData] `json:"matched_data"`
	// A set of overrides to apply to the target ruleset.
	Overrides param.Field[RuleNewParamsRulesetsExecuteRuleActionParametersOverrides] `json:"overrides"`
}

The parameters configuring the rule's action.

func (RuleNewParamsRulesetsExecuteRuleActionParameters) MarshalJSON

func (r RuleNewParamsRulesetsExecuteRuleActionParameters) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsExecuteRuleActionParametersMatchedData

type RuleNewParamsRulesetsExecuteRuleActionParametersMatchedData struct {
	// The public key to encrypt matched data logs with.
	PublicKey param.Field[string] `json:"public_key,required"`
}

The configuration to use for matched data logging.

func (RuleNewParamsRulesetsExecuteRuleActionParametersMatchedData) MarshalJSON

type RuleNewParamsRulesetsExecuteRuleActionParametersOverrides

type RuleNewParamsRulesetsExecuteRuleActionParametersOverrides struct {
	// An action to override all rules with. This option has lower precedence than rule
	// and category overrides.
	Action param.Field[string] `json:"action"`
	// A list of category-level overrides. This option has the second-highest
	// precedence after rule-level overrides.
	Categories param.Field[[]RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategory] `json:"categories"`
	// Whether to enable execution of all rules. This option has lower precedence than
	// rule and category overrides.
	Enabled param.Field[bool] `json:"enabled"`
	// A list of rule-level overrides. This option has the highest precedence.
	Rules param.Field[[]RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRule] `json:"rules"`
	// 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.
	SensitivityLevel param.Field[RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel] `json:"sensitivity_level"`
}

A set of overrides to apply to the target ruleset.

func (RuleNewParamsRulesetsExecuteRuleActionParametersOverrides) MarshalJSON

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel string

The sensitivity level to use for rules in the category.

const (
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelDefault RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "default"
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelMedium  RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "medium"
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelLow     RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "low"
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelEoff    RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "eoff"
)

func (RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategory

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategory struct {
	// The name of the category to override.
	Category param.Field[string] `json:"category,required"`
	// The action to override rules in the category with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of rules in the category.
	Enabled param.Field[bool] `json:"enabled"`
	// The sensitivity level to use for rules in the category.
	SensitivityLevel param.Field[RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel] `json:"sensitivity_level"`
}

A category-level override

func (RuleNewParamsRulesetsExecuteRuleActionParametersOverridesCategory) MarshalJSON

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRule

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRule struct {
	// The ID of the rule to override.
	ID param.Field[string] `json:"id,required"`
	// The action to override the rule with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of the rule.
	Enabled param.Field[bool] `json:"enabled"`
	// The score threshold to use for the rule.
	ScoreThreshold param.Field[int64] `json:"score_threshold"`
	// The sensitivity level to use for the rule.
	SensitivityLevel param.Field[RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel] `json:"sensitivity_level"`
}

A rule-level override

func (RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRule) MarshalJSON

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel string

The sensitivity level to use for the rule.

const (
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelDefault RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "default"
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelMedium  RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "medium"
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelLow     RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "low"
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelEoff    RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "eoff"
)

func (RuleNewParamsRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel

type RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel string

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 (
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevelDefault RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "default"
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevelMedium  RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "medium"
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevelLow     RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "low"
	RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevelEoff    RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "eoff"
)

func (RuleNewParamsRulesetsExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown

type RuleNewParamsRulesetsExecuteRuleLogging

type RuleNewParamsRulesetsExecuteRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RuleNewParamsRulesetsExecuteRuleLogging) MarshalJSON

func (r RuleNewParamsRulesetsExecuteRuleLogging) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsLogRule

type RuleNewParamsRulesetsLogRule struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RuleNewParamsRulesetsLogRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[interface{}] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RuleNewParamsRulesetsLogRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RuleNewParamsRulesetsLogRule) ImplementsRuleNewParams

func (RuleNewParamsRulesetsLogRule) ImplementsRuleNewParams()

func (RuleNewParamsRulesetsLogRule) MarshalJSON

func (r RuleNewParamsRulesetsLogRule) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsLogRuleAction

type RuleNewParamsRulesetsLogRuleAction string

The action to perform when the rule matches.

const (
	RuleNewParamsRulesetsLogRuleActionLog RuleNewParamsRulesetsLogRuleAction = "log"
)

func (RuleNewParamsRulesetsLogRuleAction) IsKnown

type RuleNewParamsRulesetsLogRuleLogging

type RuleNewParamsRulesetsLogRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RuleNewParamsRulesetsLogRuleLogging) MarshalJSON

func (r RuleNewParamsRulesetsLogRuleLogging) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsSkipRule

type RuleNewParamsRulesetsSkipRule struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RuleNewParamsRulesetsSkipRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RuleNewParamsRulesetsSkipRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RuleNewParamsRulesetsSkipRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RuleNewParamsRulesetsSkipRule) ImplementsRuleNewParams

func (RuleNewParamsRulesetsSkipRule) ImplementsRuleNewParams()

func (RuleNewParamsRulesetsSkipRule) MarshalJSON

func (r RuleNewParamsRulesetsSkipRule) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsSkipRuleAction

type RuleNewParamsRulesetsSkipRuleAction string

The action to perform when the rule matches.

const (
	RuleNewParamsRulesetsSkipRuleActionSkip RuleNewParamsRulesetsSkipRuleAction = "skip"
)

func (RuleNewParamsRulesetsSkipRuleAction) IsKnown

type RuleNewParamsRulesetsSkipRuleActionParameters

type RuleNewParamsRulesetsSkipRuleActionParameters struct {
	// A list of phases to skip the execution of. This option is incompatible with the
	// ruleset and rulesets options.
	Phases param.Field[[]RuleNewParamsRulesetsSkipRuleActionParametersPhase] `json:"phases"`
	// A list of legacy security products to skip the execution of.
	Products param.Field[[]RuleNewParamsRulesetsSkipRuleActionParametersProduct] `json:"products"`
	// 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.
	Rules param.Field[map[string][]string] `json:"rules"`
	// A ruleset to skip the execution of. This option is incompatible with the
	// rulesets, rules and phases options.
	Ruleset param.Field[RuleNewParamsRulesetsSkipRuleActionParametersRuleset] `json:"ruleset"`
	// A list of ruleset IDs to skip the execution of. This option is incompatible with
	// the ruleset and phases options.
	Rulesets param.Field[[]string] `json:"rulesets"`
}

The parameters configuring the rule's action.

func (RuleNewParamsRulesetsSkipRuleActionParameters) MarshalJSON

func (r RuleNewParamsRulesetsSkipRuleActionParameters) MarshalJSON() (data []byte, err error)

type RuleNewParamsRulesetsSkipRuleActionParametersPhase

type RuleNewParamsRulesetsSkipRuleActionParametersPhase string

A phase to skip the execution of.

const (
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseDDOSL4                         RuleNewParamsRulesetsSkipRuleActionParametersPhase = "ddos_l4"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseDDOSL7                         RuleNewParamsRulesetsSkipRuleActionParametersPhase = "ddos_l7"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPConfigSettings             RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_config_settings"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPCustomErrors               RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_custom_errors"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPLogCustomFields            RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_log_custom_fields"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRatelimit                  RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_ratelimit"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestCacheSettings       RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_cache_settings"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestDynamicRedirect     RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_dynamic_redirect"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallCustom      RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_firewall_custom"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallManaged     RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_firewall_managed"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestLateTransform       RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_late_transform"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestOrigin              RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_origin"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestRedirect            RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_redirect"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestSanitize            RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_sanitize"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestSbfm                RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_sbfm"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestSelectConfiguration RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_select_configuration"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPRequestTransform           RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_request_transform"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPResponseCompression        RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_response_compression"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPResponseFirewallManaged    RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_response_firewall_managed"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseHTTPResponseHeadersTransform   RuleNewParamsRulesetsSkipRuleActionParametersPhase = "http_response_headers_transform"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseMagicTransit                   RuleNewParamsRulesetsSkipRuleActionParametersPhase = "magic_transit"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseMagicTransitIDsManaged         RuleNewParamsRulesetsSkipRuleActionParametersPhase = "magic_transit_ids_managed"
	RuleNewParamsRulesetsSkipRuleActionParametersPhaseMagicTransitManaged            RuleNewParamsRulesetsSkipRuleActionParametersPhase = "magic_transit_managed"
)

func (RuleNewParamsRulesetsSkipRuleActionParametersPhase) IsKnown

type RuleNewParamsRulesetsSkipRuleActionParametersProduct

type RuleNewParamsRulesetsSkipRuleActionParametersProduct string

The name of a legacy security product to skip the execution of.

const (
	RuleNewParamsRulesetsSkipRuleActionParametersProductBic           RuleNewParamsRulesetsSkipRuleActionParametersProduct = "bic"
	RuleNewParamsRulesetsSkipRuleActionParametersProductHot           RuleNewParamsRulesetsSkipRuleActionParametersProduct = "hot"
	RuleNewParamsRulesetsSkipRuleActionParametersProductRateLimit     RuleNewParamsRulesetsSkipRuleActionParametersProduct = "rateLimit"
	RuleNewParamsRulesetsSkipRuleActionParametersProductSecurityLevel RuleNewParamsRulesetsSkipRuleActionParametersProduct = "securityLevel"
	RuleNewParamsRulesetsSkipRuleActionParametersProductUABlock       RuleNewParamsRulesetsSkipRuleActionParametersProduct = "uaBlock"
	RuleNewParamsRulesetsSkipRuleActionParametersProductWAF           RuleNewParamsRulesetsSkipRuleActionParametersProduct = "waf"
	RuleNewParamsRulesetsSkipRuleActionParametersProductZoneLockdown  RuleNewParamsRulesetsSkipRuleActionParametersProduct = "zoneLockdown"
)

func (RuleNewParamsRulesetsSkipRuleActionParametersProduct) IsKnown

type RuleNewParamsRulesetsSkipRuleActionParametersRuleset

type RuleNewParamsRulesetsSkipRuleActionParametersRuleset string

A ruleset to skip the execution of. This option is incompatible with the rulesets, rules and phases options.

const (
	RuleNewParamsRulesetsSkipRuleActionParametersRulesetCurrent RuleNewParamsRulesetsSkipRuleActionParametersRuleset = "current"
)

func (RuleNewParamsRulesetsSkipRuleActionParametersRuleset) IsKnown

type RuleNewParamsRulesetsSkipRuleLogging

type RuleNewParamsRulesetsSkipRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RuleNewParamsRulesetsSkipRuleLogging) MarshalJSON

func (r RuleNewParamsRulesetsSkipRuleLogging) MarshalJSON() (data []byte, err error)

type RuleNewResponseEnvelope

type RuleNewResponseEnvelope struct {
	// A list of error messages.
	Errors []RuleNewResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []RuleNewResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success RuleNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleNewResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*RuleNewResponseEnvelope) UnmarshalJSON

func (r *RuleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseEnvelopeErrors

type RuleNewResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RuleNewResponseEnvelopeErrorsSource `json:"source"`
	JSON   ruleNewResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*RuleNewResponseEnvelopeErrors) UnmarshalJSON

func (r *RuleNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseEnvelopeErrorsSource

type RuleNewResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                  `json:"pointer,required"`
	JSON    ruleNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*RuleNewResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *RuleNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseEnvelopeMessages

type RuleNewResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RuleNewResponseEnvelopeMessagesSource `json:"source"`
	JSON   ruleNewResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*RuleNewResponseEnvelopeMessages) UnmarshalJSON

func (r *RuleNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseEnvelopeMessagesSource

type RuleNewResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                    `json:"pointer,required"`
	JSON    ruleNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*RuleNewResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *RuleNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseEnvelopeSuccess

type RuleNewResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	RuleNewResponseEnvelopeSuccessTrue RuleNewResponseEnvelopeSuccess = true
)

func (RuleNewResponseEnvelopeSuccess) IsKnown

type RuleService

type RuleService struct {
	Options []option.RequestOption
}

RuleService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRuleService method instead.

func NewRuleService

func NewRuleService(opts ...option.RequestOption) (r *RuleService)

NewRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RuleService) Delete

func (r *RuleService) Delete(ctx context.Context, rulesetID string, ruleID string, body RuleDeleteParams, opts ...option.RequestOption) (res *RulesetsRulesetResponse, err error)

Deletes an existing rule from an account or zone ruleset.

func (*RuleService) Edit

func (r *RuleService) Edit(ctx context.Context, rulesetID string, ruleID string, params RuleEditParams, opts ...option.RequestOption) (res *RulesetsRulesetResponse, err error)

Updates an existing rule in an account or zone ruleset.

func (*RuleService) New

func (r *RuleService) New(ctx context.Context, rulesetID string, params RuleNewParams, opts ...option.RequestOption) (res *RulesetsRulesetResponse, err error)

Adds a new rule to an account or zone ruleset. The rule will be added to the end of the existing list of rules in the ruleset by default.

type RulesetDeleteParams

type RulesetDeleteParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type RulesetGetParams

type RulesetGetParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type RulesetGetResponseEnvelope

type RulesetGetResponseEnvelope struct {
	// A list of error messages.
	Errors []RulesetGetResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []RulesetGetResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success RulesetGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    rulesetGetResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*RulesetGetResponseEnvelope) UnmarshalJSON

func (r *RulesetGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RulesetGetResponseEnvelopeErrors

type RulesetGetResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RulesetGetResponseEnvelopeErrorsSource `json:"source"`
	JSON   rulesetGetResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*RulesetGetResponseEnvelopeErrors) UnmarshalJSON

func (r *RulesetGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RulesetGetResponseEnvelopeErrorsSource

type RulesetGetResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                     `json:"pointer,required"`
	JSON    rulesetGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*RulesetGetResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *RulesetGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type RulesetGetResponseEnvelopeMessages

type RulesetGetResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RulesetGetResponseEnvelopeMessagesSource `json:"source"`
	JSON   rulesetGetResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*RulesetGetResponseEnvelopeMessages) UnmarshalJSON

func (r *RulesetGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RulesetGetResponseEnvelopeMessagesSource

type RulesetGetResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                       `json:"pointer,required"`
	JSON    rulesetGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*RulesetGetResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *RulesetGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type RulesetGetResponseEnvelopeSuccess

type RulesetGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	RulesetGetResponseEnvelopeSuccessTrue RulesetGetResponseEnvelopeSuccess = true
)

func (RulesetGetResponseEnvelopeSuccess) IsKnown

type RulesetListParams

type RulesetListParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type RulesetListResponse added in v2.3.0

type RulesetListResponse struct {
	// The kind of the ruleset.
	Kind RulesetListResponseKind `json:"kind,required"`
	// The human-readable name of the ruleset.
	Name string `json:"name,required"`
	// The phase of the ruleset.
	Phase RulesetListResponsePhase `json:"phase,required"`
	// The unique ID of the ruleset.
	ID string `json:"id"`
	// An informative description of the ruleset.
	Description string `json:"description"`
	// The timestamp of when the ruleset was last modified.
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// The version of the ruleset.
	Version string                  `json:"version"`
	JSON    rulesetListResponseJSON `json:"-"`
}

A ruleset object.

func (*RulesetListResponse) UnmarshalJSON added in v2.3.0

func (r *RulesetListResponse) UnmarshalJSON(data []byte) (err error)

type RulesetListResponseEnvelope

type RulesetListResponseEnvelope struct {
	// A list of error messages.
	Errors []RulesetListResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []RulesetListResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetsResponse `json:"result,required"`
	// Whether the API call was successful.
	Success RulesetListResponseEnvelopeSuccess `json:"success,required"`
	JSON    rulesetListResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*RulesetListResponseEnvelope) UnmarshalJSON

func (r *RulesetListResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RulesetListResponseEnvelopeErrors

type RulesetListResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RulesetListResponseEnvelopeErrorsSource `json:"source"`
	JSON   rulesetListResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*RulesetListResponseEnvelopeErrors) UnmarshalJSON

func (r *RulesetListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RulesetListResponseEnvelopeErrorsSource

type RulesetListResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                      `json:"pointer,required"`
	JSON    rulesetListResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*RulesetListResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *RulesetListResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type RulesetListResponseEnvelopeMessages

type RulesetListResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RulesetListResponseEnvelopeMessagesSource `json:"source"`
	JSON   rulesetListResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*RulesetListResponseEnvelopeMessages) UnmarshalJSON

func (r *RulesetListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RulesetListResponseEnvelopeMessagesSource

type RulesetListResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                        `json:"pointer,required"`
	JSON    rulesetListResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*RulesetListResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *RulesetListResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type RulesetListResponseEnvelopeSuccess

type RulesetListResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	RulesetListResponseEnvelopeSuccessTrue RulesetListResponseEnvelopeSuccess = true
)

func (RulesetListResponseEnvelopeSuccess) IsKnown

type RulesetListResponseKind

type RulesetListResponseKind string

The kind of the ruleset.

const (
	RulesetListResponseKindManaged RulesetListResponseKind = "managed"
	RulesetListResponseKindCustom  RulesetListResponseKind = "custom"
	RulesetListResponseKindRoot    RulesetListResponseKind = "root"
	RulesetListResponseKindZone    RulesetListResponseKind = "zone"
)

func (RulesetListResponseKind) IsKnown

func (r RulesetListResponseKind) IsKnown() bool

type RulesetListResponsePhase

type RulesetListResponsePhase string

The phase of the ruleset.

const (
	RulesetListResponsePhaseDDOSL4                         RulesetListResponsePhase = "ddos_l4"
	RulesetListResponsePhaseDDOSL7                         RulesetListResponsePhase = "ddos_l7"
	RulesetListResponsePhaseHTTPConfigSettings             RulesetListResponsePhase = "http_config_settings"
	RulesetListResponsePhaseHTTPCustomErrors               RulesetListResponsePhase = "http_custom_errors"
	RulesetListResponsePhaseHTTPLogCustomFields            RulesetListResponsePhase = "http_log_custom_fields"
	RulesetListResponsePhaseHTTPRatelimit                  RulesetListResponsePhase = "http_ratelimit"
	RulesetListResponsePhaseHTTPRequestCacheSettings       RulesetListResponsePhase = "http_request_cache_settings"
	RulesetListResponsePhaseHTTPRequestDynamicRedirect     RulesetListResponsePhase = "http_request_dynamic_redirect"
	RulesetListResponsePhaseHTTPRequestFirewallCustom      RulesetListResponsePhase = "http_request_firewall_custom"
	RulesetListResponsePhaseHTTPRequestFirewallManaged     RulesetListResponsePhase = "http_request_firewall_managed"
	RulesetListResponsePhaseHTTPRequestLateTransform       RulesetListResponsePhase = "http_request_late_transform"
	RulesetListResponsePhaseHTTPRequestOrigin              RulesetListResponsePhase = "http_request_origin"
	RulesetListResponsePhaseHTTPRequestRedirect            RulesetListResponsePhase = "http_request_redirect"
	RulesetListResponsePhaseHTTPRequestSanitize            RulesetListResponsePhase = "http_request_sanitize"
	RulesetListResponsePhaseHTTPRequestSbfm                RulesetListResponsePhase = "http_request_sbfm"
	RulesetListResponsePhaseHTTPRequestSelectConfiguration RulesetListResponsePhase = "http_request_select_configuration"
	RulesetListResponsePhaseHTTPRequestTransform           RulesetListResponsePhase = "http_request_transform"
	RulesetListResponsePhaseHTTPResponseCompression        RulesetListResponsePhase = "http_response_compression"
	RulesetListResponsePhaseHTTPResponseFirewallManaged    RulesetListResponsePhase = "http_response_firewall_managed"
	RulesetListResponsePhaseHTTPResponseHeadersTransform   RulesetListResponsePhase = "http_response_headers_transform"
	RulesetListResponsePhaseMagicTransit                   RulesetListResponsePhase = "magic_transit"
	RulesetListResponsePhaseMagicTransitIDsManaged         RulesetListResponsePhase = "magic_transit_ids_managed"
	RulesetListResponsePhaseMagicTransitManaged            RulesetListResponsePhase = "magic_transit_managed"
)

func (RulesetListResponsePhase) IsKnown

func (r RulesetListResponsePhase) IsKnown() bool

type RulesetNewParams

type RulesetNewParams struct {
	// The kind of the ruleset.
	Kind param.Field[RulesetNewParamsKind] `json:"kind,required"`
	// The human-readable name of the ruleset.
	Name param.Field[string] `json:"name,required"`
	// The phase of the ruleset.
	Phase param.Field[RulesetNewParamsPhase] `json:"phase,required"`
	// The list of rules in the ruleset.
	Rules param.Field[[]RulesetNewParamsRule] `json:"rules,required"`
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// An informative description of the ruleset.
	Description param.Field[string] `json:"description"`
}

func (RulesetNewParams) MarshalJSON

func (r RulesetNewParams) MarshalJSON() (data []byte, err error)

type RulesetNewParamsKind

type RulesetNewParamsKind string

The kind of the ruleset.

const (
	RulesetNewParamsKindManaged RulesetNewParamsKind = "managed"
	RulesetNewParamsKindCustom  RulesetNewParamsKind = "custom"
	RulesetNewParamsKindRoot    RulesetNewParamsKind = "root"
	RulesetNewParamsKindZone    RulesetNewParamsKind = "zone"
)

func (RulesetNewParamsKind) IsKnown

func (r RulesetNewParamsKind) IsKnown() bool

type RulesetNewParamsPhase

type RulesetNewParamsPhase string

The phase of the ruleset.

const (
	RulesetNewParamsPhaseDDOSL4                         RulesetNewParamsPhase = "ddos_l4"
	RulesetNewParamsPhaseDDOSL7                         RulesetNewParamsPhase = "ddos_l7"
	RulesetNewParamsPhaseHTTPConfigSettings             RulesetNewParamsPhase = "http_config_settings"
	RulesetNewParamsPhaseHTTPCustomErrors               RulesetNewParamsPhase = "http_custom_errors"
	RulesetNewParamsPhaseHTTPLogCustomFields            RulesetNewParamsPhase = "http_log_custom_fields"
	RulesetNewParamsPhaseHTTPRatelimit                  RulesetNewParamsPhase = "http_ratelimit"
	RulesetNewParamsPhaseHTTPRequestCacheSettings       RulesetNewParamsPhase = "http_request_cache_settings"
	RulesetNewParamsPhaseHTTPRequestDynamicRedirect     RulesetNewParamsPhase = "http_request_dynamic_redirect"
	RulesetNewParamsPhaseHTTPRequestFirewallCustom      RulesetNewParamsPhase = "http_request_firewall_custom"
	RulesetNewParamsPhaseHTTPRequestFirewallManaged     RulesetNewParamsPhase = "http_request_firewall_managed"
	RulesetNewParamsPhaseHTTPRequestLateTransform       RulesetNewParamsPhase = "http_request_late_transform"
	RulesetNewParamsPhaseHTTPRequestOrigin              RulesetNewParamsPhase = "http_request_origin"
	RulesetNewParamsPhaseHTTPRequestRedirect            RulesetNewParamsPhase = "http_request_redirect"
	RulesetNewParamsPhaseHTTPRequestSanitize            RulesetNewParamsPhase = "http_request_sanitize"
	RulesetNewParamsPhaseHTTPRequestSbfm                RulesetNewParamsPhase = "http_request_sbfm"
	RulesetNewParamsPhaseHTTPRequestSelectConfiguration RulesetNewParamsPhase = "http_request_select_configuration"
	RulesetNewParamsPhaseHTTPRequestTransform           RulesetNewParamsPhase = "http_request_transform"
	RulesetNewParamsPhaseHTTPResponseCompression        RulesetNewParamsPhase = "http_response_compression"
	RulesetNewParamsPhaseHTTPResponseFirewallManaged    RulesetNewParamsPhase = "http_response_firewall_managed"
	RulesetNewParamsPhaseHTTPResponseHeadersTransform   RulesetNewParamsPhase = "http_response_headers_transform"
	RulesetNewParamsPhaseMagicTransit                   RulesetNewParamsPhase = "magic_transit"
	RulesetNewParamsPhaseMagicTransitIDsManaged         RulesetNewParamsPhase = "magic_transit_ids_managed"
	RulesetNewParamsPhaseMagicTransitManaged            RulesetNewParamsPhase = "magic_transit_managed"
)

func (RulesetNewParamsPhase) IsKnown

func (r RulesetNewParamsPhase) IsKnown() bool

type RulesetNewParamsRulesRulesetsBlockRule

type RulesetNewParamsRulesRulesetsBlockRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RulesetNewParamsRulesRulesetsBlockRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RulesetNewParamsRulesRulesetsBlockRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RulesetNewParamsRulesRulesetsBlockRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RulesetNewParamsRulesRulesetsBlockRule) MarshalJSON

func (r RulesetNewParamsRulesRulesetsBlockRule) MarshalJSON() (data []byte, err error)

type RulesetNewParamsRulesRulesetsBlockRuleAction

type RulesetNewParamsRulesRulesetsBlockRuleAction string

The action to perform when the rule matches.

const (
	RulesetNewParamsRulesRulesetsBlockRuleActionBlock RulesetNewParamsRulesRulesetsBlockRuleAction = "block"
)

func (RulesetNewParamsRulesRulesetsBlockRuleAction) IsKnown

type RulesetNewParamsRulesRulesetsBlockRuleActionParameters

type RulesetNewParamsRulesRulesetsBlockRuleActionParameters struct {
	// The response to show when the block is applied.
	Response param.Field[RulesetNewParamsRulesRulesetsBlockRuleActionParametersResponse] `json:"response"`
}

The parameters configuring the rule's action.

func (RulesetNewParamsRulesRulesetsBlockRuleActionParameters) MarshalJSON

type RulesetNewParamsRulesRulesetsBlockRuleActionParametersResponse

type RulesetNewParamsRulesRulesetsBlockRuleActionParametersResponse struct {
	// The content to return.
	Content param.Field[string] `json:"content,required"`
	// The type of the content to return.
	ContentType param.Field[string] `json:"content_type,required"`
	// The status code to return.
	StatusCode param.Field[int64] `json:"status_code,required"`
}

The response to show when the block is applied.

func (RulesetNewParamsRulesRulesetsBlockRuleActionParametersResponse) MarshalJSON

type RulesetNewParamsRulesRulesetsBlockRuleLogging

type RulesetNewParamsRulesRulesetsBlockRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RulesetNewParamsRulesRulesetsBlockRuleLogging) MarshalJSON

func (r RulesetNewParamsRulesRulesetsBlockRuleLogging) MarshalJSON() (data []byte, err error)

type RulesetNewParamsRulesRulesetsExecuteRule

type RulesetNewParamsRulesRulesetsExecuteRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RulesetNewParamsRulesRulesetsExecuteRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RulesetNewParamsRulesRulesetsExecuteRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RulesetNewParamsRulesRulesetsExecuteRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RulesetNewParamsRulesRulesetsExecuteRule) MarshalJSON

func (r RulesetNewParamsRulesRulesetsExecuteRule) MarshalJSON() (data []byte, err error)

type RulesetNewParamsRulesRulesetsExecuteRuleAction

type RulesetNewParamsRulesRulesetsExecuteRuleAction string

The action to perform when the rule matches.

const (
	RulesetNewParamsRulesRulesetsExecuteRuleActionExecute RulesetNewParamsRulesRulesetsExecuteRuleAction = "execute"
)

func (RulesetNewParamsRulesRulesetsExecuteRuleAction) IsKnown

type RulesetNewParamsRulesRulesetsExecuteRuleActionParameters

type RulesetNewParamsRulesRulesetsExecuteRuleActionParameters struct {
	// The ID of the ruleset to execute.
	ID param.Field[string] `json:"id,required"`
	// The configuration to use for matched data logging.
	MatchedData param.Field[RulesetNewParamsRulesRulesetsExecuteRuleActionParametersMatchedData] `json:"matched_data"`
	// A set of overrides to apply to the target ruleset.
	Overrides param.Field[RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverrides] `json:"overrides"`
}

The parameters configuring the rule's action.

func (RulesetNewParamsRulesRulesetsExecuteRuleActionParameters) MarshalJSON

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersMatchedData

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersMatchedData struct {
	// The public key to encrypt matched data logs with.
	PublicKey param.Field[string] `json:"public_key,required"`
}

The configuration to use for matched data logging.

func (RulesetNewParamsRulesRulesetsExecuteRuleActionParametersMatchedData) MarshalJSON

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverrides

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverrides struct {
	// An action to override all rules with. This option has lower precedence than rule
	// and category overrides.
	Action param.Field[string] `json:"action"`
	// A list of category-level overrides. This option has the second-highest
	// precedence after rule-level overrides.
	Categories param.Field[[]RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory] `json:"categories"`
	// Whether to enable execution of all rules. This option has lower precedence than
	// rule and category overrides.
	Enabled param.Field[bool] `json:"enabled"`
	// A list of rule-level overrides. This option has the highest precedence.
	Rules param.Field[[]RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRule] `json:"rules"`
	// 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.
	SensitivityLevel param.Field[RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel] `json:"sensitivity_level"`
}

A set of overrides to apply to the target ruleset.

func (RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverrides) MarshalJSON

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel string

The sensitivity level to use for rules in the category.

const (
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelDefault RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "default"
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelMedium  RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "medium"
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelLow     RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "low"
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelEoff    RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "eoff"
)

func (RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory struct {
	// The name of the category to override.
	Category param.Field[string] `json:"category,required"`
	// The action to override rules in the category with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of rules in the category.
	Enabled param.Field[bool] `json:"enabled"`
	// The sensitivity level to use for rules in the category.
	SensitivityLevel param.Field[RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel] `json:"sensitivity_level"`
}

A category-level override

func (RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory) MarshalJSON

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRule

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRule struct {
	// The ID of the rule to override.
	ID param.Field[string] `json:"id,required"`
	// The action to override the rule with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of the rule.
	Enabled param.Field[bool] `json:"enabled"`
	// The score threshold to use for the rule.
	ScoreThreshold param.Field[int64] `json:"score_threshold"`
	// The sensitivity level to use for the rule.
	SensitivityLevel param.Field[RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel] `json:"sensitivity_level"`
}

A rule-level override

func (RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRule) MarshalJSON

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel string

The sensitivity level to use for the rule.

const (
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelDefault RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "default"
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelMedium  RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "medium"
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelLow     RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "low"
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelEoff    RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "eoff"
)

func (RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel

type RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel string

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 (
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelDefault RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "default"
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelMedium  RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "medium"
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelLow     RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "low"
	RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelEoff    RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "eoff"
)

func (RulesetNewParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown

type RulesetNewParamsRulesRulesetsExecuteRuleLogging

type RulesetNewParamsRulesRulesetsExecuteRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RulesetNewParamsRulesRulesetsExecuteRuleLogging) MarshalJSON

func (r RulesetNewParamsRulesRulesetsExecuteRuleLogging) MarshalJSON() (data []byte, err error)

type RulesetNewParamsRulesRulesetsLogRule

type RulesetNewParamsRulesRulesetsLogRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RulesetNewParamsRulesRulesetsLogRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[interface{}] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RulesetNewParamsRulesRulesetsLogRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RulesetNewParamsRulesRulesetsLogRule) MarshalJSON

func (r RulesetNewParamsRulesRulesetsLogRule) MarshalJSON() (data []byte, err error)

type RulesetNewParamsRulesRulesetsLogRuleAction

type RulesetNewParamsRulesRulesetsLogRuleAction string

The action to perform when the rule matches.

const (
	RulesetNewParamsRulesRulesetsLogRuleActionLog RulesetNewParamsRulesRulesetsLogRuleAction = "log"
)

func (RulesetNewParamsRulesRulesetsLogRuleAction) IsKnown

type RulesetNewParamsRulesRulesetsLogRuleLogging

type RulesetNewParamsRulesRulesetsLogRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RulesetNewParamsRulesRulesetsLogRuleLogging) MarshalJSON

func (r RulesetNewParamsRulesRulesetsLogRuleLogging) MarshalJSON() (data []byte, err error)

type RulesetNewParamsRulesRulesetsSkipRule

type RulesetNewParamsRulesRulesetsSkipRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RulesetNewParamsRulesRulesetsSkipRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RulesetNewParamsRulesRulesetsSkipRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RulesetNewParamsRulesRulesetsSkipRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RulesetNewParamsRulesRulesetsSkipRule) MarshalJSON

func (r RulesetNewParamsRulesRulesetsSkipRule) MarshalJSON() (data []byte, err error)

type RulesetNewParamsRulesRulesetsSkipRuleAction

type RulesetNewParamsRulesRulesetsSkipRuleAction string

The action to perform when the rule matches.

const (
	RulesetNewParamsRulesRulesetsSkipRuleActionSkip RulesetNewParamsRulesRulesetsSkipRuleAction = "skip"
)

func (RulesetNewParamsRulesRulesetsSkipRuleAction) IsKnown

type RulesetNewParamsRulesRulesetsSkipRuleActionParameters

type RulesetNewParamsRulesRulesetsSkipRuleActionParameters struct {
	// A list of phases to skip the execution of. This option is incompatible with the
	// ruleset and rulesets options.
	Phases param.Field[[]RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase] `json:"phases"`
	// A list of legacy security products to skip the execution of.
	Products param.Field[[]RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct] `json:"products"`
	// 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.
	Rules param.Field[map[string][]string] `json:"rules"`
	// A ruleset to skip the execution of. This option is incompatible with the
	// rulesets, rules and phases options.
	Ruleset param.Field[RulesetNewParamsRulesRulesetsSkipRuleActionParametersRuleset] `json:"ruleset"`
	// A list of ruleset IDs to skip the execution of. This option is incompatible with
	// the ruleset and phases options.
	Rulesets param.Field[[]string] `json:"rulesets"`
}

The parameters configuring the rule's action.

func (RulesetNewParamsRulesRulesetsSkipRuleActionParameters) MarshalJSON

type RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase

type RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase string

A phase to skip the execution of.

const (
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseDDOSL4                         RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "ddos_l4"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseDDOSL7                         RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "ddos_l7"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPConfigSettings             RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_config_settings"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPCustomErrors               RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_custom_errors"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPLogCustomFields            RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_log_custom_fields"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRatelimit                  RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_ratelimit"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestCacheSettings       RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_cache_settings"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestDynamicRedirect     RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_dynamic_redirect"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallCustom      RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_firewall_custom"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallManaged     RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_firewall_managed"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestLateTransform       RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_late_transform"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestOrigin              RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_origin"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestRedirect            RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_redirect"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSanitize            RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_sanitize"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSbfm                RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_sbfm"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSelectConfiguration RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_select_configuration"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestTransform           RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_transform"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseCompression        RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_response_compression"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseFirewallManaged    RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_response_firewall_managed"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseHeadersTransform   RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "http_response_headers_transform"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseMagicTransit                   RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "magic_transit"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseMagicTransitIDsManaged         RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "magic_transit_ids_managed"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhaseMagicTransitManaged            RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase = "magic_transit_managed"
)

func (RulesetNewParamsRulesRulesetsSkipRuleActionParametersPhase) IsKnown

type RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct

type RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct string

The name of a legacy security product to skip the execution of.

const (
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersProductBic           RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct = "bic"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersProductHot           RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct = "hot"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersProductRateLimit     RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct = "rateLimit"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersProductSecurityLevel RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct = "securityLevel"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersProductUABlock       RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct = "uaBlock"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersProductWAF           RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct = "waf"
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersProductZoneLockdown  RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct = "zoneLockdown"
)

func (RulesetNewParamsRulesRulesetsSkipRuleActionParametersProduct) IsKnown

type RulesetNewParamsRulesRulesetsSkipRuleActionParametersRuleset

type RulesetNewParamsRulesRulesetsSkipRuleActionParametersRuleset string

A ruleset to skip the execution of. This option is incompatible with the rulesets, rules and phases options.

const (
	RulesetNewParamsRulesRulesetsSkipRuleActionParametersRulesetCurrent RulesetNewParamsRulesRulesetsSkipRuleActionParametersRuleset = "current"
)

func (RulesetNewParamsRulesRulesetsSkipRuleActionParametersRuleset) IsKnown

type RulesetNewParamsRulesRulesetsSkipRuleLogging

type RulesetNewParamsRulesRulesetsSkipRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RulesetNewParamsRulesRulesetsSkipRuleLogging) MarshalJSON

func (r RulesetNewParamsRulesRulesetsSkipRuleLogging) MarshalJSON() (data []byte, err error)

type RulesetNewResponseEnvelope

type RulesetNewResponseEnvelope struct {
	// A list of error messages.
	Errors []RulesetNewResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []RulesetNewResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success RulesetNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    rulesetNewResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*RulesetNewResponseEnvelope) UnmarshalJSON

func (r *RulesetNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RulesetNewResponseEnvelopeErrors

type RulesetNewResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RulesetNewResponseEnvelopeErrorsSource `json:"source"`
	JSON   rulesetNewResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*RulesetNewResponseEnvelopeErrors) UnmarshalJSON

func (r *RulesetNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RulesetNewResponseEnvelopeErrorsSource

type RulesetNewResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                     `json:"pointer,required"`
	JSON    rulesetNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*RulesetNewResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *RulesetNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type RulesetNewResponseEnvelopeMessages

type RulesetNewResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RulesetNewResponseEnvelopeMessagesSource `json:"source"`
	JSON   rulesetNewResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*RulesetNewResponseEnvelopeMessages) UnmarshalJSON

func (r *RulesetNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RulesetNewResponseEnvelopeMessagesSource

type RulesetNewResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                       `json:"pointer,required"`
	JSON    rulesetNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*RulesetNewResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *RulesetNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type RulesetNewResponseEnvelopeSuccess

type RulesetNewResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	RulesetNewResponseEnvelopeSuccessTrue RulesetNewResponseEnvelopeSuccess = true
)

func (RulesetNewResponseEnvelopeSuccess) IsKnown

type RulesetService

type RulesetService struct {
	Options  []option.RequestOption
	Phases   *PhaseService
	Rules    *RuleService
	Versions *VersionService
}

RulesetService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRulesetService method instead.

func NewRulesetService

func NewRulesetService(opts ...option.RequestOption) (r *RulesetService)

NewRulesetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RulesetService) Delete

func (r *RulesetService) Delete(ctx context.Context, rulesetID string, body RulesetDeleteParams, opts ...option.RequestOption) (err error)

Deletes all versions of an existing account or zone ruleset.

func (*RulesetService) Get

func (r *RulesetService) Get(ctx context.Context, rulesetID string, query RulesetGetParams, opts ...option.RequestOption) (res *RulesetsRulesetResponse, err error)

Fetches the latest version of an account or zone ruleset.

func (*RulesetService) List

Fetches all rulesets.

func (*RulesetService) New

Creates a ruleset.

func (*RulesetService) Update

func (r *RulesetService) Update(ctx context.Context, rulesetID string, params RulesetUpdateParams, opts ...option.RequestOption) (res *RulesetsRulesetResponse, err error)

Updates an account or zone ruleset, creating a new version.

type RulesetUpdateParams

type RulesetUpdateParams struct {
	// The unique ID of the ruleset.
	ID param.Field[string] `json:"id,required"`
	// The list of rules in the ruleset.
	Rules param.Field[[]RulesetUpdateParamsRule] `json:"rules,required"`
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
	// An informative description of the ruleset.
	Description param.Field[string] `json:"description"`
	// The kind of the ruleset.
	Kind param.Field[RulesetUpdateParamsKind] `json:"kind"`
	// The human-readable name of the ruleset.
	Name param.Field[string] `json:"name"`
	// The phase of the ruleset.
	Phase param.Field[RulesetUpdateParamsPhase] `json:"phase"`
}

func (RulesetUpdateParams) MarshalJSON

func (r RulesetUpdateParams) MarshalJSON() (data []byte, err error)

type RulesetUpdateParamsKind

type RulesetUpdateParamsKind string

The kind of the ruleset.

const (
	RulesetUpdateParamsKindManaged RulesetUpdateParamsKind = "managed"
	RulesetUpdateParamsKindCustom  RulesetUpdateParamsKind = "custom"
	RulesetUpdateParamsKindRoot    RulesetUpdateParamsKind = "root"
	RulesetUpdateParamsKindZone    RulesetUpdateParamsKind = "zone"
)

func (RulesetUpdateParamsKind) IsKnown

func (r RulesetUpdateParamsKind) IsKnown() bool

type RulesetUpdateParamsPhase

type RulesetUpdateParamsPhase string

The phase of the ruleset.

const (
	RulesetUpdateParamsPhaseDDOSL4                         RulesetUpdateParamsPhase = "ddos_l4"
	RulesetUpdateParamsPhaseDDOSL7                         RulesetUpdateParamsPhase = "ddos_l7"
	RulesetUpdateParamsPhaseHTTPConfigSettings             RulesetUpdateParamsPhase = "http_config_settings"
	RulesetUpdateParamsPhaseHTTPCustomErrors               RulesetUpdateParamsPhase = "http_custom_errors"
	RulesetUpdateParamsPhaseHTTPLogCustomFields            RulesetUpdateParamsPhase = "http_log_custom_fields"
	RulesetUpdateParamsPhaseHTTPRatelimit                  RulesetUpdateParamsPhase = "http_ratelimit"
	RulesetUpdateParamsPhaseHTTPRequestCacheSettings       RulesetUpdateParamsPhase = "http_request_cache_settings"
	RulesetUpdateParamsPhaseHTTPRequestDynamicRedirect     RulesetUpdateParamsPhase = "http_request_dynamic_redirect"
	RulesetUpdateParamsPhaseHTTPRequestFirewallCustom      RulesetUpdateParamsPhase = "http_request_firewall_custom"
	RulesetUpdateParamsPhaseHTTPRequestFirewallManaged     RulesetUpdateParamsPhase = "http_request_firewall_managed"
	RulesetUpdateParamsPhaseHTTPRequestLateTransform       RulesetUpdateParamsPhase = "http_request_late_transform"
	RulesetUpdateParamsPhaseHTTPRequestOrigin              RulesetUpdateParamsPhase = "http_request_origin"
	RulesetUpdateParamsPhaseHTTPRequestRedirect            RulesetUpdateParamsPhase = "http_request_redirect"
	RulesetUpdateParamsPhaseHTTPRequestSanitize            RulesetUpdateParamsPhase = "http_request_sanitize"
	RulesetUpdateParamsPhaseHTTPRequestSbfm                RulesetUpdateParamsPhase = "http_request_sbfm"
	RulesetUpdateParamsPhaseHTTPRequestSelectConfiguration RulesetUpdateParamsPhase = "http_request_select_configuration"
	RulesetUpdateParamsPhaseHTTPRequestTransform           RulesetUpdateParamsPhase = "http_request_transform"
	RulesetUpdateParamsPhaseHTTPResponseCompression        RulesetUpdateParamsPhase = "http_response_compression"
	RulesetUpdateParamsPhaseHTTPResponseFirewallManaged    RulesetUpdateParamsPhase = "http_response_firewall_managed"
	RulesetUpdateParamsPhaseHTTPResponseHeadersTransform   RulesetUpdateParamsPhase = "http_response_headers_transform"
	RulesetUpdateParamsPhaseMagicTransit                   RulesetUpdateParamsPhase = "magic_transit"
	RulesetUpdateParamsPhaseMagicTransitIDsManaged         RulesetUpdateParamsPhase = "magic_transit_ids_managed"
	RulesetUpdateParamsPhaseMagicTransitManaged            RulesetUpdateParamsPhase = "magic_transit_managed"
)

func (RulesetUpdateParamsPhase) IsKnown

func (r RulesetUpdateParamsPhase) IsKnown() bool

type RulesetUpdateParamsRulesRulesetsBlockRule

type RulesetUpdateParamsRulesRulesetsBlockRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RulesetUpdateParamsRulesRulesetsBlockRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RulesetUpdateParamsRulesRulesetsBlockRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RulesetUpdateParamsRulesRulesetsBlockRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RulesetUpdateParamsRulesRulesetsBlockRule) MarshalJSON

func (r RulesetUpdateParamsRulesRulesetsBlockRule) MarshalJSON() (data []byte, err error)

type RulesetUpdateParamsRulesRulesetsBlockRuleAction

type RulesetUpdateParamsRulesRulesetsBlockRuleAction string

The action to perform when the rule matches.

const (
	RulesetUpdateParamsRulesRulesetsBlockRuleActionBlock RulesetUpdateParamsRulesRulesetsBlockRuleAction = "block"
)

func (RulesetUpdateParamsRulesRulesetsBlockRuleAction) IsKnown

type RulesetUpdateParamsRulesRulesetsBlockRuleActionParameters

type RulesetUpdateParamsRulesRulesetsBlockRuleActionParameters struct {
	// The response to show when the block is applied.
	Response param.Field[RulesetUpdateParamsRulesRulesetsBlockRuleActionParametersResponse] `json:"response"`
}

The parameters configuring the rule's action.

func (RulesetUpdateParamsRulesRulesetsBlockRuleActionParameters) MarshalJSON

type RulesetUpdateParamsRulesRulesetsBlockRuleActionParametersResponse

type RulesetUpdateParamsRulesRulesetsBlockRuleActionParametersResponse struct {
	// The content to return.
	Content param.Field[string] `json:"content,required"`
	// The type of the content to return.
	ContentType param.Field[string] `json:"content_type,required"`
	// The status code to return.
	StatusCode param.Field[int64] `json:"status_code,required"`
}

The response to show when the block is applied.

func (RulesetUpdateParamsRulesRulesetsBlockRuleActionParametersResponse) MarshalJSON

type RulesetUpdateParamsRulesRulesetsBlockRuleLogging

type RulesetUpdateParamsRulesRulesetsBlockRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RulesetUpdateParamsRulesRulesetsBlockRuleLogging) MarshalJSON

func (r RulesetUpdateParamsRulesRulesetsBlockRuleLogging) MarshalJSON() (data []byte, err error)

type RulesetUpdateParamsRulesRulesetsExecuteRule

type RulesetUpdateParamsRulesRulesetsExecuteRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RulesetUpdateParamsRulesRulesetsExecuteRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RulesetUpdateParamsRulesRulesetsExecuteRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RulesetUpdateParamsRulesRulesetsExecuteRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RulesetUpdateParamsRulesRulesetsExecuteRule) MarshalJSON

func (r RulesetUpdateParamsRulesRulesetsExecuteRule) MarshalJSON() (data []byte, err error)

type RulesetUpdateParamsRulesRulesetsExecuteRuleAction

type RulesetUpdateParamsRulesRulesetsExecuteRuleAction string

The action to perform when the rule matches.

const (
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionExecute RulesetUpdateParamsRulesRulesetsExecuteRuleAction = "execute"
)

func (RulesetUpdateParamsRulesRulesetsExecuteRuleAction) IsKnown

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParameters

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParameters struct {
	// The ID of the ruleset to execute.
	ID param.Field[string] `json:"id,required"`
	// The configuration to use for matched data logging.
	MatchedData param.Field[RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersMatchedData] `json:"matched_data"`
	// A set of overrides to apply to the target ruleset.
	Overrides param.Field[RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverrides] `json:"overrides"`
}

The parameters configuring the rule's action.

func (RulesetUpdateParamsRulesRulesetsExecuteRuleActionParameters) MarshalJSON

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersMatchedData

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersMatchedData struct {
	// The public key to encrypt matched data logs with.
	PublicKey param.Field[string] `json:"public_key,required"`
}

The configuration to use for matched data logging.

func (RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersMatchedData) MarshalJSON

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverrides

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverrides struct {
	// An action to override all rules with. This option has lower precedence than rule
	// and category overrides.
	Action param.Field[string] `json:"action"`
	// A list of category-level overrides. This option has the second-highest
	// precedence after rule-level overrides.
	Categories param.Field[[]RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory] `json:"categories"`
	// Whether to enable execution of all rules. This option has lower precedence than
	// rule and category overrides.
	Enabled param.Field[bool] `json:"enabled"`
	// A list of rule-level overrides. This option has the highest precedence.
	Rules param.Field[[]RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRule] `json:"rules"`
	// 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.
	SensitivityLevel param.Field[RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel] `json:"sensitivity_level"`
}

A set of overrides to apply to the target ruleset.

func (RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverrides) MarshalJSON

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel string

The sensitivity level to use for rules in the category.

const (
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelDefault RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "default"
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelMedium  RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "medium"
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelLow     RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "low"
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelEoff    RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "eoff"
)

func (RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory struct {
	// The name of the category to override.
	Category param.Field[string] `json:"category,required"`
	// The action to override rules in the category with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of rules in the category.
	Enabled param.Field[bool] `json:"enabled"`
	// The sensitivity level to use for rules in the category.
	SensitivityLevel param.Field[RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel] `json:"sensitivity_level"`
}

A category-level override

func (RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesCategory) MarshalJSON

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRule

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRule struct {
	// The ID of the rule to override.
	ID param.Field[string] `json:"id,required"`
	// The action to override the rule with.
	Action param.Field[string] `json:"action"`
	// Whether to enable execution of the rule.
	Enabled param.Field[bool] `json:"enabled"`
	// The score threshold to use for the rule.
	ScoreThreshold param.Field[int64] `json:"score_threshold"`
	// The sensitivity level to use for the rule.
	SensitivityLevel param.Field[RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel] `json:"sensitivity_level"`
}

A rule-level override

func (RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRule) MarshalJSON

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel string

The sensitivity level to use for the rule.

const (
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelDefault RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "default"
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelMedium  RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "medium"
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelLow     RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "low"
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelEoff    RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "eoff"
)

func (RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel

type RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel string

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 (
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelDefault RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "default"
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelMedium  RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "medium"
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelLow     RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "low"
	RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelEoff    RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "eoff"
)

func (RulesetUpdateParamsRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown

type RulesetUpdateParamsRulesRulesetsExecuteRuleLogging

type RulesetUpdateParamsRulesRulesetsExecuteRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RulesetUpdateParamsRulesRulesetsExecuteRuleLogging) MarshalJSON

func (r RulesetUpdateParamsRulesRulesetsExecuteRuleLogging) MarshalJSON() (data []byte, err error)

type RulesetUpdateParamsRulesRulesetsLogRule

type RulesetUpdateParamsRulesRulesetsLogRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RulesetUpdateParamsRulesRulesetsLogRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[interface{}] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RulesetUpdateParamsRulesRulesetsLogRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RulesetUpdateParamsRulesRulesetsLogRule) MarshalJSON

func (r RulesetUpdateParamsRulesRulesetsLogRule) MarshalJSON() (data []byte, err error)

type RulesetUpdateParamsRulesRulesetsLogRuleAction

type RulesetUpdateParamsRulesRulesetsLogRuleAction string

The action to perform when the rule matches.

const (
	RulesetUpdateParamsRulesRulesetsLogRuleActionLog RulesetUpdateParamsRulesRulesetsLogRuleAction = "log"
)

func (RulesetUpdateParamsRulesRulesetsLogRuleAction) IsKnown

type RulesetUpdateParamsRulesRulesetsLogRuleLogging

type RulesetUpdateParamsRulesRulesetsLogRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RulesetUpdateParamsRulesRulesetsLogRuleLogging) MarshalJSON

func (r RulesetUpdateParamsRulesRulesetsLogRuleLogging) MarshalJSON() (data []byte, err error)

type RulesetUpdateParamsRulesRulesetsSkipRule

type RulesetUpdateParamsRulesRulesetsSkipRule struct {
	// The unique ID of the rule.
	ID param.Field[string] `json:"id"`
	// The action to perform when the rule matches.
	Action param.Field[RulesetUpdateParamsRulesRulesetsSkipRuleAction] `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters param.Field[RulesetUpdateParamsRulesRulesetsSkipRuleActionParameters] `json:"action_parameters"`
	// An informative description of the rule.
	Description param.Field[string] `json:"description"`
	// Whether the rule should be executed.
	Enabled param.Field[bool] `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression param.Field[string] `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging param.Field[RulesetUpdateParamsRulesRulesetsSkipRuleLogging] `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref param.Field[string] `json:"ref"`
}

func (RulesetUpdateParamsRulesRulesetsSkipRule) MarshalJSON

func (r RulesetUpdateParamsRulesRulesetsSkipRule) MarshalJSON() (data []byte, err error)

type RulesetUpdateParamsRulesRulesetsSkipRuleAction

type RulesetUpdateParamsRulesRulesetsSkipRuleAction string

The action to perform when the rule matches.

const (
	RulesetUpdateParamsRulesRulesetsSkipRuleActionSkip RulesetUpdateParamsRulesRulesetsSkipRuleAction = "skip"
)

func (RulesetUpdateParamsRulesRulesetsSkipRuleAction) IsKnown

type RulesetUpdateParamsRulesRulesetsSkipRuleActionParameters

type RulesetUpdateParamsRulesRulesetsSkipRuleActionParameters struct {
	// A list of phases to skip the execution of. This option is incompatible with the
	// ruleset and rulesets options.
	Phases param.Field[[]RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase] `json:"phases"`
	// A list of legacy security products to skip the execution of.
	Products param.Field[[]RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct] `json:"products"`
	// 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.
	Rules param.Field[map[string][]string] `json:"rules"`
	// A ruleset to skip the execution of. This option is incompatible with the
	// rulesets, rules and phases options.
	Ruleset param.Field[RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset] `json:"ruleset"`
	// A list of ruleset IDs to skip the execution of. This option is incompatible with
	// the ruleset and phases options.
	Rulesets param.Field[[]string] `json:"rulesets"`
}

The parameters configuring the rule's action.

func (RulesetUpdateParamsRulesRulesetsSkipRuleActionParameters) MarshalJSON

type RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase

type RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase string

A phase to skip the execution of.

const (
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseDDOSL4                         RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "ddos_l4"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseDDOSL7                         RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "ddos_l7"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPConfigSettings             RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_config_settings"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPCustomErrors               RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_custom_errors"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPLogCustomFields            RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_log_custom_fields"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRatelimit                  RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_ratelimit"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestCacheSettings       RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_cache_settings"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestDynamicRedirect     RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_dynamic_redirect"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallCustom      RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_firewall_custom"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallManaged     RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_firewall_managed"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestLateTransform       RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_late_transform"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestOrigin              RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_origin"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestRedirect            RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_redirect"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSanitize            RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_sanitize"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSbfm                RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_sbfm"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSelectConfiguration RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_select_configuration"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestTransform           RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_request_transform"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseCompression        RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_response_compression"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseFirewallManaged    RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_response_firewall_managed"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseHeadersTransform   RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "http_response_headers_transform"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseMagicTransit                   RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "magic_transit"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseMagicTransitIDsManaged         RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "magic_transit_ids_managed"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhaseMagicTransitManaged            RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase = "magic_transit_managed"
)

func (RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersPhase) IsKnown

type RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct

type RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct string

The name of a legacy security product to skip the execution of.

const (
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProductBic           RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "bic"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProductHot           RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "hot"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProductRateLimit     RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "rateLimit"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProductSecurityLevel RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "securityLevel"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProductUABlock       RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "uaBlock"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProductWAF           RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "waf"
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProductZoneLockdown  RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct = "zoneLockdown"
)

func (RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersProduct) IsKnown

type RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset

type RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset string

A ruleset to skip the execution of. This option is incompatible with the rulesets, rules and phases options.

const (
	RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersRulesetCurrent RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset = "current"
)

func (RulesetUpdateParamsRulesRulesetsSkipRuleActionParametersRuleset) IsKnown

type RulesetUpdateParamsRulesRulesetsSkipRuleLogging

type RulesetUpdateParamsRulesRulesetsSkipRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled param.Field[bool] `json:"enabled,required"`
}

An object configuring the rule's logging behavior.

func (RulesetUpdateParamsRulesRulesetsSkipRuleLogging) MarshalJSON

func (r RulesetUpdateParamsRulesRulesetsSkipRuleLogging) MarshalJSON() (data []byte, err error)

type RulesetUpdateResponseEnvelope

type RulesetUpdateResponseEnvelope struct {
	// A list of error messages.
	Errors []RulesetUpdateResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []RulesetUpdateResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success RulesetUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    rulesetUpdateResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*RulesetUpdateResponseEnvelope) UnmarshalJSON

func (r *RulesetUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RulesetUpdateResponseEnvelopeErrors

type RulesetUpdateResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RulesetUpdateResponseEnvelopeErrorsSource `json:"source"`
	JSON   rulesetUpdateResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*RulesetUpdateResponseEnvelopeErrors) UnmarshalJSON

func (r *RulesetUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RulesetUpdateResponseEnvelopeErrorsSource

type RulesetUpdateResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                        `json:"pointer,required"`
	JSON    rulesetUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*RulesetUpdateResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *RulesetUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type RulesetUpdateResponseEnvelopeMessages

type RulesetUpdateResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source RulesetUpdateResponseEnvelopeMessagesSource `json:"source"`
	JSON   rulesetUpdateResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*RulesetUpdateResponseEnvelopeMessages) UnmarshalJSON

func (r *RulesetUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RulesetUpdateResponseEnvelopeMessagesSource

type RulesetUpdateResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                          `json:"pointer,required"`
	JSON    rulesetUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*RulesetUpdateResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *RulesetUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type RulesetUpdateResponseEnvelopeSuccess

type RulesetUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	RulesetUpdateResponseEnvelopeSuccessTrue RulesetUpdateResponseEnvelopeSuccess = true
)

func (RulesetUpdateResponseEnvelopeSuccess) IsKnown

type RulesetsRulesetResponse

type RulesetsRulesetResponse struct {
	// The unique ID of the ruleset.
	ID string `json:"id,required"`
	// The kind of the ruleset.
	Kind RulesetsRulesetResponseKind `json:"kind,required"`
	// The timestamp of when the ruleset was last modified.
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The human-readable name of the ruleset.
	Name string `json:"name,required"`
	// The phase of the ruleset.
	Phase RulesetsRulesetResponsePhase `json:"phase,required"`
	// The list of rules in the ruleset.
	Rules []RulesetsRulesetResponseRule `json:"rules,required"`
	// The version of the ruleset.
	Version string `json:"version,required"`
	// An informative description of the ruleset.
	Description string                      `json:"description"`
	JSON        rulesetsRulesetResponseJSON `json:"-"`
}

A ruleset object.

func (*RulesetsRulesetResponse) UnmarshalJSON

func (r *RulesetsRulesetResponse) UnmarshalJSON(data []byte) (err error)

type RulesetsRulesetResponseKind

type RulesetsRulesetResponseKind string

The kind of the ruleset.

const (
	RulesetsRulesetResponseKindManaged RulesetsRulesetResponseKind = "managed"
	RulesetsRulesetResponseKindCustom  RulesetsRulesetResponseKind = "custom"
	RulesetsRulesetResponseKindRoot    RulesetsRulesetResponseKind = "root"
	RulesetsRulesetResponseKindZone    RulesetsRulesetResponseKind = "zone"
)

func (RulesetsRulesetResponseKind) IsKnown

func (r RulesetsRulesetResponseKind) IsKnown() bool

type RulesetsRulesetResponsePhase

type RulesetsRulesetResponsePhase string

The phase of the ruleset.

const (
	RulesetsRulesetResponsePhaseDDOSL4                         RulesetsRulesetResponsePhase = "ddos_l4"
	RulesetsRulesetResponsePhaseDDOSL7                         RulesetsRulesetResponsePhase = "ddos_l7"
	RulesetsRulesetResponsePhaseHTTPConfigSettings             RulesetsRulesetResponsePhase = "http_config_settings"
	RulesetsRulesetResponsePhaseHTTPCustomErrors               RulesetsRulesetResponsePhase = "http_custom_errors"
	RulesetsRulesetResponsePhaseHTTPLogCustomFields            RulesetsRulesetResponsePhase = "http_log_custom_fields"
	RulesetsRulesetResponsePhaseHTTPRatelimit                  RulesetsRulesetResponsePhase = "http_ratelimit"
	RulesetsRulesetResponsePhaseHTTPRequestCacheSettings       RulesetsRulesetResponsePhase = "http_request_cache_settings"
	RulesetsRulesetResponsePhaseHTTPRequestDynamicRedirect     RulesetsRulesetResponsePhase = "http_request_dynamic_redirect"
	RulesetsRulesetResponsePhaseHTTPRequestFirewallCustom      RulesetsRulesetResponsePhase = "http_request_firewall_custom"
	RulesetsRulesetResponsePhaseHTTPRequestFirewallManaged     RulesetsRulesetResponsePhase = "http_request_firewall_managed"
	RulesetsRulesetResponsePhaseHTTPRequestLateTransform       RulesetsRulesetResponsePhase = "http_request_late_transform"
	RulesetsRulesetResponsePhaseHTTPRequestOrigin              RulesetsRulesetResponsePhase = "http_request_origin"
	RulesetsRulesetResponsePhaseHTTPRequestRedirect            RulesetsRulesetResponsePhase = "http_request_redirect"
	RulesetsRulesetResponsePhaseHTTPRequestSanitize            RulesetsRulesetResponsePhase = "http_request_sanitize"
	RulesetsRulesetResponsePhaseHTTPRequestSbfm                RulesetsRulesetResponsePhase = "http_request_sbfm"
	RulesetsRulesetResponsePhaseHTTPRequestSelectConfiguration RulesetsRulesetResponsePhase = "http_request_select_configuration"
	RulesetsRulesetResponsePhaseHTTPRequestTransform           RulesetsRulesetResponsePhase = "http_request_transform"
	RulesetsRulesetResponsePhaseHTTPResponseCompression        RulesetsRulesetResponsePhase = "http_response_compression"
	RulesetsRulesetResponsePhaseHTTPResponseFirewallManaged    RulesetsRulesetResponsePhase = "http_response_firewall_managed"
	RulesetsRulesetResponsePhaseHTTPResponseHeadersTransform   RulesetsRulesetResponsePhase = "http_response_headers_transform"
	RulesetsRulesetResponsePhaseMagicTransit                   RulesetsRulesetResponsePhase = "magic_transit"
	RulesetsRulesetResponsePhaseMagicTransitIDsManaged         RulesetsRulesetResponsePhase = "magic_transit_ids_managed"
	RulesetsRulesetResponsePhaseMagicTransitManaged            RulesetsRulesetResponsePhase = "magic_transit_managed"
)

func (RulesetsRulesetResponsePhase) IsKnown

func (r RulesetsRulesetResponsePhase) IsKnown() bool

type RulesetsRulesetResponseRulesRulesetsBlockRule

type RulesetsRulesetResponseRulesRulesetsBlockRule struct {
	// The timestamp of when the rule was last modified.
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The version of the rule.
	Version string `json:"version,required"`
	// The unique ID of the rule.
	ID string `json:"id"`
	// The action to perform when the rule matches.
	Action RulesetsRulesetResponseRulesRulesetsBlockRuleAction `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters RulesetsRulesetResponseRulesRulesetsBlockRuleActionParameters `json:"action_parameters"`
	// The categories of the rule.
	Categories []string `json:"categories"`
	// An informative description of the rule.
	Description string `json:"description"`
	// Whether the rule should be executed.
	Enabled bool `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression string `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging RulesetsRulesetResponseRulesRulesetsBlockRuleLogging `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref  string                                            `json:"ref"`
	JSON rulesetsRulesetResponseRulesRulesetsBlockRuleJSON `json:"-"`
}

func (*RulesetsRulesetResponseRulesRulesetsBlockRule) UnmarshalJSON

func (r *RulesetsRulesetResponseRulesRulesetsBlockRule) UnmarshalJSON(data []byte) (err error)

type RulesetsRulesetResponseRulesRulesetsBlockRuleAction

type RulesetsRulesetResponseRulesRulesetsBlockRuleAction string

The action to perform when the rule matches.

const (
	RulesetsRulesetResponseRulesRulesetsBlockRuleActionBlock RulesetsRulesetResponseRulesRulesetsBlockRuleAction = "block"
)

func (RulesetsRulesetResponseRulesRulesetsBlockRuleAction) IsKnown

type RulesetsRulesetResponseRulesRulesetsBlockRuleActionParameters

type RulesetsRulesetResponseRulesRulesetsBlockRuleActionParameters struct {
	// The response to show when the block is applied.
	Response RulesetsRulesetResponseRulesRulesetsBlockRuleActionParametersResponse `json:"response"`
	JSON     rulesetsRulesetResponseRulesRulesetsBlockRuleActionParametersJSON     `json:"-"`
}

The parameters configuring the rule's action.

func (*RulesetsRulesetResponseRulesRulesetsBlockRuleActionParameters) UnmarshalJSON

type RulesetsRulesetResponseRulesRulesetsBlockRuleActionParametersResponse

type RulesetsRulesetResponseRulesRulesetsBlockRuleActionParametersResponse struct {
	// The content to return.
	Content string `json:"content,required"`
	// The type of the content to return.
	ContentType string `json:"content_type,required"`
	// The status code to return.
	StatusCode int64                                                                     `json:"status_code,required"`
	JSON       rulesetsRulesetResponseRulesRulesetsBlockRuleActionParametersResponseJSON `json:"-"`
}

The response to show when the block is applied.

func (*RulesetsRulesetResponseRulesRulesetsBlockRuleActionParametersResponse) UnmarshalJSON

type RulesetsRulesetResponseRulesRulesetsBlockRuleLogging

type RulesetsRulesetResponseRulesRulesetsBlockRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled bool                                                     `json:"enabled,required"`
	JSON    rulesetsRulesetResponseRulesRulesetsBlockRuleLoggingJSON `json:"-"`
}

An object configuring the rule's logging behavior.

func (*RulesetsRulesetResponseRulesRulesetsBlockRuleLogging) UnmarshalJSON

func (r *RulesetsRulesetResponseRulesRulesetsBlockRuleLogging) UnmarshalJSON(data []byte) (err error)

type RulesetsRulesetResponseRulesRulesetsExecuteRule

type RulesetsRulesetResponseRulesRulesetsExecuteRule struct {
	// The timestamp of when the rule was last modified.
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The version of the rule.
	Version string `json:"version,required"`
	// The unique ID of the rule.
	ID string `json:"id"`
	// The action to perform when the rule matches.
	Action RulesetsRulesetResponseRulesRulesetsExecuteRuleAction `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParameters `json:"action_parameters"`
	// The categories of the rule.
	Categories []string `json:"categories"`
	// An informative description of the rule.
	Description string `json:"description"`
	// Whether the rule should be executed.
	Enabled bool `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression string `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging RulesetsRulesetResponseRulesRulesetsExecuteRuleLogging `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref  string                                              `json:"ref"`
	JSON rulesetsRulesetResponseRulesRulesetsExecuteRuleJSON `json:"-"`
}

func (*RulesetsRulesetResponseRulesRulesetsExecuteRule) UnmarshalJSON

func (r *RulesetsRulesetResponseRulesRulesetsExecuteRule) UnmarshalJSON(data []byte) (err error)

type RulesetsRulesetResponseRulesRulesetsExecuteRuleAction

type RulesetsRulesetResponseRulesRulesetsExecuteRuleAction string

The action to perform when the rule matches.

const (
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionExecute RulesetsRulesetResponseRulesRulesetsExecuteRuleAction = "execute"
)

func (RulesetsRulesetResponseRulesRulesetsExecuteRuleAction) IsKnown

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParameters

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParameters struct {
	// The ID of the ruleset to execute.
	ID string `json:"id,required"`
	// The configuration to use for matched data logging.
	MatchedData RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersMatchedData `json:"matched_data"`
	// A set of overrides to apply to the target ruleset.
	Overrides RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverrides `json:"overrides"`
	JSON      rulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersJSON      `json:"-"`
}

The parameters configuring the rule's action.

func (*RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParameters) UnmarshalJSON

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersMatchedData

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersMatchedData struct {
	// The public key to encrypt matched data logs with.
	PublicKey string                                                                         `json:"public_key,required"`
	JSON      rulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersMatchedDataJSON `json:"-"`
}

The configuration to use for matched data logging.

func (*RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersMatchedData) UnmarshalJSON

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverrides

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverrides struct {
	// An action to override all rules with. This option has lower precedence than rule
	// and category overrides.
	Action string `json:"action"`
	// A list of category-level overrides. This option has the second-highest
	// precedence after rule-level overrides.
	Categories []RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategory `json:"categories"`
	// Whether to enable execution of all rules. This option has lower precedence than
	// rule and category overrides.
	Enabled bool `json:"enabled"`
	// A list of rule-level overrides. This option has the highest precedence.
	Rules []RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRule `json:"rules"`
	// 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.
	SensitivityLevel RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel `json:"sensitivity_level"`
	JSON             rulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesJSON             `json:"-"`
}

A set of overrides to apply to the target ruleset.

func (*RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverrides) UnmarshalJSON

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel string

The sensitivity level to use for rules in the category.

const (
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelDefault RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "default"
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelMedium  RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "medium"
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelLow     RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "low"
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevelEoff    RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "eoff"
)

func (RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategory

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategory struct {
	// The name of the category to override.
	Category string `json:"category,required"`
	// The action to override rules in the category with.
	Action string `json:"action"`
	// Whether to enable execution of rules in the category.
	Enabled bool `json:"enabled"`
	// The sensitivity level to use for rules in the category.
	SensitivityLevel RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoriesSensitivityLevel `json:"sensitivity_level"`
	JSON             rulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategoryJSON               `json:"-"`
}

A category-level override

func (*RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesCategory) UnmarshalJSON

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRule

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRule struct {
	// The ID of the rule to override.
	ID string `json:"id,required"`
	// The action to override the rule with.
	Action string `json:"action"`
	// Whether to enable execution of the rule.
	Enabled bool `json:"enabled"`
	// The score threshold to use for the rule.
	ScoreThreshold int64 `json:"score_threshold"`
	// The sensitivity level to use for the rule.
	SensitivityLevel RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel `json:"sensitivity_level"`
	JSON             rulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRuleJSON              `json:"-"`
}

A rule-level override

func (*RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRule) UnmarshalJSON

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel string

The sensitivity level to use for the rule.

const (
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelDefault RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "default"
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelMedium  RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "medium"
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelLow     RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "low"
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevelEoff    RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel = "eoff"
)

func (RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel

type RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel string

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 (
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelDefault RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "default"
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelMedium  RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "medium"
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelLow     RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "low"
	RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevelEoff    RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel = "eoff"
)

func (RulesetsRulesetResponseRulesRulesetsExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown

type RulesetsRulesetResponseRulesRulesetsExecuteRuleLogging

type RulesetsRulesetResponseRulesRulesetsExecuteRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled bool                                                       `json:"enabled,required"`
	JSON    rulesetsRulesetResponseRulesRulesetsExecuteRuleLoggingJSON `json:"-"`
}

An object configuring the rule's logging behavior.

func (*RulesetsRulesetResponseRulesRulesetsExecuteRuleLogging) UnmarshalJSON

func (r *RulesetsRulesetResponseRulesRulesetsExecuteRuleLogging) UnmarshalJSON(data []byte) (err error)

type RulesetsRulesetResponseRulesRulesetsLogRule

type RulesetsRulesetResponseRulesRulesetsLogRule struct {
	// The timestamp of when the rule was last modified.
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The version of the rule.
	Version string `json:"version,required"`
	// The unique ID of the rule.
	ID string `json:"id"`
	// The action to perform when the rule matches.
	Action RulesetsRulesetResponseRulesRulesetsLogRuleAction `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters interface{} `json:"action_parameters"`
	// The categories of the rule.
	Categories []string `json:"categories"`
	// An informative description of the rule.
	Description string `json:"description"`
	// Whether the rule should be executed.
	Enabled bool `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression string `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging RulesetsRulesetResponseRulesRulesetsLogRuleLogging `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref  string                                          `json:"ref"`
	JSON rulesetsRulesetResponseRulesRulesetsLogRuleJSON `json:"-"`
}

func (*RulesetsRulesetResponseRulesRulesetsLogRule) UnmarshalJSON

func (r *RulesetsRulesetResponseRulesRulesetsLogRule) UnmarshalJSON(data []byte) (err error)

type RulesetsRulesetResponseRulesRulesetsLogRuleAction

type RulesetsRulesetResponseRulesRulesetsLogRuleAction string

The action to perform when the rule matches.

const (
	RulesetsRulesetResponseRulesRulesetsLogRuleActionLog RulesetsRulesetResponseRulesRulesetsLogRuleAction = "log"
)

func (RulesetsRulesetResponseRulesRulesetsLogRuleAction) IsKnown

type RulesetsRulesetResponseRulesRulesetsLogRuleLogging

type RulesetsRulesetResponseRulesRulesetsLogRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled bool                                                   `json:"enabled,required"`
	JSON    rulesetsRulesetResponseRulesRulesetsLogRuleLoggingJSON `json:"-"`
}

An object configuring the rule's logging behavior.

func (*RulesetsRulesetResponseRulesRulesetsLogRuleLogging) UnmarshalJSON

func (r *RulesetsRulesetResponseRulesRulesetsLogRuleLogging) UnmarshalJSON(data []byte) (err error)

type RulesetsRulesetResponseRulesRulesetsSkipRule

type RulesetsRulesetResponseRulesRulesetsSkipRule struct {
	// The timestamp of when the rule was last modified.
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The version of the rule.
	Version string `json:"version,required"`
	// The unique ID of the rule.
	ID string `json:"id"`
	// The action to perform when the rule matches.
	Action RulesetsRulesetResponseRulesRulesetsSkipRuleAction `json:"action"`
	// The parameters configuring the rule's action.
	ActionParameters RulesetsRulesetResponseRulesRulesetsSkipRuleActionParameters `json:"action_parameters"`
	// The categories of the rule.
	Categories []string `json:"categories"`
	// An informative description of the rule.
	Description string `json:"description"`
	// Whether the rule should be executed.
	Enabled bool `json:"enabled"`
	// The expression defining which traffic will match the rule.
	Expression string `json:"expression"`
	// An object configuring the rule's logging behavior.
	Logging RulesetsRulesetResponseRulesRulesetsSkipRuleLogging `json:"logging"`
	// The reference of the rule (the rule ID by default).
	Ref  string                                           `json:"ref"`
	JSON rulesetsRulesetResponseRulesRulesetsSkipRuleJSON `json:"-"`
}

func (*RulesetsRulesetResponseRulesRulesetsSkipRule) UnmarshalJSON

func (r *RulesetsRulesetResponseRulesRulesetsSkipRule) UnmarshalJSON(data []byte) (err error)

type RulesetsRulesetResponseRulesRulesetsSkipRuleAction

type RulesetsRulesetResponseRulesRulesetsSkipRuleAction string

The action to perform when the rule matches.

const (
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionSkip RulesetsRulesetResponseRulesRulesetsSkipRuleAction = "skip"
)

func (RulesetsRulesetResponseRulesRulesetsSkipRuleAction) IsKnown

type RulesetsRulesetResponseRulesRulesetsSkipRuleActionParameters

type RulesetsRulesetResponseRulesRulesetsSkipRuleActionParameters struct {
	// A list of phases to skip the execution of. This option is incompatible with the
	// ruleset and rulesets options.
	Phases []RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase `json:"phases"`
	// A list of legacy security products to skip the execution of.
	Products []RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct `json:"products"`
	// 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.
	Rules map[string][]string `json:"rules"`
	// A ruleset to skip the execution of. This option is incompatible with the
	// rulesets, rules and phases options.
	Ruleset RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersRuleset `json:"ruleset"`
	// A list of ruleset IDs to skip the execution of. This option is incompatible with
	// the ruleset and phases options.
	Rulesets []string                                                         `json:"rulesets"`
	JSON     rulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersJSON `json:"-"`
}

The parameters configuring the rule's action.

func (*RulesetsRulesetResponseRulesRulesetsSkipRuleActionParameters) UnmarshalJSON

type RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase

type RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase string

A phase to skip the execution of.

const (
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseDDOSL4                         RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "ddos_l4"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseDDOSL7                         RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "ddos_l7"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPConfigSettings             RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_config_settings"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPCustomErrors               RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_custom_errors"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPLogCustomFields            RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_log_custom_fields"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRatelimit                  RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_ratelimit"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestCacheSettings       RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_cache_settings"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestDynamicRedirect     RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_dynamic_redirect"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallCustom      RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_firewall_custom"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestFirewallManaged     RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_firewall_managed"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestLateTransform       RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_late_transform"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestOrigin              RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_origin"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestRedirect            RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_redirect"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSanitize            RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_sanitize"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSbfm                RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_sbfm"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestSelectConfiguration RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_select_configuration"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPRequestTransform           RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_request_transform"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseCompression        RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_response_compression"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseFirewallManaged    RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_response_firewall_managed"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseHTTPResponseHeadersTransform   RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "http_response_headers_transform"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseMagicTransit                   RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "magic_transit"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseMagicTransitIDsManaged         RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "magic_transit_ids_managed"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhaseMagicTransitManaged            RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase = "magic_transit_managed"
)

func (RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersPhase) IsKnown

type RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct

type RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct string

The name of a legacy security product to skip the execution of.

const (
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProductBic           RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct = "bic"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProductHot           RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct = "hot"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProductRateLimit     RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct = "rateLimit"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProductSecurityLevel RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct = "securityLevel"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProductUABlock       RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct = "uaBlock"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProductWAF           RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct = "waf"
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProductZoneLockdown  RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct = "zoneLockdown"
)

func (RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersProduct) IsKnown

type RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersRuleset

type RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersRuleset string

A ruleset to skip the execution of. This option is incompatible with the rulesets, rules and phases options.

const (
	RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersRulesetCurrent RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersRuleset = "current"
)

func (RulesetsRulesetResponseRulesRulesetsSkipRuleActionParametersRuleset) IsKnown

type RulesetsRulesetResponseRulesRulesetsSkipRuleLogging

type RulesetsRulesetResponseRulesRulesetsSkipRuleLogging struct {
	// Whether to generate a log when the rule matches.
	Enabled bool                                                    `json:"enabled,required"`
	JSON    rulesetsRulesetResponseRulesRulesetsSkipRuleLoggingJSON `json:"-"`
}

An object configuring the rule's logging behavior.

func (*RulesetsRulesetResponseRulesRulesetsSkipRuleLogging) UnmarshalJSON

func (r *RulesetsRulesetResponseRulesRulesetsSkipRuleLogging) UnmarshalJSON(data []byte) (err error)

type RulesetsRulesetsResponse

type RulesetsRulesetsResponse []RulesetsRulesetsResponse

type VersionByTagGetParams

type VersionByTagGetParams struct {
	// The unique ID of the account.
	AccountID param.Field[string] `path:"account_id,required"`
}

type VersionByTagGetResponseEnvelope

type VersionByTagGetResponseEnvelope struct {
	// A list of error messages.
	Errors []VersionByTagGetResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []VersionByTagGetResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success VersionByTagGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    versionByTagGetResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*VersionByTagGetResponseEnvelope) UnmarshalJSON

func (r *VersionByTagGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type VersionByTagGetResponseEnvelopeErrors

type VersionByTagGetResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source VersionByTagGetResponseEnvelopeErrorsSource `json:"source"`
	JSON   versionByTagGetResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*VersionByTagGetResponseEnvelopeErrors) UnmarshalJSON

func (r *VersionByTagGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type VersionByTagGetResponseEnvelopeErrorsSource

type VersionByTagGetResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                          `json:"pointer,required"`
	JSON    versionByTagGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*VersionByTagGetResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *VersionByTagGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type VersionByTagGetResponseEnvelopeMessages

type VersionByTagGetResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source VersionByTagGetResponseEnvelopeMessagesSource `json:"source"`
	JSON   versionByTagGetResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*VersionByTagGetResponseEnvelopeMessages) UnmarshalJSON

func (r *VersionByTagGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type VersionByTagGetResponseEnvelopeMessagesSource

type VersionByTagGetResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                            `json:"pointer,required"`
	JSON    versionByTagGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*VersionByTagGetResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *VersionByTagGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type VersionByTagGetResponseEnvelopeSuccess

type VersionByTagGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	VersionByTagGetResponseEnvelopeSuccessTrue VersionByTagGetResponseEnvelopeSuccess = true
)

func (VersionByTagGetResponseEnvelopeSuccess) IsKnown

type VersionByTagService

type VersionByTagService struct {
	Options []option.RequestOption
}

VersionByTagService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVersionByTagService method instead.

func NewVersionByTagService

func NewVersionByTagService(opts ...option.RequestOption) (r *VersionByTagService)

NewVersionByTagService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*VersionByTagService) Get

func (r *VersionByTagService) Get(ctx context.Context, rulesetID string, rulesetVersion string, ruleTag string, query VersionByTagGetParams, opts ...option.RequestOption) (res *RulesetsRulesetResponse, err error)

Fetches the rules of a managed account ruleset version for a given tag.

type VersionDeleteParams

type VersionDeleteParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type VersionGetParams

type VersionGetParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type VersionGetResponseEnvelope

type VersionGetResponseEnvelope struct {
	// A list of error messages.
	Errors []VersionGetResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []VersionGetResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success VersionGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    versionGetResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*VersionGetResponseEnvelope) UnmarshalJSON

func (r *VersionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type VersionGetResponseEnvelopeErrors

type VersionGetResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source VersionGetResponseEnvelopeErrorsSource `json:"source"`
	JSON   versionGetResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*VersionGetResponseEnvelopeErrors) UnmarshalJSON

func (r *VersionGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type VersionGetResponseEnvelopeErrorsSource

type VersionGetResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                     `json:"pointer,required"`
	JSON    versionGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*VersionGetResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *VersionGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type VersionGetResponseEnvelopeMessages

type VersionGetResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source VersionGetResponseEnvelopeMessagesSource `json:"source"`
	JSON   versionGetResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*VersionGetResponseEnvelopeMessages) UnmarshalJSON

func (r *VersionGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type VersionGetResponseEnvelopeMessagesSource

type VersionGetResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                       `json:"pointer,required"`
	JSON    versionGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*VersionGetResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *VersionGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type VersionGetResponseEnvelopeSuccess

type VersionGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	VersionGetResponseEnvelopeSuccessTrue VersionGetResponseEnvelopeSuccess = true
)

func (VersionGetResponseEnvelopeSuccess) IsKnown

type VersionListParams

type VersionListParams struct {
	// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
	AccountID param.Field[string] `path:"account_id"`
	// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
	ZoneID param.Field[string] `path:"zone_id"`
}

type VersionListResponse added in v2.3.0

type VersionListResponse struct {
	// The kind of the ruleset.
	Kind VersionListResponseKind `json:"kind,required"`
	// The human-readable name of the ruleset.
	Name string `json:"name,required"`
	// The phase of the ruleset.
	Phase VersionListResponsePhase `json:"phase,required"`
	// The unique ID of the ruleset.
	ID string `json:"id"`
	// An informative description of the ruleset.
	Description string `json:"description"`
	// The timestamp of when the ruleset was last modified.
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// The version of the ruleset.
	Version string                  `json:"version"`
	JSON    versionListResponseJSON `json:"-"`
}

A ruleset object.

func (*VersionListResponse) UnmarshalJSON added in v2.3.0

func (r *VersionListResponse) UnmarshalJSON(data []byte) (err error)

type VersionListResponseEnvelope

type VersionListResponseEnvelope struct {
	// A list of error messages.
	Errors []VersionListResponseEnvelopeErrors `json:"errors,required"`
	// A list of warning messages.
	Messages []VersionListResponseEnvelopeMessages `json:"messages,required"`
	// A result.
	Result RulesetsRulesetsResponse `json:"result,required"`
	// Whether the API call was successful.
	Success VersionListResponseEnvelopeSuccess `json:"success,required"`
	JSON    versionListResponseEnvelopeJSON    `json:"-"`
}

A response object.

func (*VersionListResponseEnvelope) UnmarshalJSON

func (r *VersionListResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type VersionListResponseEnvelopeErrors

type VersionListResponseEnvelopeErrors struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source VersionListResponseEnvelopeErrorsSource `json:"source"`
	JSON   versionListResponseEnvelopeErrorsJSON   `json:"-"`
}

A message.

func (*VersionListResponseEnvelopeErrors) UnmarshalJSON

func (r *VersionListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type VersionListResponseEnvelopeErrorsSource

type VersionListResponseEnvelopeErrorsSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                      `json:"pointer,required"`
	JSON    versionListResponseEnvelopeErrorsSourceJSON `json:"-"`
}

The source of this message.

func (*VersionListResponseEnvelopeErrorsSource) UnmarshalJSON

func (r *VersionListResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)

type VersionListResponseEnvelopeMessages

type VersionListResponseEnvelopeMessages struct {
	// A text description of this message.
	Message string `json:"message,required"`
	// A unique code for this message.
	Code int64 `json:"code"`
	// The source of this message.
	Source VersionListResponseEnvelopeMessagesSource `json:"source"`
	JSON   versionListResponseEnvelopeMessagesJSON   `json:"-"`
}

A message.

func (*VersionListResponseEnvelopeMessages) UnmarshalJSON

func (r *VersionListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type VersionListResponseEnvelopeMessagesSource

type VersionListResponseEnvelopeMessagesSource struct {
	// A JSON pointer to the field that is the source of the message.
	Pointer string                                        `json:"pointer,required"`
	JSON    versionListResponseEnvelopeMessagesSourceJSON `json:"-"`
}

The source of this message.

func (*VersionListResponseEnvelopeMessagesSource) UnmarshalJSON

func (r *VersionListResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)

type VersionListResponseEnvelopeSuccess

type VersionListResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	VersionListResponseEnvelopeSuccessTrue VersionListResponseEnvelopeSuccess = true
)

func (VersionListResponseEnvelopeSuccess) IsKnown

type VersionListResponseKind

type VersionListResponseKind string

The kind of the ruleset.

const (
	VersionListResponseKindManaged VersionListResponseKind = "managed"
	VersionListResponseKindCustom  VersionListResponseKind = "custom"
	VersionListResponseKindRoot    VersionListResponseKind = "root"
	VersionListResponseKindZone    VersionListResponseKind = "zone"
)

func (VersionListResponseKind) IsKnown

func (r VersionListResponseKind) IsKnown() bool

type VersionListResponsePhase

type VersionListResponsePhase string

The phase of the ruleset.

const (
	VersionListResponsePhaseDDOSL4                         VersionListResponsePhase = "ddos_l4"
	VersionListResponsePhaseDDOSL7                         VersionListResponsePhase = "ddos_l7"
	VersionListResponsePhaseHTTPConfigSettings             VersionListResponsePhase = "http_config_settings"
	VersionListResponsePhaseHTTPCustomErrors               VersionListResponsePhase = "http_custom_errors"
	VersionListResponsePhaseHTTPLogCustomFields            VersionListResponsePhase = "http_log_custom_fields"
	VersionListResponsePhaseHTTPRatelimit                  VersionListResponsePhase = "http_ratelimit"
	VersionListResponsePhaseHTTPRequestCacheSettings       VersionListResponsePhase = "http_request_cache_settings"
	VersionListResponsePhaseHTTPRequestDynamicRedirect     VersionListResponsePhase = "http_request_dynamic_redirect"
	VersionListResponsePhaseHTTPRequestFirewallCustom      VersionListResponsePhase = "http_request_firewall_custom"
	VersionListResponsePhaseHTTPRequestFirewallManaged     VersionListResponsePhase = "http_request_firewall_managed"
	VersionListResponsePhaseHTTPRequestLateTransform       VersionListResponsePhase = "http_request_late_transform"
	VersionListResponsePhaseHTTPRequestOrigin              VersionListResponsePhase = "http_request_origin"
	VersionListResponsePhaseHTTPRequestRedirect            VersionListResponsePhase = "http_request_redirect"
	VersionListResponsePhaseHTTPRequestSanitize            VersionListResponsePhase = "http_request_sanitize"
	VersionListResponsePhaseHTTPRequestSbfm                VersionListResponsePhase = "http_request_sbfm"
	VersionListResponsePhaseHTTPRequestSelectConfiguration VersionListResponsePhase = "http_request_select_configuration"
	VersionListResponsePhaseHTTPRequestTransform           VersionListResponsePhase = "http_request_transform"
	VersionListResponsePhaseHTTPResponseCompression        VersionListResponsePhase = "http_response_compression"
	VersionListResponsePhaseHTTPResponseFirewallManaged    VersionListResponsePhase = "http_response_firewall_managed"
	VersionListResponsePhaseHTTPResponseHeadersTransform   VersionListResponsePhase = "http_response_headers_transform"
	VersionListResponsePhaseMagicTransit                   VersionListResponsePhase = "magic_transit"
	VersionListResponsePhaseMagicTransitIDsManaged         VersionListResponsePhase = "magic_transit_ids_managed"
	VersionListResponsePhaseMagicTransitManaged            VersionListResponsePhase = "magic_transit_managed"
)

func (VersionListResponsePhase) IsKnown

func (r VersionListResponsePhase) IsKnown() bool

type VersionService

type VersionService struct {
	Options []option.RequestOption
	ByTag   *VersionByTagService
}

VersionService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVersionService method instead.

func NewVersionService

func NewVersionService(opts ...option.RequestOption) (r *VersionService)

NewVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*VersionService) Delete

func (r *VersionService) Delete(ctx context.Context, rulesetID string, rulesetVersion string, body VersionDeleteParams, opts ...option.RequestOption) (err error)

Deletes an existing version of an account or zone ruleset.

func (*VersionService) Get

func (r *VersionService) Get(ctx context.Context, rulesetID string, rulesetVersion string, query VersionGetParams, opts ...option.RequestOption) (res *RulesetsRulesetResponse, err error)

Fetches a specific version of an account or zone ruleset.

func (*VersionService) List

func (r *VersionService) List(ctx context.Context, rulesetID string, query VersionListParams, opts ...option.RequestOption) (res *RulesetsRulesetsResponse, err error)

Fetches the versions of an account or zone ruleset.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL