bot_management

package
v4.4.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

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 BotFightModeConfiguration

type BotFightModeConfiguration struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection BotFightModeConfigurationAIBotsProtection `json:"ai_bots_protection"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection BotFightModeConfigurationCrawlerProtection `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS bool `json:"enable_js"`
	// Whether to enable Bot Fight Mode.
	FightMode bool `json:"fight_mode"`
	// A read-only field that shows which unauthorized settings are currently active on
	// the zone. These settings typically result from upgrades or downgrades.
	StaleZoneConfiguration BotFightModeConfigurationStaleZoneConfiguration `json:"stale_zone_configuration"`
	// A read-only field that indicates whether the zone currently is running the
	// latest ML model.
	UsingLatestModel bool                          `json:"using_latest_model"`
	JSON             botFightModeConfigurationJSON `json:"-"`
}

func (*BotFightModeConfiguration) UnmarshalJSON

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

type BotFightModeConfigurationAIBotsProtection

type BotFightModeConfigurationAIBotsProtection string

Enable rule to block AI Scrapers and Crawlers.

const (
	BotFightModeConfigurationAIBotsProtectionBlock    BotFightModeConfigurationAIBotsProtection = "block"
	BotFightModeConfigurationAIBotsProtectionDisabled BotFightModeConfigurationAIBotsProtection = "disabled"
)

func (BotFightModeConfigurationAIBotsProtection) IsKnown

type BotFightModeConfigurationCrawlerProtection added in v4.3.0

type BotFightModeConfigurationCrawlerProtection string

Enable rule to punish AI Scrapers and Crawlers via a link maze.

const (
	BotFightModeConfigurationCrawlerProtectionEnabled  BotFightModeConfigurationCrawlerProtection = "enabled"
	BotFightModeConfigurationCrawlerProtectionDisabled BotFightModeConfigurationCrawlerProtection = "disabled"
)

func (BotFightModeConfigurationCrawlerProtection) IsKnown added in v4.3.0

type BotFightModeConfigurationParam

type BotFightModeConfigurationParam struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection param.Field[BotFightModeConfigurationAIBotsProtection] `json:"ai_bots_protection"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection param.Field[BotFightModeConfigurationCrawlerProtection] `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS param.Field[bool] `json:"enable_js"`
	// Whether to enable Bot Fight Mode.
	FightMode param.Field[bool] `json:"fight_mode"`
}

func (BotFightModeConfigurationParam) MarshalJSON

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

type BotFightModeConfigurationStaleZoneConfiguration

type BotFightModeConfigurationStaleZoneConfiguration struct {
	// Indicates that the zone's wordpress optimization for SBFM is turned on.
	OptimizeWordpress bool `json:"optimize_wordpress"`
	// Indicates that the zone's definitely automated requests are being blocked or
	// challenged.
	SBFMDefinitelyAutomated string `json:"sbfm_definitely_automated"`
	// Indicates that the zone's likely automated requests are being blocked or
	// challenged.
	SBFMLikelyAutomated string `json:"sbfm_likely_automated"`
	// Indicates that the zone's static resource protection is turned on.
	SBFMStaticResourceProtection string `json:"sbfm_static_resource_protection"`
	// Indicates that the zone's verified bot requests are being blocked.
	SBFMVerifiedBots string `json:"sbfm_verified_bots"`
	// Indicates that the zone's session score tracking is disabled.
	SuppressSessionScore bool                                                `json:"suppress_session_score"`
	JSON                 botFightModeConfigurationStaleZoneConfigurationJSON `json:"-"`
}

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

func (*BotFightModeConfigurationStaleZoneConfiguration) UnmarshalJSON

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

type BotFightModeConfigurationStaleZoneConfigurationParam

type BotFightModeConfigurationStaleZoneConfigurationParam struct {
	// Indicates that the zone's wordpress optimization for SBFM is turned on.
	OptimizeWordpress param.Field[bool] `json:"optimize_wordpress"`
	// Indicates that the zone's definitely automated requests are being blocked or
	// challenged.
	SBFMDefinitelyAutomated param.Field[string] `json:"sbfm_definitely_automated"`
	// Indicates that the zone's likely automated requests are being blocked or
	// challenged.
	SBFMLikelyAutomated param.Field[string] `json:"sbfm_likely_automated"`
	// Indicates that the zone's static resource protection is turned on.
	SBFMStaticResourceProtection param.Field[string] `json:"sbfm_static_resource_protection"`
	// Indicates that the zone's verified bot requests are being blocked.
	SBFMVerifiedBots param.Field[string] `json:"sbfm_verified_bots"`
	// Indicates that the zone's session score tracking is disabled.
	SuppressSessionScore param.Field[bool] `json:"suppress_session_score"`
}

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

func (BotFightModeConfigurationStaleZoneConfigurationParam) MarshalJSON

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

type BotManagementGetParams

type BotManagementGetParams struct {
	// Identifier.
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type BotManagementGetResponse

type BotManagementGetResponse struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection BotManagementGetResponseAIBotsProtection `json:"ai_bots_protection"`
	// Automatically update to the newest bot detection models created by Cloudflare as
	// they are released.
	// [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
	AutoUpdateModel bool `json:"auto_update_model"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection BotManagementGetResponseCrawlerProtection `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS bool `json:"enable_js"`
	// Whether to enable Bot Fight Mode.
	FightMode bool `json:"fight_mode"`
	// Whether to optimize Super Bot Fight Mode protections for Wordpress.
	OptimizeWordpress bool `json:"optimize_wordpress"`
	// Super Bot Fight Mode (SBFM) action to take on definitely automated requests.
	SBFMDefinitelyAutomated BotManagementGetResponseSBFMDefinitelyAutomated `json:"sbfm_definitely_automated"`
	// Super Bot Fight Mode (SBFM) action to take on likely automated requests.
	SBFMLikelyAutomated BotManagementGetResponseSBFMLikelyAutomated `json:"sbfm_likely_automated"`
	// Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if
	// static resources on your application need bot protection. Note: Static resource
	// protection can also result in legitimate traffic being blocked.
	SBFMStaticResourceProtection bool `json:"sbfm_static_resource_protection"`
	// Super Bot Fight Mode (SBFM) action to take on verified bots requests.
	SBFMVerifiedBots BotManagementGetResponseSBFMVerifiedBots `json:"sbfm_verified_bots"`
	// This field can have the runtime type of
	// [BotFightModeConfigurationStaleZoneConfiguration],
	// [SuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration],
	// [SuperBotFightModeLikelyConfigurationStaleZoneConfiguration],
	// [SubscriptionConfigurationStaleZoneConfiguration].
	StaleZoneConfiguration interface{} `json:"stale_zone_configuration"`
	// Whether to disable tracking the highest bot score for a session in the Bot
	// Management cookie.
	SuppressSessionScore bool `json:"suppress_session_score"`
	// A read-only field that indicates whether the zone currently is running the
	// latest ML model.
	UsingLatestModel bool                         `json:"using_latest_model"`
	JSON             botManagementGetResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (BotManagementGetResponse) AsUnion

AsUnion returns a BotManagementGetResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are BotFightModeConfiguration, SuperBotFightModeDefinitelyConfiguration, SuperBotFightModeLikelyConfiguration, SubscriptionConfiguration.

func (*BotManagementGetResponse) UnmarshalJSON

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

type BotManagementGetResponseAIBotsProtection

type BotManagementGetResponseAIBotsProtection string

Enable rule to block AI Scrapers and Crawlers.

const (
	BotManagementGetResponseAIBotsProtectionBlock    BotManagementGetResponseAIBotsProtection = "block"
	BotManagementGetResponseAIBotsProtectionDisabled BotManagementGetResponseAIBotsProtection = "disabled"
)

func (BotManagementGetResponseAIBotsProtection) IsKnown

type BotManagementGetResponseCrawlerProtection added in v4.3.0

type BotManagementGetResponseCrawlerProtection string

Enable rule to punish AI Scrapers and Crawlers via a link maze.

const (
	BotManagementGetResponseCrawlerProtectionEnabled  BotManagementGetResponseCrawlerProtection = "enabled"
	BotManagementGetResponseCrawlerProtectionDisabled BotManagementGetResponseCrawlerProtection = "disabled"
)

func (BotManagementGetResponseCrawlerProtection) IsKnown added in v4.3.0

type BotManagementGetResponseEnvelope

type BotManagementGetResponseEnvelope struct {
	Errors   []BotManagementGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []BotManagementGetResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success BotManagementGetResponseEnvelopeSuccess `json:"success,required"`
	Result  BotManagementGetResponse                `json:"result"`
	JSON    botManagementGetResponseEnvelopeJSON    `json:"-"`
}

func (*BotManagementGetResponseEnvelope) UnmarshalJSON

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

type BotManagementGetResponseEnvelopeErrors added in v4.3.0

type BotManagementGetResponseEnvelopeErrors struct {
	Code             int64                                        `json:"code,required"`
	Message          string                                       `json:"message,required"`
	DocumentationURL string                                       `json:"documentation_url"`
	Source           BotManagementGetResponseEnvelopeErrorsSource `json:"source"`
	JSON             botManagementGetResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*BotManagementGetResponseEnvelopeErrors) UnmarshalJSON added in v4.3.0

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

type BotManagementGetResponseEnvelopeErrorsSource added in v4.3.0

type BotManagementGetResponseEnvelopeErrorsSource struct {
	Pointer string                                           `json:"pointer"`
	JSON    botManagementGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*BotManagementGetResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type BotManagementGetResponseEnvelopeMessages added in v4.3.0

type BotManagementGetResponseEnvelopeMessages struct {
	Code             int64                                          `json:"code,required"`
	Message          string                                         `json:"message,required"`
	DocumentationURL string                                         `json:"documentation_url"`
	Source           BotManagementGetResponseEnvelopeMessagesSource `json:"source"`
	JSON             botManagementGetResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*BotManagementGetResponseEnvelopeMessages) UnmarshalJSON added in v4.3.0

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

type BotManagementGetResponseEnvelopeMessagesSource added in v4.3.0

type BotManagementGetResponseEnvelopeMessagesSource struct {
	Pointer string                                             `json:"pointer"`
	JSON    botManagementGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*BotManagementGetResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

type BotManagementGetResponseEnvelopeSuccess

type BotManagementGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	BotManagementGetResponseEnvelopeSuccessTrue BotManagementGetResponseEnvelopeSuccess = true
)

func (BotManagementGetResponseEnvelopeSuccess) IsKnown

type BotManagementGetResponseSBFMDefinitelyAutomated

type BotManagementGetResponseSBFMDefinitelyAutomated string

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

const (
	BotManagementGetResponseSBFMDefinitelyAutomatedAllow            BotManagementGetResponseSBFMDefinitelyAutomated = "allow"
	BotManagementGetResponseSBFMDefinitelyAutomatedBlock            BotManagementGetResponseSBFMDefinitelyAutomated = "block"
	BotManagementGetResponseSBFMDefinitelyAutomatedManagedChallenge BotManagementGetResponseSBFMDefinitelyAutomated = "managed_challenge"
)

func (BotManagementGetResponseSBFMDefinitelyAutomated) IsKnown

type BotManagementGetResponseSBFMLikelyAutomated

type BotManagementGetResponseSBFMLikelyAutomated string

Super Bot Fight Mode (SBFM) action to take on likely automated requests.

const (
	BotManagementGetResponseSBFMLikelyAutomatedAllow            BotManagementGetResponseSBFMLikelyAutomated = "allow"
	BotManagementGetResponseSBFMLikelyAutomatedBlock            BotManagementGetResponseSBFMLikelyAutomated = "block"
	BotManagementGetResponseSBFMLikelyAutomatedManagedChallenge BotManagementGetResponseSBFMLikelyAutomated = "managed_challenge"
)

func (BotManagementGetResponseSBFMLikelyAutomated) IsKnown

type BotManagementGetResponseSBFMVerifiedBots

type BotManagementGetResponseSBFMVerifiedBots string

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

const (
	BotManagementGetResponseSBFMVerifiedBotsAllow BotManagementGetResponseSBFMVerifiedBots = "allow"
	BotManagementGetResponseSBFMVerifiedBotsBlock BotManagementGetResponseSBFMVerifiedBots = "block"
)

func (BotManagementGetResponseSBFMVerifiedBots) IsKnown

type BotManagementGetResponseUnion

type BotManagementGetResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by BotFightModeConfiguration, SuperBotFightModeDefinitelyConfiguration, SuperBotFightModeLikelyConfiguration or SubscriptionConfiguration.

type BotManagementService

type BotManagementService struct {
	Options []option.RequestOption
}

BotManagementService 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 NewBotManagementService method instead.

func NewBotManagementService

func NewBotManagementService(opts ...option.RequestOption) (r *BotManagementService)

NewBotManagementService 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 (*BotManagementService) Get

Retrieve a zone's Bot Management Config

func (*BotManagementService) Update

Updates the Bot Management configuration for a zone.

This API is used to update:

- **Bot Fight Mode** - **Super Bot Fight Mode** - **Bot Management for Enterprise**

See [Bot Plans](https://developers.cloudflare.com/bots/plans/) for more information on the different plans \ If you recently upgraded or downgraded your plan, refer to the following examples to clean up old configurations. Copy and paste the example body to remove old zone configurations based on your current plan.

#### Clean up configuration for Bot Fight Mode plan

```json

{
  "sbfm_likely_automated": "allow",
  "sbfm_definitely_automated": "allow",
  "sbfm_verified_bots": "allow",
  "sbfm_static_resource_protection": false,
  "optimize_wordpress": false,
  "suppress_session_score": false
}

```

#### Clean up configuration for SBFM Pro plan

```json

{
  "sbfm_likely_automated": "allow",
  "fight_mode": false
}

```

#### Clean up configuration for SBFM Biz plan

```json

{
  "fight_mode": false
}

```

#### Clean up configuration for BM Enterprise Subscription plan

It is strongly recommended that you ensure you have [custom rules](https://developers.cloudflare.com/waf/custom-rules/) in place to protect your zone before disabling the SBFM rules. Without these protections, your zone is vulnerable to attacks.

```json

{
  "sbfm_likely_automated": "allow",
  "sbfm_definitely_automated": "allow",
  "sbfm_verified_bots": "allow",
  "sbfm_static_resource_protection": false,
  "optimize_wordpress": false,
  "fight_mode": false
}

```

type BotManagementUpdateParams

type BotManagementUpdateParams struct {
	// Identifier.
	ZoneID param.Field[string]                `path:"zone_id,required"`
	Body   BotManagementUpdateParamsBodyUnion `json:"body,required"`
}

func (BotManagementUpdateParams) MarshalJSON

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

type BotManagementUpdateParamsBody

type BotManagementUpdateParamsBody struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection param.Field[BotManagementUpdateParamsBodyAIBotsProtection] `json:"ai_bots_protection"`
	// Automatically update to the newest bot detection models created by Cloudflare as
	// they are released.
	// [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
	AutoUpdateModel param.Field[bool] `json:"auto_update_model"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection param.Field[BotManagementUpdateParamsBodyCrawlerProtection] `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS param.Field[bool] `json:"enable_js"`
	// Whether to enable Bot Fight Mode.
	FightMode param.Field[bool] `json:"fight_mode"`
	// Whether to optimize Super Bot Fight Mode protections for Wordpress.
	OptimizeWordpress param.Field[bool] `json:"optimize_wordpress"`
	// Super Bot Fight Mode (SBFM) action to take on definitely automated requests.
	SBFMDefinitelyAutomated param.Field[BotManagementUpdateParamsBodySBFMDefinitelyAutomated] `json:"sbfm_definitely_automated"`
	// Super Bot Fight Mode (SBFM) action to take on likely automated requests.
	SBFMLikelyAutomated param.Field[BotManagementUpdateParamsBodySBFMLikelyAutomated] `json:"sbfm_likely_automated"`
	// Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if
	// static resources on your application need bot protection. Note: Static resource
	// protection can also result in legitimate traffic being blocked.
	SBFMStaticResourceProtection param.Field[bool] `json:"sbfm_static_resource_protection"`
	// Super Bot Fight Mode (SBFM) action to take on verified bots requests.
	SBFMVerifiedBots       param.Field[BotManagementUpdateParamsBodySBFMVerifiedBots] `json:"sbfm_verified_bots"`
	StaleZoneConfiguration param.Field[interface{}]                                   `json:"stale_zone_configuration"`
	// Whether to disable tracking the highest bot score for a session in the Bot
	// Management cookie.
	SuppressSessionScore param.Field[bool] `json:"suppress_session_score"`
}

func (BotManagementUpdateParamsBody) MarshalJSON

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

type BotManagementUpdateParamsBodyAIBotsProtection

type BotManagementUpdateParamsBodyAIBotsProtection string

Enable rule to block AI Scrapers and Crawlers.

const (
	BotManagementUpdateParamsBodyAIBotsProtectionBlock    BotManagementUpdateParamsBodyAIBotsProtection = "block"
	BotManagementUpdateParamsBodyAIBotsProtectionDisabled BotManagementUpdateParamsBodyAIBotsProtection = "disabled"
)

func (BotManagementUpdateParamsBodyAIBotsProtection) IsKnown

type BotManagementUpdateParamsBodyCrawlerProtection added in v4.3.0

type BotManagementUpdateParamsBodyCrawlerProtection string

Enable rule to punish AI Scrapers and Crawlers via a link maze.

const (
	BotManagementUpdateParamsBodyCrawlerProtectionEnabled  BotManagementUpdateParamsBodyCrawlerProtection = "enabled"
	BotManagementUpdateParamsBodyCrawlerProtectionDisabled BotManagementUpdateParamsBodyCrawlerProtection = "disabled"
)

func (BotManagementUpdateParamsBodyCrawlerProtection) IsKnown added in v4.3.0

type BotManagementUpdateParamsBodySBFMDefinitelyAutomated

type BotManagementUpdateParamsBodySBFMDefinitelyAutomated string

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

const (
	BotManagementUpdateParamsBodySBFMDefinitelyAutomatedAllow            BotManagementUpdateParamsBodySBFMDefinitelyAutomated = "allow"
	BotManagementUpdateParamsBodySBFMDefinitelyAutomatedBlock            BotManagementUpdateParamsBodySBFMDefinitelyAutomated = "block"
	BotManagementUpdateParamsBodySBFMDefinitelyAutomatedManagedChallenge BotManagementUpdateParamsBodySBFMDefinitelyAutomated = "managed_challenge"
)

func (BotManagementUpdateParamsBodySBFMDefinitelyAutomated) IsKnown

type BotManagementUpdateParamsBodySBFMLikelyAutomated

type BotManagementUpdateParamsBodySBFMLikelyAutomated string

Super Bot Fight Mode (SBFM) action to take on likely automated requests.

const (
	BotManagementUpdateParamsBodySBFMLikelyAutomatedAllow            BotManagementUpdateParamsBodySBFMLikelyAutomated = "allow"
	BotManagementUpdateParamsBodySBFMLikelyAutomatedBlock            BotManagementUpdateParamsBodySBFMLikelyAutomated = "block"
	BotManagementUpdateParamsBodySBFMLikelyAutomatedManagedChallenge BotManagementUpdateParamsBodySBFMLikelyAutomated = "managed_challenge"
)

func (BotManagementUpdateParamsBodySBFMLikelyAutomated) IsKnown

type BotManagementUpdateParamsBodySBFMVerifiedBots

type BotManagementUpdateParamsBodySBFMVerifiedBots string

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

const (
	BotManagementUpdateParamsBodySBFMVerifiedBotsAllow BotManagementUpdateParamsBodySBFMVerifiedBots = "allow"
	BotManagementUpdateParamsBodySBFMVerifiedBotsBlock BotManagementUpdateParamsBodySBFMVerifiedBots = "block"
)

func (BotManagementUpdateParamsBodySBFMVerifiedBots) IsKnown

type BotManagementUpdateResponse

type BotManagementUpdateResponse struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection BotManagementUpdateResponseAIBotsProtection `json:"ai_bots_protection"`
	// Automatically update to the newest bot detection models created by Cloudflare as
	// they are released.
	// [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
	AutoUpdateModel bool `json:"auto_update_model"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection BotManagementUpdateResponseCrawlerProtection `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS bool `json:"enable_js"`
	// Whether to enable Bot Fight Mode.
	FightMode bool `json:"fight_mode"`
	// Whether to optimize Super Bot Fight Mode protections for Wordpress.
	OptimizeWordpress bool `json:"optimize_wordpress"`
	// Super Bot Fight Mode (SBFM) action to take on definitely automated requests.
	SBFMDefinitelyAutomated BotManagementUpdateResponseSBFMDefinitelyAutomated `json:"sbfm_definitely_automated"`
	// Super Bot Fight Mode (SBFM) action to take on likely automated requests.
	SBFMLikelyAutomated BotManagementUpdateResponseSBFMLikelyAutomated `json:"sbfm_likely_automated"`
	// Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if
	// static resources on your application need bot protection. Note: Static resource
	// protection can also result in legitimate traffic being blocked.
	SBFMStaticResourceProtection bool `json:"sbfm_static_resource_protection"`
	// Super Bot Fight Mode (SBFM) action to take on verified bots requests.
	SBFMVerifiedBots BotManagementUpdateResponseSBFMVerifiedBots `json:"sbfm_verified_bots"`
	// This field can have the runtime type of
	// [BotFightModeConfigurationStaleZoneConfiguration],
	// [SuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration],
	// [SuperBotFightModeLikelyConfigurationStaleZoneConfiguration],
	// [SubscriptionConfigurationStaleZoneConfiguration].
	StaleZoneConfiguration interface{} `json:"stale_zone_configuration"`
	// Whether to disable tracking the highest bot score for a session in the Bot
	// Management cookie.
	SuppressSessionScore bool `json:"suppress_session_score"`
	// A read-only field that indicates whether the zone currently is running the
	// latest ML model.
	UsingLatestModel bool                            `json:"using_latest_model"`
	JSON             botManagementUpdateResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (BotManagementUpdateResponse) AsUnion

AsUnion returns a BotManagementUpdateResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are BotFightModeConfiguration, SuperBotFightModeDefinitelyConfiguration, SuperBotFightModeLikelyConfiguration, SubscriptionConfiguration.

func (*BotManagementUpdateResponse) UnmarshalJSON

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

type BotManagementUpdateResponseAIBotsProtection

type BotManagementUpdateResponseAIBotsProtection string

Enable rule to block AI Scrapers and Crawlers.

const (
	BotManagementUpdateResponseAIBotsProtectionBlock    BotManagementUpdateResponseAIBotsProtection = "block"
	BotManagementUpdateResponseAIBotsProtectionDisabled BotManagementUpdateResponseAIBotsProtection = "disabled"
)

func (BotManagementUpdateResponseAIBotsProtection) IsKnown

type BotManagementUpdateResponseCrawlerProtection added in v4.3.0

type BotManagementUpdateResponseCrawlerProtection string

Enable rule to punish AI Scrapers and Crawlers via a link maze.

const (
	BotManagementUpdateResponseCrawlerProtectionEnabled  BotManagementUpdateResponseCrawlerProtection = "enabled"
	BotManagementUpdateResponseCrawlerProtectionDisabled BotManagementUpdateResponseCrawlerProtection = "disabled"
)

func (BotManagementUpdateResponseCrawlerProtection) IsKnown added in v4.3.0

type BotManagementUpdateResponseEnvelope

type BotManagementUpdateResponseEnvelope struct {
	Errors   []BotManagementUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []BotManagementUpdateResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success BotManagementUpdateResponseEnvelopeSuccess `json:"success,required"`
	Result  BotManagementUpdateResponse                `json:"result"`
	JSON    botManagementUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*BotManagementUpdateResponseEnvelope) UnmarshalJSON

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

type BotManagementUpdateResponseEnvelopeErrors added in v4.3.0

type BotManagementUpdateResponseEnvelopeErrors struct {
	Code             int64                                           `json:"code,required"`
	Message          string                                          `json:"message,required"`
	DocumentationURL string                                          `json:"documentation_url"`
	Source           BotManagementUpdateResponseEnvelopeErrorsSource `json:"source"`
	JSON             botManagementUpdateResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*BotManagementUpdateResponseEnvelopeErrors) UnmarshalJSON added in v4.3.0

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

type BotManagementUpdateResponseEnvelopeErrorsSource added in v4.3.0

type BotManagementUpdateResponseEnvelopeErrorsSource struct {
	Pointer string                                              `json:"pointer"`
	JSON    botManagementUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*BotManagementUpdateResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type BotManagementUpdateResponseEnvelopeMessages added in v4.3.0

type BotManagementUpdateResponseEnvelopeMessages struct {
	Code             int64                                             `json:"code,required"`
	Message          string                                            `json:"message,required"`
	DocumentationURL string                                            `json:"documentation_url"`
	Source           BotManagementUpdateResponseEnvelopeMessagesSource `json:"source"`
	JSON             botManagementUpdateResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*BotManagementUpdateResponseEnvelopeMessages) UnmarshalJSON added in v4.3.0

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

type BotManagementUpdateResponseEnvelopeMessagesSource added in v4.3.0

type BotManagementUpdateResponseEnvelopeMessagesSource struct {
	Pointer string                                                `json:"pointer"`
	JSON    botManagementUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*BotManagementUpdateResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

type BotManagementUpdateResponseEnvelopeSuccess

type BotManagementUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	BotManagementUpdateResponseEnvelopeSuccessTrue BotManagementUpdateResponseEnvelopeSuccess = true
)

func (BotManagementUpdateResponseEnvelopeSuccess) IsKnown

type BotManagementUpdateResponseSBFMDefinitelyAutomated

type BotManagementUpdateResponseSBFMDefinitelyAutomated string

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

const (
	BotManagementUpdateResponseSBFMDefinitelyAutomatedAllow            BotManagementUpdateResponseSBFMDefinitelyAutomated = "allow"
	BotManagementUpdateResponseSBFMDefinitelyAutomatedBlock            BotManagementUpdateResponseSBFMDefinitelyAutomated = "block"
	BotManagementUpdateResponseSBFMDefinitelyAutomatedManagedChallenge BotManagementUpdateResponseSBFMDefinitelyAutomated = "managed_challenge"
)

func (BotManagementUpdateResponseSBFMDefinitelyAutomated) IsKnown

type BotManagementUpdateResponseSBFMLikelyAutomated

type BotManagementUpdateResponseSBFMLikelyAutomated string

Super Bot Fight Mode (SBFM) action to take on likely automated requests.

const (
	BotManagementUpdateResponseSBFMLikelyAutomatedAllow            BotManagementUpdateResponseSBFMLikelyAutomated = "allow"
	BotManagementUpdateResponseSBFMLikelyAutomatedBlock            BotManagementUpdateResponseSBFMLikelyAutomated = "block"
	BotManagementUpdateResponseSBFMLikelyAutomatedManagedChallenge BotManagementUpdateResponseSBFMLikelyAutomated = "managed_challenge"
)

func (BotManagementUpdateResponseSBFMLikelyAutomated) IsKnown

type BotManagementUpdateResponseSBFMVerifiedBots

type BotManagementUpdateResponseSBFMVerifiedBots string

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

const (
	BotManagementUpdateResponseSBFMVerifiedBotsAllow BotManagementUpdateResponseSBFMVerifiedBots = "allow"
	BotManagementUpdateResponseSBFMVerifiedBotsBlock BotManagementUpdateResponseSBFMVerifiedBots = "block"
)

func (BotManagementUpdateResponseSBFMVerifiedBots) IsKnown

type BotManagementUpdateResponseUnion

type BotManagementUpdateResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by BotFightModeConfiguration, SuperBotFightModeDefinitelyConfiguration, SuperBotFightModeLikelyConfiguration or SubscriptionConfiguration.

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 Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource added in v4.2.0

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type Member

type Member = shared.Member

This is an alias to an internal type.

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 MemberPolicy

type MemberPolicy = shared.MemberPolicy

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 Permission

type Permission = shared.Permission

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 RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

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 ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource added in v4.3.0

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

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 SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionConfiguration

type SubscriptionConfiguration struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection SubscriptionConfigurationAIBotsProtection `json:"ai_bots_protection"`
	// Automatically update to the newest bot detection models created by Cloudflare as
	// they are released.
	// [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
	AutoUpdateModel bool `json:"auto_update_model"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection SubscriptionConfigurationCrawlerProtection `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS bool `json:"enable_js"`
	// A read-only field that shows which unauthorized settings are currently active on
	// the zone. These settings typically result from upgrades or downgrades.
	StaleZoneConfiguration SubscriptionConfigurationStaleZoneConfiguration `json:"stale_zone_configuration"`
	// Whether to disable tracking the highest bot score for a session in the Bot
	// Management cookie.
	SuppressSessionScore bool `json:"suppress_session_score"`
	// A read-only field that indicates whether the zone currently is running the
	// latest ML model.
	UsingLatestModel bool                          `json:"using_latest_model"`
	JSON             subscriptionConfigurationJSON `json:"-"`
}

func (*SubscriptionConfiguration) UnmarshalJSON

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

type SubscriptionConfigurationAIBotsProtection

type SubscriptionConfigurationAIBotsProtection string

Enable rule to block AI Scrapers and Crawlers.

const (
	SubscriptionConfigurationAIBotsProtectionBlock    SubscriptionConfigurationAIBotsProtection = "block"
	SubscriptionConfigurationAIBotsProtectionDisabled SubscriptionConfigurationAIBotsProtection = "disabled"
)

func (SubscriptionConfigurationAIBotsProtection) IsKnown

type SubscriptionConfigurationCrawlerProtection added in v4.3.0

type SubscriptionConfigurationCrawlerProtection string

Enable rule to punish AI Scrapers and Crawlers via a link maze.

const (
	SubscriptionConfigurationCrawlerProtectionEnabled  SubscriptionConfigurationCrawlerProtection = "enabled"
	SubscriptionConfigurationCrawlerProtectionDisabled SubscriptionConfigurationCrawlerProtection = "disabled"
)

func (SubscriptionConfigurationCrawlerProtection) IsKnown added in v4.3.0

type SubscriptionConfigurationParam

type SubscriptionConfigurationParam struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection param.Field[SubscriptionConfigurationAIBotsProtection] `json:"ai_bots_protection"`
	// Automatically update to the newest bot detection models created by Cloudflare as
	// they are released.
	// [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
	AutoUpdateModel param.Field[bool] `json:"auto_update_model"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection param.Field[SubscriptionConfigurationCrawlerProtection] `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS param.Field[bool] `json:"enable_js"`
	// Whether to disable tracking the highest bot score for a session in the Bot
	// Management cookie.
	SuppressSessionScore param.Field[bool] `json:"suppress_session_score"`
}

func (SubscriptionConfigurationParam) MarshalJSON

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

type SubscriptionConfigurationStaleZoneConfiguration

type SubscriptionConfigurationStaleZoneConfiguration struct {
	// Indicates that the zone's Bot Fight Mode is turned on.
	FightMode bool `json:"fight_mode"`
	// Indicates that the zone's wordpress optimization for SBFM is turned on.
	OptimizeWordpress bool `json:"optimize_wordpress"`
	// Indicates that the zone's definitely automated requests are being blocked or
	// challenged.
	SBFMDefinitelyAutomated string `json:"sbfm_definitely_automated"`
	// Indicates that the zone's likely automated requests are being blocked or
	// challenged.
	SBFMLikelyAutomated string `json:"sbfm_likely_automated"`
	// Indicates that the zone's static resource protection is turned on.
	SBFMStaticResourceProtection string `json:"sbfm_static_resource_protection"`
	// Indicates that the zone's verified bot requests are being blocked.
	SBFMVerifiedBots string                                              `json:"sbfm_verified_bots"`
	JSON             subscriptionConfigurationStaleZoneConfigurationJSON `json:"-"`
}

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

func (*SubscriptionConfigurationStaleZoneConfiguration) UnmarshalJSON

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

type SubscriptionConfigurationStaleZoneConfigurationParam

type SubscriptionConfigurationStaleZoneConfigurationParam struct {
	// Indicates that the zone's Bot Fight Mode is turned on.
	FightMode param.Field[bool] `json:"fight_mode"`
	// Indicates that the zone's wordpress optimization for SBFM is turned on.
	OptimizeWordpress param.Field[bool] `json:"optimize_wordpress"`
	// Indicates that the zone's definitely automated requests are being blocked or
	// challenged.
	SBFMDefinitelyAutomated param.Field[string] `json:"sbfm_definitely_automated"`
	// Indicates that the zone's likely automated requests are being blocked or
	// challenged.
	SBFMLikelyAutomated param.Field[string] `json:"sbfm_likely_automated"`
	// Indicates that the zone's static resource protection is turned on.
	SBFMStaticResourceProtection param.Field[string] `json:"sbfm_static_resource_protection"`
	// Indicates that the zone's verified bot requests are being blocked.
	SBFMVerifiedBots param.Field[string] `json:"sbfm_verified_bots"`
}

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

func (SubscriptionConfigurationStaleZoneConfigurationParam) MarshalJSON

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

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 SuperBotFightModeDefinitelyConfiguration

type SuperBotFightModeDefinitelyConfiguration struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection SuperBotFightModeDefinitelyConfigurationAIBotsProtection `json:"ai_bots_protection"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection SuperBotFightModeDefinitelyConfigurationCrawlerProtection `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS bool `json:"enable_js"`
	// Whether to optimize Super Bot Fight Mode protections for Wordpress.
	OptimizeWordpress bool `json:"optimize_wordpress"`
	// Super Bot Fight Mode (SBFM) action to take on definitely automated requests.
	SBFMDefinitelyAutomated SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated `json:"sbfm_definitely_automated"`
	// Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if
	// static resources on your application need bot protection. Note: Static resource
	// protection can also result in legitimate traffic being blocked.
	SBFMStaticResourceProtection bool `json:"sbfm_static_resource_protection"`
	// Super Bot Fight Mode (SBFM) action to take on verified bots requests.
	SBFMVerifiedBots SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBots `json:"sbfm_verified_bots"`
	// A read-only field that shows which unauthorized settings are currently active on
	// the zone. These settings typically result from upgrades or downgrades.
	StaleZoneConfiguration SuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration `json:"stale_zone_configuration"`
	// A read-only field that indicates whether the zone currently is running the
	// latest ML model.
	UsingLatestModel bool                                         `json:"using_latest_model"`
	JSON             superBotFightModeDefinitelyConfigurationJSON `json:"-"`
}

func (*SuperBotFightModeDefinitelyConfiguration) UnmarshalJSON

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

type SuperBotFightModeDefinitelyConfigurationAIBotsProtection

type SuperBotFightModeDefinitelyConfigurationAIBotsProtection string

Enable rule to block AI Scrapers and Crawlers.

const (
	SuperBotFightModeDefinitelyConfigurationAIBotsProtectionBlock    SuperBotFightModeDefinitelyConfigurationAIBotsProtection = "block"
	SuperBotFightModeDefinitelyConfigurationAIBotsProtectionDisabled SuperBotFightModeDefinitelyConfigurationAIBotsProtection = "disabled"
)

func (SuperBotFightModeDefinitelyConfigurationAIBotsProtection) IsKnown

type SuperBotFightModeDefinitelyConfigurationCrawlerProtection added in v4.3.0

type SuperBotFightModeDefinitelyConfigurationCrawlerProtection string

Enable rule to punish AI Scrapers and Crawlers via a link maze.

const (
	SuperBotFightModeDefinitelyConfigurationCrawlerProtectionEnabled  SuperBotFightModeDefinitelyConfigurationCrawlerProtection = "enabled"
	SuperBotFightModeDefinitelyConfigurationCrawlerProtectionDisabled SuperBotFightModeDefinitelyConfigurationCrawlerProtection = "disabled"
)

func (SuperBotFightModeDefinitelyConfigurationCrawlerProtection) IsKnown added in v4.3.0

type SuperBotFightModeDefinitelyConfigurationParam

type SuperBotFightModeDefinitelyConfigurationParam struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection param.Field[SuperBotFightModeDefinitelyConfigurationAIBotsProtection] `json:"ai_bots_protection"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection param.Field[SuperBotFightModeDefinitelyConfigurationCrawlerProtection] `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS param.Field[bool] `json:"enable_js"`
	// Whether to optimize Super Bot Fight Mode protections for Wordpress.
	OptimizeWordpress param.Field[bool] `json:"optimize_wordpress"`
	// Super Bot Fight Mode (SBFM) action to take on definitely automated requests.
	SBFMDefinitelyAutomated param.Field[SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated] `json:"sbfm_definitely_automated"`
	// Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if
	// static resources on your application need bot protection. Note: Static resource
	// protection can also result in legitimate traffic being blocked.
	SBFMStaticResourceProtection param.Field[bool] `json:"sbfm_static_resource_protection"`
	// Super Bot Fight Mode (SBFM) action to take on verified bots requests.
	SBFMVerifiedBots param.Field[SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBots] `json:"sbfm_verified_bots"`
}

func (SuperBotFightModeDefinitelyConfigurationParam) MarshalJSON

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

type SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated

type SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated string

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

const (
	SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomatedAllow            SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated = "allow"
	SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomatedBlock            SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated = "block"
	SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomatedManagedChallenge SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated = "managed_challenge"
)

func (SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated) IsKnown

type SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBots

type SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBots string

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

const (
	SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBotsAllow SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBots = "allow"
	SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBotsBlock SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBots = "block"
)

func (SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBots) IsKnown

type SuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration

type SuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration struct {
	// Indicates that the zone's Bot Fight Mode is turned on.
	FightMode bool `json:"fight_mode"`
	// Indicates that the zone's likely automated requests are being blocked or
	// challenged.
	SBFMLikelyAutomated string                                                             `json:"sbfm_likely_automated"`
	JSON                superBotFightModeDefinitelyConfigurationStaleZoneConfigurationJSON `json:"-"`
}

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

func (*SuperBotFightModeDefinitelyConfigurationStaleZoneConfiguration) UnmarshalJSON

type SuperBotFightModeDefinitelyConfigurationStaleZoneConfigurationParam

type SuperBotFightModeDefinitelyConfigurationStaleZoneConfigurationParam struct {
	// Indicates that the zone's Bot Fight Mode is turned on.
	FightMode param.Field[bool] `json:"fight_mode"`
	// Indicates that the zone's likely automated requests are being blocked or
	// challenged.
	SBFMLikelyAutomated param.Field[string] `json:"sbfm_likely_automated"`
}

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

func (SuperBotFightModeDefinitelyConfigurationStaleZoneConfigurationParam) MarshalJSON

type SuperBotFightModeLikelyConfiguration

type SuperBotFightModeLikelyConfiguration struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection SuperBotFightModeLikelyConfigurationAIBotsProtection `json:"ai_bots_protection"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection SuperBotFightModeLikelyConfigurationCrawlerProtection `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS bool `json:"enable_js"`
	// Whether to optimize Super Bot Fight Mode protections for Wordpress.
	OptimizeWordpress bool `json:"optimize_wordpress"`
	// Super Bot Fight Mode (SBFM) action to take on definitely automated requests.
	SBFMDefinitelyAutomated SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated `json:"sbfm_definitely_automated"`
	// Super Bot Fight Mode (SBFM) action to take on likely automated requests.
	SBFMLikelyAutomated SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated `json:"sbfm_likely_automated"`
	// Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if
	// static resources on your application need bot protection. Note: Static resource
	// protection can also result in legitimate traffic being blocked.
	SBFMStaticResourceProtection bool `json:"sbfm_static_resource_protection"`
	// Super Bot Fight Mode (SBFM) action to take on verified bots requests.
	SBFMVerifiedBots SuperBotFightModeLikelyConfigurationSBFMVerifiedBots `json:"sbfm_verified_bots"`
	// A read-only field that shows which unauthorized settings are currently active on
	// the zone. These settings typically result from upgrades or downgrades.
	StaleZoneConfiguration SuperBotFightModeLikelyConfigurationStaleZoneConfiguration `json:"stale_zone_configuration"`
	// A read-only field that indicates whether the zone currently is running the
	// latest ML model.
	UsingLatestModel bool                                     `json:"using_latest_model"`
	JSON             superBotFightModeLikelyConfigurationJSON `json:"-"`
}

func (*SuperBotFightModeLikelyConfiguration) UnmarshalJSON

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

type SuperBotFightModeLikelyConfigurationAIBotsProtection

type SuperBotFightModeLikelyConfigurationAIBotsProtection string

Enable rule to block AI Scrapers and Crawlers.

const (
	SuperBotFightModeLikelyConfigurationAIBotsProtectionBlock    SuperBotFightModeLikelyConfigurationAIBotsProtection = "block"
	SuperBotFightModeLikelyConfigurationAIBotsProtectionDisabled SuperBotFightModeLikelyConfigurationAIBotsProtection = "disabled"
)

func (SuperBotFightModeLikelyConfigurationAIBotsProtection) IsKnown

type SuperBotFightModeLikelyConfigurationCrawlerProtection added in v4.3.0

type SuperBotFightModeLikelyConfigurationCrawlerProtection string

Enable rule to punish AI Scrapers and Crawlers via a link maze.

const (
	SuperBotFightModeLikelyConfigurationCrawlerProtectionEnabled  SuperBotFightModeLikelyConfigurationCrawlerProtection = "enabled"
	SuperBotFightModeLikelyConfigurationCrawlerProtectionDisabled SuperBotFightModeLikelyConfigurationCrawlerProtection = "disabled"
)

func (SuperBotFightModeLikelyConfigurationCrawlerProtection) IsKnown added in v4.3.0

type SuperBotFightModeLikelyConfigurationParam

type SuperBotFightModeLikelyConfigurationParam struct {
	// Enable rule to block AI Scrapers and Crawlers.
	AIBotsProtection param.Field[SuperBotFightModeLikelyConfigurationAIBotsProtection] `json:"ai_bots_protection"`
	// Enable rule to punish AI Scrapers and Crawlers via a link maze.
	CrawlerProtection param.Field[SuperBotFightModeLikelyConfigurationCrawlerProtection] `json:"crawler_protection"`
	// Use lightweight, invisible JavaScript detections to improve Bot Management.
	// [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
	EnableJS param.Field[bool] `json:"enable_js"`
	// Whether to optimize Super Bot Fight Mode protections for Wordpress.
	OptimizeWordpress param.Field[bool] `json:"optimize_wordpress"`
	// Super Bot Fight Mode (SBFM) action to take on definitely automated requests.
	SBFMDefinitelyAutomated param.Field[SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated] `json:"sbfm_definitely_automated"`
	// Super Bot Fight Mode (SBFM) action to take on likely automated requests.
	SBFMLikelyAutomated param.Field[SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated] `json:"sbfm_likely_automated"`
	// Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if
	// static resources on your application need bot protection. Note: Static resource
	// protection can also result in legitimate traffic being blocked.
	SBFMStaticResourceProtection param.Field[bool] `json:"sbfm_static_resource_protection"`
	// Super Bot Fight Mode (SBFM) action to take on verified bots requests.
	SBFMVerifiedBots param.Field[SuperBotFightModeLikelyConfigurationSBFMVerifiedBots] `json:"sbfm_verified_bots"`
}

func (SuperBotFightModeLikelyConfigurationParam) MarshalJSON

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

type SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated

type SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated string

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

const (
	SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomatedAllow            SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated = "allow"
	SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomatedBlock            SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated = "block"
	SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomatedManagedChallenge SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated = "managed_challenge"
)

func (SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated) IsKnown

type SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated

type SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated string

Super Bot Fight Mode (SBFM) action to take on likely automated requests.

const (
	SuperBotFightModeLikelyConfigurationSBFMLikelyAutomatedAllow            SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated = "allow"
	SuperBotFightModeLikelyConfigurationSBFMLikelyAutomatedBlock            SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated = "block"
	SuperBotFightModeLikelyConfigurationSBFMLikelyAutomatedManagedChallenge SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated = "managed_challenge"
)

func (SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated) IsKnown

type SuperBotFightModeLikelyConfigurationSBFMVerifiedBots

type SuperBotFightModeLikelyConfigurationSBFMVerifiedBots string

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

const (
	SuperBotFightModeLikelyConfigurationSBFMVerifiedBotsAllow SuperBotFightModeLikelyConfigurationSBFMVerifiedBots = "allow"
	SuperBotFightModeLikelyConfigurationSBFMVerifiedBotsBlock SuperBotFightModeLikelyConfigurationSBFMVerifiedBots = "block"
)

func (SuperBotFightModeLikelyConfigurationSBFMVerifiedBots) IsKnown

type SuperBotFightModeLikelyConfigurationStaleZoneConfiguration

type SuperBotFightModeLikelyConfigurationStaleZoneConfiguration struct {
	// Indicates that the zone's Bot Fight Mode is turned on.
	FightMode bool                                                           `json:"fight_mode"`
	JSON      superBotFightModeLikelyConfigurationStaleZoneConfigurationJSON `json:"-"`
}

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

func (*SuperBotFightModeLikelyConfigurationStaleZoneConfiguration) UnmarshalJSON

type SuperBotFightModeLikelyConfigurationStaleZoneConfigurationParam

type SuperBotFightModeLikelyConfigurationStaleZoneConfigurationParam struct {
	// Indicates that the zone's Bot Fight Mode is turned on.
	FightMode param.Field[bool] `json:"fight_mode"`
}

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

func (SuperBotFightModeLikelyConfigurationStaleZoneConfigurationParam) MarshalJSON

type Token

type Token = shared.Token

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 TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

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 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.

Jump to

Keyboard shortcuts

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