Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type BlockRule
- type BlockRuleAction
- type BlockRuleActionParameters
- type BlockRuleActionParametersParam
- type BlockRuleActionParametersResponse
- type BlockRuleActionParametersResponseParam
- type BlockRuleExposedCredentialCheck
- type BlockRuleExposedCredentialCheckParam
- type BlockRuleParam
- type BlockRuleRatelimit
- type BlockRuleRatelimitParam
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type CompressResponseRule
- type CompressResponseRuleAction
- type CompressResponseRuleActionParameters
- type CompressResponseRuleActionParametersAlgorithm
- type CompressResponseRuleActionParametersAlgorithmParam
- type CompressResponseRuleActionParametersAlgorithmsName
- type CompressResponseRuleActionParametersParam
- type CompressResponseRuleExposedCredentialCheck
- type CompressResponseRuleExposedCredentialCheckParam
- type CompressResponseRuleParam
- type CompressResponseRuleRatelimit
- type CompressResponseRuleRatelimitParam
- type DDoSDynamicRule
- type DDoSDynamicRuleAction
- type DDoSDynamicRuleExposedCredentialCheck
- type DDoSDynamicRuleExposedCredentialCheckJSON
- type DDoSDynamicRuleExposedCredentialCheckParam
- type DDoSDynamicRuleJSON
- type DDoSDynamicRuleParam
- type DDoSDynamicRuleRatelimit
- type DDoSDynamicRuleRatelimitJSON
- type DDoSDynamicRuleRatelimitParam
- type Error
- type ErrorData
- type ErrorDataSource
- type ExecuteRule
- type ExecuteRuleAction
- type ExecuteRuleActionParameters
- type ExecuteRuleActionParametersMatchedData
- type ExecuteRuleActionParametersMatchedDataParam
- type ExecuteRuleActionParametersOverrides
- type ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel
- type ExecuteRuleActionParametersOverridesCategory
- type ExecuteRuleActionParametersOverridesCategoryParam
- type ExecuteRuleActionParametersOverridesParam
- type ExecuteRuleActionParametersOverridesRule
- type ExecuteRuleActionParametersOverridesRuleParam
- type ExecuteRuleActionParametersOverridesRulesSensitivityLevel
- type ExecuteRuleActionParametersOverridesSensitivityLevel
- type ExecuteRuleActionParametersParam
- type ExecuteRuleExposedCredentialCheck
- type ExecuteRuleExposedCredentialCheckParam
- type ExecuteRuleParam
- type ExecuteRuleRatelimit
- type ExecuteRuleRatelimitParam
- type ForceConnectionCloseRule
- type ForceConnectionCloseRuleAction
- type ForceConnectionCloseRuleExposedCredentialCheck
- type ForceConnectionCloseRuleExposedCredentialCheckParam
- type ForceConnectionCloseRuleParam
- type ForceConnectionCloseRuleRatelimit
- type ForceConnectionCloseRuleRatelimitParam
- type Kind
- type LogCustomFieldRule
- type LogCustomFieldRuleAction
- type LogCustomFieldRuleActionParameters
- type LogCustomFieldRuleActionParametersCookieField
- type LogCustomFieldRuleActionParametersCookieFieldParam
- type LogCustomFieldRuleActionParametersParam
- type LogCustomFieldRuleActionParametersRawResponseField
- type LogCustomFieldRuleActionParametersRawResponseFieldParam
- type LogCustomFieldRuleActionParametersRequestField
- type LogCustomFieldRuleActionParametersRequestFieldParam
- type LogCustomFieldRuleActionParametersResponseField
- type LogCustomFieldRuleActionParametersResponseFieldParam
- type LogCustomFieldRuleActionParametersTransformedRequestField
- type LogCustomFieldRuleActionParametersTransformedRequestFieldParam
- type LogCustomFieldRuleExposedCredentialCheck
- type LogCustomFieldRuleExposedCredentialCheckParam
- type LogCustomFieldRuleParam
- type LogCustomFieldRuleRatelimit
- type LogCustomFieldRuleRatelimitParam
- type LogRule
- type LogRuleAction
- type LogRuleExposedCredentialCheck
- type LogRuleExposedCredentialCheckParam
- type LogRuleParam
- type LogRuleRatelimit
- type LogRuleRatelimitParam
- type Logging
- type LoggingParam
- type ManagedChallengeRule
- type ManagedChallengeRuleAction
- type ManagedChallengeRuleExposedCredentialCheck
- type ManagedChallengeRuleExposedCredentialCheckParam
- type ManagedChallengeRuleParam
- type ManagedChallengeRuleRatelimit
- type ManagedChallengeRuleRatelimitParam
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type Phase
- type PhaseGetParams
- type PhaseGetResponse
- type PhaseGetResponseEnvelope
- type PhaseGetResponseEnvelopeErrors
- type PhaseGetResponseEnvelopeErrorsSource
- type PhaseGetResponseEnvelopeMessages
- type PhaseGetResponseEnvelopeMessagesSource
- type PhaseGetResponseEnvelopeSuccess
- type PhaseGetResponseRule
- type PhaseGetResponseRulesAction
- type PhaseGetResponseRulesRulesetsChallengeRule
- type PhaseGetResponseRulesRulesetsChallengeRuleAction
- type PhaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type PhaseGetResponseRulesRulesetsChallengeRuleRatelimit
- type PhaseGetResponseRulesRulesetsJSChallengeRule
- type PhaseGetResponseRulesRulesetsJSChallengeRuleAction
- type PhaseGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type PhaseGetResponseRulesRulesetsJSChallengeRuleRatelimit
- type PhaseGetResponseRulesUnion
- type PhaseService
- type PhaseUpdateParams
- type PhaseUpdateParamsRule
- type PhaseUpdateParamsRuleUnion
- type PhaseUpdateParamsRulesAction
- type PhaseUpdateParamsRulesRulesetsChallengeRule
- type PhaseUpdateParamsRulesRulesetsChallengeRuleAction
- type PhaseUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck
- type PhaseUpdateParamsRulesRulesetsChallengeRuleRatelimit
- type PhaseUpdateParamsRulesRulesetsJSChallengeRule
- type PhaseUpdateParamsRulesRulesetsJSChallengeRuleAction
- type PhaseUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type PhaseUpdateParamsRulesRulesetsJSChallengeRuleRatelimit
- type PhaseUpdateResponse
- type PhaseUpdateResponseEnvelope
- type PhaseUpdateResponseEnvelopeErrors
- type PhaseUpdateResponseEnvelopeErrorsSource
- type PhaseUpdateResponseEnvelopeMessages
- type PhaseUpdateResponseEnvelopeMessagesSource
- type PhaseUpdateResponseEnvelopeSuccess
- type PhaseUpdateResponseRule
- type PhaseUpdateResponseRulesAction
- type PhaseUpdateResponseRulesRulesetsChallengeRule
- type PhaseUpdateResponseRulesRulesetsChallengeRuleAction
- type PhaseUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type PhaseUpdateResponseRulesRulesetsChallengeRuleRatelimit
- type PhaseUpdateResponseRulesRulesetsJSChallengeRule
- type PhaseUpdateResponseRulesRulesetsJSChallengeRuleAction
- type PhaseUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type PhaseUpdateResponseRulesRulesetsJSChallengeRuleRatelimit
- type PhaseUpdateResponseRulesUnion
- type PhaseVersionGetParams
- type PhaseVersionGetResponse
- type PhaseVersionGetResponseEnvelope
- type PhaseVersionGetResponseEnvelopeErrors
- type PhaseVersionGetResponseEnvelopeErrorsSource
- type PhaseVersionGetResponseEnvelopeMessages
- type PhaseVersionGetResponseEnvelopeMessagesSource
- type PhaseVersionGetResponseEnvelopeSuccess
- type PhaseVersionGetResponseRule
- type PhaseVersionGetResponseRulesAction
- type PhaseVersionGetResponseRulesRulesetsChallengeRule
- type PhaseVersionGetResponseRulesRulesetsChallengeRuleAction
- type PhaseVersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type PhaseVersionGetResponseRulesRulesetsChallengeRuleRatelimit
- type PhaseVersionGetResponseRulesRulesetsJSChallengeRule
- type PhaseVersionGetResponseRulesRulesetsJSChallengeRuleAction
- type PhaseVersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type PhaseVersionGetResponseRulesRulesetsJSChallengeRuleRatelimit
- type PhaseVersionGetResponseRulesUnion
- type PhaseVersionListParams
- type PhaseVersionListResponse
- type PhaseVersionService
- func (r *PhaseVersionService) Get(ctx context.Context, rulesetPhase Phase, rulesetVersion string, ...) (res *PhaseVersionGetResponse, err error)
- func (r *PhaseVersionService) List(ctx context.Context, rulesetPhase Phase, query PhaseVersionListParams, ...) (res *pagination.SinglePage[PhaseVersionListResponse], err error)
- func (r *PhaseVersionService) ListAutoPaging(ctx context.Context, rulesetPhase Phase, query PhaseVersionListParams, ...) *pagination.SinglePageAutoPager[PhaseVersionListResponse]
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type RedirectRule
- type RedirectRuleAction
- type RedirectRuleActionParameters
- type RedirectRuleActionParametersFromList
- type RedirectRuleActionParametersFromListParam
- type RedirectRuleActionParametersFromValue
- type RedirectRuleActionParametersFromValueParam
- type RedirectRuleActionParametersFromValueStatusCode
- type RedirectRuleActionParametersFromValueTargetURL
- type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect
- type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam
- type RedirectRuleActionParametersFromValueTargetURLParam
- type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect
- type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam
- type RedirectRuleActionParametersFromValueTargetURLUnion
- type RedirectRuleActionParametersFromValueTargetURLUnionParam
- type RedirectRuleActionParametersParam
- type RedirectRuleExposedCredentialCheck
- type RedirectRuleExposedCredentialCheckParam
- type RedirectRuleParam
- type RedirectRuleRatelimit
- type RedirectRuleRatelimitParam
- type ResponseInfo
- type ResponseInfoSource
- type RewriteRule
- type RewriteRuleAction
- type RewriteRuleActionParameters
- type RewriteRuleActionParametersHeader
- type RewriteRuleActionParametersHeaderParam
- type RewriteRuleActionParametersHeadersAddDynamicHeader
- type RewriteRuleActionParametersHeadersAddDynamicHeaderOperation
- type RewriteRuleActionParametersHeadersAddDynamicHeaderParam
- type RewriteRuleActionParametersHeadersAddStaticHeader
- type RewriteRuleActionParametersHeadersAddStaticHeaderOperation
- type RewriteRuleActionParametersHeadersAddStaticHeaderParam
- type RewriteRuleActionParametersHeadersOperation
- type RewriteRuleActionParametersHeadersRemoveHeader
- type RewriteRuleActionParametersHeadersRemoveHeaderOperation
- type RewriteRuleActionParametersHeadersRemoveHeaderParam
- type RewriteRuleActionParametersHeadersSetDynamicHeader
- type RewriteRuleActionParametersHeadersSetDynamicHeaderOperation
- type RewriteRuleActionParametersHeadersSetDynamicHeaderParam
- type RewriteRuleActionParametersHeadersSetStaticHeader
- type RewriteRuleActionParametersHeadersSetStaticHeaderOperation
- type RewriteRuleActionParametersHeadersSetStaticHeaderParam
- type RewriteRuleActionParametersHeadersUnion
- type RewriteRuleActionParametersHeadersUnionParam
- type RewriteRuleActionParametersParam
- type RewriteRuleActionParametersURI
- type RewriteRuleActionParametersURIParam
- type RewriteRuleExposedCredentialCheck
- type RewriteRuleExposedCredentialCheckParam
- type RewriteRuleParam
- type RewriteRuleRatelimit
- type RewriteRuleRatelimitParam
- type RewriteURIPart
- type RewriteURIPartDynamicValue
- type RewriteURIPartDynamicValueParam
- type RewriteURIPartParam
- type RewriteURIPartStaticValue
- type RewriteURIPartStaticValueParam
- type RewriteURIPartUnion
- type RewriteURIPartUnionParam
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type RouteRule
- type RouteRuleAction
- type RouteRuleActionParameters
- type RouteRuleActionParametersOrigin
- type RouteRuleActionParametersOriginParam
- type RouteRuleActionParametersParam
- type RouteRuleActionParametersSNI
- type RouteRuleActionParametersSNIParam
- type RouteRuleExposedCredentialCheck
- type RouteRuleExposedCredentialCheckParam
- type RouteRuleParam
- type RouteRuleRatelimit
- type RouteRuleRatelimitParam
- type RuleDeleteParams
- type RuleDeleteResponse
- type RuleDeleteResponseEnvelope
- type RuleDeleteResponseEnvelopeErrors
- type RuleDeleteResponseEnvelopeErrorsSource
- type RuleDeleteResponseEnvelopeMessages
- type RuleDeleteResponseEnvelopeMessagesSource
- type RuleDeleteResponseEnvelopeSuccess
- type RuleDeleteResponseRule
- type RuleDeleteResponseRulesAction
- type RuleDeleteResponseRulesRulesetsChallengeRule
- type RuleDeleteResponseRulesRulesetsChallengeRuleAction
- type RuleDeleteResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type RuleDeleteResponseRulesRulesetsChallengeRuleRatelimit
- type RuleDeleteResponseRulesRulesetsJSChallengeRule
- type RuleDeleteResponseRulesRulesetsJSChallengeRuleAction
- type RuleDeleteResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type RuleDeleteResponseRulesRulesetsJSChallengeRuleRatelimit
- type RuleDeleteResponseRulesUnion
- type RuleEditParams
- type RuleEditParamsBody
- type RuleEditParamsBodyAction
- type RuleEditParamsBodyBlockRule
- type RuleEditParamsBodyBlockRulePosition
- type RuleEditParamsBodyBlockRulePositionAfterPosition
- type RuleEditParamsBodyBlockRulePositionBeforePosition
- type RuleEditParamsBodyBlockRulePositionIndexPosition
- type RuleEditParamsBodyBlockRulePositionUnion
- type RuleEditParamsBodyChallengeRule
- type RuleEditParamsBodyChallengeRuleAction
- type RuleEditParamsBodyChallengeRuleExposedCredentialCheck
- type RuleEditParamsBodyChallengeRulePosition
- type RuleEditParamsBodyChallengeRulePositionAfterPosition
- type RuleEditParamsBodyChallengeRulePositionBeforePosition
- type RuleEditParamsBodyChallengeRulePositionIndexPosition
- type RuleEditParamsBodyChallengeRulePositionUnion
- type RuleEditParamsBodyChallengeRuleRatelimit
- type RuleEditParamsBodyCompressionRule
- type RuleEditParamsBodyCompressionRulePosition
- type RuleEditParamsBodyCompressionRulePositionAfterPosition
- type RuleEditParamsBodyCompressionRulePositionBeforePosition
- type RuleEditParamsBodyCompressionRulePositionIndexPosition
- type RuleEditParamsBodyCompressionRulePositionUnion
- type RuleEditParamsBodyDDoSDynamicRule
- type RuleEditParamsBodyDDoSDynamicRulePosition
- type RuleEditParamsBodyDDoSDynamicRulePositionAfterPosition
- type RuleEditParamsBodyDDoSDynamicRulePositionBeforePosition
- type RuleEditParamsBodyDDoSDynamicRulePositionIndexPosition
- type RuleEditParamsBodyDDoSDynamicRulePositionUnion
- type RuleEditParamsBodyExecuteRule
- type RuleEditParamsBodyExecuteRulePosition
- type RuleEditParamsBodyExecuteRulePositionAfterPosition
- type RuleEditParamsBodyExecuteRulePositionBeforePosition
- type RuleEditParamsBodyExecuteRulePositionIndexPosition
- type RuleEditParamsBodyExecuteRulePositionUnion
- type RuleEditParamsBodyForceConnectionCloseRule
- type RuleEditParamsBodyForceConnectionCloseRulePosition
- type RuleEditParamsBodyForceConnectionCloseRulePositionAfterPosition
- type RuleEditParamsBodyForceConnectionCloseRulePositionBeforePosition
- type RuleEditParamsBodyForceConnectionCloseRulePositionIndexPosition
- type RuleEditParamsBodyForceConnectionCloseRulePositionUnion
- type RuleEditParamsBodyJavascriptChallengeRule
- type RuleEditParamsBodyJavascriptChallengeRuleAction
- type RuleEditParamsBodyJavascriptChallengeRuleExposedCredentialCheck
- type RuleEditParamsBodyJavascriptChallengeRulePosition
- type RuleEditParamsBodyJavascriptChallengeRulePositionAfterPosition
- type RuleEditParamsBodyJavascriptChallengeRulePositionBeforePosition
- type RuleEditParamsBodyJavascriptChallengeRulePositionIndexPosition
- type RuleEditParamsBodyJavascriptChallengeRulePositionUnion
- type RuleEditParamsBodyJavascriptChallengeRuleRatelimit
- type RuleEditParamsBodyLogCustomFieldRule
- type RuleEditParamsBodyLogCustomFieldRulePosition
- type RuleEditParamsBodyLogCustomFieldRulePositionAfterPosition
- type RuleEditParamsBodyLogCustomFieldRulePositionBeforePosition
- type RuleEditParamsBodyLogCustomFieldRulePositionIndexPosition
- type RuleEditParamsBodyLogCustomFieldRulePositionUnion
- type RuleEditParamsBodyLogRule
- type RuleEditParamsBodyLogRulePosition
- type RuleEditParamsBodyLogRulePositionAfterPosition
- type RuleEditParamsBodyLogRulePositionBeforePosition
- type RuleEditParamsBodyLogRulePositionIndexPosition
- type RuleEditParamsBodyLogRulePositionUnion
- type RuleEditParamsBodyManagedChallengeRule
- type RuleEditParamsBodyManagedChallengeRulePosition
- type RuleEditParamsBodyManagedChallengeRulePositionAfterPosition
- type RuleEditParamsBodyManagedChallengeRulePositionBeforePosition
- type RuleEditParamsBodyManagedChallengeRulePositionIndexPosition
- type RuleEditParamsBodyManagedChallengeRulePositionUnion
- type RuleEditParamsBodyOriginRule
- type RuleEditParamsBodyOriginRulePosition
- type RuleEditParamsBodyOriginRulePositionAfterPosition
- type RuleEditParamsBodyOriginRulePositionBeforePosition
- type RuleEditParamsBodyOriginRulePositionIndexPosition
- type RuleEditParamsBodyOriginRulePositionUnion
- type RuleEditParamsBodyRedirectRule
- type RuleEditParamsBodyRedirectRulePosition
- type RuleEditParamsBodyRedirectRulePositionAfterPosition
- type RuleEditParamsBodyRedirectRulePositionBeforePosition
- type RuleEditParamsBodyRedirectRulePositionIndexPosition
- type RuleEditParamsBodyRedirectRulePositionUnion
- type RuleEditParamsBodyRewriteRule
- type RuleEditParamsBodyRewriteRulePosition
- type RuleEditParamsBodyRewriteRulePositionAfterPosition
- type RuleEditParamsBodyRewriteRulePositionBeforePosition
- type RuleEditParamsBodyRewriteRulePositionIndexPosition
- type RuleEditParamsBodyRewriteRulePositionUnion
- type RuleEditParamsBodyScoreRule
- type RuleEditParamsBodyScoreRulePosition
- type RuleEditParamsBodyScoreRulePositionAfterPosition
- type RuleEditParamsBodyScoreRulePositionBeforePosition
- type RuleEditParamsBodyScoreRulePositionIndexPosition
- type RuleEditParamsBodyScoreRulePositionUnion
- type RuleEditParamsBodyServeErrorRule
- type RuleEditParamsBodyServeErrorRulePosition
- type RuleEditParamsBodyServeErrorRulePositionAfterPosition
- type RuleEditParamsBodyServeErrorRulePositionBeforePosition
- type RuleEditParamsBodyServeErrorRulePositionIndexPosition
- type RuleEditParamsBodyServeErrorRulePositionUnion
- type RuleEditParamsBodySetCacheSettingsRule
- type RuleEditParamsBodySetCacheSettingsRulePosition
- type RuleEditParamsBodySetCacheSettingsRulePositionAfterPosition
- type RuleEditParamsBodySetCacheSettingsRulePositionBeforePosition
- type RuleEditParamsBodySetCacheSettingsRulePositionIndexPosition
- type RuleEditParamsBodySetCacheSettingsRulePositionUnion
- type RuleEditParamsBodySetConfigRule
- type RuleEditParamsBodySetConfigRulePosition
- type RuleEditParamsBodySetConfigRulePositionAfterPosition
- type RuleEditParamsBodySetConfigRulePositionBeforePosition
- type RuleEditParamsBodySetConfigRulePositionIndexPosition
- type RuleEditParamsBodySetConfigRulePositionUnion
- type RuleEditParamsBodySkipRule
- type RuleEditParamsBodySkipRulePosition
- type RuleEditParamsBodySkipRulePositionAfterPosition
- type RuleEditParamsBodySkipRulePositionBeforePosition
- type RuleEditParamsBodySkipRulePositionIndexPosition
- type RuleEditParamsBodySkipRulePositionUnion
- type RuleEditParamsBodyUnion
- type RuleEditResponse
- type RuleEditResponseEnvelope
- type RuleEditResponseEnvelopeErrors
- type RuleEditResponseEnvelopeErrorsSource
- type RuleEditResponseEnvelopeMessages
- type RuleEditResponseEnvelopeMessagesSource
- type RuleEditResponseEnvelopeSuccess
- type RuleEditResponseRule
- type RuleEditResponseRulesAction
- type RuleEditResponseRulesRulesetsChallengeRule
- type RuleEditResponseRulesRulesetsChallengeRuleAction
- type RuleEditResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type RuleEditResponseRulesRulesetsChallengeRuleRatelimit
- type RuleEditResponseRulesRulesetsJSChallengeRule
- type RuleEditResponseRulesRulesetsJSChallengeRuleAction
- type RuleEditResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type RuleEditResponseRulesRulesetsJSChallengeRuleRatelimit
- type RuleEditResponseRulesUnion
- type RuleNewParams
- type RuleNewParamsBody
- type RuleNewParamsBodyAction
- type RuleNewParamsBodyBlockRule
- type RuleNewParamsBodyBlockRulePosition
- type RuleNewParamsBodyBlockRulePositionAfterPosition
- type RuleNewParamsBodyBlockRulePositionBeforePosition
- type RuleNewParamsBodyBlockRulePositionIndexPosition
- type RuleNewParamsBodyBlockRulePositionUnion
- type RuleNewParamsBodyChallengeRule
- type RuleNewParamsBodyChallengeRuleAction
- type RuleNewParamsBodyChallengeRuleExposedCredentialCheck
- type RuleNewParamsBodyChallengeRulePosition
- type RuleNewParamsBodyChallengeRulePositionAfterPosition
- type RuleNewParamsBodyChallengeRulePositionBeforePosition
- type RuleNewParamsBodyChallengeRulePositionIndexPosition
- type RuleNewParamsBodyChallengeRulePositionUnion
- type RuleNewParamsBodyChallengeRuleRatelimit
- type RuleNewParamsBodyCompressionRule
- type RuleNewParamsBodyCompressionRulePosition
- type RuleNewParamsBodyCompressionRulePositionAfterPosition
- type RuleNewParamsBodyCompressionRulePositionBeforePosition
- type RuleNewParamsBodyCompressionRulePositionIndexPosition
- type RuleNewParamsBodyCompressionRulePositionUnion
- type RuleNewParamsBodyDDoSDynamicRule
- type RuleNewParamsBodyDDoSDynamicRulePosition
- type RuleNewParamsBodyDDoSDynamicRulePositionAfterPosition
- type RuleNewParamsBodyDDoSDynamicRulePositionBeforePosition
- type RuleNewParamsBodyDDoSDynamicRulePositionIndexPosition
- type RuleNewParamsBodyDDoSDynamicRulePositionUnion
- type RuleNewParamsBodyExecuteRule
- type RuleNewParamsBodyExecuteRulePosition
- type RuleNewParamsBodyExecuteRulePositionAfterPosition
- type RuleNewParamsBodyExecuteRulePositionBeforePosition
- type RuleNewParamsBodyExecuteRulePositionIndexPosition
- type RuleNewParamsBodyExecuteRulePositionUnion
- type RuleNewParamsBodyForceConnectionCloseRule
- type RuleNewParamsBodyForceConnectionCloseRulePosition
- type RuleNewParamsBodyForceConnectionCloseRulePositionAfterPosition
- type RuleNewParamsBodyForceConnectionCloseRulePositionBeforePosition
- type RuleNewParamsBodyForceConnectionCloseRulePositionIndexPosition
- type RuleNewParamsBodyForceConnectionCloseRulePositionUnion
- type RuleNewParamsBodyJavascriptChallengeRule
- type RuleNewParamsBodyJavascriptChallengeRuleAction
- type RuleNewParamsBodyJavascriptChallengeRuleExposedCredentialCheck
- type RuleNewParamsBodyJavascriptChallengeRulePosition
- type RuleNewParamsBodyJavascriptChallengeRulePositionAfterPosition
- type RuleNewParamsBodyJavascriptChallengeRulePositionBeforePosition
- type RuleNewParamsBodyJavascriptChallengeRulePositionIndexPosition
- type RuleNewParamsBodyJavascriptChallengeRulePositionUnion
- type RuleNewParamsBodyJavascriptChallengeRuleRatelimit
- type RuleNewParamsBodyLogCustomFieldRule
- type RuleNewParamsBodyLogCustomFieldRulePosition
- type RuleNewParamsBodyLogCustomFieldRulePositionAfterPosition
- type RuleNewParamsBodyLogCustomFieldRulePositionBeforePosition
- type RuleNewParamsBodyLogCustomFieldRulePositionIndexPosition
- type RuleNewParamsBodyLogCustomFieldRulePositionUnion
- type RuleNewParamsBodyLogRule
- type RuleNewParamsBodyLogRulePosition
- type RuleNewParamsBodyLogRulePositionAfterPosition
- type RuleNewParamsBodyLogRulePositionBeforePosition
- type RuleNewParamsBodyLogRulePositionIndexPosition
- type RuleNewParamsBodyLogRulePositionUnion
- type RuleNewParamsBodyManagedChallengeRule
- type RuleNewParamsBodyManagedChallengeRulePosition
- type RuleNewParamsBodyManagedChallengeRulePositionAfterPosition
- type RuleNewParamsBodyManagedChallengeRulePositionBeforePosition
- type RuleNewParamsBodyManagedChallengeRulePositionIndexPosition
- type RuleNewParamsBodyManagedChallengeRulePositionUnion
- type RuleNewParamsBodyOriginRule
- type RuleNewParamsBodyOriginRulePosition
- type RuleNewParamsBodyOriginRulePositionAfterPosition
- type RuleNewParamsBodyOriginRulePositionBeforePosition
- type RuleNewParamsBodyOriginRulePositionIndexPosition
- type RuleNewParamsBodyOriginRulePositionUnion
- type RuleNewParamsBodyRedirectRule
- type RuleNewParamsBodyRedirectRulePosition
- type RuleNewParamsBodyRedirectRulePositionAfterPosition
- type RuleNewParamsBodyRedirectRulePositionBeforePosition
- type RuleNewParamsBodyRedirectRulePositionIndexPosition
- type RuleNewParamsBodyRedirectRulePositionUnion
- type RuleNewParamsBodyRewriteRule
- type RuleNewParamsBodyRewriteRulePosition
- type RuleNewParamsBodyRewriteRulePositionAfterPosition
- type RuleNewParamsBodyRewriteRulePositionBeforePosition
- type RuleNewParamsBodyRewriteRulePositionIndexPosition
- type RuleNewParamsBodyRewriteRulePositionUnion
- type RuleNewParamsBodyScoreRule
- type RuleNewParamsBodyScoreRulePosition
- type RuleNewParamsBodyScoreRulePositionAfterPosition
- type RuleNewParamsBodyScoreRulePositionBeforePosition
- type RuleNewParamsBodyScoreRulePositionIndexPosition
- type RuleNewParamsBodyScoreRulePositionUnion
- type RuleNewParamsBodyServeErrorRule
- type RuleNewParamsBodyServeErrorRulePosition
- type RuleNewParamsBodyServeErrorRulePositionAfterPosition
- type RuleNewParamsBodyServeErrorRulePositionBeforePosition
- type RuleNewParamsBodyServeErrorRulePositionIndexPosition
- type RuleNewParamsBodyServeErrorRulePositionUnion
- type RuleNewParamsBodySetCacheSettingsRule
- type RuleNewParamsBodySetCacheSettingsRulePosition
- type RuleNewParamsBodySetCacheSettingsRulePositionAfterPosition
- type RuleNewParamsBodySetCacheSettingsRulePositionBeforePosition
- type RuleNewParamsBodySetCacheSettingsRulePositionIndexPosition
- type RuleNewParamsBodySetCacheSettingsRulePositionUnion
- type RuleNewParamsBodySetConfigRule
- type RuleNewParamsBodySetConfigRulePosition
- type RuleNewParamsBodySetConfigRulePositionAfterPosition
- type RuleNewParamsBodySetConfigRulePositionBeforePosition
- type RuleNewParamsBodySetConfigRulePositionIndexPosition
- type RuleNewParamsBodySetConfigRulePositionUnion
- type RuleNewParamsBodySkipRule
- type RuleNewParamsBodySkipRulePosition
- type RuleNewParamsBodySkipRulePositionAfterPosition
- type RuleNewParamsBodySkipRulePositionBeforePosition
- type RuleNewParamsBodySkipRulePositionIndexPosition
- type RuleNewParamsBodySkipRulePositionUnion
- type RuleNewParamsBodyUnion
- type RuleNewResponse
- type RuleNewResponseEnvelope
- type RuleNewResponseEnvelopeErrors
- type RuleNewResponseEnvelopeErrorsSource
- type RuleNewResponseEnvelopeMessages
- type RuleNewResponseEnvelopeMessagesSource
- type RuleNewResponseEnvelopeSuccess
- type RuleNewResponseRule
- type RuleNewResponseRulesAction
- type RuleNewResponseRulesRulesetsChallengeRule
- type RuleNewResponseRulesRulesetsChallengeRuleAction
- type RuleNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type RuleNewResponseRulesRulesetsChallengeRuleRatelimit
- type RuleNewResponseRulesRulesetsJSChallengeRule
- type RuleNewResponseRulesRulesetsJSChallengeRuleAction
- type RuleNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type RuleNewResponseRulesRulesetsJSChallengeRuleRatelimit
- type RuleNewResponseRulesUnion
- type RuleService
- func (r *RuleService) Delete(ctx context.Context, rulesetID string, ruleID string, body RuleDeleteParams, ...) (res *RuleDeleteResponse, err error)
- func (r *RuleService) Edit(ctx context.Context, rulesetID string, ruleID string, params RuleEditParams, ...) (res *RuleEditResponse, err error)
- func (r *RuleService) New(ctx context.Context, rulesetID string, params RuleNewParams, ...) (res *RuleNewResponse, err error)
- type RulesetDeleteParams
- type RulesetGetParams
- type RulesetGetResponse
- type RulesetGetResponseEnvelope
- type RulesetGetResponseEnvelopeErrors
- type RulesetGetResponseEnvelopeErrorsSource
- type RulesetGetResponseEnvelopeMessages
- type RulesetGetResponseEnvelopeMessagesSource
- type RulesetGetResponseEnvelopeSuccess
- type RulesetGetResponseRule
- type RulesetGetResponseRulesAction
- type RulesetGetResponseRulesRulesetsChallengeRule
- type RulesetGetResponseRulesRulesetsChallengeRuleAction
- type RulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type RulesetGetResponseRulesRulesetsChallengeRuleRatelimit
- type RulesetGetResponseRulesRulesetsJSChallengeRule
- type RulesetGetResponseRulesRulesetsJSChallengeRuleAction
- type RulesetGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type RulesetGetResponseRulesRulesetsJSChallengeRuleRatelimit
- type RulesetGetResponseRulesUnion
- type RulesetListParams
- type RulesetListResponse
- type RulesetNewParams
- type RulesetNewParamsRule
- type RulesetNewParamsRuleUnion
- type RulesetNewParamsRulesAction
- type RulesetNewParamsRulesRulesetsChallengeRule
- type RulesetNewParamsRulesRulesetsChallengeRuleAction
- type RulesetNewParamsRulesRulesetsChallengeRuleExposedCredentialCheck
- type RulesetNewParamsRulesRulesetsChallengeRuleRatelimit
- type RulesetNewParamsRulesRulesetsJSChallengeRule
- type RulesetNewParamsRulesRulesetsJSChallengeRuleAction
- type RulesetNewParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type RulesetNewParamsRulesRulesetsJSChallengeRuleRatelimit
- type RulesetNewResponse
- type RulesetNewResponseEnvelope
- type RulesetNewResponseEnvelopeErrors
- type RulesetNewResponseEnvelopeErrorsSource
- type RulesetNewResponseEnvelopeMessages
- type RulesetNewResponseEnvelopeMessagesSource
- type RulesetNewResponseEnvelopeSuccess
- type RulesetNewResponseRule
- type RulesetNewResponseRulesAction
- type RulesetNewResponseRulesRulesetsChallengeRule
- type RulesetNewResponseRulesRulesetsChallengeRuleAction
- type RulesetNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type RulesetNewResponseRulesRulesetsChallengeRuleRatelimit
- type RulesetNewResponseRulesRulesetsJSChallengeRule
- type RulesetNewResponseRulesRulesetsJSChallengeRuleAction
- type RulesetNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type RulesetNewResponseRulesRulesetsJSChallengeRuleRatelimit
- type RulesetNewResponseRulesUnion
- type RulesetService
- func (r *RulesetService) Delete(ctx context.Context, rulesetID string, body RulesetDeleteParams, ...) (err error)
- func (r *RulesetService) Get(ctx context.Context, rulesetID string, query RulesetGetParams, ...) (res *RulesetGetResponse, err error)
- func (r *RulesetService) List(ctx context.Context, params RulesetListParams, opts ...option.RequestOption) (res *pagination.CursorPagination[RulesetListResponse], err error)
- func (r *RulesetService) ListAutoPaging(ctx context.Context, params RulesetListParams, opts ...option.RequestOption) *pagination.CursorPaginationAutoPager[RulesetListResponse]
- func (r *RulesetService) New(ctx context.Context, params RulesetNewParams, opts ...option.RequestOption) (res *RulesetNewResponse, err error)
- func (r *RulesetService) Update(ctx context.Context, rulesetID string, params RulesetUpdateParams, ...) (res *RulesetUpdateResponse, err error)
- type RulesetUpdateParams
- type RulesetUpdateParamsRule
- type RulesetUpdateParamsRuleUnion
- type RulesetUpdateParamsRulesAction
- type RulesetUpdateParamsRulesRulesetsChallengeRule
- type RulesetUpdateParamsRulesRulesetsChallengeRuleAction
- type RulesetUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck
- type RulesetUpdateParamsRulesRulesetsChallengeRuleRatelimit
- type RulesetUpdateParamsRulesRulesetsJSChallengeRule
- type RulesetUpdateParamsRulesRulesetsJSChallengeRuleAction
- type RulesetUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type RulesetUpdateParamsRulesRulesetsJSChallengeRuleRatelimit
- type RulesetUpdateResponse
- type RulesetUpdateResponseEnvelope
- type RulesetUpdateResponseEnvelopeErrors
- type RulesetUpdateResponseEnvelopeErrorsSource
- type RulesetUpdateResponseEnvelopeMessages
- type RulesetUpdateResponseEnvelopeMessagesSource
- type RulesetUpdateResponseEnvelopeSuccess
- type RulesetUpdateResponseRule
- type RulesetUpdateResponseRulesAction
- type RulesetUpdateResponseRulesRulesetsChallengeRule
- type RulesetUpdateResponseRulesRulesetsChallengeRuleAction
- type RulesetUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type RulesetUpdateResponseRulesRulesetsChallengeRuleRatelimit
- type RulesetUpdateResponseRulesRulesetsJSChallengeRule
- type RulesetUpdateResponseRulesRulesetsJSChallengeRuleAction
- type RulesetUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type RulesetUpdateResponseRulesRulesetsJSChallengeRuleRatelimit
- type RulesetUpdateResponseRulesUnion
- type ScoreRule
- type ScoreRuleAction
- type ScoreRuleActionParameters
- type ScoreRuleActionParametersParam
- type ScoreRuleExposedCredentialCheck
- type ScoreRuleExposedCredentialCheckParam
- type ScoreRuleParam
- type ScoreRuleRatelimit
- type ScoreRuleRatelimitParam
- type ServeErrorRule
- type ServeErrorRuleAction
- type ServeErrorRuleActionParameters
- type ServeErrorRuleActionParametersContentType
- type ServeErrorRuleActionParametersParam
- type ServeErrorRuleExposedCredentialCheck
- type ServeErrorRuleExposedCredentialCheckParam
- type ServeErrorRuleParam
- type ServeErrorRuleRatelimit
- type ServeErrorRuleRatelimitParam
- type SetCacheSettingsRule
- type SetCacheSettingsRuleAction
- type SetCacheSettingsRuleActionParameters
- type SetCacheSettingsRuleActionParametersBrowserTTL
- type SetCacheSettingsRuleActionParametersBrowserTTLMode
- type SetCacheSettingsRuleActionParametersBrowserTTLParam
- type SetCacheSettingsRuleActionParametersCacheKey
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKey
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParameters
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExclude
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParameters
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParametersParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParameters
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParametersParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeUnion
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeUnionParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParameters
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersInclude
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParameters
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParametersParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParameters
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParametersParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeUnion
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeUnionParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringUnion
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringUnionParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam
- type SetCacheSettingsRuleActionParametersCacheKeyParam
- type SetCacheSettingsRuleActionParametersCacheReserve
- type SetCacheSettingsRuleActionParametersCacheReserveParam
- type SetCacheSettingsRuleActionParametersEdgeTTL
- type SetCacheSettingsRuleActionParametersEdgeTTLMode
- type SetCacheSettingsRuleActionParametersEdgeTTLParam
- type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL
- type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam
- type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange
- type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam
- type SetCacheSettingsRuleActionParametersParam
- type SetCacheSettingsRuleActionParametersServeStale
- type SetCacheSettingsRuleActionParametersServeStaleParam
- type SetCacheSettingsRuleExposedCredentialCheck
- type SetCacheSettingsRuleExposedCredentialCheckParam
- type SetCacheSettingsRuleParam
- type SetCacheSettingsRuleRatelimit
- type SetCacheSettingsRuleRatelimitParam
- type SetConfigRule
- type SetConfigRuleAction
- type SetConfigRuleActionParameters
- type SetConfigRuleActionParametersAutominify
- type SetConfigRuleActionParametersAutominifyParam
- type SetConfigRuleActionParametersDisableApps
- type SetConfigRuleActionParametersDisableRUM
- type SetConfigRuleActionParametersDisableZaraz
- type SetConfigRuleActionParametersParam
- type SetConfigRuleActionParametersPolish
- type SetConfigRuleActionParametersSSL
- type SetConfigRuleActionParametersSecurityLevel
- type SetConfigRuleExposedCredentialCheck
- type SetConfigRuleExposedCredentialCheckParam
- type SetConfigRuleParam
- type SetConfigRuleRatelimit
- type SetConfigRuleRatelimitParam
- type SkipRule
- type SkipRuleAction
- type SkipRuleActionParameters
- type SkipRuleActionParametersParam
- type SkipRuleActionParametersProduct
- type SkipRuleActionParametersRuleset
- type SkipRuleExposedCredentialCheck
- type SkipRuleExposedCredentialCheckParam
- type SkipRuleParam
- type SkipRuleRatelimit
- type SkipRuleRatelimitParam
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenPolicyResourcesMap
- type TokenPolicyResourcesMapParam
- type TokenPolicyResourcesUnion
- type TokenPolicyResourcesUnionParam
- type TokenStatus
- type TokenValue
- type VersionDeleteParams
- type VersionGetParams
- type VersionGetResponse
- type VersionGetResponseEnvelope
- type VersionGetResponseEnvelopeErrors
- type VersionGetResponseEnvelopeErrorsSource
- type VersionGetResponseEnvelopeMessages
- type VersionGetResponseEnvelopeMessagesSource
- type VersionGetResponseEnvelopeSuccess
- type VersionGetResponseRule
- type VersionGetResponseRulesAction
- type VersionGetResponseRulesRulesetsChallengeRule
- type VersionGetResponseRulesRulesetsChallengeRuleAction
- type VersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck
- type VersionGetResponseRulesRulesetsChallengeRuleRatelimit
- type VersionGetResponseRulesRulesetsJSChallengeRule
- type VersionGetResponseRulesRulesetsJSChallengeRuleAction
- type VersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck
- type VersionGetResponseRulesRulesetsJSChallengeRuleRatelimit
- type VersionGetResponseRulesUnion
- type VersionListParams
- type VersionListResponse
- type VersionService
- func (r *VersionService) Delete(ctx context.Context, rulesetID string, rulesetVersion string, ...) (err error)
- func (r *VersionService) Get(ctx context.Context, rulesetID string, rulesetVersion string, ...) (res *VersionGetResponse, err error)
- func (r *VersionService) List(ctx context.Context, rulesetID string, query VersionListParams, ...) (res *pagination.SinglePage[VersionListResponse], err error)
- func (r *VersionService) ListAutoPaging(ctx context.Context, rulesetID string, query VersionListParams, ...) *pagination.SinglePageAutoPager[VersionListResponse]
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type BlockRule ¶
type BlockRule 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 BlockRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters BlockRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck BlockRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit BlockRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON blockRuleJSON `json:"-"`
}
func (*BlockRule) UnmarshalJSON ¶
type BlockRuleAction ¶
type BlockRuleAction string
The action to perform when the rule matches.
const (
BlockRuleActionBlock BlockRuleAction = "block"
)
func (BlockRuleAction) IsKnown ¶
func (r BlockRuleAction) IsKnown() bool
type BlockRuleActionParameters ¶
type BlockRuleActionParameters struct {
// The response to show when the block is applied.
Response BlockRuleActionParametersResponse `json:"response"`
JSON blockRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*BlockRuleActionParameters) UnmarshalJSON ¶
func (r *BlockRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type BlockRuleActionParametersParam ¶
type BlockRuleActionParametersParam struct {
// The response to show when the block is applied.
Response param.Field[BlockRuleActionParametersResponseParam] `json:"response"`
}
The parameters configuring the rule's action.
func (BlockRuleActionParametersParam) MarshalJSON ¶
func (r BlockRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type BlockRuleActionParametersResponse ¶
type BlockRuleActionParametersResponse 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 blockRuleActionParametersResponseJSON `json:"-"`
}
The response to show when the block is applied.
func (*BlockRuleActionParametersResponse) UnmarshalJSON ¶
func (r *BlockRuleActionParametersResponse) UnmarshalJSON(data []byte) (err error)
type BlockRuleActionParametersResponseParam ¶
type BlockRuleActionParametersResponseParam 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 (BlockRuleActionParametersResponseParam) MarshalJSON ¶
func (r BlockRuleActionParametersResponseParam) MarshalJSON() (data []byte, err error)
type BlockRuleExposedCredentialCheck ¶
type BlockRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON blockRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*BlockRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *BlockRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type BlockRuleExposedCredentialCheckParam ¶
type BlockRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (BlockRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r BlockRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type BlockRuleParam ¶
type BlockRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[BlockRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[BlockRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[BlockRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[BlockRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (BlockRuleParam) MarshalJSON ¶
func (r BlockRuleParam) MarshalJSON() (data []byte, err error)
type BlockRuleRatelimit ¶
type BlockRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON blockRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*BlockRuleRatelimit) UnmarshalJSON ¶
func (r *BlockRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type BlockRuleRatelimitParam ¶
type BlockRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (BlockRuleRatelimitParam) MarshalJSON ¶
func (r BlockRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type CertificateCA ¶
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type CompressResponseRule ¶
type CompressResponseRule 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 CompressResponseRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters CompressResponseRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck CompressResponseRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit CompressResponseRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON compressResponseRuleJSON `json:"-"`
}
func (*CompressResponseRule) UnmarshalJSON ¶
func (r *CompressResponseRule) UnmarshalJSON(data []byte) (err error)
type CompressResponseRuleAction ¶
type CompressResponseRuleAction string
The action to perform when the rule matches.
const (
CompressResponseRuleActionCompressResponse CompressResponseRuleAction = "compress_response"
)
func (CompressResponseRuleAction) IsKnown ¶
func (r CompressResponseRuleAction) IsKnown() bool
type CompressResponseRuleActionParameters ¶
type CompressResponseRuleActionParameters struct {
// Custom order for compression algorithms.
Algorithms []CompressResponseRuleActionParametersAlgorithm `json:"algorithms"`
JSON compressResponseRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*CompressResponseRuleActionParameters) UnmarshalJSON ¶
func (r *CompressResponseRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type CompressResponseRuleActionParametersAlgorithm ¶
type CompressResponseRuleActionParametersAlgorithm struct {
// Name of compression algorithm to enable.
Name CompressResponseRuleActionParametersAlgorithmsName `json:"name"`
JSON compressResponseRuleActionParametersAlgorithmJSON `json:"-"`
}
Compression algorithm to enable.
func (*CompressResponseRuleActionParametersAlgorithm) UnmarshalJSON ¶
func (r *CompressResponseRuleActionParametersAlgorithm) UnmarshalJSON(data []byte) (err error)
type CompressResponseRuleActionParametersAlgorithmParam ¶
type CompressResponseRuleActionParametersAlgorithmParam struct {
// Name of compression algorithm to enable.
Name param.Field[CompressResponseRuleActionParametersAlgorithmsName] `json:"name"`
}
Compression algorithm to enable.
func (CompressResponseRuleActionParametersAlgorithmParam) MarshalJSON ¶
func (r CompressResponseRuleActionParametersAlgorithmParam) MarshalJSON() (data []byte, err error)
type CompressResponseRuleActionParametersAlgorithmsName ¶
type CompressResponseRuleActionParametersAlgorithmsName string
Name of compression algorithm to enable.
const ( CompressResponseRuleActionParametersAlgorithmsNameNone CompressResponseRuleActionParametersAlgorithmsName = "none" CompressResponseRuleActionParametersAlgorithmsNameAuto CompressResponseRuleActionParametersAlgorithmsName = "auto" CompressResponseRuleActionParametersAlgorithmsNameDefault CompressResponseRuleActionParametersAlgorithmsName = "default" CompressResponseRuleActionParametersAlgorithmsNameGzip CompressResponseRuleActionParametersAlgorithmsName = "gzip" CompressResponseRuleActionParametersAlgorithmsNameBrotli CompressResponseRuleActionParametersAlgorithmsName = "brotli" CompressResponseRuleActionParametersAlgorithmsNameZstd CompressResponseRuleActionParametersAlgorithmsName = "zstd" )
func (CompressResponseRuleActionParametersAlgorithmsName) IsKnown ¶
func (r CompressResponseRuleActionParametersAlgorithmsName) IsKnown() bool
type CompressResponseRuleActionParametersParam ¶
type CompressResponseRuleActionParametersParam struct {
// Custom order for compression algorithms.
Algorithms param.Field[[]CompressResponseRuleActionParametersAlgorithmParam] `json:"algorithms"`
}
The parameters configuring the rule's action.
func (CompressResponseRuleActionParametersParam) MarshalJSON ¶
func (r CompressResponseRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type CompressResponseRuleExposedCredentialCheck ¶
type CompressResponseRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON compressResponseRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*CompressResponseRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *CompressResponseRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type CompressResponseRuleExposedCredentialCheckParam ¶
type CompressResponseRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (CompressResponseRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r CompressResponseRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type CompressResponseRuleParam ¶
type CompressResponseRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[CompressResponseRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[CompressResponseRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[CompressResponseRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[CompressResponseRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (CompressResponseRuleParam) MarshalJSON ¶
func (r CompressResponseRuleParam) MarshalJSON() (data []byte, err error)
type CompressResponseRuleRatelimit ¶
type CompressResponseRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON compressResponseRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*CompressResponseRuleRatelimit) UnmarshalJSON ¶
func (r *CompressResponseRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type CompressResponseRuleRatelimitParam ¶
type CompressResponseRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (CompressResponseRuleRatelimitParam) MarshalJSON ¶
func (r CompressResponseRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type DDoSDynamicRule ¶
type DDoSDynamicRule 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 DDoSDynamicRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck DDoSDynamicRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit DDoSDynamicRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON DDoSDynamicRuleJSON `json:"-"`
}
func (*DDoSDynamicRule) UnmarshalJSON ¶
func (r *DDoSDynamicRule) UnmarshalJSON(data []byte) (err error)
type DDoSDynamicRuleAction ¶
type DDoSDynamicRuleAction string
The action to perform when the rule matches.
const (
DDoSDynamicRuleActionDDoSDynamic DDoSDynamicRuleAction = "ddos_dynamic"
)
func (DDoSDynamicRuleAction) IsKnown ¶
func (r DDoSDynamicRuleAction) IsKnown() bool
type DDoSDynamicRuleExposedCredentialCheck ¶
type DDoSDynamicRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON DDoSDynamicRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*DDoSDynamicRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *DDoSDynamicRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type DDoSDynamicRuleExposedCredentialCheckJSON ¶
type DDoSDynamicRuleExposedCredentialCheckJSON struct {
PasswordExpression apijson.Field
UsernameExpression apijson.Field
ExtraFields map[string]apijson.Field
// contains filtered or unexported fields
}
DDoSDynamicRuleExposedCredentialCheckJSON contains the JSON metadata for the struct DDoSDynamicRuleExposedCredentialCheck
func (DDoSDynamicRuleExposedCredentialCheckJSON) RawJSON ¶
func (r DDoSDynamicRuleExposedCredentialCheckJSON) RawJSON() string
type DDoSDynamicRuleExposedCredentialCheckParam ¶
type DDoSDynamicRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (DDoSDynamicRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r DDoSDynamicRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type DDoSDynamicRuleJSON ¶
type DDoSDynamicRuleJSON struct {
LastUpdated apijson.Field
Version apijson.Field
ID apijson.Field
Action apijson.Field
ActionParameters apijson.Field
Categories apijson.Field
Description apijson.Field
Enabled apijson.Field
ExposedCredentialCheck apijson.Field
Expression apijson.Field
Logging apijson.Field
Ratelimit apijson.Field
Ref apijson.Field
ExtraFields map[string]apijson.Field
// contains filtered or unexported fields
}
DDoSDynamicRuleJSON contains the JSON metadata for the struct DDoSDynamicRule
func (DDoSDynamicRuleJSON) RawJSON ¶
func (r DDoSDynamicRuleJSON) RawJSON() string
type DDoSDynamicRuleParam ¶
type DDoSDynamicRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[DDoSDynamicRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[DDoSDynamicRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[DDoSDynamicRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (DDoSDynamicRuleParam) MarshalJSON ¶
func (r DDoSDynamicRuleParam) MarshalJSON() (data []byte, err error)
type DDoSDynamicRuleRatelimit ¶
type DDoSDynamicRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON DDoSDynamicRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*DDoSDynamicRuleRatelimit) UnmarshalJSON ¶
func (r *DDoSDynamicRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type DDoSDynamicRuleRatelimitJSON ¶
type DDoSDynamicRuleRatelimitJSON struct {
Characteristics apijson.Field
Period apijson.Field
CountingExpression apijson.Field
MitigationTimeout apijson.Field
RequestsPerPeriod apijson.Field
RequestsToOrigin apijson.Field
ScorePerPeriod apijson.Field
ScoreResponseHeaderName apijson.Field
ExtraFields map[string]apijson.Field
// contains filtered or unexported fields
}
DDoSDynamicRuleRatelimitJSON contains the JSON metadata for the struct DDoSDynamicRuleRatelimit
func (DDoSDynamicRuleRatelimitJSON) RawJSON ¶
func (r DDoSDynamicRuleRatelimitJSON) RawJSON() string
type DDoSDynamicRuleRatelimitParam ¶
type DDoSDynamicRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (DDoSDynamicRuleRatelimitParam) MarshalJSON ¶
func (r DDoSDynamicRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type ErrorDataSource ¶ added in v4.2.0
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type ExecuteRule ¶
type ExecuteRule 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 ExecuteRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters ExecuteRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck ExecuteRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit ExecuteRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON executeRuleJSON `json:"-"`
}
func (*ExecuteRule) UnmarshalJSON ¶
func (r *ExecuteRule) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleAction ¶
type ExecuteRuleAction string
The action to perform when the rule matches.
const (
ExecuteRuleActionExecute ExecuteRuleAction = "execute"
)
func (ExecuteRuleAction) IsKnown ¶
func (r ExecuteRuleAction) IsKnown() bool
type ExecuteRuleActionParameters ¶
type ExecuteRuleActionParameters struct {
// The ID of the ruleset to execute.
ID string `json:"id,required"`
// The configuration to use for matched data logging.
MatchedData ExecuteRuleActionParametersMatchedData `json:"matched_data"`
// A set of overrides to apply to the target ruleset.
Overrides ExecuteRuleActionParametersOverrides `json:"overrides"`
JSON executeRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*ExecuteRuleActionParameters) UnmarshalJSON ¶
func (r *ExecuteRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersMatchedData ¶
type ExecuteRuleActionParametersMatchedData struct {
// The public key to encrypt matched data logs with.
PublicKey string `json:"public_key,required"`
JSON executeRuleActionParametersMatchedDataJSON `json:"-"`
}
The configuration to use for matched data logging.
func (*ExecuteRuleActionParametersMatchedData) UnmarshalJSON ¶
func (r *ExecuteRuleActionParametersMatchedData) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersMatchedDataParam ¶
type ExecuteRuleActionParametersMatchedDataParam 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 (ExecuteRuleActionParametersMatchedDataParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersMatchedDataParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleActionParametersOverrides ¶
type ExecuteRuleActionParametersOverrides 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 []ExecuteRuleActionParametersOverridesCategory `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 []ExecuteRuleActionParametersOverridesRule `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 ExecuteRuleActionParametersOverridesSensitivityLevel `json:"sensitivity_level"`
JSON executeRuleActionParametersOverridesJSON `json:"-"`
}
A set of overrides to apply to the target ruleset.
func (*ExecuteRuleActionParametersOverrides) UnmarshalJSON ¶
func (r *ExecuteRuleActionParametersOverrides) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel ¶
type ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel string
The sensitivity level to use for rules in the category.
const ( ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelDefault ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "default" ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelMedium ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "medium" ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelLow ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "low" ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelEoff ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "eoff" )
func (ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown ¶
func (r ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown() bool
type ExecuteRuleActionParametersOverridesCategory ¶
type ExecuteRuleActionParametersOverridesCategory 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 ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel `json:"sensitivity_level"`
JSON executeRuleActionParametersOverridesCategoryJSON `json:"-"`
}
A category-level override.
func (*ExecuteRuleActionParametersOverridesCategory) UnmarshalJSON ¶
func (r *ExecuteRuleActionParametersOverridesCategory) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersOverridesCategoryParam ¶
type ExecuteRuleActionParametersOverridesCategoryParam 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[ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel] `json:"sensitivity_level"`
}
A category-level override.
func (ExecuteRuleActionParametersOverridesCategoryParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersOverridesCategoryParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleActionParametersOverridesParam ¶
type ExecuteRuleActionParametersOverridesParam 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[[]ExecuteRuleActionParametersOverridesCategoryParam] `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[[]ExecuteRuleActionParametersOverridesRuleParam] `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[ExecuteRuleActionParametersOverridesSensitivityLevel] `json:"sensitivity_level"`
}
A set of overrides to apply to the target ruleset.
func (ExecuteRuleActionParametersOverridesParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersOverridesParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleActionParametersOverridesRule ¶
type ExecuteRuleActionParametersOverridesRule 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 ExecuteRuleActionParametersOverridesRulesSensitivityLevel `json:"sensitivity_level"`
JSON executeRuleActionParametersOverridesRuleJSON `json:"-"`
}
A rule-level override.
func (*ExecuteRuleActionParametersOverridesRule) UnmarshalJSON ¶
func (r *ExecuteRuleActionParametersOverridesRule) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersOverridesRuleParam ¶
type ExecuteRuleActionParametersOverridesRuleParam 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[ExecuteRuleActionParametersOverridesRulesSensitivityLevel] `json:"sensitivity_level"`
}
A rule-level override.
func (ExecuteRuleActionParametersOverridesRuleParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersOverridesRuleParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleActionParametersOverridesRulesSensitivityLevel ¶
type ExecuteRuleActionParametersOverridesRulesSensitivityLevel string
The sensitivity level to use for the rule.
const ( ExecuteRuleActionParametersOverridesRulesSensitivityLevelDefault ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "default" ExecuteRuleActionParametersOverridesRulesSensitivityLevelMedium ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "medium" ExecuteRuleActionParametersOverridesRulesSensitivityLevelLow ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "low" ExecuteRuleActionParametersOverridesRulesSensitivityLevelEoff ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "eoff" )
func (ExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown ¶
func (r ExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown() bool
type ExecuteRuleActionParametersOverridesSensitivityLevel ¶
type ExecuteRuleActionParametersOverridesSensitivityLevel 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 ( ExecuteRuleActionParametersOverridesSensitivityLevelDefault ExecuteRuleActionParametersOverridesSensitivityLevel = "default" ExecuteRuleActionParametersOverridesSensitivityLevelMedium ExecuteRuleActionParametersOverridesSensitivityLevel = "medium" ExecuteRuleActionParametersOverridesSensitivityLevelLow ExecuteRuleActionParametersOverridesSensitivityLevel = "low" ExecuteRuleActionParametersOverridesSensitivityLevelEoff ExecuteRuleActionParametersOverridesSensitivityLevel = "eoff" )
func (ExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown ¶
func (r ExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown() bool
type ExecuteRuleActionParametersParam ¶
type ExecuteRuleActionParametersParam 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[ExecuteRuleActionParametersMatchedDataParam] `json:"matched_data"`
// A set of overrides to apply to the target ruleset.
Overrides param.Field[ExecuteRuleActionParametersOverridesParam] `json:"overrides"`
}
The parameters configuring the rule's action.
func (ExecuteRuleActionParametersParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleExposedCredentialCheck ¶
type ExecuteRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON executeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*ExecuteRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *ExecuteRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleExposedCredentialCheckParam ¶
type ExecuteRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (ExecuteRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r ExecuteRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleParam ¶
type ExecuteRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[ExecuteRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[ExecuteRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[ExecuteRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[ExecuteRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (ExecuteRuleParam) MarshalJSON ¶
func (r ExecuteRuleParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleRatelimit ¶
type ExecuteRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON executeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*ExecuteRuleRatelimit) UnmarshalJSON ¶
func (r *ExecuteRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleRatelimitParam ¶
type ExecuteRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (ExecuteRuleRatelimitParam) MarshalJSON ¶
func (r ExecuteRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type ForceConnectionCloseRule ¶
type ForceConnectionCloseRule 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 ForceConnectionCloseRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck ForceConnectionCloseRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit ForceConnectionCloseRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON forceConnectionCloseRuleJSON `json:"-"`
}
func (*ForceConnectionCloseRule) UnmarshalJSON ¶
func (r *ForceConnectionCloseRule) UnmarshalJSON(data []byte) (err error)
type ForceConnectionCloseRuleAction ¶
type ForceConnectionCloseRuleAction string
The action to perform when the rule matches.
const (
ForceConnectionCloseRuleActionForceConnectionClose ForceConnectionCloseRuleAction = "force_connection_close"
)
func (ForceConnectionCloseRuleAction) IsKnown ¶
func (r ForceConnectionCloseRuleAction) IsKnown() bool
type ForceConnectionCloseRuleExposedCredentialCheck ¶
type ForceConnectionCloseRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON forceConnectionCloseRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*ForceConnectionCloseRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *ForceConnectionCloseRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type ForceConnectionCloseRuleExposedCredentialCheckParam ¶
type ForceConnectionCloseRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (ForceConnectionCloseRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r ForceConnectionCloseRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type ForceConnectionCloseRuleParam ¶
type ForceConnectionCloseRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[ForceConnectionCloseRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[ForceConnectionCloseRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[ForceConnectionCloseRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (ForceConnectionCloseRuleParam) MarshalJSON ¶
func (r ForceConnectionCloseRuleParam) MarshalJSON() (data []byte, err error)
type ForceConnectionCloseRuleRatelimit ¶
type ForceConnectionCloseRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON forceConnectionCloseRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*ForceConnectionCloseRuleRatelimit) UnmarshalJSON ¶
func (r *ForceConnectionCloseRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type ForceConnectionCloseRuleRatelimitParam ¶
type ForceConnectionCloseRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (ForceConnectionCloseRuleRatelimitParam) MarshalJSON ¶
func (r ForceConnectionCloseRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type LogCustomFieldRule ¶
type LogCustomFieldRule 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 LogCustomFieldRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters LogCustomFieldRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck LogCustomFieldRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit LogCustomFieldRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON logCustomFieldRuleJSON `json:"-"`
}
func (*LogCustomFieldRule) UnmarshalJSON ¶
func (r *LogCustomFieldRule) UnmarshalJSON(data []byte) (err error)
type LogCustomFieldRuleAction ¶
type LogCustomFieldRuleAction string
The action to perform when the rule matches.
const (
LogCustomFieldRuleActionLogCustomField LogCustomFieldRuleAction = "log_custom_field"
)
func (LogCustomFieldRuleAction) IsKnown ¶
func (r LogCustomFieldRuleAction) IsKnown() bool
type LogCustomFieldRuleActionParameters ¶
type LogCustomFieldRuleActionParameters struct {
// The cookie fields to log.
CookieFields []LogCustomFieldRuleActionParametersCookieField `json:"cookie_fields"`
// The raw response fields to log.
RawResponseFields []LogCustomFieldRuleActionParametersRawResponseField `json:"raw_response_fields"`
// The raw request fields to log.
RequestFields []LogCustomFieldRuleActionParametersRequestField `json:"request_fields"`
// The transformed response fields to log.
ResponseFields []LogCustomFieldRuleActionParametersResponseField `json:"response_fields"`
// The transformed request fields to log.
TransformedRequestFields []LogCustomFieldRuleActionParametersTransformedRequestField `json:"transformed_request_fields"`
JSON logCustomFieldRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*LogCustomFieldRuleActionParameters) UnmarshalJSON ¶
func (r *LogCustomFieldRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type LogCustomFieldRuleActionParametersCookieField ¶
type LogCustomFieldRuleActionParametersCookieField struct {
// The name of the field.
Name string `json:"name,required"`
JSON logCustomFieldRuleActionParametersCookieFieldJSON `json:"-"`
}
The cookie field to log.
func (*LogCustomFieldRuleActionParametersCookieField) UnmarshalJSON ¶
func (r *LogCustomFieldRuleActionParametersCookieField) UnmarshalJSON(data []byte) (err error)
type LogCustomFieldRuleActionParametersCookieFieldParam ¶
type LogCustomFieldRuleActionParametersCookieFieldParam struct {
// The name of the field.
Name param.Field[string] `json:"name,required"`
}
The cookie field to log.
func (LogCustomFieldRuleActionParametersCookieFieldParam) MarshalJSON ¶
func (r LogCustomFieldRuleActionParametersCookieFieldParam) MarshalJSON() (data []byte, err error)
type LogCustomFieldRuleActionParametersParam ¶
type LogCustomFieldRuleActionParametersParam struct {
// The cookie fields to log.
CookieFields param.Field[[]LogCustomFieldRuleActionParametersCookieFieldParam] `json:"cookie_fields"`
// The raw response fields to log.
RawResponseFields param.Field[[]LogCustomFieldRuleActionParametersRawResponseFieldParam] `json:"raw_response_fields"`
// The raw request fields to log.
RequestFields param.Field[[]LogCustomFieldRuleActionParametersRequestFieldParam] `json:"request_fields"`
// The transformed response fields to log.
ResponseFields param.Field[[]LogCustomFieldRuleActionParametersResponseFieldParam] `json:"response_fields"`
// The transformed request fields to log.
TransformedRequestFields param.Field[[]LogCustomFieldRuleActionParametersTransformedRequestFieldParam] `json:"transformed_request_fields"`
}
The parameters configuring the rule's action.
func (LogCustomFieldRuleActionParametersParam) MarshalJSON ¶
func (r LogCustomFieldRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type LogCustomFieldRuleActionParametersRawResponseField ¶ added in v4.2.0
type LogCustomFieldRuleActionParametersRawResponseField struct {
// The name of the field.
Name string `json:"name,required"`
// Whether to log duplicate values of the same header.
PreserveDuplicates bool `json:"preserve_duplicates"`
JSON logCustomFieldRuleActionParametersRawResponseFieldJSON `json:"-"`
}
The raw response field to log.
func (*LogCustomFieldRuleActionParametersRawResponseField) UnmarshalJSON ¶ added in v4.2.0
func (r *LogCustomFieldRuleActionParametersRawResponseField) UnmarshalJSON(data []byte) (err error)
type LogCustomFieldRuleActionParametersRawResponseFieldParam ¶ added in v4.2.0
type LogCustomFieldRuleActionParametersRawResponseFieldParam struct {
// The name of the field.
Name param.Field[string] `json:"name,required"`
// Whether to log duplicate values of the same header.
PreserveDuplicates param.Field[bool] `json:"preserve_duplicates"`
}
The raw response field to log.
func (LogCustomFieldRuleActionParametersRawResponseFieldParam) MarshalJSON ¶ added in v4.2.0
func (r LogCustomFieldRuleActionParametersRawResponseFieldParam) MarshalJSON() (data []byte, err error)
type LogCustomFieldRuleActionParametersRequestField ¶
type LogCustomFieldRuleActionParametersRequestField struct {
// The name of the field.
Name string `json:"name,required"`
JSON logCustomFieldRuleActionParametersRequestFieldJSON `json:"-"`
}
The raw request field to log.
func (*LogCustomFieldRuleActionParametersRequestField) UnmarshalJSON ¶
func (r *LogCustomFieldRuleActionParametersRequestField) UnmarshalJSON(data []byte) (err error)
type LogCustomFieldRuleActionParametersRequestFieldParam ¶
type LogCustomFieldRuleActionParametersRequestFieldParam struct {
// The name of the field.
Name param.Field[string] `json:"name,required"`
}
The raw request field to log.
func (LogCustomFieldRuleActionParametersRequestFieldParam) MarshalJSON ¶
func (r LogCustomFieldRuleActionParametersRequestFieldParam) MarshalJSON() (data []byte, err error)
type LogCustomFieldRuleActionParametersResponseField ¶
type LogCustomFieldRuleActionParametersResponseField struct {
// The name of the field.
Name string `json:"name,required"`
// Whether to log duplicate values of the same header.
PreserveDuplicates bool `json:"preserve_duplicates"`
JSON logCustomFieldRuleActionParametersResponseFieldJSON `json:"-"`
}
The transformed response field to log.
func (*LogCustomFieldRuleActionParametersResponseField) UnmarshalJSON ¶
func (r *LogCustomFieldRuleActionParametersResponseField) UnmarshalJSON(data []byte) (err error)
type LogCustomFieldRuleActionParametersResponseFieldParam ¶
type LogCustomFieldRuleActionParametersResponseFieldParam struct {
// The name of the field.
Name param.Field[string] `json:"name,required"`
// Whether to log duplicate values of the same header.
PreserveDuplicates param.Field[bool] `json:"preserve_duplicates"`
}
The transformed response field to log.
func (LogCustomFieldRuleActionParametersResponseFieldParam) MarshalJSON ¶
func (r LogCustomFieldRuleActionParametersResponseFieldParam) MarshalJSON() (data []byte, err error)
type LogCustomFieldRuleActionParametersTransformedRequestField ¶ added in v4.2.0
type LogCustomFieldRuleActionParametersTransformedRequestField struct {
// The name of the field.
Name string `json:"name,required"`
JSON logCustomFieldRuleActionParametersTransformedRequestFieldJSON `json:"-"`
}
The transformed request field to log.
func (*LogCustomFieldRuleActionParametersTransformedRequestField) UnmarshalJSON ¶ added in v4.2.0
func (r *LogCustomFieldRuleActionParametersTransformedRequestField) UnmarshalJSON(data []byte) (err error)
type LogCustomFieldRuleActionParametersTransformedRequestFieldParam ¶ added in v4.2.0
type LogCustomFieldRuleActionParametersTransformedRequestFieldParam struct {
// The name of the field.
Name param.Field[string] `json:"name,required"`
}
The transformed request field to log.
func (LogCustomFieldRuleActionParametersTransformedRequestFieldParam) MarshalJSON ¶ added in v4.2.0
func (r LogCustomFieldRuleActionParametersTransformedRequestFieldParam) MarshalJSON() (data []byte, err error)
type LogCustomFieldRuleExposedCredentialCheck ¶
type LogCustomFieldRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON logCustomFieldRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*LogCustomFieldRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *LogCustomFieldRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type LogCustomFieldRuleExposedCredentialCheckParam ¶
type LogCustomFieldRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (LogCustomFieldRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r LogCustomFieldRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type LogCustomFieldRuleParam ¶
type LogCustomFieldRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[LogCustomFieldRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[LogCustomFieldRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[LogCustomFieldRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[LogCustomFieldRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (LogCustomFieldRuleParam) MarshalJSON ¶
func (r LogCustomFieldRuleParam) MarshalJSON() (data []byte, err error)
type LogCustomFieldRuleRatelimit ¶
type LogCustomFieldRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON logCustomFieldRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*LogCustomFieldRuleRatelimit) UnmarshalJSON ¶
func (r *LogCustomFieldRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type LogCustomFieldRuleRatelimitParam ¶
type LogCustomFieldRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (LogCustomFieldRuleRatelimitParam) MarshalJSON ¶
func (r LogCustomFieldRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type LogRule ¶
type LogRule 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 LogRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck LogRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit LogRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON logRuleJSON `json:"-"`
}
func (*LogRule) UnmarshalJSON ¶
type LogRuleAction ¶
type LogRuleAction string
The action to perform when the rule matches.
const (
LogRuleActionLog LogRuleAction = "log"
)
func (LogRuleAction) IsKnown ¶
func (r LogRuleAction) IsKnown() bool
type LogRuleExposedCredentialCheck ¶
type LogRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON logRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*LogRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *LogRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type LogRuleExposedCredentialCheckParam ¶
type LogRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (LogRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r LogRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type LogRuleParam ¶
type LogRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[LogRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[LogRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[LogRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (LogRuleParam) MarshalJSON ¶
func (r LogRuleParam) MarshalJSON() (data []byte, err error)
type LogRuleRatelimit ¶
type LogRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON logRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*LogRuleRatelimit) UnmarshalJSON ¶
func (r *LogRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type LogRuleRatelimitParam ¶
type LogRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (LogRuleRatelimitParam) MarshalJSON ¶
func (r LogRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type Logging ¶
type Logging struct {
// Whether to generate a log when the rule matches.
Enabled bool `json:"enabled,required"`
JSON loggingJSON `json:"-"`
}
An object configuring the rule's logging behavior.
func (*Logging) UnmarshalJSON ¶
type LoggingParam ¶
type LoggingParam 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 (LoggingParam) MarshalJSON ¶
func (r LoggingParam) MarshalJSON() (data []byte, err error)
type ManagedChallengeRule ¶
type ManagedChallengeRule 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 ManagedChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck ManagedChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit ManagedChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON managedChallengeRuleJSON `json:"-"`
}
func (*ManagedChallengeRule) UnmarshalJSON ¶
func (r *ManagedChallengeRule) UnmarshalJSON(data []byte) (err error)
type ManagedChallengeRuleAction ¶
type ManagedChallengeRuleAction string
The action to perform when the rule matches.
const (
ManagedChallengeRuleActionManagedChallenge ManagedChallengeRuleAction = "managed_challenge"
)
func (ManagedChallengeRuleAction) IsKnown ¶
func (r ManagedChallengeRuleAction) IsKnown() bool
type ManagedChallengeRuleExposedCredentialCheck ¶
type ManagedChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON managedChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*ManagedChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *ManagedChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type ManagedChallengeRuleExposedCredentialCheckParam ¶
type ManagedChallengeRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (ManagedChallengeRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r ManagedChallengeRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type ManagedChallengeRuleParam ¶
type ManagedChallengeRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[ManagedChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[ManagedChallengeRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[ManagedChallengeRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (ManagedChallengeRuleParam) MarshalJSON ¶
func (r ManagedChallengeRuleParam) MarshalJSON() (data []byte, err error)
type ManagedChallengeRuleRatelimit ¶
type ManagedChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON managedChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*ManagedChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *ManagedChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type ManagedChallengeRuleRatelimitParam ¶
type ManagedChallengeRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (ManagedChallengeRuleRatelimitParam) MarshalJSON ¶
func (r ManagedChallengeRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
A scope is a combination of scope objects which provides additional context.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScopeObject ¶
type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject
A scope object represents any resource that can have actions applied against invite.
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUser ¶
type MemberUser = shared.MemberUser
Details of the user associated to the membership.
This is an alias to an internal type.
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
type Phase ¶
type Phase string
The phase of the ruleset.
const ( PhaseDDoSL4 Phase = "ddos_l4" PhaseDDoSL7 Phase = "ddos_l7" PhaseHTTPConfigSettings Phase = "http_config_settings" PhaseHTTPCustomErrors Phase = "http_custom_errors" PhaseHTTPLogCustomFields Phase = "http_log_custom_fields" PhaseHTTPRatelimit Phase = "http_ratelimit" PhaseHTTPRequestCacheSettings Phase = "http_request_cache_settings" PhaseHTTPRequestDynamicRedirect Phase = "http_request_dynamic_redirect" PhaseHTTPRequestFirewallCustom Phase = "http_request_firewall_custom" PhaseHTTPRequestFirewallManaged Phase = "http_request_firewall_managed" PhaseHTTPRequestLateTransform Phase = "http_request_late_transform" PhaseHTTPRequestOrigin Phase = "http_request_origin" PhaseHTTPRequestRedirect Phase = "http_request_redirect" PhaseHTTPRequestSanitize Phase = "http_request_sanitize" PhaseHTTPRequestSBFM Phase = "http_request_sbfm" PhaseHTTPRequestTransform Phase = "http_request_transform" PhaseHTTPResponseCompression Phase = "http_response_compression" PhaseHTTPResponseFirewallManaged Phase = "http_response_firewall_managed" PhaseHTTPResponseHeadersTransform Phase = "http_response_headers_transform" PhaseMagicTransit Phase = "magic_transit" PhaseMagicTransitIDsManaged Phase = "magic_transit_ids_managed" PhaseMagicTransitManaged Phase = "magic_transit_managed" PhaseMagicTransitRatelimit Phase = "magic_transit_ratelimit" )
type PhaseGetParams ¶
type PhaseGetResponse ¶
type PhaseGetResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []PhaseGetResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON phaseGetResponseJSON `json:"-"`
}
A ruleset object.
func (*PhaseGetResponse) UnmarshalJSON ¶
func (r *PhaseGetResponse) UnmarshalJSON(data []byte) (err error)
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 ruleset object.
Result PhaseGetResponse `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 ¶
func (r PhaseGetResponseEnvelopeSuccess) IsKnown() bool
type PhaseGetResponseRule ¶
type PhaseGetResponseRule 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 PhaseGetResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [PhaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [PhaseGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [PhaseGetResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [PhaseGetResponseRulesRulesetsJSChallengeRuleRatelimit], [LogRuleRatelimit],
// [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON phaseGetResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (PhaseGetResponseRule) AsUnion ¶
func (r PhaseGetResponseRule) AsUnion() PhaseGetResponseRulesUnion
AsUnion returns a PhaseGetResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, PhaseGetResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, PhaseGetResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*PhaseGetResponseRule) UnmarshalJSON ¶
func (r *PhaseGetResponseRule) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseRulesAction ¶
type PhaseGetResponseRulesAction string
The action to perform when the rule matches.
const ( PhaseGetResponseRulesActionBlock PhaseGetResponseRulesAction = "block" PhaseGetResponseRulesActionChallenge PhaseGetResponseRulesAction = "challenge" PhaseGetResponseRulesActionCompressResponse PhaseGetResponseRulesAction = "compress_response" PhaseGetResponseRulesActionExecute PhaseGetResponseRulesAction = "execute" PhaseGetResponseRulesActionJSChallenge PhaseGetResponseRulesAction = "js_challenge" PhaseGetResponseRulesActionLog PhaseGetResponseRulesAction = "log" PhaseGetResponseRulesActionManagedChallenge PhaseGetResponseRulesAction = "managed_challenge" PhaseGetResponseRulesActionRedirect PhaseGetResponseRulesAction = "redirect" PhaseGetResponseRulesActionRewrite PhaseGetResponseRulesAction = "rewrite" PhaseGetResponseRulesActionRoute PhaseGetResponseRulesAction = "route" PhaseGetResponseRulesActionScore PhaseGetResponseRulesAction = "score" PhaseGetResponseRulesActionServeError PhaseGetResponseRulesAction = "serve_error" PhaseGetResponseRulesActionSetConfig PhaseGetResponseRulesAction = "set_config" PhaseGetResponseRulesActionSkip PhaseGetResponseRulesAction = "skip" PhaseGetResponseRulesActionSetCacheSettings PhaseGetResponseRulesAction = "set_cache_settings" PhaseGetResponseRulesActionLogCustomField PhaseGetResponseRulesAction = "log_custom_field" PhaseGetResponseRulesActionDDoSDynamic PhaseGetResponseRulesAction = "ddos_dynamic" PhaseGetResponseRulesActionForceConnectionClose PhaseGetResponseRulesAction = "force_connection_close" )
func (PhaseGetResponseRulesAction) IsKnown ¶
func (r PhaseGetResponseRulesAction) IsKnown() bool
type PhaseGetResponseRulesRulesetsChallengeRule ¶
type PhaseGetResponseRulesRulesetsChallengeRule 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 PhaseGetResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck PhaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit PhaseGetResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON phaseGetResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*PhaseGetResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *PhaseGetResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseRulesRulesetsChallengeRuleAction ¶
type PhaseGetResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
PhaseGetResponseRulesRulesetsChallengeRuleActionChallenge PhaseGetResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (PhaseGetResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r PhaseGetResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type PhaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type PhaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON phaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*PhaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *PhaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseRulesRulesetsChallengeRuleRatelimit ¶
type PhaseGetResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON phaseGetResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*PhaseGetResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *PhaseGetResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseRulesRulesetsJSChallengeRule ¶
type PhaseGetResponseRulesRulesetsJSChallengeRule 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 PhaseGetResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck PhaseGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit PhaseGetResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON phaseGetResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*PhaseGetResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *PhaseGetResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseRulesRulesetsJSChallengeRuleAction ¶
type PhaseGetResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
PhaseGetResponseRulesRulesetsJSChallengeRuleActionJSChallenge PhaseGetResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (PhaseGetResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r PhaseGetResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type PhaseGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type PhaseGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON phaseGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*PhaseGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *PhaseGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type PhaseGetResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON phaseGetResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*PhaseGetResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *PhaseGetResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseRulesUnion ¶
type PhaseGetResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, PhaseGetResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, PhaseGetResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
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 ¶
func (r *PhaseService) Get(ctx context.Context, rulesetPhase Phase, query PhaseGetParams, opts ...option.RequestOption) (res *PhaseGetResponse, err error)
Fetches the latest version of the account or zone entry point ruleset for a given phase.
func (*PhaseService) Update ¶
func (r *PhaseService) Update(ctx context.Context, rulesetPhase Phase, params PhaseUpdateParams, opts ...option.RequestOption) (res *PhaseUpdateResponse, err error)
Updates an account or zone entry point ruleset, creating a new version.
type PhaseUpdateParams ¶
type PhaseUpdateParams 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"`
// An informative description of the ruleset.
Description param.Field[string] `json:"description"`
// The human-readable name of the ruleset.
Name param.Field[string] `json:"name"`
// The list of rules in the ruleset.
Rules param.Field[[]PhaseUpdateParamsRuleUnion] `json:"rules"`
}
func (PhaseUpdateParams) MarshalJSON ¶
func (r PhaseUpdateParams) MarshalJSON() (data []byte, err error)
type PhaseUpdateParamsRule ¶
type PhaseUpdateParamsRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[PhaseUpdateParamsRulesAction] `json:"action"`
ActionParameters param.Field[interface{}] `json:"action_parameters"`
Categories param.Field[interface{}] `json:"categories"`
// An informative description of the rule.
Description param.Field[string] `json:"description"`
// Whether the rule should be executed.
Enabled param.Field[bool] `json:"enabled"`
ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
Ratelimit param.Field[interface{}] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (PhaseUpdateParamsRule) MarshalJSON ¶
func (r PhaseUpdateParamsRule) MarshalJSON() (data []byte, err error)
type PhaseUpdateParamsRuleUnion ¶
type PhaseUpdateParamsRuleUnion interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.BlockRuleParam, rulesets.PhaseUpdateParamsRulesRulesetsChallengeRule, rulesets.CompressResponseRuleParam, rulesets.ExecuteRuleParam, rulesets.PhaseUpdateParamsRulesRulesetsJSChallengeRule, rulesets.LogRuleParam, rulesets.ManagedChallengeRuleParam, rulesets.RedirectRuleParam, rulesets.RewriteRuleParam, rulesets.RouteRuleParam, rulesets.ScoreRuleParam, rulesets.ServeErrorRuleParam, rulesets.SetConfigRuleParam, rulesets.SkipRuleParam, rulesets.SetCacheSettingsRuleParam, rulesets.LogCustomFieldRuleParam, rulesets.DDoSDynamicRuleParam, rulesets.ForceConnectionCloseRuleParam, PhaseUpdateParamsRule.
type PhaseUpdateParamsRulesAction ¶
type PhaseUpdateParamsRulesAction string
The action to perform when the rule matches.
const ( PhaseUpdateParamsRulesActionBlock PhaseUpdateParamsRulesAction = "block" PhaseUpdateParamsRulesActionChallenge PhaseUpdateParamsRulesAction = "challenge" PhaseUpdateParamsRulesActionCompressResponse PhaseUpdateParamsRulesAction = "compress_response" PhaseUpdateParamsRulesActionExecute PhaseUpdateParamsRulesAction = "execute" PhaseUpdateParamsRulesActionJSChallenge PhaseUpdateParamsRulesAction = "js_challenge" PhaseUpdateParamsRulesActionLog PhaseUpdateParamsRulesAction = "log" PhaseUpdateParamsRulesActionManagedChallenge PhaseUpdateParamsRulesAction = "managed_challenge" PhaseUpdateParamsRulesActionRedirect PhaseUpdateParamsRulesAction = "redirect" PhaseUpdateParamsRulesActionRewrite PhaseUpdateParamsRulesAction = "rewrite" PhaseUpdateParamsRulesActionRoute PhaseUpdateParamsRulesAction = "route" PhaseUpdateParamsRulesActionScore PhaseUpdateParamsRulesAction = "score" PhaseUpdateParamsRulesActionServeError PhaseUpdateParamsRulesAction = "serve_error" PhaseUpdateParamsRulesActionSetConfig PhaseUpdateParamsRulesAction = "set_config" PhaseUpdateParamsRulesActionSkip PhaseUpdateParamsRulesAction = "skip" PhaseUpdateParamsRulesActionSetCacheSettings PhaseUpdateParamsRulesAction = "set_cache_settings" PhaseUpdateParamsRulesActionLogCustomField PhaseUpdateParamsRulesAction = "log_custom_field" PhaseUpdateParamsRulesActionDDoSDynamic PhaseUpdateParamsRulesAction = "ddos_dynamic" PhaseUpdateParamsRulesActionForceConnectionClose PhaseUpdateParamsRulesAction = "force_connection_close" )
func (PhaseUpdateParamsRulesAction) IsKnown ¶
func (r PhaseUpdateParamsRulesAction) IsKnown() bool
type PhaseUpdateParamsRulesRulesetsChallengeRule ¶
type PhaseUpdateParamsRulesRulesetsChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[PhaseUpdateParamsRulesRulesetsChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[PhaseUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[PhaseUpdateParamsRulesRulesetsChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (PhaseUpdateParamsRulesRulesetsChallengeRule) MarshalJSON ¶
func (r PhaseUpdateParamsRulesRulesetsChallengeRule) MarshalJSON() (data []byte, err error)
type PhaseUpdateParamsRulesRulesetsChallengeRuleAction ¶
type PhaseUpdateParamsRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
PhaseUpdateParamsRulesRulesetsChallengeRuleActionChallenge PhaseUpdateParamsRulesRulesetsChallengeRuleAction = "challenge"
)
func (PhaseUpdateParamsRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r PhaseUpdateParamsRulesRulesetsChallengeRuleAction) IsKnown() bool
type PhaseUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type PhaseUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (PhaseUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r PhaseUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type PhaseUpdateParamsRulesRulesetsChallengeRuleRatelimit ¶
type PhaseUpdateParamsRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (PhaseUpdateParamsRulesRulesetsChallengeRuleRatelimit) MarshalJSON ¶
func (r PhaseUpdateParamsRulesRulesetsChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type PhaseUpdateParamsRulesRulesetsJSChallengeRule ¶
type PhaseUpdateParamsRulesRulesetsJSChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[PhaseUpdateParamsRulesRulesetsJSChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[PhaseUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[PhaseUpdateParamsRulesRulesetsJSChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (PhaseUpdateParamsRulesRulesetsJSChallengeRule) MarshalJSON ¶
func (r PhaseUpdateParamsRulesRulesetsJSChallengeRule) MarshalJSON() (data []byte, err error)
type PhaseUpdateParamsRulesRulesetsJSChallengeRuleAction ¶
type PhaseUpdateParamsRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
PhaseUpdateParamsRulesRulesetsJSChallengeRuleActionJSChallenge PhaseUpdateParamsRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (PhaseUpdateParamsRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r PhaseUpdateParamsRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type PhaseUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type PhaseUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (PhaseUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r PhaseUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type PhaseUpdateParamsRulesRulesetsJSChallengeRuleRatelimit ¶
type PhaseUpdateParamsRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (PhaseUpdateParamsRulesRulesetsJSChallengeRuleRatelimit) MarshalJSON ¶
func (r PhaseUpdateParamsRulesRulesetsJSChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type PhaseUpdateResponse ¶
type PhaseUpdateResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []PhaseUpdateResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON phaseUpdateResponseJSON `json:"-"`
}
A ruleset object.
func (*PhaseUpdateResponse) UnmarshalJSON ¶
func (r *PhaseUpdateResponse) UnmarshalJSON(data []byte) (err error)
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 ruleset object.
Result PhaseUpdateResponse `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 ¶
func (r PhaseUpdateResponseEnvelopeSuccess) IsKnown() bool
type PhaseUpdateResponseRule ¶
type PhaseUpdateResponseRule 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 PhaseUpdateResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [PhaseUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [PhaseUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [PhaseUpdateResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [PhaseUpdateResponseRulesRulesetsJSChallengeRuleRatelimit], [LogRuleRatelimit],
// [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON phaseUpdateResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (PhaseUpdateResponseRule) AsUnion ¶
func (r PhaseUpdateResponseRule) AsUnion() PhaseUpdateResponseRulesUnion
AsUnion returns a PhaseUpdateResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, PhaseUpdateResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, PhaseUpdateResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*PhaseUpdateResponseRule) UnmarshalJSON ¶
func (r *PhaseUpdateResponseRule) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseRulesAction ¶
type PhaseUpdateResponseRulesAction string
The action to perform when the rule matches.
const ( PhaseUpdateResponseRulesActionBlock PhaseUpdateResponseRulesAction = "block" PhaseUpdateResponseRulesActionChallenge PhaseUpdateResponseRulesAction = "challenge" PhaseUpdateResponseRulesActionCompressResponse PhaseUpdateResponseRulesAction = "compress_response" PhaseUpdateResponseRulesActionExecute PhaseUpdateResponseRulesAction = "execute" PhaseUpdateResponseRulesActionJSChallenge PhaseUpdateResponseRulesAction = "js_challenge" PhaseUpdateResponseRulesActionLog PhaseUpdateResponseRulesAction = "log" PhaseUpdateResponseRulesActionManagedChallenge PhaseUpdateResponseRulesAction = "managed_challenge" PhaseUpdateResponseRulesActionRedirect PhaseUpdateResponseRulesAction = "redirect" PhaseUpdateResponseRulesActionRewrite PhaseUpdateResponseRulesAction = "rewrite" PhaseUpdateResponseRulesActionRoute PhaseUpdateResponseRulesAction = "route" PhaseUpdateResponseRulesActionScore PhaseUpdateResponseRulesAction = "score" PhaseUpdateResponseRulesActionServeError PhaseUpdateResponseRulesAction = "serve_error" PhaseUpdateResponseRulesActionSetConfig PhaseUpdateResponseRulesAction = "set_config" PhaseUpdateResponseRulesActionSkip PhaseUpdateResponseRulesAction = "skip" PhaseUpdateResponseRulesActionSetCacheSettings PhaseUpdateResponseRulesAction = "set_cache_settings" PhaseUpdateResponseRulesActionLogCustomField PhaseUpdateResponseRulesAction = "log_custom_field" PhaseUpdateResponseRulesActionDDoSDynamic PhaseUpdateResponseRulesAction = "ddos_dynamic" PhaseUpdateResponseRulesActionForceConnectionClose PhaseUpdateResponseRulesAction = "force_connection_close" )
func (PhaseUpdateResponseRulesAction) IsKnown ¶
func (r PhaseUpdateResponseRulesAction) IsKnown() bool
type PhaseUpdateResponseRulesRulesetsChallengeRule ¶
type PhaseUpdateResponseRulesRulesetsChallengeRule 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 PhaseUpdateResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck PhaseUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit PhaseUpdateResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON phaseUpdateResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*PhaseUpdateResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *PhaseUpdateResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseRulesRulesetsChallengeRuleAction ¶
type PhaseUpdateResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
PhaseUpdateResponseRulesRulesetsChallengeRuleActionChallenge PhaseUpdateResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (PhaseUpdateResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r PhaseUpdateResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type PhaseUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type PhaseUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON phaseUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*PhaseUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *PhaseUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseRulesRulesetsChallengeRuleRatelimit ¶
type PhaseUpdateResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON phaseUpdateResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*PhaseUpdateResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *PhaseUpdateResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseRulesRulesetsJSChallengeRule ¶
type PhaseUpdateResponseRulesRulesetsJSChallengeRule 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 PhaseUpdateResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck PhaseUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit PhaseUpdateResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON phaseUpdateResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*PhaseUpdateResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *PhaseUpdateResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseRulesRulesetsJSChallengeRuleAction ¶
type PhaseUpdateResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
PhaseUpdateResponseRulesRulesetsJSChallengeRuleActionJSChallenge PhaseUpdateResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (PhaseUpdateResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r PhaseUpdateResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type PhaseUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type PhaseUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON phaseUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*PhaseUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *PhaseUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type PhaseUpdateResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON phaseUpdateResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*PhaseUpdateResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *PhaseUpdateResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseRulesUnion ¶
type PhaseUpdateResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, PhaseUpdateResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, PhaseUpdateResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
type PhaseVersionGetParams ¶
type PhaseVersionGetResponse ¶
type PhaseVersionGetResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []PhaseVersionGetResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON phaseVersionGetResponseJSON `json:"-"`
}
A ruleset object.
func (*PhaseVersionGetResponse) UnmarshalJSON ¶
func (r *PhaseVersionGetResponse) UnmarshalJSON(data []byte) (err error)
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 ruleset object.
Result PhaseVersionGetResponse `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 ¶
func (r PhaseVersionGetResponseEnvelopeSuccess) IsKnown() bool
type PhaseVersionGetResponseRule ¶
type PhaseVersionGetResponseRule 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 PhaseVersionGetResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [PhaseVersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [PhaseVersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [PhaseVersionGetResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [PhaseVersionGetResponseRulesRulesetsJSChallengeRuleRatelimit],
// [LogRuleRatelimit], [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON phaseVersionGetResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (PhaseVersionGetResponseRule) AsUnion ¶
func (r PhaseVersionGetResponseRule) AsUnion() PhaseVersionGetResponseRulesUnion
AsUnion returns a PhaseVersionGetResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, PhaseVersionGetResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, PhaseVersionGetResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*PhaseVersionGetResponseRule) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseRule) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseRulesAction ¶
type PhaseVersionGetResponseRulesAction string
The action to perform when the rule matches.
const ( PhaseVersionGetResponseRulesActionBlock PhaseVersionGetResponseRulesAction = "block" PhaseVersionGetResponseRulesActionChallenge PhaseVersionGetResponseRulesAction = "challenge" PhaseVersionGetResponseRulesActionCompressResponse PhaseVersionGetResponseRulesAction = "compress_response" PhaseVersionGetResponseRulesActionExecute PhaseVersionGetResponseRulesAction = "execute" PhaseVersionGetResponseRulesActionJSChallenge PhaseVersionGetResponseRulesAction = "js_challenge" PhaseVersionGetResponseRulesActionLog PhaseVersionGetResponseRulesAction = "log" PhaseVersionGetResponseRulesActionManagedChallenge PhaseVersionGetResponseRulesAction = "managed_challenge" PhaseVersionGetResponseRulesActionRedirect PhaseVersionGetResponseRulesAction = "redirect" PhaseVersionGetResponseRulesActionRewrite PhaseVersionGetResponseRulesAction = "rewrite" PhaseVersionGetResponseRulesActionRoute PhaseVersionGetResponseRulesAction = "route" PhaseVersionGetResponseRulesActionScore PhaseVersionGetResponseRulesAction = "score" PhaseVersionGetResponseRulesActionServeError PhaseVersionGetResponseRulesAction = "serve_error" PhaseVersionGetResponseRulesActionSetConfig PhaseVersionGetResponseRulesAction = "set_config" PhaseVersionGetResponseRulesActionSkip PhaseVersionGetResponseRulesAction = "skip" PhaseVersionGetResponseRulesActionSetCacheSettings PhaseVersionGetResponseRulesAction = "set_cache_settings" PhaseVersionGetResponseRulesActionLogCustomField PhaseVersionGetResponseRulesAction = "log_custom_field" PhaseVersionGetResponseRulesActionDDoSDynamic PhaseVersionGetResponseRulesAction = "ddos_dynamic" PhaseVersionGetResponseRulesActionForceConnectionClose PhaseVersionGetResponseRulesAction = "force_connection_close" )
func (PhaseVersionGetResponseRulesAction) IsKnown ¶
func (r PhaseVersionGetResponseRulesAction) IsKnown() bool
type PhaseVersionGetResponseRulesRulesetsChallengeRule ¶
type PhaseVersionGetResponseRulesRulesetsChallengeRule 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 PhaseVersionGetResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck PhaseVersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit PhaseVersionGetResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON phaseVersionGetResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*PhaseVersionGetResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseRulesRulesetsChallengeRuleAction ¶
type PhaseVersionGetResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
PhaseVersionGetResponseRulesRulesetsChallengeRuleActionChallenge PhaseVersionGetResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (PhaseVersionGetResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r PhaseVersionGetResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type PhaseVersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type PhaseVersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON phaseVersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*PhaseVersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseRulesRulesetsChallengeRuleRatelimit ¶
type PhaseVersionGetResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON phaseVersionGetResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*PhaseVersionGetResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseRulesRulesetsJSChallengeRule ¶
type PhaseVersionGetResponseRulesRulesetsJSChallengeRule 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 PhaseVersionGetResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck PhaseVersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit PhaseVersionGetResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON phaseVersionGetResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*PhaseVersionGetResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseRulesRulesetsJSChallengeRuleAction ¶
type PhaseVersionGetResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
PhaseVersionGetResponseRulesRulesetsJSChallengeRuleActionJSChallenge PhaseVersionGetResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (PhaseVersionGetResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r PhaseVersionGetResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type PhaseVersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type PhaseVersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON phaseVersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*PhaseVersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type PhaseVersionGetResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON phaseVersionGetResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*PhaseVersionGetResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseRulesUnion ¶
type PhaseVersionGetResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, PhaseVersionGetResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, PhaseVersionGetResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
type PhaseVersionListParams ¶
type PhaseVersionListResponse ¶
type PhaseVersionListResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON phaseVersionListResponseJSON `json:"-"`
}
A ruleset object.
func (*PhaseVersionListResponse) UnmarshalJSON ¶
func (r *PhaseVersionListResponse) UnmarshalJSON(data []byte) (err error)
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 ¶
func (r *PhaseVersionService) Get(ctx context.Context, rulesetPhase Phase, rulesetVersion string, query PhaseVersionGetParams, opts ...option.RequestOption) (res *PhaseVersionGetResponse, err error)
Fetches a specific version of an account or zone entry point ruleset.
func (*PhaseVersionService) List ¶
func (r *PhaseVersionService) List(ctx context.Context, rulesetPhase Phase, query PhaseVersionListParams, opts ...option.RequestOption) (res *pagination.SinglePage[PhaseVersionListResponse], err error)
Fetches the versions of an account or zone entry point ruleset.
func (*PhaseVersionService) ListAutoPaging ¶
func (r *PhaseVersionService) ListAutoPaging(ctx context.Context, rulesetPhase Phase, query PhaseVersionListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[PhaseVersionListResponse]
Fetches the versions of an account or zone entry point ruleset.
type RatePlanID ¶ added in v4.1.0
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
This is an alias to an internal type.
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type RedirectRule ¶
type RedirectRule 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 RedirectRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters RedirectRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RedirectRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RedirectRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON redirectRuleJSON `json:"-"`
}
func (*RedirectRule) UnmarshalJSON ¶
func (r *RedirectRule) UnmarshalJSON(data []byte) (err error)
type RedirectRuleAction ¶
type RedirectRuleAction string
The action to perform when the rule matches.
const (
RedirectRuleActionRedirect RedirectRuleAction = "redirect"
)
func (RedirectRuleAction) IsKnown ¶
func (r RedirectRuleAction) IsKnown() bool
type RedirectRuleActionParameters ¶
type RedirectRuleActionParameters struct {
// Serve a redirect based on a bulk list lookup.
FromList RedirectRuleActionParametersFromList `json:"from_list"`
// Serve a redirect based on the request properties.
FromValue RedirectRuleActionParametersFromValue `json:"from_value"`
JSON redirectRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*RedirectRuleActionParameters) UnmarshalJSON ¶
func (r *RedirectRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromList ¶
type RedirectRuleActionParametersFromList struct {
// Expression that evaluates to the list lookup key.
Key string `json:"key"`
// The name of the list to match against.
Name string `json:"name"`
JSON redirectRuleActionParametersFromListJSON `json:"-"`
}
Serve a redirect based on a bulk list lookup.
func (*RedirectRuleActionParametersFromList) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromList) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromListParam ¶
type RedirectRuleActionParametersFromListParam struct {
// Expression that evaluates to the list lookup key.
Key param.Field[string] `json:"key"`
// The name of the list to match against.
Name param.Field[string] `json:"name"`
}
Serve a redirect based on a bulk list lookup.
func (RedirectRuleActionParametersFromListParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromListParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValue ¶
type RedirectRuleActionParametersFromValue struct {
// Keep the query string of the original request.
PreserveQueryString bool `json:"preserve_query_string"`
// The status code to be used for the redirect.
StatusCode RedirectRuleActionParametersFromValueStatusCode `json:"status_code"`
// The URL to redirect the request to.
TargetURL RedirectRuleActionParametersFromValueTargetURL `json:"target_url"`
JSON redirectRuleActionParametersFromValueJSON `json:"-"`
}
Serve a redirect based on the request properties.
func (*RedirectRuleActionParametersFromValue) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromValue) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromValueParam ¶
type RedirectRuleActionParametersFromValueParam struct {
// Keep the query string of the original request.
PreserveQueryString param.Field[bool] `json:"preserve_query_string"`
// The status code to be used for the redirect.
StatusCode param.Field[RedirectRuleActionParametersFromValueStatusCode] `json:"status_code"`
// The URL to redirect the request to.
TargetURL param.Field[RedirectRuleActionParametersFromValueTargetURLUnionParam] `json:"target_url"`
}
Serve a redirect based on the request properties.
func (RedirectRuleActionParametersFromValueParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromValueParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValueStatusCode ¶
type RedirectRuleActionParametersFromValueStatusCode float64
The status code to be used for the redirect.
const ( RedirectRuleActionParametersFromValueStatusCode301 RedirectRuleActionParametersFromValueStatusCode = 301 RedirectRuleActionParametersFromValueStatusCode302 RedirectRuleActionParametersFromValueStatusCode = 302 RedirectRuleActionParametersFromValueStatusCode303 RedirectRuleActionParametersFromValueStatusCode = 303 RedirectRuleActionParametersFromValueStatusCode307 RedirectRuleActionParametersFromValueStatusCode = 307 RedirectRuleActionParametersFromValueStatusCode308 RedirectRuleActionParametersFromValueStatusCode = 308 )
func (RedirectRuleActionParametersFromValueStatusCode) IsKnown ¶
func (r RedirectRuleActionParametersFromValueStatusCode) IsKnown() bool
type RedirectRuleActionParametersFromValueTargetURL ¶
type RedirectRuleActionParametersFromValueTargetURL struct {
// An expression to evaluate to get the URL to redirect the request to.
Expression string `json:"expression"`
// The URL to redirect the request to.
Value string `json:"value"`
JSON redirectRuleActionParametersFromValueTargetURLJSON `json:"-"`
// contains filtered or unexported fields
}
The URL to redirect the request to.
func (RedirectRuleActionParametersFromValueTargetURL) AsUnion ¶
func (r RedirectRuleActionParametersFromValueTargetURL) AsUnion() RedirectRuleActionParametersFromValueTargetURLUnion
AsUnion returns a RedirectRuleActionParametersFromValueTargetURLUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect, RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect.
func (*RedirectRuleActionParametersFromValueTargetURL) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromValueTargetURL) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect ¶
type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect struct {
// An expression to evaluate to get the URL to redirect the request to.
Expression string `json:"expression"`
JSON redirectRuleActionParametersFromValueTargetURLDynamicURLRedirectJSON `json:"-"`
}
func (*RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam ¶
type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam struct {
// An expression to evaluate to get the URL to redirect the request to.
Expression param.Field[string] `json:"expression"`
}
func (RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValueTargetURLParam ¶
type RedirectRuleActionParametersFromValueTargetURLParam struct {
// An expression to evaluate to get the URL to redirect the request to.
Expression param.Field[string] `json:"expression"`
// The URL to redirect the request to.
Value param.Field[string] `json:"value"`
}
The URL to redirect the request to.
func (RedirectRuleActionParametersFromValueTargetURLParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromValueTargetURLParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect ¶
type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect struct {
// The URL to redirect the request to.
Value string `json:"value"`
JSON redirectRuleActionParametersFromValueTargetURLStaticURLRedirectJSON `json:"-"`
}
func (*RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam ¶
type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam struct {
// The URL to redirect the request to.
Value param.Field[string] `json:"value"`
}
func (RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValueTargetURLUnion ¶
type RedirectRuleActionParametersFromValueTargetURLUnion interface {
// contains filtered or unexported methods
}
The URL to redirect the request to.
Union satisfied by RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect or RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect.
type RedirectRuleActionParametersFromValueTargetURLUnionParam ¶
type RedirectRuleActionParametersFromValueTargetURLUnionParam interface {
// contains filtered or unexported methods
}
The URL to redirect the request to.
Satisfied by rulesets.RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam, rulesets.RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam, RedirectRuleActionParametersFromValueTargetURLParam.
type RedirectRuleActionParametersParam ¶
type RedirectRuleActionParametersParam struct {
// Serve a redirect based on a bulk list lookup.
FromList param.Field[RedirectRuleActionParametersFromListParam] `json:"from_list"`
// Serve a redirect based on the request properties.
FromValue param.Field[RedirectRuleActionParametersFromValueParam] `json:"from_value"`
}
The parameters configuring the rule's action.
func (RedirectRuleActionParametersParam) MarshalJSON ¶
func (r RedirectRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type RedirectRuleExposedCredentialCheck ¶
type RedirectRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON redirectRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RedirectRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RedirectRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RedirectRuleExposedCredentialCheckParam ¶
type RedirectRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RedirectRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r RedirectRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type RedirectRuleParam ¶
type RedirectRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RedirectRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[RedirectRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RedirectRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RedirectRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RedirectRuleParam) MarshalJSON ¶
func (r RedirectRuleParam) MarshalJSON() (data []byte, err error)
type RedirectRuleRatelimit ¶
type RedirectRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON redirectRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RedirectRuleRatelimit) UnmarshalJSON ¶
func (r *RedirectRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RedirectRuleRatelimitParam ¶
type RedirectRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RedirectRuleRatelimitParam) MarshalJSON ¶
func (r RedirectRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type ResponseInfoSource ¶ added in v4.3.0
type ResponseInfoSource = shared.ResponseInfoSource
This is an alias to an internal type.
type RewriteRule ¶
type RewriteRule 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 RewriteRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters RewriteRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RewriteRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RewriteRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rewriteRuleJSON `json:"-"`
}
func (*RewriteRule) UnmarshalJSON ¶
func (r *RewriteRule) UnmarshalJSON(data []byte) (err error)
type RewriteRuleAction ¶
type RewriteRuleAction string
The action to perform when the rule matches.
const (
RewriteRuleActionRewrite RewriteRuleAction = "rewrite"
)
func (RewriteRuleAction) IsKnown ¶
func (r RewriteRuleAction) IsKnown() bool
type RewriteRuleActionParameters ¶
type RewriteRuleActionParameters struct {
// Map of request headers to modify.
Headers map[string]RewriteRuleActionParametersHeader `json:"headers"`
// URI to rewrite the request to.
URI RewriteRuleActionParametersURI `json:"uri"`
JSON rewriteRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*RewriteRuleActionParameters) UnmarshalJSON ¶
func (r *RewriteRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeader ¶
type RewriteRuleActionParametersHeader struct {
Operation RewriteRuleActionParametersHeadersOperation `json:"operation,required"`
// Expression for the header value.
Expression string `json:"expression"`
// Static value for the header.
Value string `json:"value"`
JSON rewriteRuleActionParametersHeaderJSON `json:"-"`
// contains filtered or unexported fields
}
Remove the header from the request.
func (RewriteRuleActionParametersHeader) AsUnion ¶
func (r RewriteRuleActionParametersHeader) AsUnion() RewriteRuleActionParametersHeadersUnion
AsUnion returns a RewriteRuleActionParametersHeadersUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are RewriteRuleActionParametersHeadersRemoveHeader, RewriteRuleActionParametersHeadersAddStaticHeader, RewriteRuleActionParametersHeadersSetStaticHeader, RewriteRuleActionParametersHeadersAddDynamicHeader, RewriteRuleActionParametersHeadersSetDynamicHeader.
func (*RewriteRuleActionParametersHeader) UnmarshalJSON ¶
func (r *RewriteRuleActionParametersHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeaderParam ¶
type RewriteRuleActionParametersHeaderParam struct {
Operation param.Field[RewriteRuleActionParametersHeadersOperation] `json:"operation,required"`
// Expression for the header value.
Expression param.Field[string] `json:"expression"`
// Static value for the header.
Value param.Field[string] `json:"value"`
}
Remove the header from the request.
func (RewriteRuleActionParametersHeaderParam) MarshalJSON ¶
func (r RewriteRuleActionParametersHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersAddDynamicHeader ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersAddDynamicHeader struct {
// Expression for the header value.
Expression string `json:"expression,required"`
Operation RewriteRuleActionParametersHeadersAddDynamicHeaderOperation `json:"operation,required"`
JSON rewriteRuleActionParametersHeadersAddDynamicHeaderJSON `json:"-"`
}
Add a request header with a dynamic value.
func (*RewriteRuleActionParametersHeadersAddDynamicHeader) UnmarshalJSON ¶ added in v4.3.0
func (r *RewriteRuleActionParametersHeadersAddDynamicHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeadersAddDynamicHeaderOperation ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersAddDynamicHeaderOperation string
const (
RewriteRuleActionParametersHeadersAddDynamicHeaderOperationAdd RewriteRuleActionParametersHeadersAddDynamicHeaderOperation = "add"
)
func (RewriteRuleActionParametersHeadersAddDynamicHeaderOperation) IsKnown ¶ added in v4.3.0
func (r RewriteRuleActionParametersHeadersAddDynamicHeaderOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersAddDynamicHeaderParam ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersAddDynamicHeaderParam struct {
// Expression for the header value.
Expression param.Field[string] `json:"expression,required"`
Operation param.Field[RewriteRuleActionParametersHeadersAddDynamicHeaderOperation] `json:"operation,required"`
}
Add a request header with a dynamic value.
func (RewriteRuleActionParametersHeadersAddDynamicHeaderParam) MarshalJSON ¶ added in v4.3.0
func (r RewriteRuleActionParametersHeadersAddDynamicHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersAddStaticHeader ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersAddStaticHeader struct {
Operation RewriteRuleActionParametersHeadersAddStaticHeaderOperation `json:"operation,required"`
// Static value for the header.
Value string `json:"value,required"`
JSON rewriteRuleActionParametersHeadersAddStaticHeaderJSON `json:"-"`
}
Add a request header with a static value.
func (*RewriteRuleActionParametersHeadersAddStaticHeader) UnmarshalJSON ¶ added in v4.3.0
func (r *RewriteRuleActionParametersHeadersAddStaticHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeadersAddStaticHeaderOperation ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersAddStaticHeaderOperation string
const (
RewriteRuleActionParametersHeadersAddStaticHeaderOperationAdd RewriteRuleActionParametersHeadersAddStaticHeaderOperation = "add"
)
func (RewriteRuleActionParametersHeadersAddStaticHeaderOperation) IsKnown ¶ added in v4.3.0
func (r RewriteRuleActionParametersHeadersAddStaticHeaderOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersAddStaticHeaderParam ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersAddStaticHeaderParam struct {
Operation param.Field[RewriteRuleActionParametersHeadersAddStaticHeaderOperation] `json:"operation,required"`
// Static value for the header.
Value param.Field[string] `json:"value,required"`
}
Add a request header with a static value.
func (RewriteRuleActionParametersHeadersAddStaticHeaderParam) MarshalJSON ¶ added in v4.3.0
func (r RewriteRuleActionParametersHeadersAddStaticHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersOperation ¶
type RewriteRuleActionParametersHeadersOperation string
const ( RewriteRuleActionParametersHeadersOperationRemove RewriteRuleActionParametersHeadersOperation = "remove" RewriteRuleActionParametersHeadersOperationAdd RewriteRuleActionParametersHeadersOperation = "add" RewriteRuleActionParametersHeadersOperationSet RewriteRuleActionParametersHeadersOperation = "set" )
func (RewriteRuleActionParametersHeadersOperation) IsKnown ¶
func (r RewriteRuleActionParametersHeadersOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersRemoveHeader ¶
type RewriteRuleActionParametersHeadersRemoveHeader struct {
Operation RewriteRuleActionParametersHeadersRemoveHeaderOperation `json:"operation,required"`
JSON rewriteRuleActionParametersHeadersRemoveHeaderJSON `json:"-"`
}
Remove the header from the request.
func (*RewriteRuleActionParametersHeadersRemoveHeader) UnmarshalJSON ¶
func (r *RewriteRuleActionParametersHeadersRemoveHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeadersRemoveHeaderOperation ¶
type RewriteRuleActionParametersHeadersRemoveHeaderOperation string
const (
RewriteRuleActionParametersHeadersRemoveHeaderOperationRemove RewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"
)
func (RewriteRuleActionParametersHeadersRemoveHeaderOperation) IsKnown ¶
func (r RewriteRuleActionParametersHeadersRemoveHeaderOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersRemoveHeaderParam ¶
type RewriteRuleActionParametersHeadersRemoveHeaderParam struct {
Operation param.Field[RewriteRuleActionParametersHeadersRemoveHeaderOperation] `json:"operation,required"`
}
Remove the header from the request.
func (RewriteRuleActionParametersHeadersRemoveHeaderParam) MarshalJSON ¶
func (r RewriteRuleActionParametersHeadersRemoveHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersSetDynamicHeader ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersSetDynamicHeader struct {
// Expression for the header value.
Expression string `json:"expression,required"`
Operation RewriteRuleActionParametersHeadersSetDynamicHeaderOperation `json:"operation,required"`
JSON rewriteRuleActionParametersHeadersSetDynamicHeaderJSON `json:"-"`
}
Set a request header with a dynamic value.
func (*RewriteRuleActionParametersHeadersSetDynamicHeader) UnmarshalJSON ¶ added in v4.3.0
func (r *RewriteRuleActionParametersHeadersSetDynamicHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeadersSetDynamicHeaderOperation ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersSetDynamicHeaderOperation string
const (
RewriteRuleActionParametersHeadersSetDynamicHeaderOperationSet RewriteRuleActionParametersHeadersSetDynamicHeaderOperation = "set"
)
func (RewriteRuleActionParametersHeadersSetDynamicHeaderOperation) IsKnown ¶ added in v4.3.0
func (r RewriteRuleActionParametersHeadersSetDynamicHeaderOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersSetDynamicHeaderParam ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersSetDynamicHeaderParam struct {
// Expression for the header value.
Expression param.Field[string] `json:"expression,required"`
Operation param.Field[RewriteRuleActionParametersHeadersSetDynamicHeaderOperation] `json:"operation,required"`
}
Set a request header with a dynamic value.
func (RewriteRuleActionParametersHeadersSetDynamicHeaderParam) MarshalJSON ¶ added in v4.3.0
func (r RewriteRuleActionParametersHeadersSetDynamicHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersSetStaticHeader ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersSetStaticHeader struct {
Operation RewriteRuleActionParametersHeadersSetStaticHeaderOperation `json:"operation,required"`
// Static value for the header.
Value string `json:"value,required"`
JSON rewriteRuleActionParametersHeadersSetStaticHeaderJSON `json:"-"`
}
Set a request header with a static value.
func (*RewriteRuleActionParametersHeadersSetStaticHeader) UnmarshalJSON ¶ added in v4.3.0
func (r *RewriteRuleActionParametersHeadersSetStaticHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeadersSetStaticHeaderOperation ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersSetStaticHeaderOperation string
const (
RewriteRuleActionParametersHeadersSetStaticHeaderOperationSet RewriteRuleActionParametersHeadersSetStaticHeaderOperation = "set"
)
func (RewriteRuleActionParametersHeadersSetStaticHeaderOperation) IsKnown ¶ added in v4.3.0
func (r RewriteRuleActionParametersHeadersSetStaticHeaderOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersSetStaticHeaderParam ¶ added in v4.3.0
type RewriteRuleActionParametersHeadersSetStaticHeaderParam struct {
Operation param.Field[RewriteRuleActionParametersHeadersSetStaticHeaderOperation] `json:"operation,required"`
// Static value for the header.
Value param.Field[string] `json:"value,required"`
}
Set a request header with a static value.
func (RewriteRuleActionParametersHeadersSetStaticHeaderParam) MarshalJSON ¶ added in v4.3.0
func (r RewriteRuleActionParametersHeadersSetStaticHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersUnion ¶
type RewriteRuleActionParametersHeadersUnion interface {
// contains filtered or unexported methods
}
Remove the header from the request.
Union satisfied by RewriteRuleActionParametersHeadersRemoveHeader, RewriteRuleActionParametersHeadersAddStaticHeader, RewriteRuleActionParametersHeadersSetStaticHeader, RewriteRuleActionParametersHeadersAddDynamicHeader or RewriteRuleActionParametersHeadersSetDynamicHeader.
type RewriteRuleActionParametersHeadersUnionParam ¶
type RewriteRuleActionParametersHeadersUnionParam interface {
// contains filtered or unexported methods
}
Remove the header from the request.
Satisfied by rulesets.RewriteRuleActionParametersHeadersRemoveHeaderParam, rulesets.RewriteRuleActionParametersHeadersAddStaticHeaderParam, rulesets.RewriteRuleActionParametersHeadersSetStaticHeaderParam, rulesets.RewriteRuleActionParametersHeadersAddDynamicHeaderParam, rulesets.RewriteRuleActionParametersHeadersSetDynamicHeaderParam, RewriteRuleActionParametersHeaderParam.
type RewriteRuleActionParametersParam ¶
type RewriteRuleActionParametersParam struct {
// Map of request headers to modify.
Headers param.Field[map[string]RewriteRuleActionParametersHeadersUnionParam] `json:"headers"`
// URI to rewrite the request to.
URI param.Field[RewriteRuleActionParametersURIParam] `json:"uri"`
}
The parameters configuring the rule's action.
func (RewriteRuleActionParametersParam) MarshalJSON ¶
func (r RewriteRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersURI ¶
type RewriteRuleActionParametersURI struct {
// Path portion rewrite.
Path RewriteURIPart `json:"path"`
// Query portion rewrite.
Query RewriteURIPart `json:"query"`
JSON rewriteRuleActionParametersURIJSON `json:"-"`
}
URI to rewrite the request to.
func (*RewriteRuleActionParametersURI) UnmarshalJSON ¶
func (r *RewriteRuleActionParametersURI) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersURIParam ¶
type RewriteRuleActionParametersURIParam struct {
// Path portion rewrite.
Path param.Field[RewriteURIPartUnionParam] `json:"path"`
// Query portion rewrite.
Query param.Field[RewriteURIPartUnionParam] `json:"query"`
}
URI to rewrite the request to.
func (RewriteRuleActionParametersURIParam) MarshalJSON ¶
func (r RewriteRuleActionParametersURIParam) MarshalJSON() (data []byte, err error)
type RewriteRuleExposedCredentialCheck ¶
type RewriteRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON rewriteRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RewriteRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RewriteRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RewriteRuleExposedCredentialCheckParam ¶
type RewriteRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RewriteRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r RewriteRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type RewriteRuleParam ¶
type RewriteRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RewriteRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[RewriteRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RewriteRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RewriteRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RewriteRuleParam) MarshalJSON ¶
func (r RewriteRuleParam) MarshalJSON() (data []byte, err error)
type RewriteRuleRatelimit ¶
type RewriteRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON rewriteRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RewriteRuleRatelimit) UnmarshalJSON ¶
func (r *RewriteRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RewriteRuleRatelimitParam ¶
type RewriteRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RewriteRuleRatelimitParam) MarshalJSON ¶
func (r RewriteRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type RewriteURIPart ¶
type RewriteURIPart struct {
// Expression to evaluate for the replacement value.
Expression string `json:"expression"`
// Predefined replacement value.
Value string `json:"value"`
JSON rewriteURIPartJSON `json:"-"`
// contains filtered or unexported fields
}
func (RewriteURIPart) AsUnion ¶
func (r RewriteURIPart) AsUnion() RewriteURIPartUnion
AsUnion returns a RewriteURIPartUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are RewriteURIPartStaticValue, RewriteURIPartDynamicValue.
func (*RewriteURIPart) UnmarshalJSON ¶
func (r *RewriteURIPart) UnmarshalJSON(data []byte) (err error)
type RewriteURIPartDynamicValue ¶
type RewriteURIPartDynamicValue struct {
// Expression to evaluate for the replacement value.
Expression string `json:"expression,required"`
JSON rewriteURIPartDynamicValueJSON `json:"-"`
}
func (*RewriteURIPartDynamicValue) UnmarshalJSON ¶
func (r *RewriteURIPartDynamicValue) UnmarshalJSON(data []byte) (err error)
type RewriteURIPartDynamicValueParam ¶
type RewriteURIPartDynamicValueParam struct {
// Expression to evaluate for the replacement value.
Expression param.Field[string] `json:"expression,required"`
}
func (RewriteURIPartDynamicValueParam) MarshalJSON ¶
func (r RewriteURIPartDynamicValueParam) MarshalJSON() (data []byte, err error)
type RewriteURIPartParam ¶
type RewriteURIPartParam struct {
// Expression to evaluate for the replacement value.
Expression param.Field[string] `json:"expression"`
// Predefined replacement value.
Value param.Field[string] `json:"value"`
}
func (RewriteURIPartParam) MarshalJSON ¶
func (r RewriteURIPartParam) MarshalJSON() (data []byte, err error)
type RewriteURIPartStaticValue ¶
type RewriteURIPartStaticValue struct {
// Predefined replacement value.
Value string `json:"value,required"`
JSON rewriteURIPartStaticValueJSON `json:"-"`
}
func (*RewriteURIPartStaticValue) UnmarshalJSON ¶
func (r *RewriteURIPartStaticValue) UnmarshalJSON(data []byte) (err error)
type RewriteURIPartStaticValueParam ¶
type RewriteURIPartStaticValueParam struct {
// Predefined replacement value.
Value param.Field[string] `json:"value,required"`
}
func (RewriteURIPartStaticValueParam) MarshalJSON ¶
func (r RewriteURIPartStaticValueParam) MarshalJSON() (data []byte, err error)
type RewriteURIPartUnion ¶
type RewriteURIPartUnion interface {
// contains filtered or unexported methods
}
Union satisfied by RewriteURIPartStaticValue or RewriteURIPartDynamicValue.
type RewriteURIPartUnionParam ¶
type RewriteURIPartUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.RewriteURIPartStaticValueParam, rulesets.RewriteURIPartDynamicValueParam, RewriteURIPartParam.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
This is an alias to an internal type.
type RouteRule ¶
type RouteRule 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 RouteRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters RouteRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RouteRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RouteRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON routeRuleJSON `json:"-"`
}
func (*RouteRule) UnmarshalJSON ¶
type RouteRuleAction ¶
type RouteRuleAction string
The action to perform when the rule matches.
const (
RouteRuleActionRoute RouteRuleAction = "route"
)
func (RouteRuleAction) IsKnown ¶
func (r RouteRuleAction) IsKnown() bool
type RouteRuleActionParameters ¶
type RouteRuleActionParameters struct {
// Rewrite the HTTP Host header.
HostHeader string `json:"host_header"`
// Override the IP/TCP destination.
Origin RouteRuleActionParametersOrigin `json:"origin"`
// Override the Server Name Indication (SNI).
SNI RouteRuleActionParametersSNI `json:"sni"`
JSON routeRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*RouteRuleActionParameters) UnmarshalJSON ¶
func (r *RouteRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type RouteRuleActionParametersOrigin ¶
type RouteRuleActionParametersOrigin struct {
// Override the resolved hostname.
Host string `json:"host"`
// Override the destination port.
Port float64 `json:"port"`
JSON routeRuleActionParametersOriginJSON `json:"-"`
}
Override the IP/TCP destination.
func (*RouteRuleActionParametersOrigin) UnmarshalJSON ¶
func (r *RouteRuleActionParametersOrigin) UnmarshalJSON(data []byte) (err error)
type RouteRuleActionParametersOriginParam ¶
type RouteRuleActionParametersOriginParam struct {
// Override the resolved hostname.
Host param.Field[string] `json:"host"`
// Override the destination port.
Port param.Field[float64] `json:"port"`
}
Override the IP/TCP destination.
func (RouteRuleActionParametersOriginParam) MarshalJSON ¶
func (r RouteRuleActionParametersOriginParam) MarshalJSON() (data []byte, err error)
type RouteRuleActionParametersParam ¶
type RouteRuleActionParametersParam struct {
// Rewrite the HTTP Host header.
HostHeader param.Field[string] `json:"host_header"`
// Override the IP/TCP destination.
Origin param.Field[RouteRuleActionParametersOriginParam] `json:"origin"`
// Override the Server Name Indication (SNI).
SNI param.Field[RouteRuleActionParametersSNIParam] `json:"sni"`
}
The parameters configuring the rule's action.
func (RouteRuleActionParametersParam) MarshalJSON ¶
func (r RouteRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type RouteRuleActionParametersSNI ¶
type RouteRuleActionParametersSNI struct {
// The SNI override.
Value string `json:"value,required"`
JSON routeRuleActionParametersSNIJSON `json:"-"`
}
Override the Server Name Indication (SNI).
func (*RouteRuleActionParametersSNI) UnmarshalJSON ¶
func (r *RouteRuleActionParametersSNI) UnmarshalJSON(data []byte) (err error)
type RouteRuleActionParametersSNIParam ¶
type RouteRuleActionParametersSNIParam struct {
// The SNI override.
Value param.Field[string] `json:"value,required"`
}
Override the Server Name Indication (SNI).
func (RouteRuleActionParametersSNIParam) MarshalJSON ¶
func (r RouteRuleActionParametersSNIParam) MarshalJSON() (data []byte, err error)
type RouteRuleExposedCredentialCheck ¶
type RouteRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON routeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RouteRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RouteRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RouteRuleExposedCredentialCheckParam ¶
type RouteRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RouteRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r RouteRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type RouteRuleParam ¶
type RouteRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RouteRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[RouteRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RouteRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RouteRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RouteRuleParam) MarshalJSON ¶
func (r RouteRuleParam) MarshalJSON() (data []byte, err error)
type RouteRuleRatelimit ¶
type RouteRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON routeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RouteRuleRatelimit) UnmarshalJSON ¶
func (r *RouteRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RouteRuleRatelimitParam ¶
type RouteRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RouteRuleRatelimitParam) MarshalJSON ¶
func (r RouteRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type RuleDeleteParams ¶
type RuleDeleteResponse ¶
type RuleDeleteResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []RuleDeleteResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON ruleDeleteResponseJSON `json:"-"`
}
A ruleset object.
func (*RuleDeleteResponse) UnmarshalJSON ¶
func (r *RuleDeleteResponse) UnmarshalJSON(data []byte) (err error)
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 ruleset object.
Result RuleDeleteResponse `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 ¶
func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type RuleDeleteResponseRule ¶
type RuleDeleteResponseRule 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 RuleDeleteResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [RuleDeleteResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [RuleDeleteResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [RuleDeleteResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [RuleDeleteResponseRulesRulesetsJSChallengeRuleRatelimit], [LogRuleRatelimit],
// [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON ruleDeleteResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (RuleDeleteResponseRule) AsUnion ¶
func (r RuleDeleteResponseRule) AsUnion() RuleDeleteResponseRulesUnion
AsUnion returns a RuleDeleteResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, RuleDeleteResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RuleDeleteResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*RuleDeleteResponseRule) UnmarshalJSON ¶
func (r *RuleDeleteResponseRule) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseRulesAction ¶
type RuleDeleteResponseRulesAction string
The action to perform when the rule matches.
const ( RuleDeleteResponseRulesActionBlock RuleDeleteResponseRulesAction = "block" RuleDeleteResponseRulesActionChallenge RuleDeleteResponseRulesAction = "challenge" RuleDeleteResponseRulesActionCompressResponse RuleDeleteResponseRulesAction = "compress_response" RuleDeleteResponseRulesActionExecute RuleDeleteResponseRulesAction = "execute" RuleDeleteResponseRulesActionJSChallenge RuleDeleteResponseRulesAction = "js_challenge" RuleDeleteResponseRulesActionLog RuleDeleteResponseRulesAction = "log" RuleDeleteResponseRulesActionManagedChallenge RuleDeleteResponseRulesAction = "managed_challenge" RuleDeleteResponseRulesActionRedirect RuleDeleteResponseRulesAction = "redirect" RuleDeleteResponseRulesActionRewrite RuleDeleteResponseRulesAction = "rewrite" RuleDeleteResponseRulesActionRoute RuleDeleteResponseRulesAction = "route" RuleDeleteResponseRulesActionScore RuleDeleteResponseRulesAction = "score" RuleDeleteResponseRulesActionServeError RuleDeleteResponseRulesAction = "serve_error" RuleDeleteResponseRulesActionSetConfig RuleDeleteResponseRulesAction = "set_config" RuleDeleteResponseRulesActionSkip RuleDeleteResponseRulesAction = "skip" RuleDeleteResponseRulesActionSetCacheSettings RuleDeleteResponseRulesAction = "set_cache_settings" RuleDeleteResponseRulesActionLogCustomField RuleDeleteResponseRulesAction = "log_custom_field" RuleDeleteResponseRulesActionDDoSDynamic RuleDeleteResponseRulesAction = "ddos_dynamic" RuleDeleteResponseRulesActionForceConnectionClose RuleDeleteResponseRulesAction = "force_connection_close" )
func (RuleDeleteResponseRulesAction) IsKnown ¶
func (r RuleDeleteResponseRulesAction) IsKnown() bool
type RuleDeleteResponseRulesRulesetsChallengeRule ¶
type RuleDeleteResponseRulesRulesetsChallengeRule 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 RuleDeleteResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RuleDeleteResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RuleDeleteResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON ruleDeleteResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*RuleDeleteResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *RuleDeleteResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseRulesRulesetsChallengeRuleAction ¶
type RuleDeleteResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleDeleteResponseRulesRulesetsChallengeRuleActionChallenge RuleDeleteResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (RuleDeleteResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r RuleDeleteResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type RuleDeleteResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type RuleDeleteResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON ruleDeleteResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RuleDeleteResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RuleDeleteResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseRulesRulesetsChallengeRuleRatelimit ¶
type RuleDeleteResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON ruleDeleteResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RuleDeleteResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RuleDeleteResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseRulesRulesetsJSChallengeRule ¶
type RuleDeleteResponseRulesRulesetsJSChallengeRule 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 RuleDeleteResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RuleDeleteResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RuleDeleteResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON ruleDeleteResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*RuleDeleteResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *RuleDeleteResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseRulesRulesetsJSChallengeRuleAction ¶
type RuleDeleteResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleDeleteResponseRulesRulesetsJSChallengeRuleActionJSChallenge RuleDeleteResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (RuleDeleteResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r RuleDeleteResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type RuleDeleteResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type RuleDeleteResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON ruleDeleteResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RuleDeleteResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RuleDeleteResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type RuleDeleteResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON ruleDeleteResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RuleDeleteResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RuleDeleteResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseRulesUnion ¶
type RuleDeleteResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, RuleDeleteResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RuleDeleteResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
type RuleEditParams ¶
type RuleEditParams struct {
Body RuleEditParamsBodyUnion `json:"body,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"`
}
func (RuleEditParams) MarshalJSON ¶
func (r RuleEditParams) MarshalJSON() (data []byte, err error)
type RuleEditParamsBody ¶
type RuleEditParamsBody struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RuleEditParamsBodyAction] `json:"action"`
ActionParameters param.Field[interface{}] `json:"action_parameters"`
Categories param.Field[interface{}] `json:"categories"`
// An informative description of the rule.
Description param.Field[string] `json:"description"`
// Whether the rule should be executed.
Enabled param.Field[bool] `json:"enabled"`
ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
Position param.Field[interface{}] `json:"position"`
Ratelimit param.Field[interface{}] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RuleEditParamsBody) MarshalJSON ¶
func (r RuleEditParamsBody) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyAction ¶
type RuleEditParamsBodyAction string
The action to perform when the rule matches.
const ( RuleEditParamsBodyActionBlock RuleEditParamsBodyAction = "block" RuleEditParamsBodyActionChallenge RuleEditParamsBodyAction = "challenge" RuleEditParamsBodyActionCompressResponse RuleEditParamsBodyAction = "compress_response" RuleEditParamsBodyActionExecute RuleEditParamsBodyAction = "execute" RuleEditParamsBodyActionJSChallenge RuleEditParamsBodyAction = "js_challenge" RuleEditParamsBodyActionLog RuleEditParamsBodyAction = "log" RuleEditParamsBodyActionManagedChallenge RuleEditParamsBodyAction = "managed_challenge" RuleEditParamsBodyActionRedirect RuleEditParamsBodyAction = "redirect" RuleEditParamsBodyActionRewrite RuleEditParamsBodyAction = "rewrite" RuleEditParamsBodyActionRoute RuleEditParamsBodyAction = "route" RuleEditParamsBodyActionScore RuleEditParamsBodyAction = "score" RuleEditParamsBodyActionServeError RuleEditParamsBodyAction = "serve_error" RuleEditParamsBodyActionSetConfig RuleEditParamsBodyAction = "set_config" RuleEditParamsBodyActionSkip RuleEditParamsBodyAction = "skip" RuleEditParamsBodyActionSetCacheSettings RuleEditParamsBodyAction = "set_cache_settings" RuleEditParamsBodyActionLogCustomField RuleEditParamsBodyAction = "log_custom_field" RuleEditParamsBodyActionDDoSDynamic RuleEditParamsBodyAction = "ddos_dynamic" RuleEditParamsBodyActionForceConnectionClose RuleEditParamsBodyAction = "force_connection_close" )
func (RuleEditParamsBodyAction) IsKnown ¶
func (r RuleEditParamsBodyAction) IsKnown() bool
type RuleEditParamsBodyBlockRule ¶
type RuleEditParamsBodyBlockRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyBlockRulePositionUnion] `json:"position"`
BlockRuleParam
}
func (RuleEditParamsBodyBlockRule) MarshalJSON ¶
func (r RuleEditParamsBodyBlockRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyBlockRulePosition ¶
type RuleEditParamsBodyBlockRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyBlockRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyBlockRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyBlockRulePositionAfterPosition ¶
type RuleEditParamsBodyBlockRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyBlockRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyBlockRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyBlockRulePositionBeforePosition ¶
type RuleEditParamsBodyBlockRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyBlockRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyBlockRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyBlockRulePositionIndexPosition ¶
type RuleEditParamsBodyBlockRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyBlockRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyBlockRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyBlockRulePositionUnion ¶
type RuleEditParamsBodyBlockRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyBlockRulePositionBeforePosition, rulesets.RuleEditParamsBodyBlockRulePositionAfterPosition, rulesets.RuleEditParamsBodyBlockRulePositionIndexPosition, RuleEditParamsBodyBlockRulePosition.
type RuleEditParamsBodyChallengeRule ¶
type RuleEditParamsBodyChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RuleEditParamsBodyChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RuleEditParamsBodyChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyChallengeRulePositionUnion] `json:"position"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RuleEditParamsBodyChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RuleEditParamsBodyChallengeRule) MarshalJSON ¶
func (r RuleEditParamsBodyChallengeRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyChallengeRuleAction ¶
type RuleEditParamsBodyChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleEditParamsBodyChallengeRuleActionChallenge RuleEditParamsBodyChallengeRuleAction = "challenge"
)
func (RuleEditParamsBodyChallengeRuleAction) IsKnown ¶
func (r RuleEditParamsBodyChallengeRuleAction) IsKnown() bool
type RuleEditParamsBodyChallengeRuleExposedCredentialCheck ¶
type RuleEditParamsBodyChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RuleEditParamsBodyChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r RuleEditParamsBodyChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyChallengeRulePosition ¶
type RuleEditParamsBodyChallengeRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyChallengeRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyChallengeRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyChallengeRulePositionAfterPosition ¶
type RuleEditParamsBodyChallengeRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyChallengeRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyChallengeRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyChallengeRulePositionBeforePosition ¶
type RuleEditParamsBodyChallengeRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyChallengeRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyChallengeRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyChallengeRulePositionIndexPosition ¶
type RuleEditParamsBodyChallengeRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyChallengeRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyChallengeRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyChallengeRulePositionUnion ¶
type RuleEditParamsBodyChallengeRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyChallengeRulePositionBeforePosition, rulesets.RuleEditParamsBodyChallengeRulePositionAfterPosition, rulesets.RuleEditParamsBodyChallengeRulePositionIndexPosition, RuleEditParamsBodyChallengeRulePosition.
type RuleEditParamsBodyChallengeRuleRatelimit ¶
type RuleEditParamsBodyChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RuleEditParamsBodyChallengeRuleRatelimit) MarshalJSON ¶
func (r RuleEditParamsBodyChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyCompressionRule ¶
type RuleEditParamsBodyCompressionRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyCompressionRulePositionUnion] `json:"position"`
CompressResponseRuleParam
}
func (RuleEditParamsBodyCompressionRule) MarshalJSON ¶
func (r RuleEditParamsBodyCompressionRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyCompressionRulePosition ¶
type RuleEditParamsBodyCompressionRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyCompressionRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyCompressionRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyCompressionRulePositionAfterPosition ¶
type RuleEditParamsBodyCompressionRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyCompressionRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyCompressionRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyCompressionRulePositionBeforePosition ¶
type RuleEditParamsBodyCompressionRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyCompressionRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyCompressionRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyCompressionRulePositionIndexPosition ¶
type RuleEditParamsBodyCompressionRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyCompressionRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyCompressionRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyCompressionRulePositionUnion ¶
type RuleEditParamsBodyCompressionRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyCompressionRulePositionBeforePosition, rulesets.RuleEditParamsBodyCompressionRulePositionAfterPosition, rulesets.RuleEditParamsBodyCompressionRulePositionIndexPosition, RuleEditParamsBodyCompressionRulePosition.
type RuleEditParamsBodyDDoSDynamicRule ¶
type RuleEditParamsBodyDDoSDynamicRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyDDoSDynamicRulePositionUnion] `json:"position"`
DDoSDynamicRuleParam
}
func (RuleEditParamsBodyDDoSDynamicRule) MarshalJSON ¶
func (r RuleEditParamsBodyDDoSDynamicRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyDDoSDynamicRulePosition ¶
type RuleEditParamsBodyDDoSDynamicRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyDDoSDynamicRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyDDoSDynamicRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyDDoSDynamicRulePositionAfterPosition ¶
type RuleEditParamsBodyDDoSDynamicRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyDDoSDynamicRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyDDoSDynamicRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyDDoSDynamicRulePositionBeforePosition ¶
type RuleEditParamsBodyDDoSDynamicRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyDDoSDynamicRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyDDoSDynamicRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyDDoSDynamicRulePositionIndexPosition ¶
type RuleEditParamsBodyDDoSDynamicRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyDDoSDynamicRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyDDoSDynamicRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyDDoSDynamicRulePositionUnion ¶
type RuleEditParamsBodyDDoSDynamicRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyDDoSDynamicRulePositionBeforePosition, rulesets.RuleEditParamsBodyDDoSDynamicRulePositionAfterPosition, rulesets.RuleEditParamsBodyDDoSDynamicRulePositionIndexPosition, RuleEditParamsBodyDDoSDynamicRulePosition.
type RuleEditParamsBodyExecuteRule ¶
type RuleEditParamsBodyExecuteRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyExecuteRulePositionUnion] `json:"position"`
ExecuteRuleParam
}
func (RuleEditParamsBodyExecuteRule) MarshalJSON ¶
func (r RuleEditParamsBodyExecuteRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyExecuteRulePosition ¶
type RuleEditParamsBodyExecuteRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyExecuteRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyExecuteRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyExecuteRulePositionAfterPosition ¶
type RuleEditParamsBodyExecuteRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyExecuteRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyExecuteRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyExecuteRulePositionBeforePosition ¶
type RuleEditParamsBodyExecuteRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyExecuteRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyExecuteRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyExecuteRulePositionIndexPosition ¶
type RuleEditParamsBodyExecuteRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyExecuteRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyExecuteRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyExecuteRulePositionUnion ¶
type RuleEditParamsBodyExecuteRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyExecuteRulePositionBeforePosition, rulesets.RuleEditParamsBodyExecuteRulePositionAfterPosition, rulesets.RuleEditParamsBodyExecuteRulePositionIndexPosition, RuleEditParamsBodyExecuteRulePosition.
type RuleEditParamsBodyForceConnectionCloseRule ¶
type RuleEditParamsBodyForceConnectionCloseRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyForceConnectionCloseRulePositionUnion] `json:"position"`
ForceConnectionCloseRuleParam
}
func (RuleEditParamsBodyForceConnectionCloseRule) MarshalJSON ¶
func (r RuleEditParamsBodyForceConnectionCloseRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyForceConnectionCloseRulePosition ¶
type RuleEditParamsBodyForceConnectionCloseRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyForceConnectionCloseRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyForceConnectionCloseRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyForceConnectionCloseRulePositionAfterPosition ¶
type RuleEditParamsBodyForceConnectionCloseRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyForceConnectionCloseRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyForceConnectionCloseRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyForceConnectionCloseRulePositionBeforePosition ¶
type RuleEditParamsBodyForceConnectionCloseRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyForceConnectionCloseRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyForceConnectionCloseRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyForceConnectionCloseRulePositionIndexPosition ¶
type RuleEditParamsBodyForceConnectionCloseRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyForceConnectionCloseRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyForceConnectionCloseRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyForceConnectionCloseRulePositionUnion ¶
type RuleEditParamsBodyForceConnectionCloseRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyForceConnectionCloseRulePositionBeforePosition, rulesets.RuleEditParamsBodyForceConnectionCloseRulePositionAfterPosition, rulesets.RuleEditParamsBodyForceConnectionCloseRulePositionIndexPosition, RuleEditParamsBodyForceConnectionCloseRulePosition.
type RuleEditParamsBodyJavascriptChallengeRule ¶
type RuleEditParamsBodyJavascriptChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RuleEditParamsBodyJavascriptChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RuleEditParamsBodyJavascriptChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyJavascriptChallengeRulePositionUnion] `json:"position"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RuleEditParamsBodyJavascriptChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RuleEditParamsBodyJavascriptChallengeRule) MarshalJSON ¶
func (r RuleEditParamsBodyJavascriptChallengeRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyJavascriptChallengeRuleAction ¶
type RuleEditParamsBodyJavascriptChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleEditParamsBodyJavascriptChallengeRuleActionJSChallenge RuleEditParamsBodyJavascriptChallengeRuleAction = "js_challenge"
)
func (RuleEditParamsBodyJavascriptChallengeRuleAction) IsKnown ¶
func (r RuleEditParamsBodyJavascriptChallengeRuleAction) IsKnown() bool
type RuleEditParamsBodyJavascriptChallengeRuleExposedCredentialCheck ¶
type RuleEditParamsBodyJavascriptChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RuleEditParamsBodyJavascriptChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r RuleEditParamsBodyJavascriptChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyJavascriptChallengeRulePosition ¶
type RuleEditParamsBodyJavascriptChallengeRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyJavascriptChallengeRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyJavascriptChallengeRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyJavascriptChallengeRulePositionAfterPosition ¶
type RuleEditParamsBodyJavascriptChallengeRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyJavascriptChallengeRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyJavascriptChallengeRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyJavascriptChallengeRulePositionBeforePosition ¶
type RuleEditParamsBodyJavascriptChallengeRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyJavascriptChallengeRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyJavascriptChallengeRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyJavascriptChallengeRulePositionIndexPosition ¶
type RuleEditParamsBodyJavascriptChallengeRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyJavascriptChallengeRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyJavascriptChallengeRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyJavascriptChallengeRulePositionUnion ¶
type RuleEditParamsBodyJavascriptChallengeRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyJavascriptChallengeRulePositionBeforePosition, rulesets.RuleEditParamsBodyJavascriptChallengeRulePositionAfterPosition, rulesets.RuleEditParamsBodyJavascriptChallengeRulePositionIndexPosition, RuleEditParamsBodyJavascriptChallengeRulePosition.
type RuleEditParamsBodyJavascriptChallengeRuleRatelimit ¶
type RuleEditParamsBodyJavascriptChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RuleEditParamsBodyJavascriptChallengeRuleRatelimit) MarshalJSON ¶
func (r RuleEditParamsBodyJavascriptChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogCustomFieldRule ¶
type RuleEditParamsBodyLogCustomFieldRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyLogCustomFieldRulePositionUnion] `json:"position"`
LogCustomFieldRuleParam
}
func (RuleEditParamsBodyLogCustomFieldRule) MarshalJSON ¶
func (r RuleEditParamsBodyLogCustomFieldRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogCustomFieldRulePosition ¶
type RuleEditParamsBodyLogCustomFieldRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyLogCustomFieldRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyLogCustomFieldRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogCustomFieldRulePositionAfterPosition ¶
type RuleEditParamsBodyLogCustomFieldRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyLogCustomFieldRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyLogCustomFieldRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogCustomFieldRulePositionBeforePosition ¶
type RuleEditParamsBodyLogCustomFieldRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyLogCustomFieldRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyLogCustomFieldRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogCustomFieldRulePositionIndexPosition ¶
type RuleEditParamsBodyLogCustomFieldRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyLogCustomFieldRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyLogCustomFieldRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogCustomFieldRulePositionUnion ¶
type RuleEditParamsBodyLogCustomFieldRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyLogCustomFieldRulePositionBeforePosition, rulesets.RuleEditParamsBodyLogCustomFieldRulePositionAfterPosition, rulesets.RuleEditParamsBodyLogCustomFieldRulePositionIndexPosition, RuleEditParamsBodyLogCustomFieldRulePosition.
type RuleEditParamsBodyLogRule ¶
type RuleEditParamsBodyLogRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyLogRulePositionUnion] `json:"position"`
LogRuleParam
}
func (RuleEditParamsBodyLogRule) MarshalJSON ¶
func (r RuleEditParamsBodyLogRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogRulePosition ¶
type RuleEditParamsBodyLogRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyLogRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyLogRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogRulePositionAfterPosition ¶
type RuleEditParamsBodyLogRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyLogRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyLogRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogRulePositionBeforePosition ¶
type RuleEditParamsBodyLogRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyLogRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyLogRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogRulePositionIndexPosition ¶
type RuleEditParamsBodyLogRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyLogRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyLogRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyLogRulePositionUnion ¶
type RuleEditParamsBodyLogRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyLogRulePositionBeforePosition, rulesets.RuleEditParamsBodyLogRulePositionAfterPosition, rulesets.RuleEditParamsBodyLogRulePositionIndexPosition, RuleEditParamsBodyLogRulePosition.
type RuleEditParamsBodyManagedChallengeRule ¶
type RuleEditParamsBodyManagedChallengeRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyManagedChallengeRulePositionUnion] `json:"position"`
ManagedChallengeRuleParam
}
func (RuleEditParamsBodyManagedChallengeRule) MarshalJSON ¶
func (r RuleEditParamsBodyManagedChallengeRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyManagedChallengeRulePosition ¶
type RuleEditParamsBodyManagedChallengeRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyManagedChallengeRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyManagedChallengeRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyManagedChallengeRulePositionAfterPosition ¶
type RuleEditParamsBodyManagedChallengeRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyManagedChallengeRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyManagedChallengeRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyManagedChallengeRulePositionBeforePosition ¶
type RuleEditParamsBodyManagedChallengeRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyManagedChallengeRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyManagedChallengeRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyManagedChallengeRulePositionIndexPosition ¶
type RuleEditParamsBodyManagedChallengeRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyManagedChallengeRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyManagedChallengeRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyManagedChallengeRulePositionUnion ¶
type RuleEditParamsBodyManagedChallengeRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyManagedChallengeRulePositionBeforePosition, rulesets.RuleEditParamsBodyManagedChallengeRulePositionAfterPosition, rulesets.RuleEditParamsBodyManagedChallengeRulePositionIndexPosition, RuleEditParamsBodyManagedChallengeRulePosition.
type RuleEditParamsBodyOriginRule ¶
type RuleEditParamsBodyOriginRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyOriginRulePositionUnion] `json:"position"`
RouteRuleParam
}
func (RuleEditParamsBodyOriginRule) MarshalJSON ¶
func (r RuleEditParamsBodyOriginRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyOriginRulePosition ¶
type RuleEditParamsBodyOriginRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyOriginRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyOriginRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyOriginRulePositionAfterPosition ¶
type RuleEditParamsBodyOriginRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyOriginRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyOriginRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyOriginRulePositionBeforePosition ¶
type RuleEditParamsBodyOriginRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyOriginRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyOriginRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyOriginRulePositionIndexPosition ¶
type RuleEditParamsBodyOriginRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyOriginRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyOriginRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyOriginRulePositionUnion ¶
type RuleEditParamsBodyOriginRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyOriginRulePositionBeforePosition, rulesets.RuleEditParamsBodyOriginRulePositionAfterPosition, rulesets.RuleEditParamsBodyOriginRulePositionIndexPosition, RuleEditParamsBodyOriginRulePosition.
type RuleEditParamsBodyRedirectRule ¶
type RuleEditParamsBodyRedirectRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyRedirectRulePositionUnion] `json:"position"`
RedirectRuleParam
}
func (RuleEditParamsBodyRedirectRule) MarshalJSON ¶
func (r RuleEditParamsBodyRedirectRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRedirectRulePosition ¶
type RuleEditParamsBodyRedirectRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyRedirectRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyRedirectRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRedirectRulePositionAfterPosition ¶
type RuleEditParamsBodyRedirectRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyRedirectRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyRedirectRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRedirectRulePositionBeforePosition ¶
type RuleEditParamsBodyRedirectRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyRedirectRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyRedirectRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRedirectRulePositionIndexPosition ¶
type RuleEditParamsBodyRedirectRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyRedirectRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyRedirectRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRedirectRulePositionUnion ¶
type RuleEditParamsBodyRedirectRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyRedirectRulePositionBeforePosition, rulesets.RuleEditParamsBodyRedirectRulePositionAfterPosition, rulesets.RuleEditParamsBodyRedirectRulePositionIndexPosition, RuleEditParamsBodyRedirectRulePosition.
type RuleEditParamsBodyRewriteRule ¶
type RuleEditParamsBodyRewriteRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyRewriteRulePositionUnion] `json:"position"`
RewriteRuleParam
}
func (RuleEditParamsBodyRewriteRule) MarshalJSON ¶
func (r RuleEditParamsBodyRewriteRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRewriteRulePosition ¶
type RuleEditParamsBodyRewriteRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyRewriteRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyRewriteRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRewriteRulePositionAfterPosition ¶
type RuleEditParamsBodyRewriteRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyRewriteRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyRewriteRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRewriteRulePositionBeforePosition ¶
type RuleEditParamsBodyRewriteRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyRewriteRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyRewriteRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRewriteRulePositionIndexPosition ¶
type RuleEditParamsBodyRewriteRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyRewriteRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyRewriteRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyRewriteRulePositionUnion ¶
type RuleEditParamsBodyRewriteRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyRewriteRulePositionBeforePosition, rulesets.RuleEditParamsBodyRewriteRulePositionAfterPosition, rulesets.RuleEditParamsBodyRewriteRulePositionIndexPosition, RuleEditParamsBodyRewriteRulePosition.
type RuleEditParamsBodyScoreRule ¶
type RuleEditParamsBodyScoreRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyScoreRulePositionUnion] `json:"position"`
ScoreRuleParam
}
func (RuleEditParamsBodyScoreRule) MarshalJSON ¶
func (r RuleEditParamsBodyScoreRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyScoreRulePosition ¶
type RuleEditParamsBodyScoreRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyScoreRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyScoreRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyScoreRulePositionAfterPosition ¶
type RuleEditParamsBodyScoreRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyScoreRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyScoreRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyScoreRulePositionBeforePosition ¶
type RuleEditParamsBodyScoreRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyScoreRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyScoreRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyScoreRulePositionIndexPosition ¶
type RuleEditParamsBodyScoreRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyScoreRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyScoreRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyScoreRulePositionUnion ¶
type RuleEditParamsBodyScoreRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyScoreRulePositionBeforePosition, rulesets.RuleEditParamsBodyScoreRulePositionAfterPosition, rulesets.RuleEditParamsBodyScoreRulePositionIndexPosition, RuleEditParamsBodyScoreRulePosition.
type RuleEditParamsBodyServeErrorRule ¶
type RuleEditParamsBodyServeErrorRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodyServeErrorRulePositionUnion] `json:"position"`
ServeErrorRuleParam
}
func (RuleEditParamsBodyServeErrorRule) MarshalJSON ¶
func (r RuleEditParamsBodyServeErrorRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyServeErrorRulePosition ¶
type RuleEditParamsBodyServeErrorRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyServeErrorRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodyServeErrorRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyServeErrorRulePositionAfterPosition ¶
type RuleEditParamsBodyServeErrorRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyServeErrorRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodyServeErrorRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyServeErrorRulePositionBeforePosition ¶
type RuleEditParamsBodyServeErrorRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyServeErrorRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodyServeErrorRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyServeErrorRulePositionIndexPosition ¶
type RuleEditParamsBodyServeErrorRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodyServeErrorRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodyServeErrorRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodyServeErrorRulePositionUnion ¶
type RuleEditParamsBodyServeErrorRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodyServeErrorRulePositionBeforePosition, rulesets.RuleEditParamsBodyServeErrorRulePositionAfterPosition, rulesets.RuleEditParamsBodyServeErrorRulePositionIndexPosition, RuleEditParamsBodyServeErrorRulePosition.
type RuleEditParamsBodySetCacheSettingsRule ¶
type RuleEditParamsBodySetCacheSettingsRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodySetCacheSettingsRulePositionUnion] `json:"position"`
SetCacheSettingsRuleParam
}
func (RuleEditParamsBodySetCacheSettingsRule) MarshalJSON ¶
func (r RuleEditParamsBodySetCacheSettingsRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetCacheSettingsRulePosition ¶
type RuleEditParamsBodySetCacheSettingsRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySetCacheSettingsRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodySetCacheSettingsRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetCacheSettingsRulePositionAfterPosition ¶
type RuleEditParamsBodySetCacheSettingsRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySetCacheSettingsRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodySetCacheSettingsRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetCacheSettingsRulePositionBeforePosition ¶
type RuleEditParamsBodySetCacheSettingsRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySetCacheSettingsRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodySetCacheSettingsRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetCacheSettingsRulePositionIndexPosition ¶
type RuleEditParamsBodySetCacheSettingsRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySetCacheSettingsRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodySetCacheSettingsRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetCacheSettingsRulePositionUnion ¶
type RuleEditParamsBodySetCacheSettingsRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodySetCacheSettingsRulePositionBeforePosition, rulesets.RuleEditParamsBodySetCacheSettingsRulePositionAfterPosition, rulesets.RuleEditParamsBodySetCacheSettingsRulePositionIndexPosition, RuleEditParamsBodySetCacheSettingsRulePosition.
type RuleEditParamsBodySetConfigRule ¶
type RuleEditParamsBodySetConfigRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodySetConfigRulePositionUnion] `json:"position"`
SetConfigRuleParam
}
func (RuleEditParamsBodySetConfigRule) MarshalJSON ¶
func (r RuleEditParamsBodySetConfigRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetConfigRulePosition ¶
type RuleEditParamsBodySetConfigRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySetConfigRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodySetConfigRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetConfigRulePositionAfterPosition ¶
type RuleEditParamsBodySetConfigRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySetConfigRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodySetConfigRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetConfigRulePositionBeforePosition ¶
type RuleEditParamsBodySetConfigRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySetConfigRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodySetConfigRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetConfigRulePositionIndexPosition ¶
type RuleEditParamsBodySetConfigRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySetConfigRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodySetConfigRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySetConfigRulePositionUnion ¶
type RuleEditParamsBodySetConfigRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodySetConfigRulePositionBeforePosition, rulesets.RuleEditParamsBodySetConfigRulePositionAfterPosition, rulesets.RuleEditParamsBodySetConfigRulePositionIndexPosition, RuleEditParamsBodySetConfigRulePosition.
type RuleEditParamsBodySkipRule ¶
type RuleEditParamsBodySkipRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleEditParamsBodySkipRulePositionUnion] `json:"position"`
SkipRuleParam
}
func (RuleEditParamsBodySkipRule) MarshalJSON ¶
func (r RuleEditParamsBodySkipRule) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySkipRulePosition ¶
type RuleEditParamsBodySkipRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySkipRulePosition) MarshalJSON ¶
func (r RuleEditParamsBodySkipRulePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySkipRulePositionAfterPosition ¶
type RuleEditParamsBodySkipRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySkipRulePositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsBodySkipRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySkipRulePositionBeforePosition ¶
type RuleEditParamsBodySkipRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySkipRulePositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsBodySkipRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySkipRulePositionIndexPosition ¶
type RuleEditParamsBodySkipRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleEditParamsBodySkipRulePositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsBodySkipRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsBodySkipRulePositionUnion ¶
type RuleEditParamsBodySkipRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsBodySkipRulePositionBeforePosition, rulesets.RuleEditParamsBodySkipRulePositionAfterPosition, rulesets.RuleEditParamsBodySkipRulePositionIndexPosition, RuleEditParamsBodySkipRulePosition.
type RuleEditParamsBodyUnion ¶
type RuleEditParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.RuleEditParamsBodyBlockRule, rulesets.RuleEditParamsBodyChallengeRule, rulesets.RuleEditParamsBodyCompressionRule, rulesets.RuleEditParamsBodyExecuteRule, rulesets.RuleEditParamsBodyJavascriptChallengeRule, rulesets.RuleEditParamsBodyLogRule, rulesets.RuleEditParamsBodyManagedChallengeRule, rulesets.RuleEditParamsBodyRedirectRule, rulesets.RuleEditParamsBodyRewriteRule, rulesets.RuleEditParamsBodyOriginRule, rulesets.RuleEditParamsBodyScoreRule, rulesets.RuleEditParamsBodyServeErrorRule, rulesets.RuleEditParamsBodySetConfigRule, rulesets.RuleEditParamsBodySkipRule, rulesets.RuleEditParamsBodySetCacheSettingsRule, rulesets.RuleEditParamsBodyLogCustomFieldRule, rulesets.RuleEditParamsBodyDDoSDynamicRule, rulesets.RuleEditParamsBodyForceConnectionCloseRule, RuleEditParamsBody.
type RuleEditResponse ¶
type RuleEditResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []RuleEditResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON ruleEditResponseJSON `json:"-"`
}
A ruleset object.
func (*RuleEditResponse) UnmarshalJSON ¶
func (r *RuleEditResponse) UnmarshalJSON(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 ruleset object.
Result RuleEditResponse `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 ¶
func (r RuleEditResponseEnvelopeSuccess) IsKnown() bool
type RuleEditResponseRule ¶
type RuleEditResponseRule 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 RuleEditResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [RuleEditResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [RuleEditResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [RuleEditResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [RuleEditResponseRulesRulesetsJSChallengeRuleRatelimit], [LogRuleRatelimit],
// [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON ruleEditResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (RuleEditResponseRule) AsUnion ¶
func (r RuleEditResponseRule) AsUnion() RuleEditResponseRulesUnion
AsUnion returns a RuleEditResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, RuleEditResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RuleEditResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*RuleEditResponseRule) UnmarshalJSON ¶
func (r *RuleEditResponseRule) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseRulesAction ¶
type RuleEditResponseRulesAction string
The action to perform when the rule matches.
const ( RuleEditResponseRulesActionBlock RuleEditResponseRulesAction = "block" RuleEditResponseRulesActionChallenge RuleEditResponseRulesAction = "challenge" RuleEditResponseRulesActionCompressResponse RuleEditResponseRulesAction = "compress_response" RuleEditResponseRulesActionExecute RuleEditResponseRulesAction = "execute" RuleEditResponseRulesActionJSChallenge RuleEditResponseRulesAction = "js_challenge" RuleEditResponseRulesActionLog RuleEditResponseRulesAction = "log" RuleEditResponseRulesActionManagedChallenge RuleEditResponseRulesAction = "managed_challenge" RuleEditResponseRulesActionRedirect RuleEditResponseRulesAction = "redirect" RuleEditResponseRulesActionRewrite RuleEditResponseRulesAction = "rewrite" RuleEditResponseRulesActionRoute RuleEditResponseRulesAction = "route" RuleEditResponseRulesActionScore RuleEditResponseRulesAction = "score" RuleEditResponseRulesActionServeError RuleEditResponseRulesAction = "serve_error" RuleEditResponseRulesActionSetConfig RuleEditResponseRulesAction = "set_config" RuleEditResponseRulesActionSkip RuleEditResponseRulesAction = "skip" RuleEditResponseRulesActionSetCacheSettings RuleEditResponseRulesAction = "set_cache_settings" RuleEditResponseRulesActionLogCustomField RuleEditResponseRulesAction = "log_custom_field" RuleEditResponseRulesActionDDoSDynamic RuleEditResponseRulesAction = "ddos_dynamic" RuleEditResponseRulesActionForceConnectionClose RuleEditResponseRulesAction = "force_connection_close" )
func (RuleEditResponseRulesAction) IsKnown ¶
func (r RuleEditResponseRulesAction) IsKnown() bool
type RuleEditResponseRulesRulesetsChallengeRule ¶
type RuleEditResponseRulesRulesetsChallengeRule 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 RuleEditResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RuleEditResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RuleEditResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON ruleEditResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*RuleEditResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *RuleEditResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseRulesRulesetsChallengeRuleAction ¶
type RuleEditResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleEditResponseRulesRulesetsChallengeRuleActionChallenge RuleEditResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (RuleEditResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r RuleEditResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type RuleEditResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type RuleEditResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON ruleEditResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RuleEditResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RuleEditResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseRulesRulesetsChallengeRuleRatelimit ¶
type RuleEditResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON ruleEditResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RuleEditResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RuleEditResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseRulesRulesetsJSChallengeRule ¶
type RuleEditResponseRulesRulesetsJSChallengeRule 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 RuleEditResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RuleEditResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RuleEditResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON ruleEditResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*RuleEditResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *RuleEditResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseRulesRulesetsJSChallengeRuleAction ¶
type RuleEditResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleEditResponseRulesRulesetsJSChallengeRuleActionJSChallenge RuleEditResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (RuleEditResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r RuleEditResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type RuleEditResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type RuleEditResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON ruleEditResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RuleEditResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RuleEditResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type RuleEditResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON ruleEditResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RuleEditResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RuleEditResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseRulesUnion ¶
type RuleEditResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, RuleEditResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RuleEditResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
type RuleNewParams ¶
type RuleNewParams struct {
Body RuleNewParamsBodyUnion `json:"body,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"`
}
func (RuleNewParams) MarshalJSON ¶
func (r RuleNewParams) MarshalJSON() (data []byte, err error)
type RuleNewParamsBody ¶
type RuleNewParamsBody struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RuleNewParamsBodyAction] `json:"action"`
ActionParameters param.Field[interface{}] `json:"action_parameters"`
Categories param.Field[interface{}] `json:"categories"`
// An informative description of the rule.
Description param.Field[string] `json:"description"`
// Whether the rule should be executed.
Enabled param.Field[bool] `json:"enabled"`
ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
Position param.Field[interface{}] `json:"position"`
Ratelimit param.Field[interface{}] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RuleNewParamsBody) MarshalJSON ¶
func (r RuleNewParamsBody) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyAction ¶
type RuleNewParamsBodyAction string
The action to perform when the rule matches.
const ( RuleNewParamsBodyActionBlock RuleNewParamsBodyAction = "block" RuleNewParamsBodyActionChallenge RuleNewParamsBodyAction = "challenge" RuleNewParamsBodyActionCompressResponse RuleNewParamsBodyAction = "compress_response" RuleNewParamsBodyActionExecute RuleNewParamsBodyAction = "execute" RuleNewParamsBodyActionJSChallenge RuleNewParamsBodyAction = "js_challenge" RuleNewParamsBodyActionLog RuleNewParamsBodyAction = "log" RuleNewParamsBodyActionManagedChallenge RuleNewParamsBodyAction = "managed_challenge" RuleNewParamsBodyActionRedirect RuleNewParamsBodyAction = "redirect" RuleNewParamsBodyActionRewrite RuleNewParamsBodyAction = "rewrite" RuleNewParamsBodyActionRoute RuleNewParamsBodyAction = "route" RuleNewParamsBodyActionScore RuleNewParamsBodyAction = "score" RuleNewParamsBodyActionServeError RuleNewParamsBodyAction = "serve_error" RuleNewParamsBodyActionSetConfig RuleNewParamsBodyAction = "set_config" RuleNewParamsBodyActionSkip RuleNewParamsBodyAction = "skip" RuleNewParamsBodyActionSetCacheSettings RuleNewParamsBodyAction = "set_cache_settings" RuleNewParamsBodyActionLogCustomField RuleNewParamsBodyAction = "log_custom_field" RuleNewParamsBodyActionDDoSDynamic RuleNewParamsBodyAction = "ddos_dynamic" RuleNewParamsBodyActionForceConnectionClose RuleNewParamsBodyAction = "force_connection_close" )
func (RuleNewParamsBodyAction) IsKnown ¶
func (r RuleNewParamsBodyAction) IsKnown() bool
type RuleNewParamsBodyBlockRule ¶
type RuleNewParamsBodyBlockRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyBlockRulePositionUnion] `json:"position"`
BlockRuleParam
}
func (RuleNewParamsBodyBlockRule) MarshalJSON ¶
func (r RuleNewParamsBodyBlockRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyBlockRulePosition ¶
type RuleNewParamsBodyBlockRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyBlockRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyBlockRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyBlockRulePositionAfterPosition ¶
type RuleNewParamsBodyBlockRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyBlockRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyBlockRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyBlockRulePositionBeforePosition ¶
type RuleNewParamsBodyBlockRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyBlockRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyBlockRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyBlockRulePositionIndexPosition ¶
type RuleNewParamsBodyBlockRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyBlockRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyBlockRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyBlockRulePositionUnion ¶
type RuleNewParamsBodyBlockRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyBlockRulePositionBeforePosition, rulesets.RuleNewParamsBodyBlockRulePositionAfterPosition, rulesets.RuleNewParamsBodyBlockRulePositionIndexPosition, RuleNewParamsBodyBlockRulePosition.
type RuleNewParamsBodyChallengeRule ¶
type RuleNewParamsBodyChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RuleNewParamsBodyChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RuleNewParamsBodyChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyChallengeRulePositionUnion] `json:"position"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RuleNewParamsBodyChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RuleNewParamsBodyChallengeRule) MarshalJSON ¶
func (r RuleNewParamsBodyChallengeRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyChallengeRuleAction ¶
type RuleNewParamsBodyChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleNewParamsBodyChallengeRuleActionChallenge RuleNewParamsBodyChallengeRuleAction = "challenge"
)
func (RuleNewParamsBodyChallengeRuleAction) IsKnown ¶
func (r RuleNewParamsBodyChallengeRuleAction) IsKnown() bool
type RuleNewParamsBodyChallengeRuleExposedCredentialCheck ¶
type RuleNewParamsBodyChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RuleNewParamsBodyChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r RuleNewParamsBodyChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyChallengeRulePosition ¶
type RuleNewParamsBodyChallengeRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyChallengeRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyChallengeRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyChallengeRulePositionAfterPosition ¶
type RuleNewParamsBodyChallengeRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyChallengeRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyChallengeRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyChallengeRulePositionBeforePosition ¶
type RuleNewParamsBodyChallengeRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyChallengeRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyChallengeRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyChallengeRulePositionIndexPosition ¶
type RuleNewParamsBodyChallengeRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyChallengeRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyChallengeRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyChallengeRulePositionUnion ¶
type RuleNewParamsBodyChallengeRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyChallengeRulePositionBeforePosition, rulesets.RuleNewParamsBodyChallengeRulePositionAfterPosition, rulesets.RuleNewParamsBodyChallengeRulePositionIndexPosition, RuleNewParamsBodyChallengeRulePosition.
type RuleNewParamsBodyChallengeRuleRatelimit ¶
type RuleNewParamsBodyChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RuleNewParamsBodyChallengeRuleRatelimit) MarshalJSON ¶
func (r RuleNewParamsBodyChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyCompressionRule ¶
type RuleNewParamsBodyCompressionRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyCompressionRulePositionUnion] `json:"position"`
CompressResponseRuleParam
}
func (RuleNewParamsBodyCompressionRule) MarshalJSON ¶
func (r RuleNewParamsBodyCompressionRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyCompressionRulePosition ¶
type RuleNewParamsBodyCompressionRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyCompressionRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyCompressionRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyCompressionRulePositionAfterPosition ¶
type RuleNewParamsBodyCompressionRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyCompressionRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyCompressionRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyCompressionRulePositionBeforePosition ¶
type RuleNewParamsBodyCompressionRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyCompressionRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyCompressionRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyCompressionRulePositionIndexPosition ¶
type RuleNewParamsBodyCompressionRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyCompressionRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyCompressionRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyCompressionRulePositionUnion ¶
type RuleNewParamsBodyCompressionRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyCompressionRulePositionBeforePosition, rulesets.RuleNewParamsBodyCompressionRulePositionAfterPosition, rulesets.RuleNewParamsBodyCompressionRulePositionIndexPosition, RuleNewParamsBodyCompressionRulePosition.
type RuleNewParamsBodyDDoSDynamicRule ¶
type RuleNewParamsBodyDDoSDynamicRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyDDoSDynamicRulePositionUnion] `json:"position"`
DDoSDynamicRuleParam
}
func (RuleNewParamsBodyDDoSDynamicRule) MarshalJSON ¶
func (r RuleNewParamsBodyDDoSDynamicRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyDDoSDynamicRulePosition ¶
type RuleNewParamsBodyDDoSDynamicRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyDDoSDynamicRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyDDoSDynamicRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyDDoSDynamicRulePositionAfterPosition ¶
type RuleNewParamsBodyDDoSDynamicRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyDDoSDynamicRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyDDoSDynamicRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyDDoSDynamicRulePositionBeforePosition ¶
type RuleNewParamsBodyDDoSDynamicRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyDDoSDynamicRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyDDoSDynamicRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyDDoSDynamicRulePositionIndexPosition ¶
type RuleNewParamsBodyDDoSDynamicRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyDDoSDynamicRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyDDoSDynamicRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyDDoSDynamicRulePositionUnion ¶
type RuleNewParamsBodyDDoSDynamicRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyDDoSDynamicRulePositionBeforePosition, rulesets.RuleNewParamsBodyDDoSDynamicRulePositionAfterPosition, rulesets.RuleNewParamsBodyDDoSDynamicRulePositionIndexPosition, RuleNewParamsBodyDDoSDynamicRulePosition.
type RuleNewParamsBodyExecuteRule ¶
type RuleNewParamsBodyExecuteRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyExecuteRulePositionUnion] `json:"position"`
ExecuteRuleParam
}
func (RuleNewParamsBodyExecuteRule) MarshalJSON ¶
func (r RuleNewParamsBodyExecuteRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyExecuteRulePosition ¶
type RuleNewParamsBodyExecuteRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyExecuteRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyExecuteRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyExecuteRulePositionAfterPosition ¶
type RuleNewParamsBodyExecuteRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyExecuteRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyExecuteRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyExecuteRulePositionBeforePosition ¶
type RuleNewParamsBodyExecuteRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyExecuteRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyExecuteRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyExecuteRulePositionIndexPosition ¶
type RuleNewParamsBodyExecuteRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyExecuteRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyExecuteRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyExecuteRulePositionUnion ¶
type RuleNewParamsBodyExecuteRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyExecuteRulePositionBeforePosition, rulesets.RuleNewParamsBodyExecuteRulePositionAfterPosition, rulesets.RuleNewParamsBodyExecuteRulePositionIndexPosition, RuleNewParamsBodyExecuteRulePosition.
type RuleNewParamsBodyForceConnectionCloseRule ¶
type RuleNewParamsBodyForceConnectionCloseRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyForceConnectionCloseRulePositionUnion] `json:"position"`
ForceConnectionCloseRuleParam
}
func (RuleNewParamsBodyForceConnectionCloseRule) MarshalJSON ¶
func (r RuleNewParamsBodyForceConnectionCloseRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyForceConnectionCloseRulePosition ¶
type RuleNewParamsBodyForceConnectionCloseRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyForceConnectionCloseRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyForceConnectionCloseRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyForceConnectionCloseRulePositionAfterPosition ¶
type RuleNewParamsBodyForceConnectionCloseRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyForceConnectionCloseRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyForceConnectionCloseRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyForceConnectionCloseRulePositionBeforePosition ¶
type RuleNewParamsBodyForceConnectionCloseRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyForceConnectionCloseRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyForceConnectionCloseRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyForceConnectionCloseRulePositionIndexPosition ¶
type RuleNewParamsBodyForceConnectionCloseRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyForceConnectionCloseRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyForceConnectionCloseRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyForceConnectionCloseRulePositionUnion ¶
type RuleNewParamsBodyForceConnectionCloseRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyForceConnectionCloseRulePositionBeforePosition, rulesets.RuleNewParamsBodyForceConnectionCloseRulePositionAfterPosition, rulesets.RuleNewParamsBodyForceConnectionCloseRulePositionIndexPosition, RuleNewParamsBodyForceConnectionCloseRulePosition.
type RuleNewParamsBodyJavascriptChallengeRule ¶
type RuleNewParamsBodyJavascriptChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RuleNewParamsBodyJavascriptChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RuleNewParamsBodyJavascriptChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyJavascriptChallengeRulePositionUnion] `json:"position"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RuleNewParamsBodyJavascriptChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RuleNewParamsBodyJavascriptChallengeRule) MarshalJSON ¶
func (r RuleNewParamsBodyJavascriptChallengeRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyJavascriptChallengeRuleAction ¶
type RuleNewParamsBodyJavascriptChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleNewParamsBodyJavascriptChallengeRuleActionJSChallenge RuleNewParamsBodyJavascriptChallengeRuleAction = "js_challenge"
)
func (RuleNewParamsBodyJavascriptChallengeRuleAction) IsKnown ¶
func (r RuleNewParamsBodyJavascriptChallengeRuleAction) IsKnown() bool
type RuleNewParamsBodyJavascriptChallengeRuleExposedCredentialCheck ¶
type RuleNewParamsBodyJavascriptChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RuleNewParamsBodyJavascriptChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r RuleNewParamsBodyJavascriptChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyJavascriptChallengeRulePosition ¶
type RuleNewParamsBodyJavascriptChallengeRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyJavascriptChallengeRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyJavascriptChallengeRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyJavascriptChallengeRulePositionAfterPosition ¶
type RuleNewParamsBodyJavascriptChallengeRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyJavascriptChallengeRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyJavascriptChallengeRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyJavascriptChallengeRulePositionBeforePosition ¶
type RuleNewParamsBodyJavascriptChallengeRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyJavascriptChallengeRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyJavascriptChallengeRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyJavascriptChallengeRulePositionIndexPosition ¶
type RuleNewParamsBodyJavascriptChallengeRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyJavascriptChallengeRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyJavascriptChallengeRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyJavascriptChallengeRulePositionUnion ¶
type RuleNewParamsBodyJavascriptChallengeRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyJavascriptChallengeRulePositionBeforePosition, rulesets.RuleNewParamsBodyJavascriptChallengeRulePositionAfterPosition, rulesets.RuleNewParamsBodyJavascriptChallengeRulePositionIndexPosition, RuleNewParamsBodyJavascriptChallengeRulePosition.
type RuleNewParamsBodyJavascriptChallengeRuleRatelimit ¶
type RuleNewParamsBodyJavascriptChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RuleNewParamsBodyJavascriptChallengeRuleRatelimit) MarshalJSON ¶
func (r RuleNewParamsBodyJavascriptChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogCustomFieldRule ¶
type RuleNewParamsBodyLogCustomFieldRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyLogCustomFieldRulePositionUnion] `json:"position"`
LogCustomFieldRuleParam
}
func (RuleNewParamsBodyLogCustomFieldRule) MarshalJSON ¶
func (r RuleNewParamsBodyLogCustomFieldRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogCustomFieldRulePosition ¶
type RuleNewParamsBodyLogCustomFieldRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyLogCustomFieldRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyLogCustomFieldRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogCustomFieldRulePositionAfterPosition ¶
type RuleNewParamsBodyLogCustomFieldRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyLogCustomFieldRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyLogCustomFieldRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogCustomFieldRulePositionBeforePosition ¶
type RuleNewParamsBodyLogCustomFieldRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyLogCustomFieldRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyLogCustomFieldRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogCustomFieldRulePositionIndexPosition ¶
type RuleNewParamsBodyLogCustomFieldRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyLogCustomFieldRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyLogCustomFieldRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogCustomFieldRulePositionUnion ¶
type RuleNewParamsBodyLogCustomFieldRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyLogCustomFieldRulePositionBeforePosition, rulesets.RuleNewParamsBodyLogCustomFieldRulePositionAfterPosition, rulesets.RuleNewParamsBodyLogCustomFieldRulePositionIndexPosition, RuleNewParamsBodyLogCustomFieldRulePosition.
type RuleNewParamsBodyLogRule ¶
type RuleNewParamsBodyLogRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyLogRulePositionUnion] `json:"position"`
LogRuleParam
}
func (RuleNewParamsBodyLogRule) MarshalJSON ¶
func (r RuleNewParamsBodyLogRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogRulePosition ¶
type RuleNewParamsBodyLogRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyLogRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyLogRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogRulePositionAfterPosition ¶
type RuleNewParamsBodyLogRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyLogRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyLogRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogRulePositionBeforePosition ¶
type RuleNewParamsBodyLogRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyLogRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyLogRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogRulePositionIndexPosition ¶
type RuleNewParamsBodyLogRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyLogRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyLogRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyLogRulePositionUnion ¶
type RuleNewParamsBodyLogRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyLogRulePositionBeforePosition, rulesets.RuleNewParamsBodyLogRulePositionAfterPosition, rulesets.RuleNewParamsBodyLogRulePositionIndexPosition, RuleNewParamsBodyLogRulePosition.
type RuleNewParamsBodyManagedChallengeRule ¶
type RuleNewParamsBodyManagedChallengeRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyManagedChallengeRulePositionUnion] `json:"position"`
ManagedChallengeRuleParam
}
func (RuleNewParamsBodyManagedChallengeRule) MarshalJSON ¶
func (r RuleNewParamsBodyManagedChallengeRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyManagedChallengeRulePosition ¶
type RuleNewParamsBodyManagedChallengeRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyManagedChallengeRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyManagedChallengeRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyManagedChallengeRulePositionAfterPosition ¶
type RuleNewParamsBodyManagedChallengeRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyManagedChallengeRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyManagedChallengeRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyManagedChallengeRulePositionBeforePosition ¶
type RuleNewParamsBodyManagedChallengeRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyManagedChallengeRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyManagedChallengeRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyManagedChallengeRulePositionIndexPosition ¶
type RuleNewParamsBodyManagedChallengeRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyManagedChallengeRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyManagedChallengeRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyManagedChallengeRulePositionUnion ¶
type RuleNewParamsBodyManagedChallengeRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyManagedChallengeRulePositionBeforePosition, rulesets.RuleNewParamsBodyManagedChallengeRulePositionAfterPosition, rulesets.RuleNewParamsBodyManagedChallengeRulePositionIndexPosition, RuleNewParamsBodyManagedChallengeRulePosition.
type RuleNewParamsBodyOriginRule ¶
type RuleNewParamsBodyOriginRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyOriginRulePositionUnion] `json:"position"`
RouteRuleParam
}
func (RuleNewParamsBodyOriginRule) MarshalJSON ¶
func (r RuleNewParamsBodyOriginRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyOriginRulePosition ¶
type RuleNewParamsBodyOriginRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyOriginRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyOriginRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyOriginRulePositionAfterPosition ¶
type RuleNewParamsBodyOriginRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyOriginRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyOriginRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyOriginRulePositionBeforePosition ¶
type RuleNewParamsBodyOriginRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyOriginRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyOriginRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyOriginRulePositionIndexPosition ¶
type RuleNewParamsBodyOriginRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyOriginRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyOriginRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyOriginRulePositionUnion ¶
type RuleNewParamsBodyOriginRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyOriginRulePositionBeforePosition, rulesets.RuleNewParamsBodyOriginRulePositionAfterPosition, rulesets.RuleNewParamsBodyOriginRulePositionIndexPosition, RuleNewParamsBodyOriginRulePosition.
type RuleNewParamsBodyRedirectRule ¶
type RuleNewParamsBodyRedirectRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyRedirectRulePositionUnion] `json:"position"`
RedirectRuleParam
}
func (RuleNewParamsBodyRedirectRule) MarshalJSON ¶
func (r RuleNewParamsBodyRedirectRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRedirectRulePosition ¶
type RuleNewParamsBodyRedirectRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyRedirectRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyRedirectRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRedirectRulePositionAfterPosition ¶
type RuleNewParamsBodyRedirectRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyRedirectRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyRedirectRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRedirectRulePositionBeforePosition ¶
type RuleNewParamsBodyRedirectRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyRedirectRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyRedirectRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRedirectRulePositionIndexPosition ¶
type RuleNewParamsBodyRedirectRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyRedirectRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyRedirectRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRedirectRulePositionUnion ¶
type RuleNewParamsBodyRedirectRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyRedirectRulePositionBeforePosition, rulesets.RuleNewParamsBodyRedirectRulePositionAfterPosition, rulesets.RuleNewParamsBodyRedirectRulePositionIndexPosition, RuleNewParamsBodyRedirectRulePosition.
type RuleNewParamsBodyRewriteRule ¶
type RuleNewParamsBodyRewriteRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyRewriteRulePositionUnion] `json:"position"`
RewriteRuleParam
}
func (RuleNewParamsBodyRewriteRule) MarshalJSON ¶
func (r RuleNewParamsBodyRewriteRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRewriteRulePosition ¶
type RuleNewParamsBodyRewriteRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyRewriteRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyRewriteRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRewriteRulePositionAfterPosition ¶
type RuleNewParamsBodyRewriteRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyRewriteRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyRewriteRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRewriteRulePositionBeforePosition ¶
type RuleNewParamsBodyRewriteRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyRewriteRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyRewriteRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRewriteRulePositionIndexPosition ¶
type RuleNewParamsBodyRewriteRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyRewriteRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyRewriteRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyRewriteRulePositionUnion ¶
type RuleNewParamsBodyRewriteRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyRewriteRulePositionBeforePosition, rulesets.RuleNewParamsBodyRewriteRulePositionAfterPosition, rulesets.RuleNewParamsBodyRewriteRulePositionIndexPosition, RuleNewParamsBodyRewriteRulePosition.
type RuleNewParamsBodyScoreRule ¶
type RuleNewParamsBodyScoreRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyScoreRulePositionUnion] `json:"position"`
ScoreRuleParam
}
func (RuleNewParamsBodyScoreRule) MarshalJSON ¶
func (r RuleNewParamsBodyScoreRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyScoreRulePosition ¶
type RuleNewParamsBodyScoreRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyScoreRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyScoreRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyScoreRulePositionAfterPosition ¶
type RuleNewParamsBodyScoreRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyScoreRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyScoreRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyScoreRulePositionBeforePosition ¶
type RuleNewParamsBodyScoreRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyScoreRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyScoreRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyScoreRulePositionIndexPosition ¶
type RuleNewParamsBodyScoreRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyScoreRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyScoreRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyScoreRulePositionUnion ¶
type RuleNewParamsBodyScoreRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyScoreRulePositionBeforePosition, rulesets.RuleNewParamsBodyScoreRulePositionAfterPosition, rulesets.RuleNewParamsBodyScoreRulePositionIndexPosition, RuleNewParamsBodyScoreRulePosition.
type RuleNewParamsBodyServeErrorRule ¶
type RuleNewParamsBodyServeErrorRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodyServeErrorRulePositionUnion] `json:"position"`
ServeErrorRuleParam
}
func (RuleNewParamsBodyServeErrorRule) MarshalJSON ¶
func (r RuleNewParamsBodyServeErrorRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyServeErrorRulePosition ¶
type RuleNewParamsBodyServeErrorRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyServeErrorRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodyServeErrorRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyServeErrorRulePositionAfterPosition ¶
type RuleNewParamsBodyServeErrorRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyServeErrorRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodyServeErrorRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyServeErrorRulePositionBeforePosition ¶
type RuleNewParamsBodyServeErrorRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyServeErrorRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodyServeErrorRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyServeErrorRulePositionIndexPosition ¶
type RuleNewParamsBodyServeErrorRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodyServeErrorRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodyServeErrorRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodyServeErrorRulePositionUnion ¶
type RuleNewParamsBodyServeErrorRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodyServeErrorRulePositionBeforePosition, rulesets.RuleNewParamsBodyServeErrorRulePositionAfterPosition, rulesets.RuleNewParamsBodyServeErrorRulePositionIndexPosition, RuleNewParamsBodyServeErrorRulePosition.
type RuleNewParamsBodySetCacheSettingsRule ¶
type RuleNewParamsBodySetCacheSettingsRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodySetCacheSettingsRulePositionUnion] `json:"position"`
SetCacheSettingsRuleParam
}
func (RuleNewParamsBodySetCacheSettingsRule) MarshalJSON ¶
func (r RuleNewParamsBodySetCacheSettingsRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetCacheSettingsRulePosition ¶
type RuleNewParamsBodySetCacheSettingsRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySetCacheSettingsRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodySetCacheSettingsRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetCacheSettingsRulePositionAfterPosition ¶
type RuleNewParamsBodySetCacheSettingsRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySetCacheSettingsRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodySetCacheSettingsRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetCacheSettingsRulePositionBeforePosition ¶
type RuleNewParamsBodySetCacheSettingsRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySetCacheSettingsRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodySetCacheSettingsRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetCacheSettingsRulePositionIndexPosition ¶
type RuleNewParamsBodySetCacheSettingsRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySetCacheSettingsRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodySetCacheSettingsRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetCacheSettingsRulePositionUnion ¶
type RuleNewParamsBodySetCacheSettingsRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodySetCacheSettingsRulePositionBeforePosition, rulesets.RuleNewParamsBodySetCacheSettingsRulePositionAfterPosition, rulesets.RuleNewParamsBodySetCacheSettingsRulePositionIndexPosition, RuleNewParamsBodySetCacheSettingsRulePosition.
type RuleNewParamsBodySetConfigRule ¶
type RuleNewParamsBodySetConfigRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodySetConfigRulePositionUnion] `json:"position"`
SetConfigRuleParam
}
func (RuleNewParamsBodySetConfigRule) MarshalJSON ¶
func (r RuleNewParamsBodySetConfigRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetConfigRulePosition ¶
type RuleNewParamsBodySetConfigRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySetConfigRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodySetConfigRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetConfigRulePositionAfterPosition ¶
type RuleNewParamsBodySetConfigRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySetConfigRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodySetConfigRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetConfigRulePositionBeforePosition ¶
type RuleNewParamsBodySetConfigRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySetConfigRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodySetConfigRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetConfigRulePositionIndexPosition ¶
type RuleNewParamsBodySetConfigRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySetConfigRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodySetConfigRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySetConfigRulePositionUnion ¶
type RuleNewParamsBodySetConfigRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodySetConfigRulePositionBeforePosition, rulesets.RuleNewParamsBodySetConfigRulePositionAfterPosition, rulesets.RuleNewParamsBodySetConfigRulePositionIndexPosition, RuleNewParamsBodySetConfigRulePosition.
type RuleNewParamsBodySkipRule ¶
type RuleNewParamsBodySkipRule struct {
// An object configuring where the rule will be placed.
Position param.Field[RuleNewParamsBodySkipRulePositionUnion] `json:"position"`
SkipRuleParam
}
func (RuleNewParamsBodySkipRule) MarshalJSON ¶
func (r RuleNewParamsBodySkipRule) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySkipRulePosition ¶
type RuleNewParamsBodySkipRulePosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySkipRulePosition) MarshalJSON ¶
func (r RuleNewParamsBodySkipRulePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySkipRulePositionAfterPosition ¶
type RuleNewParamsBodySkipRulePositionAfterPosition struct {
// The ID of another rule to place the rule after. An empty value causes the rule
// to be placed at the bottom.
After param.Field[string] `json:"after"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySkipRulePositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsBodySkipRulePositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySkipRulePositionBeforePosition ¶
type RuleNewParamsBodySkipRulePositionBeforePosition struct {
// The ID of another rule to place the rule before. An empty value causes the rule
// to be placed at the top.
Before param.Field[string] `json:"before"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySkipRulePositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsBodySkipRulePositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySkipRulePositionIndexPosition ¶
type RuleNewParamsBodySkipRulePositionIndexPosition struct {
// An index at which to place the rule, where index 1 is the first rule.
Index param.Field[float64] `json:"index"`
}
An object configuring where the rule will be placed.
func (RuleNewParamsBodySkipRulePositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsBodySkipRulePositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsBodySkipRulePositionUnion ¶
type RuleNewParamsBodySkipRulePositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsBodySkipRulePositionBeforePosition, rulesets.RuleNewParamsBodySkipRulePositionAfterPosition, rulesets.RuleNewParamsBodySkipRulePositionIndexPosition, RuleNewParamsBodySkipRulePosition.
type RuleNewParamsBodyUnion ¶
type RuleNewParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.RuleNewParamsBodyBlockRule, rulesets.RuleNewParamsBodyChallengeRule, rulesets.RuleNewParamsBodyCompressionRule, rulesets.RuleNewParamsBodyExecuteRule, rulesets.RuleNewParamsBodyJavascriptChallengeRule, rulesets.RuleNewParamsBodyLogRule, rulesets.RuleNewParamsBodyManagedChallengeRule, rulesets.RuleNewParamsBodyRedirectRule, rulesets.RuleNewParamsBodyRewriteRule, rulesets.RuleNewParamsBodyOriginRule, rulesets.RuleNewParamsBodyScoreRule, rulesets.RuleNewParamsBodyServeErrorRule, rulesets.RuleNewParamsBodySetConfigRule, rulesets.RuleNewParamsBodySkipRule, rulesets.RuleNewParamsBodySetCacheSettingsRule, rulesets.RuleNewParamsBodyLogCustomFieldRule, rulesets.RuleNewParamsBodyDDoSDynamicRule, rulesets.RuleNewParamsBodyForceConnectionCloseRule, RuleNewParamsBody.
type RuleNewResponse ¶
type RuleNewResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []RuleNewResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON ruleNewResponseJSON `json:"-"`
}
A ruleset object.
func (*RuleNewResponse) UnmarshalJSON ¶
func (r *RuleNewResponse) UnmarshalJSON(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 ruleset object.
Result RuleNewResponse `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 ¶
func (r RuleNewResponseEnvelopeSuccess) IsKnown() bool
type RuleNewResponseRule ¶
type RuleNewResponseRule 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 RuleNewResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [RuleNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [RuleNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [RuleNewResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [RuleNewResponseRulesRulesetsJSChallengeRuleRatelimit], [LogRuleRatelimit],
// [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON ruleNewResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (RuleNewResponseRule) AsUnion ¶
func (r RuleNewResponseRule) AsUnion() RuleNewResponseRulesUnion
AsUnion returns a RuleNewResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, RuleNewResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RuleNewResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*RuleNewResponseRule) UnmarshalJSON ¶
func (r *RuleNewResponseRule) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseRulesAction ¶
type RuleNewResponseRulesAction string
The action to perform when the rule matches.
const ( RuleNewResponseRulesActionBlock RuleNewResponseRulesAction = "block" RuleNewResponseRulesActionChallenge RuleNewResponseRulesAction = "challenge" RuleNewResponseRulesActionCompressResponse RuleNewResponseRulesAction = "compress_response" RuleNewResponseRulesActionExecute RuleNewResponseRulesAction = "execute" RuleNewResponseRulesActionJSChallenge RuleNewResponseRulesAction = "js_challenge" RuleNewResponseRulesActionLog RuleNewResponseRulesAction = "log" RuleNewResponseRulesActionManagedChallenge RuleNewResponseRulesAction = "managed_challenge" RuleNewResponseRulesActionRedirect RuleNewResponseRulesAction = "redirect" RuleNewResponseRulesActionRewrite RuleNewResponseRulesAction = "rewrite" RuleNewResponseRulesActionRoute RuleNewResponseRulesAction = "route" RuleNewResponseRulesActionScore RuleNewResponseRulesAction = "score" RuleNewResponseRulesActionServeError RuleNewResponseRulesAction = "serve_error" RuleNewResponseRulesActionSetConfig RuleNewResponseRulesAction = "set_config" RuleNewResponseRulesActionSkip RuleNewResponseRulesAction = "skip" RuleNewResponseRulesActionSetCacheSettings RuleNewResponseRulesAction = "set_cache_settings" RuleNewResponseRulesActionLogCustomField RuleNewResponseRulesAction = "log_custom_field" RuleNewResponseRulesActionDDoSDynamic RuleNewResponseRulesAction = "ddos_dynamic" RuleNewResponseRulesActionForceConnectionClose RuleNewResponseRulesAction = "force_connection_close" )
func (RuleNewResponseRulesAction) IsKnown ¶
func (r RuleNewResponseRulesAction) IsKnown() bool
type RuleNewResponseRulesRulesetsChallengeRule ¶
type RuleNewResponseRulesRulesetsChallengeRule 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 RuleNewResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RuleNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RuleNewResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON ruleNewResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*RuleNewResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *RuleNewResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseRulesRulesetsChallengeRuleAction ¶
type RuleNewResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleNewResponseRulesRulesetsChallengeRuleActionChallenge RuleNewResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (RuleNewResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r RuleNewResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type RuleNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type RuleNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON ruleNewResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RuleNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RuleNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseRulesRulesetsChallengeRuleRatelimit ¶
type RuleNewResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON ruleNewResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RuleNewResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RuleNewResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseRulesRulesetsJSChallengeRule ¶
type RuleNewResponseRulesRulesetsJSChallengeRule 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 RuleNewResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RuleNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RuleNewResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON ruleNewResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*RuleNewResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *RuleNewResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseRulesRulesetsJSChallengeRuleAction ¶
type RuleNewResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
RuleNewResponseRulesRulesetsJSChallengeRuleActionJSChallenge RuleNewResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (RuleNewResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r RuleNewResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type RuleNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type RuleNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON ruleNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RuleNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RuleNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type RuleNewResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON ruleNewResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RuleNewResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RuleNewResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseRulesUnion ¶
type RuleNewResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, RuleNewResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RuleNewResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
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 *RuleDeleteResponse, 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 *RuleEditResponse, 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 *RuleNewResponse, 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 RulesetGetParams ¶
type RulesetGetResponse ¶
type RulesetGetResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []RulesetGetResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON rulesetGetResponseJSON `json:"-"`
}
A ruleset object.
func (*RulesetGetResponse) UnmarshalJSON ¶
func (r *RulesetGetResponse) UnmarshalJSON(data []byte) (err error)
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 ruleset object.
Result RulesetGetResponse `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 ¶
func (r RulesetGetResponseEnvelopeSuccess) IsKnown() bool
type RulesetGetResponseRule ¶
type RulesetGetResponseRule 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 RulesetGetResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [RulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [RulesetGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [RulesetGetResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [RulesetGetResponseRulesRulesetsJSChallengeRuleRatelimit], [LogRuleRatelimit],
// [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rulesetGetResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (RulesetGetResponseRule) AsUnion ¶
func (r RulesetGetResponseRule) AsUnion() RulesetGetResponseRulesUnion
AsUnion returns a RulesetGetResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, RulesetGetResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RulesetGetResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*RulesetGetResponseRule) UnmarshalJSON ¶
func (r *RulesetGetResponseRule) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseRulesAction ¶
type RulesetGetResponseRulesAction string
The action to perform when the rule matches.
const ( RulesetGetResponseRulesActionBlock RulesetGetResponseRulesAction = "block" RulesetGetResponseRulesActionChallenge RulesetGetResponseRulesAction = "challenge" RulesetGetResponseRulesActionCompressResponse RulesetGetResponseRulesAction = "compress_response" RulesetGetResponseRulesActionExecute RulesetGetResponseRulesAction = "execute" RulesetGetResponseRulesActionJSChallenge RulesetGetResponseRulesAction = "js_challenge" RulesetGetResponseRulesActionLog RulesetGetResponseRulesAction = "log" RulesetGetResponseRulesActionManagedChallenge RulesetGetResponseRulesAction = "managed_challenge" RulesetGetResponseRulesActionRedirect RulesetGetResponseRulesAction = "redirect" RulesetGetResponseRulesActionRewrite RulesetGetResponseRulesAction = "rewrite" RulesetGetResponseRulesActionRoute RulesetGetResponseRulesAction = "route" RulesetGetResponseRulesActionScore RulesetGetResponseRulesAction = "score" RulesetGetResponseRulesActionServeError RulesetGetResponseRulesAction = "serve_error" RulesetGetResponseRulesActionSetConfig RulesetGetResponseRulesAction = "set_config" RulesetGetResponseRulesActionSkip RulesetGetResponseRulesAction = "skip" RulesetGetResponseRulesActionSetCacheSettings RulesetGetResponseRulesAction = "set_cache_settings" RulesetGetResponseRulesActionLogCustomField RulesetGetResponseRulesAction = "log_custom_field" RulesetGetResponseRulesActionDDoSDynamic RulesetGetResponseRulesAction = "ddos_dynamic" RulesetGetResponseRulesActionForceConnectionClose RulesetGetResponseRulesAction = "force_connection_close" )
func (RulesetGetResponseRulesAction) IsKnown ¶
func (r RulesetGetResponseRulesAction) IsKnown() bool
type RulesetGetResponseRulesRulesetsChallengeRule ¶
type RulesetGetResponseRulesRulesetsChallengeRule 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 RulesetGetResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RulesetGetResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rulesetGetResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*RulesetGetResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *RulesetGetResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseRulesRulesetsChallengeRuleAction ¶
type RulesetGetResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetGetResponseRulesRulesetsChallengeRuleActionChallenge RulesetGetResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (RulesetGetResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r RulesetGetResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type RulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type RulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON rulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseRulesRulesetsChallengeRuleRatelimit ¶
type RulesetGetResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON rulesetGetResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RulesetGetResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RulesetGetResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseRulesRulesetsJSChallengeRule ¶
type RulesetGetResponseRulesRulesetsJSChallengeRule 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 RulesetGetResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RulesetGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RulesetGetResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rulesetGetResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*RulesetGetResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *RulesetGetResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseRulesRulesetsJSChallengeRuleAction ¶
type RulesetGetResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetGetResponseRulesRulesetsJSChallengeRuleActionJSChallenge RulesetGetResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (RulesetGetResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r RulesetGetResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type RulesetGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type RulesetGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON rulesetGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RulesetGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RulesetGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type RulesetGetResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON rulesetGetResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RulesetGetResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RulesetGetResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseRulesUnion ¶
type RulesetGetResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, RulesetGetResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RulesetGetResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
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"`
// Cursor to use for the next page.
Cursor param.Field[string] `query:"cursor"`
// Number of rulesets to return per page.
PerPage param.Field[int64] `query:"per_page"`
}
func (RulesetListParams) URLQuery ¶ added in v4.1.0
func (r RulesetListParams) URLQuery() (v url.Values)
URLQuery serializes RulesetListParams's query parameters as `url.Values`.
type RulesetListResponse ¶
type RulesetListResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON rulesetListResponseJSON `json:"-"`
}
A ruleset object.
func (*RulesetListResponse) UnmarshalJSON ¶
func (r *RulesetListResponse) UnmarshalJSON(data []byte) (err error)
type RulesetNewParams ¶
type RulesetNewParams struct {
// The kind of the ruleset.
Kind param.Field[Kind] `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[Phase] `json:"phase,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 list of rules in the ruleset.
Rules param.Field[[]RulesetNewParamsRuleUnion] `json:"rules"`
}
func (RulesetNewParams) MarshalJSON ¶
func (r RulesetNewParams) MarshalJSON() (data []byte, err error)
type RulesetNewParamsRule ¶
type RulesetNewParamsRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RulesetNewParamsRulesAction] `json:"action"`
ActionParameters param.Field[interface{}] `json:"action_parameters"`
Categories param.Field[interface{}] `json:"categories"`
// An informative description of the rule.
Description param.Field[string] `json:"description"`
// Whether the rule should be executed.
Enabled param.Field[bool] `json:"enabled"`
ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
Ratelimit param.Field[interface{}] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RulesetNewParamsRule) MarshalJSON ¶
func (r RulesetNewParamsRule) MarshalJSON() (data []byte, err error)
type RulesetNewParamsRuleUnion ¶
type RulesetNewParamsRuleUnion interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.BlockRuleParam, rulesets.RulesetNewParamsRulesRulesetsChallengeRule, rulesets.CompressResponseRuleParam, rulesets.ExecuteRuleParam, rulesets.RulesetNewParamsRulesRulesetsJSChallengeRule, rulesets.LogRuleParam, rulesets.ManagedChallengeRuleParam, rulesets.RedirectRuleParam, rulesets.RewriteRuleParam, rulesets.RouteRuleParam, rulesets.ScoreRuleParam, rulesets.ServeErrorRuleParam, rulesets.SetConfigRuleParam, rulesets.SkipRuleParam, rulesets.SetCacheSettingsRuleParam, rulesets.LogCustomFieldRuleParam, rulesets.DDoSDynamicRuleParam, rulesets.ForceConnectionCloseRuleParam, RulesetNewParamsRule.
type RulesetNewParamsRulesAction ¶
type RulesetNewParamsRulesAction string
The action to perform when the rule matches.
const ( RulesetNewParamsRulesActionBlock RulesetNewParamsRulesAction = "block" RulesetNewParamsRulesActionChallenge RulesetNewParamsRulesAction = "challenge" RulesetNewParamsRulesActionCompressResponse RulesetNewParamsRulesAction = "compress_response" RulesetNewParamsRulesActionExecute RulesetNewParamsRulesAction = "execute" RulesetNewParamsRulesActionJSChallenge RulesetNewParamsRulesAction = "js_challenge" RulesetNewParamsRulesActionLog RulesetNewParamsRulesAction = "log" RulesetNewParamsRulesActionManagedChallenge RulesetNewParamsRulesAction = "managed_challenge" RulesetNewParamsRulesActionRedirect RulesetNewParamsRulesAction = "redirect" RulesetNewParamsRulesActionRewrite RulesetNewParamsRulesAction = "rewrite" RulesetNewParamsRulesActionRoute RulesetNewParamsRulesAction = "route" RulesetNewParamsRulesActionScore RulesetNewParamsRulesAction = "score" RulesetNewParamsRulesActionServeError RulesetNewParamsRulesAction = "serve_error" RulesetNewParamsRulesActionSetConfig RulesetNewParamsRulesAction = "set_config" RulesetNewParamsRulesActionSkip RulesetNewParamsRulesAction = "skip" RulesetNewParamsRulesActionSetCacheSettings RulesetNewParamsRulesAction = "set_cache_settings" RulesetNewParamsRulesActionLogCustomField RulesetNewParamsRulesAction = "log_custom_field" RulesetNewParamsRulesActionDDoSDynamic RulesetNewParamsRulesAction = "ddos_dynamic" RulesetNewParamsRulesActionForceConnectionClose RulesetNewParamsRulesAction = "force_connection_close" )
func (RulesetNewParamsRulesAction) IsKnown ¶
func (r RulesetNewParamsRulesAction) IsKnown() bool
type RulesetNewParamsRulesRulesetsChallengeRule ¶
type RulesetNewParamsRulesRulesetsChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RulesetNewParamsRulesRulesetsChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RulesetNewParamsRulesRulesetsChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RulesetNewParamsRulesRulesetsChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RulesetNewParamsRulesRulesetsChallengeRule) MarshalJSON ¶
func (r RulesetNewParamsRulesRulesetsChallengeRule) MarshalJSON() (data []byte, err error)
type RulesetNewParamsRulesRulesetsChallengeRuleAction ¶
type RulesetNewParamsRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetNewParamsRulesRulesetsChallengeRuleActionChallenge RulesetNewParamsRulesRulesetsChallengeRuleAction = "challenge"
)
func (RulesetNewParamsRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r RulesetNewParamsRulesRulesetsChallengeRuleAction) IsKnown() bool
type RulesetNewParamsRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type RulesetNewParamsRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RulesetNewParamsRulesRulesetsChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r RulesetNewParamsRulesRulesetsChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type RulesetNewParamsRulesRulesetsChallengeRuleRatelimit ¶
type RulesetNewParamsRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RulesetNewParamsRulesRulesetsChallengeRuleRatelimit) MarshalJSON ¶
func (r RulesetNewParamsRulesRulesetsChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type RulesetNewParamsRulesRulesetsJSChallengeRule ¶
type RulesetNewParamsRulesRulesetsJSChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RulesetNewParamsRulesRulesetsJSChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RulesetNewParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RulesetNewParamsRulesRulesetsJSChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RulesetNewParamsRulesRulesetsJSChallengeRule) MarshalJSON ¶
func (r RulesetNewParamsRulesRulesetsJSChallengeRule) MarshalJSON() (data []byte, err error)
type RulesetNewParamsRulesRulesetsJSChallengeRuleAction ¶
type RulesetNewParamsRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetNewParamsRulesRulesetsJSChallengeRuleActionJSChallenge RulesetNewParamsRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (RulesetNewParamsRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r RulesetNewParamsRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type RulesetNewParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type RulesetNewParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RulesetNewParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r RulesetNewParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type RulesetNewParamsRulesRulesetsJSChallengeRuleRatelimit ¶
type RulesetNewParamsRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RulesetNewParamsRulesRulesetsJSChallengeRuleRatelimit) MarshalJSON ¶
func (r RulesetNewParamsRulesRulesetsJSChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type RulesetNewResponse ¶
type RulesetNewResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []RulesetNewResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON rulesetNewResponseJSON `json:"-"`
}
A ruleset object.
func (*RulesetNewResponse) UnmarshalJSON ¶
func (r *RulesetNewResponse) UnmarshalJSON(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 ruleset object.
Result RulesetNewResponse `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 ¶
func (r RulesetNewResponseEnvelopeSuccess) IsKnown() bool
type RulesetNewResponseRule ¶
type RulesetNewResponseRule 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 RulesetNewResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [RulesetNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [RulesetNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [RulesetNewResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [RulesetNewResponseRulesRulesetsJSChallengeRuleRatelimit], [LogRuleRatelimit],
// [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rulesetNewResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (RulesetNewResponseRule) AsUnion ¶
func (r RulesetNewResponseRule) AsUnion() RulesetNewResponseRulesUnion
AsUnion returns a RulesetNewResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, RulesetNewResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RulesetNewResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*RulesetNewResponseRule) UnmarshalJSON ¶
func (r *RulesetNewResponseRule) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseRulesAction ¶
type RulesetNewResponseRulesAction string
The action to perform when the rule matches.
const ( RulesetNewResponseRulesActionBlock RulesetNewResponseRulesAction = "block" RulesetNewResponseRulesActionChallenge RulesetNewResponseRulesAction = "challenge" RulesetNewResponseRulesActionCompressResponse RulesetNewResponseRulesAction = "compress_response" RulesetNewResponseRulesActionExecute RulesetNewResponseRulesAction = "execute" RulesetNewResponseRulesActionJSChallenge RulesetNewResponseRulesAction = "js_challenge" RulesetNewResponseRulesActionLog RulesetNewResponseRulesAction = "log" RulesetNewResponseRulesActionManagedChallenge RulesetNewResponseRulesAction = "managed_challenge" RulesetNewResponseRulesActionRedirect RulesetNewResponseRulesAction = "redirect" RulesetNewResponseRulesActionRewrite RulesetNewResponseRulesAction = "rewrite" RulesetNewResponseRulesActionRoute RulesetNewResponseRulesAction = "route" RulesetNewResponseRulesActionScore RulesetNewResponseRulesAction = "score" RulesetNewResponseRulesActionServeError RulesetNewResponseRulesAction = "serve_error" RulesetNewResponseRulesActionSetConfig RulesetNewResponseRulesAction = "set_config" RulesetNewResponseRulesActionSkip RulesetNewResponseRulesAction = "skip" RulesetNewResponseRulesActionSetCacheSettings RulesetNewResponseRulesAction = "set_cache_settings" RulesetNewResponseRulesActionLogCustomField RulesetNewResponseRulesAction = "log_custom_field" RulesetNewResponseRulesActionDDoSDynamic RulesetNewResponseRulesAction = "ddos_dynamic" RulesetNewResponseRulesActionForceConnectionClose RulesetNewResponseRulesAction = "force_connection_close" )
func (RulesetNewResponseRulesAction) IsKnown ¶
func (r RulesetNewResponseRulesAction) IsKnown() bool
type RulesetNewResponseRulesRulesetsChallengeRule ¶
type RulesetNewResponseRulesRulesetsChallengeRule 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 RulesetNewResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RulesetNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RulesetNewResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rulesetNewResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*RulesetNewResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *RulesetNewResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseRulesRulesetsChallengeRuleAction ¶
type RulesetNewResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetNewResponseRulesRulesetsChallengeRuleActionChallenge RulesetNewResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (RulesetNewResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r RulesetNewResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type RulesetNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type RulesetNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON rulesetNewResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RulesetNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RulesetNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseRulesRulesetsChallengeRuleRatelimit ¶
type RulesetNewResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON rulesetNewResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RulesetNewResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RulesetNewResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseRulesRulesetsJSChallengeRule ¶
type RulesetNewResponseRulesRulesetsJSChallengeRule 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 RulesetNewResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RulesetNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RulesetNewResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rulesetNewResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*RulesetNewResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *RulesetNewResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseRulesRulesetsJSChallengeRuleAction ¶
type RulesetNewResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetNewResponseRulesRulesetsJSChallengeRuleActionJSChallenge RulesetNewResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (RulesetNewResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r RulesetNewResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type RulesetNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type RulesetNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON rulesetNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RulesetNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RulesetNewResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type RulesetNewResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON rulesetNewResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RulesetNewResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RulesetNewResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseRulesUnion ¶
type RulesetNewResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, RulesetNewResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RulesetNewResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
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 *RulesetGetResponse, err error)
Fetches the latest version of an account or zone ruleset.
func (*RulesetService) List ¶
func (r *RulesetService) List(ctx context.Context, params RulesetListParams, opts ...option.RequestOption) (res *pagination.CursorPagination[RulesetListResponse], err error)
Fetches all rulesets.
func (*RulesetService) ListAutoPaging ¶
func (r *RulesetService) ListAutoPaging(ctx context.Context, params RulesetListParams, opts ...option.RequestOption) *pagination.CursorPaginationAutoPager[RulesetListResponse]
Fetches all rulesets.
func (*RulesetService) New ¶
func (r *RulesetService) New(ctx context.Context, params RulesetNewParams, opts ...option.RequestOption) (res *RulesetNewResponse, err error)
Creates a ruleset.
func (*RulesetService) Update ¶
func (r *RulesetService) Update(ctx context.Context, rulesetID string, params RulesetUpdateParams, opts ...option.RequestOption) (res *RulesetUpdateResponse, err error)
Updates an account or zone ruleset, creating a new version.
type RulesetUpdateParams ¶
type RulesetUpdateParams 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"`
// An informative description of the ruleset.
Description param.Field[string] `json:"description"`
// The kind of the ruleset.
Kind param.Field[Kind] `json:"kind"`
// The human-readable name of the ruleset.
Name param.Field[string] `json:"name"`
// The phase of the ruleset.
Phase param.Field[Phase] `json:"phase"`
// The list of rules in the ruleset.
Rules param.Field[[]RulesetUpdateParamsRuleUnion] `json:"rules"`
}
func (RulesetUpdateParams) MarshalJSON ¶
func (r RulesetUpdateParams) MarshalJSON() (data []byte, err error)
type RulesetUpdateParamsRule ¶
type RulesetUpdateParamsRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RulesetUpdateParamsRulesAction] `json:"action"`
ActionParameters param.Field[interface{}] `json:"action_parameters"`
Categories param.Field[interface{}] `json:"categories"`
// An informative description of the rule.
Description param.Field[string] `json:"description"`
// Whether the rule should be executed.
Enabled param.Field[bool] `json:"enabled"`
ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
Ratelimit param.Field[interface{}] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RulesetUpdateParamsRule) MarshalJSON ¶
func (r RulesetUpdateParamsRule) MarshalJSON() (data []byte, err error)
type RulesetUpdateParamsRuleUnion ¶
type RulesetUpdateParamsRuleUnion interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.BlockRuleParam, rulesets.RulesetUpdateParamsRulesRulesetsChallengeRule, rulesets.CompressResponseRuleParam, rulesets.ExecuteRuleParam, rulesets.RulesetUpdateParamsRulesRulesetsJSChallengeRule, rulesets.LogRuleParam, rulesets.ManagedChallengeRuleParam, rulesets.RedirectRuleParam, rulesets.RewriteRuleParam, rulesets.RouteRuleParam, rulesets.ScoreRuleParam, rulesets.ServeErrorRuleParam, rulesets.SetConfigRuleParam, rulesets.SkipRuleParam, rulesets.SetCacheSettingsRuleParam, rulesets.LogCustomFieldRuleParam, rulesets.DDoSDynamicRuleParam, rulesets.ForceConnectionCloseRuleParam, RulesetUpdateParamsRule.
type RulesetUpdateParamsRulesAction ¶
type RulesetUpdateParamsRulesAction string
The action to perform when the rule matches.
const ( RulesetUpdateParamsRulesActionBlock RulesetUpdateParamsRulesAction = "block" RulesetUpdateParamsRulesActionChallenge RulesetUpdateParamsRulesAction = "challenge" RulesetUpdateParamsRulesActionCompressResponse RulesetUpdateParamsRulesAction = "compress_response" RulesetUpdateParamsRulesActionExecute RulesetUpdateParamsRulesAction = "execute" RulesetUpdateParamsRulesActionJSChallenge RulesetUpdateParamsRulesAction = "js_challenge" RulesetUpdateParamsRulesActionLog RulesetUpdateParamsRulesAction = "log" RulesetUpdateParamsRulesActionManagedChallenge RulesetUpdateParamsRulesAction = "managed_challenge" RulesetUpdateParamsRulesActionRedirect RulesetUpdateParamsRulesAction = "redirect" RulesetUpdateParamsRulesActionRewrite RulesetUpdateParamsRulesAction = "rewrite" RulesetUpdateParamsRulesActionRoute RulesetUpdateParamsRulesAction = "route" RulesetUpdateParamsRulesActionScore RulesetUpdateParamsRulesAction = "score" RulesetUpdateParamsRulesActionServeError RulesetUpdateParamsRulesAction = "serve_error" RulesetUpdateParamsRulesActionSetConfig RulesetUpdateParamsRulesAction = "set_config" RulesetUpdateParamsRulesActionSkip RulesetUpdateParamsRulesAction = "skip" RulesetUpdateParamsRulesActionSetCacheSettings RulesetUpdateParamsRulesAction = "set_cache_settings" RulesetUpdateParamsRulesActionLogCustomField RulesetUpdateParamsRulesAction = "log_custom_field" RulesetUpdateParamsRulesActionDDoSDynamic RulesetUpdateParamsRulesAction = "ddos_dynamic" RulesetUpdateParamsRulesActionForceConnectionClose RulesetUpdateParamsRulesAction = "force_connection_close" )
func (RulesetUpdateParamsRulesAction) IsKnown ¶
func (r RulesetUpdateParamsRulesAction) IsKnown() bool
type RulesetUpdateParamsRulesRulesetsChallengeRule ¶
type RulesetUpdateParamsRulesRulesetsChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RulesetUpdateParamsRulesRulesetsChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RulesetUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RulesetUpdateParamsRulesRulesetsChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RulesetUpdateParamsRulesRulesetsChallengeRule) MarshalJSON ¶
func (r RulesetUpdateParamsRulesRulesetsChallengeRule) MarshalJSON() (data []byte, err error)
type RulesetUpdateParamsRulesRulesetsChallengeRuleAction ¶
type RulesetUpdateParamsRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetUpdateParamsRulesRulesetsChallengeRuleActionChallenge RulesetUpdateParamsRulesRulesetsChallengeRuleAction = "challenge"
)
func (RulesetUpdateParamsRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r RulesetUpdateParamsRulesRulesetsChallengeRuleAction) IsKnown() bool
type RulesetUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type RulesetUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RulesetUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r RulesetUpdateParamsRulesRulesetsChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type RulesetUpdateParamsRulesRulesetsChallengeRuleRatelimit ¶
type RulesetUpdateParamsRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RulesetUpdateParamsRulesRulesetsChallengeRuleRatelimit) MarshalJSON ¶
func (r RulesetUpdateParamsRulesRulesetsChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type RulesetUpdateParamsRulesRulesetsJSChallengeRule ¶
type RulesetUpdateParamsRulesRulesetsJSChallengeRule struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[RulesetUpdateParamsRulesRulesetsJSChallengeRuleAction] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[RulesetUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[RulesetUpdateParamsRulesRulesetsJSChallengeRuleRatelimit] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (RulesetUpdateParamsRulesRulesetsJSChallengeRule) MarshalJSON ¶
func (r RulesetUpdateParamsRulesRulesetsJSChallengeRule) MarshalJSON() (data []byte, err error)
type RulesetUpdateParamsRulesRulesetsJSChallengeRuleAction ¶
type RulesetUpdateParamsRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetUpdateParamsRulesRulesetsJSChallengeRuleActionJSChallenge RulesetUpdateParamsRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (RulesetUpdateParamsRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r RulesetUpdateParamsRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type RulesetUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type RulesetUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (RulesetUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck) MarshalJSON ¶
func (r RulesetUpdateParamsRulesRulesetsJSChallengeRuleExposedCredentialCheck) MarshalJSON() (data []byte, err error)
type RulesetUpdateParamsRulesRulesetsJSChallengeRuleRatelimit ¶
type RulesetUpdateParamsRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (RulesetUpdateParamsRulesRulesetsJSChallengeRuleRatelimit) MarshalJSON ¶
func (r RulesetUpdateParamsRulesRulesetsJSChallengeRuleRatelimit) MarshalJSON() (data []byte, err error)
type RulesetUpdateResponse ¶
type RulesetUpdateResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []RulesetUpdateResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON rulesetUpdateResponseJSON `json:"-"`
}
A ruleset object.
func (*RulesetUpdateResponse) UnmarshalJSON ¶
func (r *RulesetUpdateResponse) UnmarshalJSON(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 ruleset object.
Result RulesetUpdateResponse `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 ¶
func (r RulesetUpdateResponseEnvelopeSuccess) IsKnown() bool
type RulesetUpdateResponseRule ¶
type RulesetUpdateResponseRule 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 RulesetUpdateResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [RulesetUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [RulesetUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [RulesetUpdateResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [RulesetUpdateResponseRulesRulesetsJSChallengeRuleRatelimit],
// [LogRuleRatelimit], [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rulesetUpdateResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (RulesetUpdateResponseRule) AsUnion ¶
func (r RulesetUpdateResponseRule) AsUnion() RulesetUpdateResponseRulesUnion
AsUnion returns a RulesetUpdateResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, RulesetUpdateResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RulesetUpdateResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*RulesetUpdateResponseRule) UnmarshalJSON ¶
func (r *RulesetUpdateResponseRule) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseRulesAction ¶
type RulesetUpdateResponseRulesAction string
The action to perform when the rule matches.
const ( RulesetUpdateResponseRulesActionBlock RulesetUpdateResponseRulesAction = "block" RulesetUpdateResponseRulesActionChallenge RulesetUpdateResponseRulesAction = "challenge" RulesetUpdateResponseRulesActionCompressResponse RulesetUpdateResponseRulesAction = "compress_response" RulesetUpdateResponseRulesActionExecute RulesetUpdateResponseRulesAction = "execute" RulesetUpdateResponseRulesActionJSChallenge RulesetUpdateResponseRulesAction = "js_challenge" RulesetUpdateResponseRulesActionLog RulesetUpdateResponseRulesAction = "log" RulesetUpdateResponseRulesActionManagedChallenge RulesetUpdateResponseRulesAction = "managed_challenge" RulesetUpdateResponseRulesActionRedirect RulesetUpdateResponseRulesAction = "redirect" RulesetUpdateResponseRulesActionRewrite RulesetUpdateResponseRulesAction = "rewrite" RulesetUpdateResponseRulesActionRoute RulesetUpdateResponseRulesAction = "route" RulesetUpdateResponseRulesActionScore RulesetUpdateResponseRulesAction = "score" RulesetUpdateResponseRulesActionServeError RulesetUpdateResponseRulesAction = "serve_error" RulesetUpdateResponseRulesActionSetConfig RulesetUpdateResponseRulesAction = "set_config" RulesetUpdateResponseRulesActionSkip RulesetUpdateResponseRulesAction = "skip" RulesetUpdateResponseRulesActionSetCacheSettings RulesetUpdateResponseRulesAction = "set_cache_settings" RulesetUpdateResponseRulesActionLogCustomField RulesetUpdateResponseRulesAction = "log_custom_field" RulesetUpdateResponseRulesActionDDoSDynamic RulesetUpdateResponseRulesAction = "ddos_dynamic" RulesetUpdateResponseRulesActionForceConnectionClose RulesetUpdateResponseRulesAction = "force_connection_close" )
func (RulesetUpdateResponseRulesAction) IsKnown ¶
func (r RulesetUpdateResponseRulesAction) IsKnown() bool
type RulesetUpdateResponseRulesRulesetsChallengeRule ¶
type RulesetUpdateResponseRulesRulesetsChallengeRule 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 RulesetUpdateResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RulesetUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RulesetUpdateResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rulesetUpdateResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*RulesetUpdateResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *RulesetUpdateResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseRulesRulesetsChallengeRuleAction ¶
type RulesetUpdateResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetUpdateResponseRulesRulesetsChallengeRuleActionChallenge RulesetUpdateResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (RulesetUpdateResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r RulesetUpdateResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type RulesetUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type RulesetUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON rulesetUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RulesetUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RulesetUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseRulesRulesetsChallengeRuleRatelimit ¶
type RulesetUpdateResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON rulesetUpdateResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RulesetUpdateResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RulesetUpdateResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseRulesRulesetsJSChallengeRule ¶
type RulesetUpdateResponseRulesRulesetsJSChallengeRule 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 RulesetUpdateResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck RulesetUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit RulesetUpdateResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON rulesetUpdateResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*RulesetUpdateResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *RulesetUpdateResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseRulesRulesetsJSChallengeRuleAction ¶
type RulesetUpdateResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
RulesetUpdateResponseRulesRulesetsJSChallengeRuleActionJSChallenge RulesetUpdateResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (RulesetUpdateResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r RulesetUpdateResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type RulesetUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type RulesetUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON rulesetUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*RulesetUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *RulesetUpdateResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type RulesetUpdateResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON rulesetUpdateResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*RulesetUpdateResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *RulesetUpdateResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseRulesUnion ¶
type RulesetUpdateResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, RulesetUpdateResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, RulesetUpdateResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
type ScoreRule ¶
type ScoreRule 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 ScoreRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters ScoreRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck ScoreRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit ScoreRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON scoreRuleJSON `json:"-"`
}
func (*ScoreRule) UnmarshalJSON ¶
type ScoreRuleAction ¶
type ScoreRuleAction string
The action to perform when the rule matches.
const (
ScoreRuleActionScore ScoreRuleAction = "score"
)
func (ScoreRuleAction) IsKnown ¶
func (r ScoreRuleAction) IsKnown() bool
type ScoreRuleActionParameters ¶
type ScoreRuleActionParameters struct {
// Increment contains the delta to change the score and can be either positive or
// negative.
Increment int64 `json:"increment"`
JSON scoreRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*ScoreRuleActionParameters) UnmarshalJSON ¶
func (r *ScoreRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type ScoreRuleActionParametersParam ¶
type ScoreRuleActionParametersParam struct {
// Increment contains the delta to change the score and can be either positive or
// negative.
Increment param.Field[int64] `json:"increment"`
}
The parameters configuring the rule's action.
func (ScoreRuleActionParametersParam) MarshalJSON ¶
func (r ScoreRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type ScoreRuleExposedCredentialCheck ¶
type ScoreRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON scoreRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*ScoreRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *ScoreRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type ScoreRuleExposedCredentialCheckParam ¶
type ScoreRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (ScoreRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r ScoreRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type ScoreRuleParam ¶
type ScoreRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[ScoreRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[ScoreRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[ScoreRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[ScoreRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (ScoreRuleParam) MarshalJSON ¶
func (r ScoreRuleParam) MarshalJSON() (data []byte, err error)
type ScoreRuleRatelimit ¶
type ScoreRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON scoreRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*ScoreRuleRatelimit) UnmarshalJSON ¶
func (r *ScoreRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type ScoreRuleRatelimitParam ¶
type ScoreRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (ScoreRuleRatelimitParam) MarshalJSON ¶
func (r ScoreRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type ServeErrorRule ¶
type ServeErrorRule 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 ServeErrorRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters ServeErrorRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck ServeErrorRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit ServeErrorRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON serveErrorRuleJSON `json:"-"`
}
func (*ServeErrorRule) UnmarshalJSON ¶
func (r *ServeErrorRule) UnmarshalJSON(data []byte) (err error)
type ServeErrorRuleAction ¶
type ServeErrorRuleAction string
The action to perform when the rule matches.
const (
ServeErrorRuleActionServeError ServeErrorRuleAction = "serve_error"
)
func (ServeErrorRuleAction) IsKnown ¶
func (r ServeErrorRuleAction) IsKnown() bool
type ServeErrorRuleActionParameters ¶
type ServeErrorRuleActionParameters struct {
// Error response content.
Content string `json:"content"`
// Content-type header to set with the response.
ContentType ServeErrorRuleActionParametersContentType `json:"content_type"`
// The status code to use for the error.
StatusCode float64 `json:"status_code"`
JSON serveErrorRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*ServeErrorRuleActionParameters) UnmarshalJSON ¶
func (r *ServeErrorRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type ServeErrorRuleActionParametersContentType ¶
type ServeErrorRuleActionParametersContentType string
Content-type header to set with the response.
const ( ServeErrorRuleActionParametersContentTypeApplicationJson ServeErrorRuleActionParametersContentType = "application/json" ServeErrorRuleActionParametersContentTypeTextXml ServeErrorRuleActionParametersContentType = "text/xml" ServeErrorRuleActionParametersContentTypeTextPlain ServeErrorRuleActionParametersContentType = "text/plain" ServeErrorRuleActionParametersContentTypeTextHTML ServeErrorRuleActionParametersContentType = "text/html" )
func (ServeErrorRuleActionParametersContentType) IsKnown ¶
func (r ServeErrorRuleActionParametersContentType) IsKnown() bool
type ServeErrorRuleActionParametersParam ¶
type ServeErrorRuleActionParametersParam struct {
// Error response content.
Content param.Field[string] `json:"content"`
// Content-type header to set with the response.
ContentType param.Field[ServeErrorRuleActionParametersContentType] `json:"content_type"`
// The status code to use for the error.
StatusCode param.Field[float64] `json:"status_code"`
}
The parameters configuring the rule's action.
func (ServeErrorRuleActionParametersParam) MarshalJSON ¶
func (r ServeErrorRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type ServeErrorRuleExposedCredentialCheck ¶
type ServeErrorRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON serveErrorRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*ServeErrorRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *ServeErrorRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type ServeErrorRuleExposedCredentialCheckParam ¶
type ServeErrorRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (ServeErrorRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r ServeErrorRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type ServeErrorRuleParam ¶
type ServeErrorRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[ServeErrorRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[ServeErrorRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[ServeErrorRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[ServeErrorRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (ServeErrorRuleParam) MarshalJSON ¶
func (r ServeErrorRuleParam) MarshalJSON() (data []byte, err error)
type ServeErrorRuleRatelimit ¶
type ServeErrorRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON serveErrorRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*ServeErrorRuleRatelimit) UnmarshalJSON ¶
func (r *ServeErrorRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type ServeErrorRuleRatelimitParam ¶
type ServeErrorRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (ServeErrorRuleRatelimitParam) MarshalJSON ¶
func (r ServeErrorRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRule ¶
type SetCacheSettingsRule 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 SetCacheSettingsRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters SetCacheSettingsRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck SetCacheSettingsRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit SetCacheSettingsRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON setCacheSettingsRuleJSON `json:"-"`
}
func (*SetCacheSettingsRule) UnmarshalJSON ¶
func (r *SetCacheSettingsRule) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleAction ¶
type SetCacheSettingsRuleAction string
The action to perform when the rule matches.
const (
SetCacheSettingsRuleActionSetCacheSettings SetCacheSettingsRuleAction = "set_cache_settings"
)
func (SetCacheSettingsRuleAction) IsKnown ¶
func (r SetCacheSettingsRuleAction) IsKnown() bool
type SetCacheSettingsRuleActionParameters ¶
type SetCacheSettingsRuleActionParameters struct {
// List of additional ports that caching can be enabled on.
AdditionalCacheablePorts []int64 `json:"additional_cacheable_ports"`
// Specify how long client browsers should cache the response. Cloudflare cache
// purge will not purge content cached on client browsers, so high browser TTLs may
// lead to stale content.
BrowserTTL SetCacheSettingsRuleActionParametersBrowserTTL `json:"browser_ttl"`
// Mark whether the request’s response from origin is eligible for caching. Caching
// itself will still depend on the cache-control header and your other caching
// configurations.
Cache bool `json:"cache"`
// Define which components of the request are included or excluded from the cache
// key Cloudflare uses to store the response in cache.
CacheKey SetCacheSettingsRuleActionParametersCacheKey `json:"cache_key"`
// Mark whether the request's response from origin is eligible for Cache Reserve
// (requires a Cache Reserve add-on plan).
CacheReserve SetCacheSettingsRuleActionParametersCacheReserve `json:"cache_reserve"`
// TTL (Time to Live) specifies the maximum time to cache a resource in the
// Cloudflare edge network.
EdgeTTL SetCacheSettingsRuleActionParametersEdgeTTL `json:"edge_ttl"`
// When enabled, Cloudflare will aim to strictly adhere to RFC 7234.
OriginCacheControl bool `json:"origin_cache_control"`
// Generate Cloudflare error pages from issues sent from the origin server. When
// on, error pages will trigger for issues from the origin.
OriginErrorPagePassthru bool `json:"origin_error_page_passthru"`
// Define a timeout value between two successive read operations to your origin
// server. Historically, the timeout value between two read options from Cloudflare
// to an origin server is 100 seconds. If you are attempting to reduce HTTP 524
// errors because of timeouts from an origin server, try increasing this timeout
// value.
ReadTimeout int64 `json:"read_timeout"`
// headers. When off, Cloudflare converts strong ETag headers to weak ETag headers.
RespectStrongEtags bool `json:"respect_strong_etags"`
// Define if Cloudflare should serve stale content while getting the latest content
// from the origin. If on, Cloudflare will not serve stale content while getting
// the latest content from the origin.
ServeStale SetCacheSettingsRuleActionParametersServeStale `json:"serve_stale"`
JSON setCacheSettingsRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*SetCacheSettingsRuleActionParameters) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersBrowserTTL ¶
type SetCacheSettingsRuleActionParametersBrowserTTL struct {
// Determines which browser ttl mode to use.
Mode SetCacheSettingsRuleActionParametersBrowserTTLMode `json:"mode,required"`
// The TTL (in seconds) if you choose override_origin mode.
Default int64 `json:"default"`
JSON setCacheSettingsRuleActionParametersBrowserTTLJSON `json:"-"`
}
Specify how long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content.
func (*SetCacheSettingsRuleActionParametersBrowserTTL) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersBrowserTTL) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersBrowserTTLMode ¶
type SetCacheSettingsRuleActionParametersBrowserTTLMode string
Determines which browser ttl mode to use.
const ( SetCacheSettingsRuleActionParametersBrowserTTLModeRespectOrigin SetCacheSettingsRuleActionParametersBrowserTTLMode = "respect_origin" SetCacheSettingsRuleActionParametersBrowserTTLModeBypassByDefault SetCacheSettingsRuleActionParametersBrowserTTLMode = "bypass_by_default" SetCacheSettingsRuleActionParametersBrowserTTLModeOverrideOrigin SetCacheSettingsRuleActionParametersBrowserTTLMode = "override_origin" )
func (SetCacheSettingsRuleActionParametersBrowserTTLMode) IsKnown ¶
func (r SetCacheSettingsRuleActionParametersBrowserTTLMode) IsKnown() bool
type SetCacheSettingsRuleActionParametersBrowserTTLParam ¶
type SetCacheSettingsRuleActionParametersBrowserTTLParam struct {
// Determines which browser ttl mode to use.
Mode param.Field[SetCacheSettingsRuleActionParametersBrowserTTLMode] `json:"mode,required"`
// The TTL (in seconds) if you choose override_origin mode.
Default param.Field[int64] `json:"default"`
}
Specify how long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content.
func (SetCacheSettingsRuleActionParametersBrowserTTLParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersBrowserTTLParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKey ¶
type SetCacheSettingsRuleActionParametersCacheKey struct {
// Separate cached content based on the visitor’s device type.
CacheByDeviceType bool `json:"cache_by_device_type"`
// Protect from web cache deception attacks while allowing static assets to be
// cached.
CacheDeceptionArmor bool `json:"cache_deception_armor"`
// Customize which components of the request are included or excluded from the
// cache key.
CustomKey SetCacheSettingsRuleActionParametersCacheKeyCustomKey `json:"custom_key"`
// Treat requests with the same query parameters the same, regardless of the order
// those query parameters are in. A value of true ignores the query strings' order.
IgnoreQueryStringsOrder bool `json:"ignore_query_strings_order"`
JSON setCacheSettingsRuleActionParametersCacheKeyJSON `json:"-"`
}
Define which components of the request are included or excluded from the cache key Cloudflare uses to store the response in cache.
func (*SetCacheSettingsRuleActionParametersCacheKey) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKey) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKey ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKey struct {
// The cookies to include in building the cache key.
Cookie SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie `json:"cookie"`
// The header names and values to include in building the cache key.
Header SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader `json:"header"`
// Whether to use the original host or the resolved host in the cache key.
Host SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost `json:"host"`
// Use the presence of parameters in the query string to build the cache key.
QueryString SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString `json:"query_string"`
// Characteristics of the request user agent used in building the cache key.
User SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser `json:"user"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyJSON `json:"-"`
}
Customize which components of the request are included or excluded from the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKey) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKey) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie struct {
// Checks for the presence of these cookie names. The presence of these cookies is
// used in building the cache key.
CheckPresence []string `json:"check_presence"`
// Include these cookies' names and their values.
Include []string `json:"include"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieJSON `json:"-"`
}
The cookies to include in building the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam struct {
// Checks for the presence of these cookie names. The presence of these cookies is
// used in building the cache key.
CheckPresence param.Field[[]string] `json:"check_presence"`
// Include these cookies' names and their values.
Include param.Field[[]string] `json:"include"`
}
The cookies to include in building the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader struct {
// Checks for the presence of these header names. The presence of these headers is
// used in building the cache key.
CheckPresence []string `json:"check_presence"`
// For each header name and list of values combination, check if the request header
// contains any of the values provided. The presence of the request header and
// whether any of the values provided are contained in the request header value is
// used in building the cache key.
Contains map[string][]string `json:"contains"`
// Whether or not to include the origin header. A value of true will exclude the
// origin header in the cache key.
ExcludeOrigin bool `json:"exclude_origin"`
// Include these headers' names and their values.
Include []string `json:"include"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderJSON `json:"-"`
}
The header names and values to include in building the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam struct {
// Checks for the presence of these header names. The presence of these headers is
// used in building the cache key.
CheckPresence param.Field[[]string] `json:"check_presence"`
// For each header name and list of values combination, check if the request header
// contains any of the values provided. The presence of the request header and
// whether any of the values provided are contained in the request header value is
// used in building the cache key.
Contains param.Field[map[string][]string] `json:"contains"`
// Whether or not to include the origin header. A value of true will exclude the
// origin header in the cache key.
ExcludeOrigin param.Field[bool] `json:"exclude_origin"`
// Include these headers' names and their values.
Include param.Field[[]string] `json:"include"`
}
The header names and values to include in building the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost struct {
// Use the resolved host in the cache key. A value of true will use the resolved
// host, while a value or false will use the original host.
Resolved bool `json:"resolved"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyHostJSON `json:"-"`
}
Whether to use the original host or the resolved host in the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam struct {
// Use the resolved host in the cache key. A value of true will use the resolved
// host, while a value or false will use the original host.
Resolved param.Field[bool] `json:"resolved"`
}
Whether to use the original host or the resolved host in the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam struct {
// The cookies to include in building the cache key.
Cookie param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam] `json:"cookie"`
// The header names and values to include in building the cache key.
Header param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam] `json:"header"`
// Whether to use the original host or the resolved host in the cache key.
Host param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam] `json:"host"`
// Use the presence of parameters in the query string to build the cache key.
QueryString param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringUnionParam] `json:"query_string"`
// Characteristics of the request user agent used in building the cache key.
User param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam] `json:"user"`
}
Customize which components of the request are included or excluded from the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString struct {
// This field can have the runtime type of
// [SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExclude].
Exclude interface{} `json:"exclude"`
// This field can have the runtime type of
// [SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersInclude].
Include interface{} `json:"include"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringJSON `json:"-"`
// contains filtered or unexported fields
}
Use the presence of parameters in the query string to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString) AsUnion ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString) AsUnion() SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringUnion
AsUnion returns a SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParameters, SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParameters.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParameters ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParameters struct {
// A list of query string parameters NOT used to build the cache key. All
// parameters present in the request but missing in this list will be used to build
// the cache key.
Exclude SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExclude `json:"exclude"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersJSON `json:"-"`
}
Use the absence of parameters in the query string to build the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParameters) UnmarshalJSON ¶ added in v4.1.0
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParameters) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExclude ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExclude struct {
// Determines whether to exclude all query string parameters from the cache key.
All bool `json:"all"`
// This field can have the runtime type of [[]string].
List interface{} `json:"list"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeJSON `json:"-"`
// contains filtered or unexported fields
}
A list of query string parameters NOT used to build the cache key. All parameters present in the request but missing in this list will be used to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExclude) AsUnion ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExclude) AsUnion() SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeUnion
AsUnion returns a SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParameters, SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParameters.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExclude) UnmarshalJSON ¶ added in v4.1.0
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExclude) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParameters ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParameters struct {
// Determines whether to exclude all query string parameters from the cache key.
All bool `json:"all"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParametersJSON `json:"-"`
}
Build the cache key excluding ALL query string parameters that are in the request.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParameters) UnmarshalJSON ¶ added in v4.1.0
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParameters) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParametersParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParametersParam struct {
// Determines whether to exclude all query string parameters from the cache key.
All param.Field[bool] `json:"all"`
}
Build the cache key excluding ALL query string parameters that are in the request.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParametersParam) MarshalJSON ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParametersParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeParam struct {
// Determines whether to exclude all query string parameters from the cache key.
All param.Field[bool] `json:"all"`
List param.Field[interface{}] `json:"list"`
}
A list of query string parameters NOT used to build the cache key. All parameters present in the request but missing in this list will be used to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeParam) MarshalJSON ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParameters ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParameters struct {
List []string `json:"list"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParametersJSON `json:"-"`
}
A list of query string parameters NOT used to build the cache key. All parameters present in the request but missing in this list will be used to build the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParameters) UnmarshalJSON ¶ added in v4.1.0
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParameters) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParametersParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParametersParam struct {
List param.Field[[]string] `json:"list"`
}
A list of query string parameters NOT used to build the cache key. All parameters present in the request but missing in this list will be used to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParametersParam) MarshalJSON ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParametersParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeUnion ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeUnion interface {
// contains filtered or unexported methods
}
A list of query string parameters NOT used to build the cache key. All parameters present in the request but missing in this list will be used to build the cache key.
Union satisfied by SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParameters or SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParameters.
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeUnionParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeUnionParam interface {
// contains filtered or unexported methods
}
A list of query string parameters NOT used to build the cache key. All parameters present in the request but missing in this list will be used to build the cache key.
Satisfied by rulesets.SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeSomeQueryStringParametersParam, rulesets.SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeAllQueryStringParametersParam, SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeParam.
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersParam struct {
// A list of query string parameters NOT used to build the cache key. All
// parameters present in the request but missing in this list will be used to build
// the cache key.
Exclude param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersExcludeUnionParam] `json:"exclude"`
}
Use the absence of parameters in the query string to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersParam) MarshalJSON ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParameters ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParameters struct {
// A list of query string parameters used to build the cache key.
Include SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersInclude `json:"include"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersJSON `json:"-"`
}
Use the presence of parameters in the query string to build the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParameters) UnmarshalJSON ¶ added in v4.1.0
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParameters) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersInclude ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersInclude struct {
// Determines whether to include all query string parameters in the cache key.
All bool `json:"all"`
// This field can have the runtime type of [[]string].
List interface{} `json:"list"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeJSON `json:"-"`
// contains filtered or unexported fields
}
A list of query string parameters used to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersInclude) AsUnion ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersInclude) AsUnion() SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeUnion
AsUnion returns a SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParameters, SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParameters.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersInclude) UnmarshalJSON ¶ added in v4.1.0
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersInclude) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParameters ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParameters struct {
// Determines whether to include all query string parameters in the cache key.
All bool `json:"all"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParametersJSON `json:"-"`
}
Build the cache key using ALL query string parameters that are in the request.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParameters) UnmarshalJSON ¶ added in v4.1.0
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParameters) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParametersParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParametersParam struct {
// Determines whether to include all query string parameters in the cache key.
All param.Field[bool] `json:"all"`
}
Build the cache key using ALL query string parameters that are in the request.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParametersParam) MarshalJSON ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParametersParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeParam struct {
// Determines whether to include all query string parameters in the cache key.
All param.Field[bool] `json:"all"`
List param.Field[interface{}] `json:"list"`
}
A list of query string parameters used to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeParam) MarshalJSON ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParameters ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParameters struct {
List []string `json:"list"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParametersJSON `json:"-"`
}
A list of query string parameters used to build the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParameters) UnmarshalJSON ¶ added in v4.1.0
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParameters) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParametersParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParametersParam struct {
List param.Field[[]string] `json:"list"`
}
A list of query string parameters used to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParametersParam) MarshalJSON ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParametersParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeUnion ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeUnion interface {
// contains filtered or unexported methods
}
A list of query string parameters used to build the cache key.
Union satisfied by SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParameters or SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParameters.
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeUnionParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeUnionParam interface {
// contains filtered or unexported methods
}
A list of query string parameters used to build the cache key.
Satisfied by rulesets.SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeSomeQueryStringParametersParam, rulesets.SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeAllQueryStringParametersParam, SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeParam.
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersParam struct {
// A list of query string parameters used to build the cache key.
Include param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersIncludeUnionParam] `json:"include"`
}
Use the presence of parameters in the query string to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersParam) MarshalJSON ¶ added in v4.1.0
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam struct {
Exclude param.Field[interface{}] `json:"exclude"`
Include param.Field[interface{}] `json:"include"`
}
Use the presence of parameters in the query string to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringUnion ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringUnion interface {
// contains filtered or unexported methods
}
Use the presence of parameters in the query string to build the cache key.
Union satisfied by SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParameters or SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParameters.
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringUnionParam ¶ added in v4.1.0
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringUnionParam interface {
// contains filtered or unexported methods
}
Use the presence of parameters in the query string to build the cache key.
Satisfied by rulesets.SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludedQueryStringParametersParam, rulesets.SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludedQueryStringParametersParam, SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam.
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser struct {
// Use the user agent's device type in the cache key.
DeviceType bool `json:"device_type"`
// Use the user agents's country in the cache key.
Geo bool `json:"geo"`
// Use the user agent's language in the cache key.
Lang bool `json:"lang"`
JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyUserJSON `json:"-"`
}
Characteristics of the request user agent used in building the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam struct {
// Use the user agent's device type in the cache key.
DeviceType param.Field[bool] `json:"device_type"`
// Use the user agents's country in the cache key.
Geo param.Field[bool] `json:"geo"`
// Use the user agent's language in the cache key.
Lang param.Field[bool] `json:"lang"`
}
Characteristics of the request user agent used in building the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyParam struct {
// Separate cached content based on the visitor’s device type.
CacheByDeviceType param.Field[bool] `json:"cache_by_device_type"`
// Protect from web cache deception attacks while allowing static assets to be
// cached.
CacheDeceptionArmor param.Field[bool] `json:"cache_deception_armor"`
// Customize which components of the request are included or excluded from the
// cache key.
CustomKey param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam] `json:"custom_key"`
// Treat requests with the same query parameters the same, regardless of the order
// those query parameters are in. A value of true ignores the query strings' order.
IgnoreQueryStringsOrder param.Field[bool] `json:"ignore_query_strings_order"`
}
Define which components of the request are included or excluded from the cache key Cloudflare uses to store the response in cache.
func (SetCacheSettingsRuleActionParametersCacheKeyParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheReserve ¶
type SetCacheSettingsRuleActionParametersCacheReserve struct {
// Determines whether cache reserve is enabled. If this is true and a request meets
// eligibility criteria, Cloudflare will write the resource to cache reserve.
Eligible bool `json:"eligible,required"`
// The minimum file size eligible for store in cache reserve.
MinimumFileSize int64 `json:"minimum_file_size,required"`
JSON setCacheSettingsRuleActionParametersCacheReserveJSON `json:"-"`
}
Mark whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan).
func (*SetCacheSettingsRuleActionParametersCacheReserve) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheReserve) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheReserveParam ¶
type SetCacheSettingsRuleActionParametersCacheReserveParam struct {
// Determines whether cache reserve is enabled. If this is true and a request meets
// eligibility criteria, Cloudflare will write the resource to cache reserve.
Eligible param.Field[bool] `json:"eligible,required"`
// The minimum file size eligible for store in cache reserve.
MinimumFileSize param.Field[int64] `json:"minimum_file_size,required"`
}
Mark whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan).
func (SetCacheSettingsRuleActionParametersCacheReserveParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheReserveParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersEdgeTTL ¶
type SetCacheSettingsRuleActionParametersEdgeTTL struct {
// The TTL (in seconds) if you choose override_origin mode.
Default int64 `json:"default,required"`
// Edge TTL options.
Mode SetCacheSettingsRuleActionParametersEdgeTTLMode `json:"mode,required"`
// List of single status codes, or status code ranges to apply the selected mode.
StatusCodeTTL []SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL `json:"status_code_ttl,required"`
JSON setCacheSettingsRuleActionParametersEdgeTTLJSON `json:"-"`
}
TTL (Time to Live) specifies the maximum time to cache a resource in the Cloudflare edge network.
func (*SetCacheSettingsRuleActionParametersEdgeTTL) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersEdgeTTL) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersEdgeTTLMode ¶
type SetCacheSettingsRuleActionParametersEdgeTTLMode string
Edge TTL options.
const ( SetCacheSettingsRuleActionParametersEdgeTTLModeRespectOrigin SetCacheSettingsRuleActionParametersEdgeTTLMode = "respect_origin" SetCacheSettingsRuleActionParametersEdgeTTLModeBypassByDefault SetCacheSettingsRuleActionParametersEdgeTTLMode = "bypass_by_default" SetCacheSettingsRuleActionParametersEdgeTTLModeOverrideOrigin SetCacheSettingsRuleActionParametersEdgeTTLMode = "override_origin" )
func (SetCacheSettingsRuleActionParametersEdgeTTLMode) IsKnown ¶
func (r SetCacheSettingsRuleActionParametersEdgeTTLMode) IsKnown() bool
type SetCacheSettingsRuleActionParametersEdgeTTLParam ¶
type SetCacheSettingsRuleActionParametersEdgeTTLParam struct {
// The TTL (in seconds) if you choose override_origin mode.
Default param.Field[int64] `json:"default,required"`
// Edge TTL options.
Mode param.Field[SetCacheSettingsRuleActionParametersEdgeTTLMode] `json:"mode,required"`
// List of single status codes, or status code ranges to apply the selected mode.
StatusCodeTTL param.Field[[]SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam] `json:"status_code_ttl,required"`
}
TTL (Time to Live) specifies the maximum time to cache a resource in the Cloudflare edge network.
func (SetCacheSettingsRuleActionParametersEdgeTTLParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersEdgeTTLParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL ¶
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL struct {
// Time to cache a response (in seconds). A value of 0 is equivalent to setting the
// Cache-Control header with the value "no-cache". A value of -1 is equivalent to
// setting Cache-Control header with the value of "no-store".
Value int64 `json:"value,required"`
// The range of status codes used to apply the selected mode.
StatusCodeRange SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange `json:"status_code_range"`
// Set the TTL for responses with this specific status code.
StatusCodeValue int64 `json:"status_code_value"`
JSON setCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLJSON `json:"-"`
}
Specify how long Cloudflare should cache the response based on the status code from the origin. Can be a single status code or a range or status codes.
func (*SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam ¶
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam struct {
// Time to cache a response (in seconds). A value of 0 is equivalent to setting the
// Cache-Control header with the value "no-cache". A value of -1 is equivalent to
// setting Cache-Control header with the value of "no-store".
Value param.Field[int64] `json:"value,required"`
// The range of status codes used to apply the selected mode.
StatusCodeRange param.Field[SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam] `json:"status_code_range"`
// Set the TTL for responses with this specific status code.
StatusCodeValue param.Field[int64] `json:"status_code_value"`
}
Specify how long Cloudflare should cache the response based on the status code from the origin. Can be a single status code or a range or status codes.
func (SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange ¶
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange struct {
// Response status code lower bound.
From int64 `json:"from,required"`
// Response status code upper bound.
To int64 `json:"to,required"`
JSON setCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeJSON `json:"-"`
}
The range of status codes used to apply the selected mode.
func (*SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam ¶
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam struct {
// Response status code lower bound.
From param.Field[int64] `json:"from,required"`
// Response status code upper bound.
To param.Field[int64] `json:"to,required"`
}
The range of status codes used to apply the selected mode.
func (SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersParam ¶
type SetCacheSettingsRuleActionParametersParam struct {
// List of additional ports that caching can be enabled on.
AdditionalCacheablePorts param.Field[[]int64] `json:"additional_cacheable_ports"`
// Specify how long client browsers should cache the response. Cloudflare cache
// purge will not purge content cached on client browsers, so high browser TTLs may
// lead to stale content.
BrowserTTL param.Field[SetCacheSettingsRuleActionParametersBrowserTTLParam] `json:"browser_ttl"`
// Mark whether the request’s response from origin is eligible for caching. Caching
// itself will still depend on the cache-control header and your other caching
// configurations.
Cache param.Field[bool] `json:"cache"`
// Define which components of the request are included or excluded from the cache
// key Cloudflare uses to store the response in cache.
CacheKey param.Field[SetCacheSettingsRuleActionParametersCacheKeyParam] `json:"cache_key"`
// Mark whether the request's response from origin is eligible for Cache Reserve
// (requires a Cache Reserve add-on plan).
CacheReserve param.Field[SetCacheSettingsRuleActionParametersCacheReserveParam] `json:"cache_reserve"`
// TTL (Time to Live) specifies the maximum time to cache a resource in the
// Cloudflare edge network.
EdgeTTL param.Field[SetCacheSettingsRuleActionParametersEdgeTTLParam] `json:"edge_ttl"`
// When enabled, Cloudflare will aim to strictly adhere to RFC 7234.
OriginCacheControl param.Field[bool] `json:"origin_cache_control"`
// Generate Cloudflare error pages from issues sent from the origin server. When
// on, error pages will trigger for issues from the origin.
OriginErrorPagePassthru param.Field[bool] `json:"origin_error_page_passthru"`
// Define a timeout value between two successive read operations to your origin
// server. Historically, the timeout value between two read options from Cloudflare
// to an origin server is 100 seconds. If you are attempting to reduce HTTP 524
// errors because of timeouts from an origin server, try increasing this timeout
// value.
ReadTimeout param.Field[int64] `json:"read_timeout"`
// headers. When off, Cloudflare converts strong ETag headers to weak ETag headers.
RespectStrongEtags param.Field[bool] `json:"respect_strong_etags"`
// Define if Cloudflare should serve stale content while getting the latest content
// from the origin. If on, Cloudflare will not serve stale content while getting
// the latest content from the origin.
ServeStale param.Field[SetCacheSettingsRuleActionParametersServeStaleParam] `json:"serve_stale"`
}
The parameters configuring the rule's action.
func (SetCacheSettingsRuleActionParametersParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersServeStale ¶
type SetCacheSettingsRuleActionParametersServeStale struct {
// Defines whether Cloudflare should serve stale content while updating. If true,
// Cloudflare will not serve stale content while getting the latest content from
// the origin.
DisableStaleWhileUpdating bool `json:"disable_stale_while_updating,required"`
JSON setCacheSettingsRuleActionParametersServeStaleJSON `json:"-"`
}
Define if Cloudflare should serve stale content while getting the latest content from the origin. If on, Cloudflare will not serve stale content while getting the latest content from the origin.
func (*SetCacheSettingsRuleActionParametersServeStale) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersServeStale) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersServeStaleParam ¶
type SetCacheSettingsRuleActionParametersServeStaleParam struct {
// Defines whether Cloudflare should serve stale content while updating. If true,
// Cloudflare will not serve stale content while getting the latest content from
// the origin.
DisableStaleWhileUpdating param.Field[bool] `json:"disable_stale_while_updating,required"`
}
Define if Cloudflare should serve stale content while getting the latest content from the origin. If on, Cloudflare will not serve stale content while getting the latest content from the origin.
func (SetCacheSettingsRuleActionParametersServeStaleParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersServeStaleParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleExposedCredentialCheck ¶
type SetCacheSettingsRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON setCacheSettingsRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*SetCacheSettingsRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleExposedCredentialCheckParam ¶
type SetCacheSettingsRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (SetCacheSettingsRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r SetCacheSettingsRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleParam ¶
type SetCacheSettingsRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[SetCacheSettingsRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[SetCacheSettingsRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[SetCacheSettingsRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[SetCacheSettingsRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (SetCacheSettingsRuleParam) MarshalJSON ¶
func (r SetCacheSettingsRuleParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleRatelimit ¶
type SetCacheSettingsRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON setCacheSettingsRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*SetCacheSettingsRuleRatelimit) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleRatelimitParam ¶
type SetCacheSettingsRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (SetCacheSettingsRuleRatelimitParam) MarshalJSON ¶
func (r SetCacheSettingsRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type SetConfigRule ¶
type SetConfigRule 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 SetConfigRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters SetConfigRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck SetConfigRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit SetConfigRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON setConfigRuleJSON `json:"-"`
}
func (*SetConfigRule) UnmarshalJSON ¶
func (r *SetConfigRule) UnmarshalJSON(data []byte) (err error)
type SetConfigRuleAction ¶
type SetConfigRuleAction string
The action to perform when the rule matches.
const (
SetConfigRuleActionSetConfig SetConfigRuleAction = "set_config"
)
func (SetConfigRuleAction) IsKnown ¶
func (r SetConfigRuleAction) IsKnown() bool
type SetConfigRuleActionParameters ¶
type SetConfigRuleActionParameters struct {
// Turn on or off Automatic HTTPS Rewrites.
AutomaticHTTPSRewrites bool `json:"automatic_https_rewrites"`
// Select which file extensions to minify automatically.
Autominify SetConfigRuleActionParametersAutominify `json:"autominify"`
// Turn on or off Browser Integrity Check.
BIC bool `json:"bic"`
// Turn off all active Cloudflare Apps.
DisableApps SetConfigRuleActionParametersDisableApps `json:"disable_apps"`
// Turn off Real User Monitoring (RUM).
DisableRUM SetConfigRuleActionParametersDisableRUM `json:"disable_rum"`
// Turn off Zaraz.
DisableZaraz SetConfigRuleActionParametersDisableZaraz `json:"disable_zaraz"`
// Turn on or off Email Obfuscation.
EmailObfuscation bool `json:"email_obfuscation"`
// Turn on or off Cloudflare Fonts.
Fonts bool `json:"fonts"`
// Turn on or off the Hotlink Protection.
HotlinkProtection bool `json:"hotlink_protection"`
// Turn on or off Mirage.
Mirage bool `json:"mirage"`
// Turn on or off Opportunistic Encryption.
OpportunisticEncryption bool `json:"opportunistic_encryption"`
// Configure the Polish level.
Polish SetConfigRuleActionParametersPolish `json:"polish"`
// Turn on or off Rocket Loader.
RocketLoader bool `json:"rocket_loader"`
// Configure the Security Level.
SecurityLevel SetConfigRuleActionParametersSecurityLevel `json:"security_level"`
// Turn on or off Server Side Excludes.
ServerSideExcludes bool `json:"server_side_excludes"`
// Configure the SSL level.
SSL SetConfigRuleActionParametersSSL `json:"ssl"`
// Turn on or off Signed Exchanges (SXG).
SXG bool `json:"sxg"`
JSON setConfigRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*SetConfigRuleActionParameters) UnmarshalJSON ¶
func (r *SetConfigRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type SetConfigRuleActionParametersAutominify ¶
type SetConfigRuleActionParametersAutominify struct {
// Minify CSS files.
CSS bool `json:"css"`
// Minify HTML files.
HTML bool `json:"html"`
// Minify JS files.
JS bool `json:"js"`
JSON setConfigRuleActionParametersAutominifyJSON `json:"-"`
}
Select which file extensions to minify automatically.
func (*SetConfigRuleActionParametersAutominify) UnmarshalJSON ¶
func (r *SetConfigRuleActionParametersAutominify) UnmarshalJSON(data []byte) (err error)
type SetConfigRuleActionParametersAutominifyParam ¶
type SetConfigRuleActionParametersAutominifyParam struct {
// Minify CSS files.
CSS param.Field[bool] `json:"css"`
// Minify HTML files.
HTML param.Field[bool] `json:"html"`
// Minify JS files.
JS param.Field[bool] `json:"js"`
}
Select which file extensions to minify automatically.
func (SetConfigRuleActionParametersAutominifyParam) MarshalJSON ¶
func (r SetConfigRuleActionParametersAutominifyParam) MarshalJSON() (data []byte, err error)
type SetConfigRuleActionParametersDisableApps ¶
type SetConfigRuleActionParametersDisableApps bool
Turn off all active Cloudflare Apps.
const (
SetConfigRuleActionParametersDisableAppsTrue SetConfigRuleActionParametersDisableApps = true
)
func (SetConfigRuleActionParametersDisableApps) IsKnown ¶
func (r SetConfigRuleActionParametersDisableApps) IsKnown() bool
type SetConfigRuleActionParametersDisableRUM ¶
type SetConfigRuleActionParametersDisableRUM bool
Turn off Real User Monitoring (RUM).
const (
SetConfigRuleActionParametersDisableRUMTrue SetConfigRuleActionParametersDisableRUM = true
)
func (SetConfigRuleActionParametersDisableRUM) IsKnown ¶
func (r SetConfigRuleActionParametersDisableRUM) IsKnown() bool
type SetConfigRuleActionParametersDisableZaraz ¶
type SetConfigRuleActionParametersDisableZaraz bool
Turn off Zaraz.
const (
SetConfigRuleActionParametersDisableZarazTrue SetConfigRuleActionParametersDisableZaraz = true
)
func (SetConfigRuleActionParametersDisableZaraz) IsKnown ¶
func (r SetConfigRuleActionParametersDisableZaraz) IsKnown() bool
type SetConfigRuleActionParametersParam ¶
type SetConfigRuleActionParametersParam struct {
// Turn on or off Automatic HTTPS Rewrites.
AutomaticHTTPSRewrites param.Field[bool] `json:"automatic_https_rewrites"`
// Select which file extensions to minify automatically.
Autominify param.Field[SetConfigRuleActionParametersAutominifyParam] `json:"autominify"`
// Turn on or off Browser Integrity Check.
BIC param.Field[bool] `json:"bic"`
// Turn off all active Cloudflare Apps.
DisableApps param.Field[SetConfigRuleActionParametersDisableApps] `json:"disable_apps"`
// Turn off Real User Monitoring (RUM).
DisableRUM param.Field[SetConfigRuleActionParametersDisableRUM] `json:"disable_rum"`
// Turn off Zaraz.
DisableZaraz param.Field[SetConfigRuleActionParametersDisableZaraz] `json:"disable_zaraz"`
// Turn on or off Email Obfuscation.
EmailObfuscation param.Field[bool] `json:"email_obfuscation"`
// Turn on or off Cloudflare Fonts.
Fonts param.Field[bool] `json:"fonts"`
// Turn on or off the Hotlink Protection.
HotlinkProtection param.Field[bool] `json:"hotlink_protection"`
// Turn on or off Mirage.
Mirage param.Field[bool] `json:"mirage"`
// Turn on or off Opportunistic Encryption.
OpportunisticEncryption param.Field[bool] `json:"opportunistic_encryption"`
// Configure the Polish level.
Polish param.Field[SetConfigRuleActionParametersPolish] `json:"polish"`
// Turn on or off Rocket Loader.
RocketLoader param.Field[bool] `json:"rocket_loader"`
// Configure the Security Level.
SecurityLevel param.Field[SetConfigRuleActionParametersSecurityLevel] `json:"security_level"`
// Turn on or off Server Side Excludes.
ServerSideExcludes param.Field[bool] `json:"server_side_excludes"`
// Configure the SSL level.
SSL param.Field[SetConfigRuleActionParametersSSL] `json:"ssl"`
// Turn on or off Signed Exchanges (SXG).
SXG param.Field[bool] `json:"sxg"`
}
The parameters configuring the rule's action.
func (SetConfigRuleActionParametersParam) MarshalJSON ¶
func (r SetConfigRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type SetConfigRuleActionParametersPolish ¶
type SetConfigRuleActionParametersPolish string
Configure the Polish level.
const ( SetConfigRuleActionParametersPolishOff SetConfigRuleActionParametersPolish = "off" SetConfigRuleActionParametersPolishLossless SetConfigRuleActionParametersPolish = "lossless" SetConfigRuleActionParametersPolishLossy SetConfigRuleActionParametersPolish = "lossy" SetConfigRuleActionParametersPolishWebP SetConfigRuleActionParametersPolish = "webp" )
func (SetConfigRuleActionParametersPolish) IsKnown ¶
func (r SetConfigRuleActionParametersPolish) IsKnown() bool
type SetConfigRuleActionParametersSSL ¶
type SetConfigRuleActionParametersSSL string
Configure the SSL level.
const ( SetConfigRuleActionParametersSSLOff SetConfigRuleActionParametersSSL = "off" SetConfigRuleActionParametersSSLFlexible SetConfigRuleActionParametersSSL = "flexible" SetConfigRuleActionParametersSSLFull SetConfigRuleActionParametersSSL = "full" SetConfigRuleActionParametersSSLStrict SetConfigRuleActionParametersSSL = "strict" SetConfigRuleActionParametersSSLOriginPull SetConfigRuleActionParametersSSL = "origin_pull" )
func (SetConfigRuleActionParametersSSL) IsKnown ¶
func (r SetConfigRuleActionParametersSSL) IsKnown() bool
type SetConfigRuleActionParametersSecurityLevel ¶
type SetConfigRuleActionParametersSecurityLevel string
Configure the Security Level.
const ( SetConfigRuleActionParametersSecurityLevelOff SetConfigRuleActionParametersSecurityLevel = "off" SetConfigRuleActionParametersSecurityLevelEssentiallyOff SetConfigRuleActionParametersSecurityLevel = "essentially_off" SetConfigRuleActionParametersSecurityLevelLow SetConfigRuleActionParametersSecurityLevel = "low" SetConfigRuleActionParametersSecurityLevelMedium SetConfigRuleActionParametersSecurityLevel = "medium" SetConfigRuleActionParametersSecurityLevelHigh SetConfigRuleActionParametersSecurityLevel = "high" SetConfigRuleActionParametersSecurityLevelUnderAttack SetConfigRuleActionParametersSecurityLevel = "under_attack" )
func (SetConfigRuleActionParametersSecurityLevel) IsKnown ¶
func (r SetConfigRuleActionParametersSecurityLevel) IsKnown() bool
type SetConfigRuleExposedCredentialCheck ¶
type SetConfigRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON setConfigRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*SetConfigRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *SetConfigRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type SetConfigRuleExposedCredentialCheckParam ¶
type SetConfigRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (SetConfigRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r SetConfigRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type SetConfigRuleParam ¶
type SetConfigRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[SetConfigRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[SetConfigRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[SetConfigRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[SetConfigRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (SetConfigRuleParam) MarshalJSON ¶
func (r SetConfigRuleParam) MarshalJSON() (data []byte, err error)
type SetConfigRuleRatelimit ¶
type SetConfigRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON setConfigRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*SetConfigRuleRatelimit) UnmarshalJSON ¶
func (r *SetConfigRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type SetConfigRuleRatelimitParam ¶
type SetConfigRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (SetConfigRuleRatelimitParam) MarshalJSON ¶
func (r SetConfigRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type SkipRule ¶
type SkipRule 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 SkipRuleAction `json:"action"`
// The parameters configuring the rule's action.
ActionParameters SkipRuleActionParameters `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck SkipRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit SkipRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON skipRuleJSON `json:"-"`
}
func (*SkipRule) UnmarshalJSON ¶
type SkipRuleAction ¶
type SkipRuleAction string
The action to perform when the rule matches.
const (
SkipRuleActionSkip SkipRuleAction = "skip"
)
func (SkipRuleAction) IsKnown ¶
func (r SkipRuleAction) IsKnown() bool
type SkipRuleActionParameters ¶
type SkipRuleActionParameters struct {
// A list of phases to skip the execution of. This option is incompatible with the
// rulesets option.
Phases []Phase `json:"phases"`
// A list of legacy security products to skip the execution of.
Products []SkipRuleActionParametersProduct `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 option.
Ruleset SkipRuleActionParametersRuleset `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 skipRuleActionParametersJSON `json:"-"`
}
The parameters configuring the rule's action.
func (*SkipRuleActionParameters) UnmarshalJSON ¶
func (r *SkipRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type SkipRuleActionParametersParam ¶
type SkipRuleActionParametersParam struct {
// A list of phases to skip the execution of. This option is incompatible with the
// rulesets option.
Phases param.Field[[]Phase] `json:"phases"`
// A list of legacy security products to skip the execution of.
Products param.Field[[]SkipRuleActionParametersProduct] `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 option.
Ruleset param.Field[SkipRuleActionParametersRuleset] `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 (SkipRuleActionParametersParam) MarshalJSON ¶
func (r SkipRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type SkipRuleActionParametersProduct ¶
type SkipRuleActionParametersProduct string
The name of a legacy security product to skip the execution of.
const ( SkipRuleActionParametersProductBIC SkipRuleActionParametersProduct = "bic" SkipRuleActionParametersProductHot SkipRuleActionParametersProduct = "hot" SkipRuleActionParametersProductRateLimit SkipRuleActionParametersProduct = "rateLimit" SkipRuleActionParametersProductSecurityLevel SkipRuleActionParametersProduct = "securityLevel" SkipRuleActionParametersProductUABlock SkipRuleActionParametersProduct = "uaBlock" SkipRuleActionParametersProductWAF SkipRuleActionParametersProduct = "waf" SkipRuleActionParametersProductZoneLockdown SkipRuleActionParametersProduct = "zoneLockdown" )
func (SkipRuleActionParametersProduct) IsKnown ¶
func (r SkipRuleActionParametersProduct) IsKnown() bool
type SkipRuleActionParametersRuleset ¶
type SkipRuleActionParametersRuleset string
A ruleset to skip the execution of. This option is incompatible with the rulesets option.
const (
SkipRuleActionParametersRulesetCurrent SkipRuleActionParametersRuleset = "current"
)
func (SkipRuleActionParametersRuleset) IsKnown ¶
func (r SkipRuleActionParametersRuleset) IsKnown() bool
type SkipRuleExposedCredentialCheck ¶
type SkipRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON skipRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*SkipRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *SkipRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type SkipRuleExposedCredentialCheckParam ¶
type SkipRuleExposedCredentialCheckParam struct {
// Expression that selects the password used in the credentials check.
PasswordExpression param.Field[string] `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression param.Field[string] `json:"username_expression,required"`
}
Configure checks for exposed credentials.
func (SkipRuleExposedCredentialCheckParam) MarshalJSON ¶
func (r SkipRuleExposedCredentialCheckParam) MarshalJSON() (data []byte, err error)
type SkipRuleParam ¶
type SkipRuleParam struct {
// The unique ID of the rule.
ID param.Field[string] `json:"id"`
// The action to perform when the rule matches.
Action param.Field[SkipRuleAction] `json:"action"`
// The parameters configuring the rule's action.
ActionParameters param.Field[SkipRuleActionParametersParam] `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck param.Field[SkipRuleExposedCredentialCheckParam] `json:"exposed_credential_check"`
// 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[LoggingParam] `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit param.Field[SkipRuleRatelimitParam] `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref param.Field[string] `json:"ref"`
}
func (SkipRuleParam) MarshalJSON ¶
func (r SkipRuleParam) MarshalJSON() (data []byte, err error)
type SkipRuleRatelimit ¶
type SkipRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON skipRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*SkipRuleRatelimit) UnmarshalJSON ¶
func (r *SkipRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type SkipRuleRatelimitParam ¶
type SkipRuleRatelimitParam struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics param.Field[[]string] `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period param.Field[int64] `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression param.Field[string] `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout param.Field[int64] `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod param.Field[int64] `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin param.Field[bool] `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod param.Field[int64] `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName param.Field[string] `json:"score_response_header_name"`
}
An object configuring the rule's ratelimit behavior.
func (SkipRuleRatelimitParam) MarshalJSON ¶
func (r SkipRuleRatelimitParam) MarshalJSON() (data []byte, err error)
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyResourcesMap ¶ added in v4.6.0
type TokenPolicyResourcesMap = shared.TokenPolicyResourcesMap
A nested permission grant for further scoping.
This is an alias to an internal type.
type TokenPolicyResourcesMapParam ¶ added in v4.6.0
type TokenPolicyResourcesMapParam = shared.TokenPolicyResourcesMapParam
A nested permission grant for further scoping.
This is an alias to an internal type.
type TokenPolicyResourcesUnion ¶ added in v4.6.0
type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion
A simple wildcard permission, e.g., "\*".
This is an alias to an internal type.
type TokenPolicyResourcesUnionParam ¶ added in v4.6.0
type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam
A simple wildcard permission, e.g., "\*".
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.
type VersionDeleteParams ¶
type VersionGetParams ¶
type VersionGetResponse ¶
type VersionGetResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The list of rules in the ruleset.
Rules []VersionGetResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON versionGetResponseJSON `json:"-"`
}
A ruleset object.
func (*VersionGetResponse) UnmarshalJSON ¶
func (r *VersionGetResponse) UnmarshalJSON(data []byte) (err error)
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 ruleset object.
Result VersionGetResponse `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 ¶
func (r VersionGetResponseEnvelopeSuccess) IsKnown() bool
type VersionGetResponseRule ¶
type VersionGetResponseRule 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 VersionGetResponseRulesAction `json:"action"`
// This field can have the runtime type of [BlockRuleActionParameters],
// [interface{}], [CompressResponseRuleActionParameters],
// [ExecuteRuleActionParameters], [RedirectRuleActionParameters],
// [RewriteRuleActionParameters], [RouteRuleActionParameters],
// [ScoreRuleActionParameters], [ServeErrorRuleActionParameters],
// [SetConfigRuleActionParameters], [SkipRuleActionParameters],
// [SetCacheSettingsRuleActionParameters], [LogCustomFieldRuleActionParameters].
ActionParameters interface{} `json:"action_parameters"`
// This field can have the runtime type of [[]string].
Categories interface{} `json:"categories"`
// An informative description of the rule.
Description string `json:"description"`
// Whether the rule should be executed.
Enabled bool `json:"enabled"`
// This field can have the runtime type of [BlockRuleExposedCredentialCheck],
// [VersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck],
// [CompressResponseRuleExposedCredentialCheck],
// [ExecuteRuleExposedCredentialCheck],
// [VersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck],
// [LogRuleExposedCredentialCheck], [ManagedChallengeRuleExposedCredentialCheck],
// [RedirectRuleExposedCredentialCheck], [RewriteRuleExposedCredentialCheck],
// [RouteRuleExposedCredentialCheck], [ScoreRuleExposedCredentialCheck],
// [ServeErrorRuleExposedCredentialCheck], [SetConfigRuleExposedCredentialCheck],
// [SkipRuleExposedCredentialCheck], [SetCacheSettingsRuleExposedCredentialCheck],
// [LogCustomFieldRuleExposedCredentialCheck],
// [DDoSDynamicRuleExposedCredentialCheck],
// [ForceConnectionCloseRuleExposedCredentialCheck].
ExposedCredentialCheck interface{} `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// This field can have the runtime type of [BlockRuleRatelimit],
// [VersionGetResponseRulesRulesetsChallengeRuleRatelimit],
// [CompressResponseRuleRatelimit], [ExecuteRuleRatelimit],
// [VersionGetResponseRulesRulesetsJSChallengeRuleRatelimit], [LogRuleRatelimit],
// [ManagedChallengeRuleRatelimit], [RedirectRuleRatelimit],
// [RewriteRuleRatelimit], [RouteRuleRatelimit], [ScoreRuleRatelimit],
// [ServeErrorRuleRatelimit], [SetConfigRuleRatelimit], [SkipRuleRatelimit],
// [SetCacheSettingsRuleRatelimit], [LogCustomFieldRuleRatelimit],
// [DDoSDynamicRuleRatelimit], [ForceConnectionCloseRuleRatelimit].
Ratelimit interface{} `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON versionGetResponseRuleJSON `json:"-"`
// contains filtered or unexported fields
}
func (VersionGetResponseRule) AsUnion ¶
func (r VersionGetResponseRule) AsUnion() VersionGetResponseRulesUnion
AsUnion returns a VersionGetResponseRulesUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are BlockRule, VersionGetResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, VersionGetResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule, ForceConnectionCloseRule.
func (*VersionGetResponseRule) UnmarshalJSON ¶
func (r *VersionGetResponseRule) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseRulesAction ¶
type VersionGetResponseRulesAction string
The action to perform when the rule matches.
const ( VersionGetResponseRulesActionBlock VersionGetResponseRulesAction = "block" VersionGetResponseRulesActionChallenge VersionGetResponseRulesAction = "challenge" VersionGetResponseRulesActionCompressResponse VersionGetResponseRulesAction = "compress_response" VersionGetResponseRulesActionExecute VersionGetResponseRulesAction = "execute" VersionGetResponseRulesActionJSChallenge VersionGetResponseRulesAction = "js_challenge" VersionGetResponseRulesActionLog VersionGetResponseRulesAction = "log" VersionGetResponseRulesActionManagedChallenge VersionGetResponseRulesAction = "managed_challenge" VersionGetResponseRulesActionRedirect VersionGetResponseRulesAction = "redirect" VersionGetResponseRulesActionRewrite VersionGetResponseRulesAction = "rewrite" VersionGetResponseRulesActionRoute VersionGetResponseRulesAction = "route" VersionGetResponseRulesActionScore VersionGetResponseRulesAction = "score" VersionGetResponseRulesActionServeError VersionGetResponseRulesAction = "serve_error" VersionGetResponseRulesActionSetConfig VersionGetResponseRulesAction = "set_config" VersionGetResponseRulesActionSkip VersionGetResponseRulesAction = "skip" VersionGetResponseRulesActionSetCacheSettings VersionGetResponseRulesAction = "set_cache_settings" VersionGetResponseRulesActionLogCustomField VersionGetResponseRulesAction = "log_custom_field" VersionGetResponseRulesActionDDoSDynamic VersionGetResponseRulesAction = "ddos_dynamic" VersionGetResponseRulesActionForceConnectionClose VersionGetResponseRulesAction = "force_connection_close" )
func (VersionGetResponseRulesAction) IsKnown ¶
func (r VersionGetResponseRulesAction) IsKnown() bool
type VersionGetResponseRulesRulesetsChallengeRule ¶
type VersionGetResponseRulesRulesetsChallengeRule 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 VersionGetResponseRulesRulesetsChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck VersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit VersionGetResponseRulesRulesetsChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON versionGetResponseRulesRulesetsChallengeRuleJSON `json:"-"`
}
func (*VersionGetResponseRulesRulesetsChallengeRule) UnmarshalJSON ¶
func (r *VersionGetResponseRulesRulesetsChallengeRule) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseRulesRulesetsChallengeRuleAction ¶
type VersionGetResponseRulesRulesetsChallengeRuleAction string
The action to perform when the rule matches.
const (
VersionGetResponseRulesRulesetsChallengeRuleActionChallenge VersionGetResponseRulesRulesetsChallengeRuleAction = "challenge"
)
func (VersionGetResponseRulesRulesetsChallengeRuleAction) IsKnown ¶
func (r VersionGetResponseRulesRulesetsChallengeRuleAction) IsKnown() bool
type VersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck ¶
type VersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON versionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*VersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *VersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseRulesRulesetsChallengeRuleRatelimit ¶
type VersionGetResponseRulesRulesetsChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON versionGetResponseRulesRulesetsChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*VersionGetResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *VersionGetResponseRulesRulesetsChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseRulesRulesetsJSChallengeRule ¶
type VersionGetResponseRulesRulesetsJSChallengeRule 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 VersionGetResponseRulesRulesetsJSChallengeRuleAction `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"`
// Configure checks for exposed credentials.
ExposedCredentialCheck VersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck `json:"exposed_credential_check"`
// The expression defining which traffic will match the rule.
Expression string `json:"expression"`
// An object configuring the rule's logging behavior.
Logging Logging `json:"logging"`
// An object configuring the rule's ratelimit behavior.
Ratelimit VersionGetResponseRulesRulesetsJSChallengeRuleRatelimit `json:"ratelimit"`
// The reference of the rule (the rule ID by default).
Ref string `json:"ref"`
JSON versionGetResponseRulesRulesetsJSChallengeRuleJSON `json:"-"`
}
func (*VersionGetResponseRulesRulesetsJSChallengeRule) UnmarshalJSON ¶
func (r *VersionGetResponseRulesRulesetsJSChallengeRule) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseRulesRulesetsJSChallengeRuleAction ¶
type VersionGetResponseRulesRulesetsJSChallengeRuleAction string
The action to perform when the rule matches.
const (
VersionGetResponseRulesRulesetsJSChallengeRuleActionJSChallenge VersionGetResponseRulesRulesetsJSChallengeRuleAction = "js_challenge"
)
func (VersionGetResponseRulesRulesetsJSChallengeRuleAction) IsKnown ¶
func (r VersionGetResponseRulesRulesetsJSChallengeRuleAction) IsKnown() bool
type VersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck ¶
type VersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck struct {
// Expression that selects the password used in the credentials check.
PasswordExpression string `json:"password_expression,required"`
// Expression that selects the user ID used in the credentials check.
UsernameExpression string `json:"username_expression,required"`
JSON versionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheckJSON `json:"-"`
}
Configure checks for exposed credentials.
func (*VersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON ¶
func (r *VersionGetResponseRulesRulesetsJSChallengeRuleExposedCredentialCheck) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseRulesRulesetsJSChallengeRuleRatelimit ¶
type VersionGetResponseRulesRulesetsJSChallengeRuleRatelimit struct {
// Characteristics of the request on which the ratelimiter counter will be
// incremented.
Characteristics []string `json:"characteristics,required"`
// Period in seconds over which the counter is being incremented.
Period int64 `json:"period,required"`
// Defines when the ratelimit counter should be incremented. It is optional and
// defaults to the same as the rule's expression.
CountingExpression string `json:"counting_expression"`
// Period of time in seconds after which the action will be disabled following its
// first execution.
MitigationTimeout int64 `json:"mitigation_timeout"`
// The threshold of requests per period after which the action will be executed for
// the first time.
RequestsPerPeriod int64 `json:"requests_per_period"`
// Defines if ratelimit counting is only done when an origin is reached.
RequestsToOrigin bool `json:"requests_to_origin"`
// The score threshold per period for which the action will be executed the first
// time.
ScorePerPeriod int64 `json:"score_per_period"`
// The response header name provided by the origin which should contain the score
// to increment ratelimit counter on.
ScoreResponseHeaderName string `json:"score_response_header_name"`
JSON versionGetResponseRulesRulesetsJSChallengeRuleRatelimitJSON `json:"-"`
}
An object configuring the rule's ratelimit behavior.
func (*VersionGetResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON ¶
func (r *VersionGetResponseRulesRulesetsJSChallengeRuleRatelimit) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseRulesUnion ¶
type VersionGetResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by BlockRule, VersionGetResponseRulesRulesetsChallengeRule, CompressResponseRule, ExecuteRule, VersionGetResponseRulesRulesetsJSChallengeRule, LogRule, ManagedChallengeRule, RedirectRule, RewriteRule, RouteRule, ScoreRule, ServeErrorRule, SetConfigRule, SkipRule, SetCacheSettingsRule, LogCustomFieldRule, DDoSDynamicRule or ForceConnectionCloseRule.
type VersionListParams ¶
type VersionListResponse ¶
type VersionListResponse struct {
// The unique ID of the ruleset.
ID string `json:"id,required"`
// The kind of the ruleset.
Kind Kind `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 Phase `json:"phase,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Description string `json:"description"`
JSON versionListResponseJSON `json:"-"`
}
A ruleset object.
func (*VersionListResponse) UnmarshalJSON ¶
func (r *VersionListResponse) UnmarshalJSON(data []byte) (err error)
type VersionService ¶
type VersionService struct {
Options []option.RequestOption
}
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 *VersionGetResponse, 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 *pagination.SinglePage[VersionListResponse], err error)
Fetches the versions of an account or zone ruleset.
func (*VersionService) ListAutoPaging ¶
func (r *VersionService) ListAutoPaging(ctx context.Context, rulesetID string, query VersionListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[VersionListResponse]
Fetches the versions of an account or zone ruleset.