Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type ErrorDataSource
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type PageRule
- type PageRuleAction
- type PageRuleActionsBypassCacheOnCookie
- type PageRuleActionsBypassCacheOnCookieID
- type PageRuleActionsCacheByDeviceType
- type PageRuleActionsCacheByDeviceTypeID
- type PageRuleActionsCacheByDeviceTypeValue
- type PageRuleActionsCacheDeceptionArmor
- type PageRuleActionsCacheDeceptionArmorID
- type PageRuleActionsCacheDeceptionArmorValue
- type PageRuleActionsCacheKeyFields
- type PageRuleActionsCacheKeyFieldsID
- type PageRuleActionsCacheKeyFieldsValue
- type PageRuleActionsCacheKeyFieldsValueCookie
- type PageRuleActionsCacheKeyFieldsValueHeader
- type PageRuleActionsCacheKeyFieldsValueHost
- type PageRuleActionsCacheKeyFieldsValueQueryString
- type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeArray
- type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString
- type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeUnion
- type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeArray
- type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString
- type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeUnion
- type PageRuleActionsCacheKeyFieldsValueUser
- type PageRuleActionsCacheOnCookie
- type PageRuleActionsCacheOnCookieID
- type PageRuleActionsCacheTTLByStatus
- type PageRuleActionsCacheTTLByStatusID
- type PageRuleActionsCacheTTLByStatusValueString
- type PageRuleActionsCacheTTLByStatusValueUnion
- type PageRuleActionsDisableApps
- type PageRuleActionsDisableAppsID
- type PageRuleActionsDisablePerformance
- type PageRuleActionsDisablePerformanceID
- type PageRuleActionsDisableSecurity
- type PageRuleActionsDisableSecurityID
- type PageRuleActionsDisableZaraz
- type PageRuleActionsDisableZarazID
- type PageRuleActionsEdgeCacheTTL
- type PageRuleActionsEdgeCacheTTLID
- type PageRuleActionsExplicitCacheControl
- type PageRuleActionsExplicitCacheControlID
- type PageRuleActionsExplicitCacheControlValue
- type PageRuleActionsForwardingURL
- type PageRuleActionsForwardingURLID
- type PageRuleActionsForwardingURLValue
- type PageRuleActionsForwardingURLValueStatusCode
- type PageRuleActionsHostHeaderOverride
- type PageRuleActionsHostHeaderOverrideID
- type PageRuleActionsID
- type PageRuleActionsResolveOverride
- type PageRuleActionsResolveOverrideID
- type PageRuleActionsRespectStrongEtag
- type PageRuleActionsRespectStrongEtagID
- type PageRuleActionsRespectStrongEtagValue
- type PageRuleActionsUnion
- type PageRuleDeleteParams
- type PageRuleDeleteResponse
- type PageRuleDeleteResponseEnvelope
- type PageRuleDeleteResponseEnvelopeErrors
- type PageRuleDeleteResponseEnvelopeErrorsSource
- type PageRuleDeleteResponseEnvelopeMessages
- type PageRuleDeleteResponseEnvelopeMessagesSource
- type PageRuleDeleteResponseEnvelopeSuccess
- type PageRuleEditParams
- type PageRuleEditParamsAction
- type PageRuleEditParamsActionUnion
- type PageRuleEditParamsActionsBypassCacheOnCookie
- type PageRuleEditParamsActionsBypassCacheOnCookieID
- type PageRuleEditParamsActionsCacheByDeviceType
- type PageRuleEditParamsActionsCacheByDeviceTypeID
- type PageRuleEditParamsActionsCacheByDeviceTypeValue
- type PageRuleEditParamsActionsCacheDeceptionArmor
- type PageRuleEditParamsActionsCacheDeceptionArmorID
- type PageRuleEditParamsActionsCacheDeceptionArmorValue
- type PageRuleEditParamsActionsCacheKeyFields
- type PageRuleEditParamsActionsCacheKeyFieldsID
- type PageRuleEditParamsActionsCacheKeyFieldsValue
- type PageRuleEditParamsActionsCacheKeyFieldsValueCookie
- type PageRuleEditParamsActionsCacheKeyFieldsValueHeader
- type PageRuleEditParamsActionsCacheKeyFieldsValueHost
- type PageRuleEditParamsActionsCacheKeyFieldsValueQueryString
- type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeArray
- type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeString
- type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion
- type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeArray
- type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeString
- type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion
- type PageRuleEditParamsActionsCacheKeyFieldsValueUser
- type PageRuleEditParamsActionsCacheOnCookie
- type PageRuleEditParamsActionsCacheOnCookieID
- type PageRuleEditParamsActionsCacheTTLByStatus
- type PageRuleEditParamsActionsCacheTTLByStatusID
- type PageRuleEditParamsActionsCacheTTLByStatusValueString
- type PageRuleEditParamsActionsCacheTTLByStatusValueUnion
- type PageRuleEditParamsActionsDisableApps
- type PageRuleEditParamsActionsDisableAppsID
- type PageRuleEditParamsActionsDisablePerformance
- type PageRuleEditParamsActionsDisablePerformanceID
- type PageRuleEditParamsActionsDisableSecurity
- type PageRuleEditParamsActionsDisableSecurityID
- type PageRuleEditParamsActionsDisableZaraz
- type PageRuleEditParamsActionsDisableZarazID
- type PageRuleEditParamsActionsEdgeCacheTTL
- type PageRuleEditParamsActionsEdgeCacheTTLID
- type PageRuleEditParamsActionsExplicitCacheControl
- type PageRuleEditParamsActionsExplicitCacheControlID
- type PageRuleEditParamsActionsExplicitCacheControlValue
- type PageRuleEditParamsActionsForwardingURL
- type PageRuleEditParamsActionsForwardingURLID
- type PageRuleEditParamsActionsForwardingURLValue
- type PageRuleEditParamsActionsForwardingURLValueStatusCode
- type PageRuleEditParamsActionsHostHeaderOverride
- type PageRuleEditParamsActionsHostHeaderOverrideID
- type PageRuleEditParamsActionsID
- type PageRuleEditParamsActionsResolveOverride
- type PageRuleEditParamsActionsResolveOverrideID
- type PageRuleEditParamsActionsRespectStrongEtag
- type PageRuleEditParamsActionsRespectStrongEtagID
- type PageRuleEditParamsActionsRespectStrongEtagValue
- type PageRuleEditParamsStatus
- type PageRuleEditResponseEnvelope
- type PageRuleEditResponseEnvelopeErrors
- type PageRuleEditResponseEnvelopeErrorsSource
- type PageRuleEditResponseEnvelopeMessages
- type PageRuleEditResponseEnvelopeMessagesSource
- type PageRuleEditResponseEnvelopeSuccess
- type PageRuleGetParams
- type PageRuleGetResponseEnvelope
- type PageRuleGetResponseEnvelopeErrors
- type PageRuleGetResponseEnvelopeErrorsSource
- type PageRuleGetResponseEnvelopeMessages
- type PageRuleGetResponseEnvelopeMessagesSource
- type PageRuleGetResponseEnvelopeSuccess
- type PageRuleListParams
- type PageRuleListParamsDirection
- type PageRuleListParamsMatch
- type PageRuleListParamsOrder
- type PageRuleListParamsStatus
- type PageRuleListResponseEnvelope
- type PageRuleListResponseEnvelopeErrors
- type PageRuleListResponseEnvelopeErrorsSource
- type PageRuleListResponseEnvelopeMessages
- type PageRuleListResponseEnvelopeMessagesSource
- type PageRuleListResponseEnvelopeSuccess
- type PageRuleNewParams
- type PageRuleNewParamsAction
- type PageRuleNewParamsActionUnion
- type PageRuleNewParamsActionsBypassCacheOnCookie
- type PageRuleNewParamsActionsBypassCacheOnCookieID
- type PageRuleNewParamsActionsCacheByDeviceType
- type PageRuleNewParamsActionsCacheByDeviceTypeID
- type PageRuleNewParamsActionsCacheByDeviceTypeValue
- type PageRuleNewParamsActionsCacheDeceptionArmor
- type PageRuleNewParamsActionsCacheDeceptionArmorID
- type PageRuleNewParamsActionsCacheDeceptionArmorValue
- type PageRuleNewParamsActionsCacheKeyFields
- type PageRuleNewParamsActionsCacheKeyFieldsID
- type PageRuleNewParamsActionsCacheKeyFieldsValue
- type PageRuleNewParamsActionsCacheKeyFieldsValueCookie
- type PageRuleNewParamsActionsCacheKeyFieldsValueHeader
- type PageRuleNewParamsActionsCacheKeyFieldsValueHost
- type PageRuleNewParamsActionsCacheKeyFieldsValueQueryString
- type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeArray
- type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeString
- type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion
- type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeArray
- type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeString
- type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion
- type PageRuleNewParamsActionsCacheKeyFieldsValueUser
- type PageRuleNewParamsActionsCacheOnCookie
- type PageRuleNewParamsActionsCacheOnCookieID
- type PageRuleNewParamsActionsCacheTTLByStatus
- type PageRuleNewParamsActionsCacheTTLByStatusID
- type PageRuleNewParamsActionsCacheTTLByStatusValueString
- type PageRuleNewParamsActionsCacheTTLByStatusValueUnion
- type PageRuleNewParamsActionsDisableApps
- type PageRuleNewParamsActionsDisableAppsID
- type PageRuleNewParamsActionsDisablePerformance
- type PageRuleNewParamsActionsDisablePerformanceID
- type PageRuleNewParamsActionsDisableSecurity
- type PageRuleNewParamsActionsDisableSecurityID
- type PageRuleNewParamsActionsDisableZaraz
- type PageRuleNewParamsActionsDisableZarazID
- type PageRuleNewParamsActionsEdgeCacheTTL
- type PageRuleNewParamsActionsEdgeCacheTTLID
- type PageRuleNewParamsActionsExplicitCacheControl
- type PageRuleNewParamsActionsExplicitCacheControlID
- type PageRuleNewParamsActionsExplicitCacheControlValue
- type PageRuleNewParamsActionsForwardingURL
- type PageRuleNewParamsActionsForwardingURLID
- type PageRuleNewParamsActionsForwardingURLValue
- type PageRuleNewParamsActionsForwardingURLValueStatusCode
- type PageRuleNewParamsActionsHostHeaderOverride
- type PageRuleNewParamsActionsHostHeaderOverrideID
- type PageRuleNewParamsActionsID
- type PageRuleNewParamsActionsResolveOverride
- type PageRuleNewParamsActionsResolveOverrideID
- type PageRuleNewParamsActionsRespectStrongEtag
- type PageRuleNewParamsActionsRespectStrongEtagID
- type PageRuleNewParamsActionsRespectStrongEtagValue
- type PageRuleNewParamsStatus
- type PageRuleNewResponseEnvelope
- type PageRuleNewResponseEnvelopeErrors
- type PageRuleNewResponseEnvelopeErrorsSource
- type PageRuleNewResponseEnvelopeMessages
- type PageRuleNewResponseEnvelopeMessagesSource
- type PageRuleNewResponseEnvelopeSuccess
- type PageRuleService
- func (r *PageRuleService) Delete(ctx context.Context, pageruleID string, body PageRuleDeleteParams, ...) (res *PageRuleDeleteResponse, err error)
- func (r *PageRuleService) Edit(ctx context.Context, pageruleID string, params PageRuleEditParams, ...) (res *PageRule, err error)
- func (r *PageRuleService) Get(ctx context.Context, pageruleID string, query PageRuleGetParams, ...) (res *PageRule, err error)
- func (r *PageRuleService) List(ctx context.Context, params PageRuleListParams, opts ...option.RequestOption) (res *[]PageRule, err error)
- func (r *PageRuleService) New(ctx context.Context, params PageRuleNewParams, opts ...option.RequestOption) (res *PageRule, err error)
- func (r *PageRuleService) Update(ctx context.Context, pageruleID string, params PageRuleUpdateParams, ...) (res *PageRule, err error)
- type PageRuleStatus
- type PageRuleUpdateParams
- type PageRuleUpdateParamsAction
- type PageRuleUpdateParamsActionUnion
- type PageRuleUpdateParamsActionsBypassCacheOnCookie
- type PageRuleUpdateParamsActionsBypassCacheOnCookieID
- type PageRuleUpdateParamsActionsCacheByDeviceType
- type PageRuleUpdateParamsActionsCacheByDeviceTypeID
- type PageRuleUpdateParamsActionsCacheByDeviceTypeValue
- type PageRuleUpdateParamsActionsCacheDeceptionArmor
- type PageRuleUpdateParamsActionsCacheDeceptionArmorID
- type PageRuleUpdateParamsActionsCacheDeceptionArmorValue
- type PageRuleUpdateParamsActionsCacheKeyFields
- type PageRuleUpdateParamsActionsCacheKeyFieldsID
- type PageRuleUpdateParamsActionsCacheKeyFieldsValue
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueCookie
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueHeader
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueHost
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryString
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeArray
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeString
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeArray
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeString
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion
- type PageRuleUpdateParamsActionsCacheKeyFieldsValueUser
- type PageRuleUpdateParamsActionsCacheOnCookie
- type PageRuleUpdateParamsActionsCacheOnCookieID
- type PageRuleUpdateParamsActionsCacheTTLByStatus
- type PageRuleUpdateParamsActionsCacheTTLByStatusID
- type PageRuleUpdateParamsActionsCacheTTLByStatusValueString
- type PageRuleUpdateParamsActionsCacheTTLByStatusValueUnion
- type PageRuleUpdateParamsActionsDisableApps
- type PageRuleUpdateParamsActionsDisableAppsID
- type PageRuleUpdateParamsActionsDisablePerformance
- type PageRuleUpdateParamsActionsDisablePerformanceID
- type PageRuleUpdateParamsActionsDisableSecurity
- type PageRuleUpdateParamsActionsDisableSecurityID
- type PageRuleUpdateParamsActionsDisableZaraz
- type PageRuleUpdateParamsActionsDisableZarazID
- type PageRuleUpdateParamsActionsEdgeCacheTTL
- type PageRuleUpdateParamsActionsEdgeCacheTTLID
- type PageRuleUpdateParamsActionsExplicitCacheControl
- type PageRuleUpdateParamsActionsExplicitCacheControlID
- type PageRuleUpdateParamsActionsExplicitCacheControlValue
- type PageRuleUpdateParamsActionsForwardingURL
- type PageRuleUpdateParamsActionsForwardingURLID
- type PageRuleUpdateParamsActionsForwardingURLValue
- type PageRuleUpdateParamsActionsForwardingURLValueStatusCode
- type PageRuleUpdateParamsActionsHostHeaderOverride
- type PageRuleUpdateParamsActionsHostHeaderOverrideID
- type PageRuleUpdateParamsActionsID
- type PageRuleUpdateParamsActionsResolveOverride
- type PageRuleUpdateParamsActionsResolveOverrideID
- type PageRuleUpdateParamsActionsRespectStrongEtag
- type PageRuleUpdateParamsActionsRespectStrongEtagID
- type PageRuleUpdateParamsActionsRespectStrongEtagValue
- type PageRuleUpdateParamsStatus
- type PageRuleUpdateResponseEnvelope
- type PageRuleUpdateResponseEnvelopeErrors
- type PageRuleUpdateResponseEnvelopeErrorsSource
- type PageRuleUpdateResponseEnvelopeMessages
- type PageRuleUpdateResponseEnvelopeMessagesSource
- type PageRuleUpdateResponseEnvelopeSuccess
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Target
- type TargetConstraint
- type TargetConstraintOperator
- type TargetConstraintParam
- type TargetParam
- type TargetTarget
- 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 TokenStatus
- type TokenValue
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 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 ErrorDataSource ¶ added in v4.2.0
type ErrorDataSource = shared.ErrorDataSource
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 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 PageRule ¶
type PageRule struct {
// Identifier.
ID string `json:"id,required"`
// The set of actions to perform if the targets of this rule match the request.
// Actions can redirect to another URL or override settings, but not both.
Actions []PageRuleAction `json:"actions,required"`
// The timestamp of when the Page Rule was created.
CreatedOn time.Time `json:"created_on,required" format:"date-time"`
// The timestamp of when the Page Rule was last modified.
ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
// The priority of the rule, used to define which Page Rule is processed over
// another. A higher number indicates a higher priority. For example, if you have a
// catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
// take precedence (rule B: `/images/special/*`), specify a higher priority for
// rule B so it overrides rule A.
Priority int64 `json:"priority,required"`
// The status of the Page Rule.
Status PageRuleStatus `json:"status,required"`
// The rule targets to evaluate on each request.
Targets []Target `json:"targets,required"`
JSON pageRuleJSON `json:"-"`
}
func (*PageRule) UnmarshalJSON ¶
type PageRuleAction ¶
type PageRuleAction struct {
// If enabled, any ` http://“ URL is converted to `https://` through a 301
// redirect.
ID PageRuleActionsID `json:"id"`
// This field can have the runtime type of [zones.AutomaticHTTPSRewritesValue],
// [int64], [zones.BrowserCheckValue], [string],
// [PageRuleActionsCacheByDeviceTypeValue],
// [PageRuleActionsCacheDeceptionArmorValue], [PageRuleActionsCacheKeyFieldsValue],
// [zones.CacheLevelValue], [map[string]PageRuleActionsCacheTTLByStatusValueUnion],
// [zones.EmailObfuscationValue], [PageRuleActionsExplicitCacheControlValue],
// [PageRuleActionsForwardingURLValue], [zones.IPGeolocationValue],
// [zones.MirageValue], [zones.OpportunisticEncryptionValue],
// [zones.OriginErrorPagePassThruValue], [zones.PolishValue],
// [PageRuleActionsRespectStrongEtagValue], [zones.ResponseBufferingValue],
// [zones.RocketLoaderValue], [zones.SecurityLevelValue],
// [zones.SortQueryStringForCacheValue], [zones.SSLValue],
// [zones.TrueClientIPHeaderValue], [zones.WAFValue].
Value interface{} `json:"value"`
JSON pageRuleActionJSON `json:"-"`
// contains filtered or unexported fields
}
func (PageRuleAction) AsUnion ¶
func (r PageRuleAction) AsUnion() PageRuleActionsUnion
AsUnion returns a PageRuleActionsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are zones.AlwaysUseHTTPS, zones.AutomaticHTTPSRewrites, zones.BrowserCacheTTL, zones.BrowserCheck, PageRuleActionsBypassCacheOnCookie, PageRuleActionsCacheByDeviceType, PageRuleActionsCacheDeceptionArmor, PageRuleActionsCacheKeyFields, zones.CacheLevel, PageRuleActionsCacheOnCookie, PageRuleActionsCacheTTLByStatus, PageRuleActionsDisableApps, PageRuleActionsDisablePerformance, PageRuleActionsDisableSecurity, PageRuleActionsDisableZaraz, PageRuleActionsEdgeCacheTTL, zones.EmailObfuscation, PageRuleActionsExplicitCacheControl, PageRuleActionsForwardingURL, PageRuleActionsHostHeaderOverride, zones.IPGeolocation, zones.Mirage, zones.OpportunisticEncryption, zones.OriginErrorPagePassThru, zones.Polish, PageRuleActionsResolveOverride, PageRuleActionsRespectStrongEtag, zones.ResponseBuffering, zones.RocketLoader, zones.SecurityLevel, zones.SortQueryStringForCache, zones.SSL, zones.TrueClientIPHeader, zones.WAF.
func (*PageRuleAction) UnmarshalJSON ¶
func (r *PageRuleAction) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsBypassCacheOnCookie ¶
type PageRuleActionsBypassCacheOnCookie struct {
// Bypass cache and fetch resources from the origin server if a regular expression
// matches against a cookie name present in the request.
ID PageRuleActionsBypassCacheOnCookieID `json:"id"`
// The regular expression to use for matching cookie names in the request. Refer to
// [Bypass Cache on Cookie setting](https://developers.cloudflare.com/rules/page-rules/reference/additional-reference/#bypass-cache-on-cookie-setting)
// to learn about limited regular expression support.
Value string `json:"value"`
JSON pageRuleActionsBypassCacheOnCookieJSON `json:"-"`
}
func (PageRuleActionsBypassCacheOnCookie) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsBypassCacheOnCookie) ImplementsPageRuleAction()
func (*PageRuleActionsBypassCacheOnCookie) UnmarshalJSON ¶
func (r *PageRuleActionsBypassCacheOnCookie) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsBypassCacheOnCookieID ¶
type PageRuleActionsBypassCacheOnCookieID string
Bypass cache and fetch resources from the origin server if a regular expression matches against a cookie name present in the request.
const (
PageRuleActionsBypassCacheOnCookieIDBypassCacheOnCookie PageRuleActionsBypassCacheOnCookieID = "bypass_cache_on_cookie"
)
func (PageRuleActionsBypassCacheOnCookieID) IsKnown ¶
func (r PageRuleActionsBypassCacheOnCookieID) IsKnown() bool
type PageRuleActionsCacheByDeviceType ¶
type PageRuleActionsCacheByDeviceType struct {
// Separate cached content based on the visitor's device type.
ID PageRuleActionsCacheByDeviceTypeID `json:"id"`
// The status of Cache By Device Type.
Value PageRuleActionsCacheByDeviceTypeValue `json:"value"`
JSON pageRuleActionsCacheByDeviceTypeJSON `json:"-"`
}
func (PageRuleActionsCacheByDeviceType) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsCacheByDeviceType) ImplementsPageRuleAction()
func (*PageRuleActionsCacheByDeviceType) UnmarshalJSON ¶
func (r *PageRuleActionsCacheByDeviceType) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheByDeviceTypeID ¶
type PageRuleActionsCacheByDeviceTypeID string
Separate cached content based on the visitor's device type.
const (
PageRuleActionsCacheByDeviceTypeIDCacheByDeviceType PageRuleActionsCacheByDeviceTypeID = "cache_by_device_type"
)
func (PageRuleActionsCacheByDeviceTypeID) IsKnown ¶
func (r PageRuleActionsCacheByDeviceTypeID) IsKnown() bool
type PageRuleActionsCacheByDeviceTypeValue ¶
type PageRuleActionsCacheByDeviceTypeValue string
The status of Cache By Device Type.
const ( PageRuleActionsCacheByDeviceTypeValueOn PageRuleActionsCacheByDeviceTypeValue = "on" PageRuleActionsCacheByDeviceTypeValueOff PageRuleActionsCacheByDeviceTypeValue = "off" )
func (PageRuleActionsCacheByDeviceTypeValue) IsKnown ¶
func (r PageRuleActionsCacheByDeviceTypeValue) IsKnown() bool
type PageRuleActionsCacheDeceptionArmor ¶
type PageRuleActionsCacheDeceptionArmor struct {
// Protect from web cache deception attacks while still allowing static assets to
// be cached. This setting verifies that the URL's extension matches the returned
// `Content-Type`.
ID PageRuleActionsCacheDeceptionArmorID `json:"id"`
// The status of Cache Deception Armor.
Value PageRuleActionsCacheDeceptionArmorValue `json:"value"`
JSON pageRuleActionsCacheDeceptionArmorJSON `json:"-"`
}
func (PageRuleActionsCacheDeceptionArmor) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsCacheDeceptionArmor) ImplementsPageRuleAction()
func (*PageRuleActionsCacheDeceptionArmor) UnmarshalJSON ¶
func (r *PageRuleActionsCacheDeceptionArmor) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheDeceptionArmorID ¶
type PageRuleActionsCacheDeceptionArmorID string
Protect from web cache deception attacks while still allowing static assets to be cached. This setting verifies that the URL's extension matches the returned `Content-Type`.
const (
PageRuleActionsCacheDeceptionArmorIDCacheDeceptionArmor PageRuleActionsCacheDeceptionArmorID = "cache_deception_armor"
)
func (PageRuleActionsCacheDeceptionArmorID) IsKnown ¶
func (r PageRuleActionsCacheDeceptionArmorID) IsKnown() bool
type PageRuleActionsCacheDeceptionArmorValue ¶
type PageRuleActionsCacheDeceptionArmorValue string
The status of Cache Deception Armor.
const ( PageRuleActionsCacheDeceptionArmorValueOn PageRuleActionsCacheDeceptionArmorValue = "on" PageRuleActionsCacheDeceptionArmorValueOff PageRuleActionsCacheDeceptionArmorValue = "off" )
func (PageRuleActionsCacheDeceptionArmorValue) IsKnown ¶
func (r PageRuleActionsCacheDeceptionArmorValue) IsKnown() bool
type PageRuleActionsCacheKeyFields ¶
type PageRuleActionsCacheKeyFields struct {
// Control specifically what variables to include when deciding which resources to
// cache. This allows customers to determine what to cache based on something other
// than just the URL.
ID PageRuleActionsCacheKeyFieldsID `json:"id"`
Value PageRuleActionsCacheKeyFieldsValue `json:"value"`
JSON pageRuleActionsCacheKeyFieldsJSON `json:"-"`
}
func (PageRuleActionsCacheKeyFields) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsCacheKeyFields) ImplementsPageRuleAction()
func (*PageRuleActionsCacheKeyFields) UnmarshalJSON ¶
func (r *PageRuleActionsCacheKeyFields) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheKeyFieldsID ¶
type PageRuleActionsCacheKeyFieldsID string
Control specifically what variables to include when deciding which resources to cache. This allows customers to determine what to cache based on something other than just the URL.
const (
PageRuleActionsCacheKeyFieldsIDCacheKeyFields PageRuleActionsCacheKeyFieldsID = "cache_key_fields"
)
func (PageRuleActionsCacheKeyFieldsID) IsKnown ¶
func (r PageRuleActionsCacheKeyFieldsID) IsKnown() bool
type PageRuleActionsCacheKeyFieldsValue ¶
type PageRuleActionsCacheKeyFieldsValue struct {
// Controls which cookies appear in the Cache Key.
Cookie PageRuleActionsCacheKeyFieldsValueCookie `json:"cookie"`
// Controls which headers go into the Cache Key. Exactly one of `include` or
// `exclude` is expected.
Header PageRuleActionsCacheKeyFieldsValueHeader `json:"header"`
// Determines which host header to include in the Cache Key.
Host PageRuleActionsCacheKeyFieldsValueHost `json:"host"`
// Controls which URL query string parameters go into the Cache Key. Exactly one of
// `include` or `exclude` is expected.
QueryString PageRuleActionsCacheKeyFieldsValueQueryString `json:"query_string"`
// Feature fields to add features about the end-user (client) into the Cache Key.
User PageRuleActionsCacheKeyFieldsValueUser `json:"user"`
JSON pageRuleActionsCacheKeyFieldsValueJSON `json:"-"`
}
func (*PageRuleActionsCacheKeyFieldsValue) UnmarshalJSON ¶
func (r *PageRuleActionsCacheKeyFieldsValue) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheKeyFieldsValueCookie ¶
type PageRuleActionsCacheKeyFieldsValueCookie struct {
// A list of cookies to check for the presence of, without including their actual
// values.
CheckPresence []string `json:"check_presence"`
// A list of cookies to include.
Include []string `json:"include"`
JSON pageRuleActionsCacheKeyFieldsValueCookieJSON `json:"-"`
}
Controls which cookies appear in the Cache Key.
func (*PageRuleActionsCacheKeyFieldsValueCookie) UnmarshalJSON ¶
func (r *PageRuleActionsCacheKeyFieldsValueCookie) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheKeyFieldsValueHeader ¶
type PageRuleActionsCacheKeyFieldsValueHeader struct {
// A list of headers to check for the presence of, without including their actual
// values.
CheckPresence []string `json:"check_presence"`
// A list of headers to ignore.
Exclude []string `json:"exclude"`
// A list of headers to include.
Include []string `json:"include"`
JSON pageRuleActionsCacheKeyFieldsValueHeaderJSON `json:"-"`
}
Controls which headers go into the Cache Key. Exactly one of `include` or `exclude` is expected.
func (*PageRuleActionsCacheKeyFieldsValueHeader) UnmarshalJSON ¶
func (r *PageRuleActionsCacheKeyFieldsValueHeader) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheKeyFieldsValueHost ¶
type PageRuleActionsCacheKeyFieldsValueHost struct {
// Whether to include the Host header in the HTTP request sent to the origin.
Resolved bool `json:"resolved"`
JSON pageRuleActionsCacheKeyFieldsValueHostJSON `json:"-"`
}
Determines which host header to include in the Cache Key.
func (*PageRuleActionsCacheKeyFieldsValueHost) UnmarshalJSON ¶
func (r *PageRuleActionsCacheKeyFieldsValueHost) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheKeyFieldsValueQueryString ¶
type PageRuleActionsCacheKeyFieldsValueQueryString struct {
// Ignore all query string parameters.
Exclude PageRuleActionsCacheKeyFieldsValueQueryStringExcludeUnion `json:"exclude"`
// Include all query string parameters.
Include PageRuleActionsCacheKeyFieldsValueQueryStringIncludeUnion `json:"include"`
JSON pageRuleActionsCacheKeyFieldsValueQueryStringJSON `json:"-"`
}
Controls which URL query string parameters go into the Cache Key. Exactly one of `include` or `exclude` is expected.
func (*PageRuleActionsCacheKeyFieldsValueQueryString) UnmarshalJSON ¶
func (r *PageRuleActionsCacheKeyFieldsValueQueryString) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeArray ¶
type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeArray []string
type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString ¶
type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString string
Ignore all query string parameters.
const (
PageRuleActionsCacheKeyFieldsValueQueryStringExcludeStringStar PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString = "*"
)
func (PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString) IsKnown ¶
func (r PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString) IsKnown() bool
type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeUnion ¶
type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeUnion interface {
// contains filtered or unexported methods
}
Ignore all query string parameters.
Union satisfied by PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString or PageRuleActionsCacheKeyFieldsValueQueryStringExcludeArray.
type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeArray ¶
type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeArray []string
type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString ¶
type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString string
Include all query string parameters.
const (
PageRuleActionsCacheKeyFieldsValueQueryStringIncludeStringStar PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString = "*"
)
func (PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString) IsKnown ¶
func (r PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString) IsKnown() bool
type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeUnion ¶
type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeUnion interface {
// contains filtered or unexported methods
}
Include all query string parameters.
Union satisfied by PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString or PageRuleActionsCacheKeyFieldsValueQueryStringIncludeArray.
type PageRuleActionsCacheKeyFieldsValueUser ¶
type PageRuleActionsCacheKeyFieldsValueUser struct {
// Classifies a request as `mobile`, `desktop`, or `tablet` based on the User
// Agent.
DeviceType bool `json:"device_type"`
// Includes the client's country, derived from the IP address.
Geo bool `json:"geo"`
// Includes the first language code contained in the `Accept-Language` header sent
// by the client.
Lang bool `json:"lang"`
JSON pageRuleActionsCacheKeyFieldsValueUserJSON `json:"-"`
}
Feature fields to add features about the end-user (client) into the Cache Key.
func (*PageRuleActionsCacheKeyFieldsValueUser) UnmarshalJSON ¶
func (r *PageRuleActionsCacheKeyFieldsValueUser) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheOnCookie ¶
type PageRuleActionsCacheOnCookie struct {
// Apply the Cache Everything option (Cache Level setting) based on a regular
// expression match against a cookie name.
ID PageRuleActionsCacheOnCookieID `json:"id"`
// The regular expression to use for matching cookie names in the request.
Value string `json:"value"`
JSON pageRuleActionsCacheOnCookieJSON `json:"-"`
}
func (PageRuleActionsCacheOnCookie) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsCacheOnCookie) ImplementsPageRuleAction()
func (*PageRuleActionsCacheOnCookie) UnmarshalJSON ¶
func (r *PageRuleActionsCacheOnCookie) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheOnCookieID ¶
type PageRuleActionsCacheOnCookieID string
Apply the Cache Everything option (Cache Level setting) based on a regular expression match against a cookie name.
const (
PageRuleActionsCacheOnCookieIDCacheOnCookie PageRuleActionsCacheOnCookieID = "cache_on_cookie"
)
func (PageRuleActionsCacheOnCookieID) IsKnown ¶
func (r PageRuleActionsCacheOnCookieID) IsKnown() bool
type PageRuleActionsCacheTTLByStatus ¶
type PageRuleActionsCacheTTLByStatus struct {
// Enterprise customers can set cache time-to-live (TTL) based on the response
// status from the origin web server. Cache TTL refers to the duration of a
// resource in the Cloudflare network before being marked as stale or discarded
// from cache. Status codes are returned by a resource's origin. Setting cache TTL
// based on response status overrides the default cache behavior (standard caching)
// for static files and overrides cache instructions sent by the origin web server.
// To cache non-static assets, set a Cache Level of Cache Everything using a Page
// Rule. Setting no-store Cache-Control or a low TTL (using `max-age`/`s-maxage`)
// increases requests to origin web servers and decreases performance.
ID PageRuleActionsCacheTTLByStatusID `json:"id"`
// A JSON object containing status codes and their corresponding TTLs. Each
// key-value pair in the cache TTL by status cache rule has the following syntax
//
// - `status_code`: An integer value such as 200 or 500. status_code matches the
// exact status code from the origin web server. Valid status codes are between
// 100-999.
// - `status_code_range`: Integer values for from and to. status_code_range matches
// any status code from the origin web server within the specified range.
// - `value`: An integer value that defines the duration an asset is valid in
// seconds or one of the following strings: no-store (equivalent to -1), no-cache
// (equivalent to 0).
Value map[string]PageRuleActionsCacheTTLByStatusValueUnion `json:"value"`
JSON pageRuleActionsCacheTTLByStatusJSON `json:"-"`
}
func (PageRuleActionsCacheTTLByStatus) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsCacheTTLByStatus) ImplementsPageRuleAction()
func (*PageRuleActionsCacheTTLByStatus) UnmarshalJSON ¶
func (r *PageRuleActionsCacheTTLByStatus) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsCacheTTLByStatusID ¶
type PageRuleActionsCacheTTLByStatusID string
Enterprise customers can set cache time-to-live (TTL) based on the response status from the origin web server. Cache TTL refers to the duration of a resource in the Cloudflare network before being marked as stale or discarded from cache. Status codes are returned by a resource's origin. Setting cache TTL based on response status overrides the default cache behavior (standard caching) for static files and overrides cache instructions sent by the origin web server. To cache non-static assets, set a Cache Level of Cache Everything using a Page Rule. Setting no-store Cache-Control or a low TTL (using `max-age`/`s-maxage`) increases requests to origin web servers and decreases performance.
const (
PageRuleActionsCacheTTLByStatusIDCacheTTLByStatus PageRuleActionsCacheTTLByStatusID = "cache_ttl_by_status"
)
func (PageRuleActionsCacheTTLByStatusID) IsKnown ¶
func (r PageRuleActionsCacheTTLByStatusID) IsKnown() bool
type PageRuleActionsCacheTTLByStatusValueString ¶
type PageRuleActionsCacheTTLByStatusValueString string
`no-store` (equivalent to -1), `no-cache` (equivalent to 0)
const ( PageRuleActionsCacheTTLByStatusValueStringNoCache PageRuleActionsCacheTTLByStatusValueString = "no-cache" PageRuleActionsCacheTTLByStatusValueStringNoStore PageRuleActionsCacheTTLByStatusValueString = "no-store" )
func (PageRuleActionsCacheTTLByStatusValueString) ImplementsPageRuleActionsCacheTTLByStatusValueUnion ¶ added in v4.1.0
func (r PageRuleActionsCacheTTLByStatusValueString) ImplementsPageRuleActionsCacheTTLByStatusValueUnion()
func (PageRuleActionsCacheTTLByStatusValueString) IsKnown ¶
func (r PageRuleActionsCacheTTLByStatusValueString) IsKnown() bool
type PageRuleActionsCacheTTLByStatusValueUnion ¶
type PageRuleActionsCacheTTLByStatusValueUnion interface {
ImplementsPageRuleActionsCacheTTLByStatusValueUnion()
}
`no-store` (equivalent to -1), `no-cache` (equivalent to 0)
Union satisfied by PageRuleActionsCacheTTLByStatusValueString or shared.UnionInt.
type PageRuleActionsDisableApps ¶
type PageRuleActionsDisableApps struct {
// Turn off all active
// [Cloudflare Apps](https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/)
// (deprecated).
ID PageRuleActionsDisableAppsID `json:"id"`
JSON pageRuleActionsDisableAppsJSON `json:"-"`
}
func (PageRuleActionsDisableApps) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsDisableApps) ImplementsPageRuleAction()
func (*PageRuleActionsDisableApps) UnmarshalJSON ¶
func (r *PageRuleActionsDisableApps) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsDisableAppsID ¶
type PageRuleActionsDisableAppsID string
Turn off all active [Cloudflare Apps](https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/) (deprecated).
const (
PageRuleActionsDisableAppsIDDisableApps PageRuleActionsDisableAppsID = "disable_apps"
)
func (PageRuleActionsDisableAppsID) IsKnown ¶
func (r PageRuleActionsDisableAppsID) IsKnown() bool
type PageRuleActionsDisablePerformance ¶
type PageRuleActionsDisablePerformance struct {
// Turn off
// [Rocket Loader](https://developers.cloudflare.com/speed/optimization/content/rocket-loader/),
// [Mirage](https://developers.cloudflare.com/speed/optimization/images/mirage/),
// and [Polish](https://developers.cloudflare.com/images/polish/).
ID PageRuleActionsDisablePerformanceID `json:"id"`
JSON pageRuleActionsDisablePerformanceJSON `json:"-"`
}
func (PageRuleActionsDisablePerformance) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsDisablePerformance) ImplementsPageRuleAction()
func (*PageRuleActionsDisablePerformance) UnmarshalJSON ¶
func (r *PageRuleActionsDisablePerformance) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsDisablePerformanceID ¶
type PageRuleActionsDisablePerformanceID string
Turn off [Rocket Loader](https://developers.cloudflare.com/speed/optimization/content/rocket-loader/), [Mirage](https://developers.cloudflare.com/speed/optimization/images/mirage/), and [Polish](https://developers.cloudflare.com/images/polish/).
const (
PageRuleActionsDisablePerformanceIDDisablePerformance PageRuleActionsDisablePerformanceID = "disable_performance"
)
func (PageRuleActionsDisablePerformanceID) IsKnown ¶
func (r PageRuleActionsDisablePerformanceID) IsKnown() bool
type PageRuleActionsDisableSecurity ¶
type PageRuleActionsDisableSecurity struct {
// Turn off
// [Email Obfuscation](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/),
// [Rate Limiting (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/),
// [Scrape Shield](https://developers.cloudflare.com/waf/tools/scrape-shield/),
// [URL (Zone) Lockdown](https://developers.cloudflare.com/waf/tools/zone-lockdown/),
// and
// [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/).
ID PageRuleActionsDisableSecurityID `json:"id"`
JSON pageRuleActionsDisableSecurityJSON `json:"-"`
}
func (PageRuleActionsDisableSecurity) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsDisableSecurity) ImplementsPageRuleAction()
func (*PageRuleActionsDisableSecurity) UnmarshalJSON ¶
func (r *PageRuleActionsDisableSecurity) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsDisableSecurityID ¶
type PageRuleActionsDisableSecurityID string
Turn off [Email Obfuscation](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/), [Rate Limiting (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/), [Scrape Shield](https://developers.cloudflare.com/waf/tools/scrape-shield/), [URL (Zone) Lockdown](https://developers.cloudflare.com/waf/tools/zone-lockdown/), and [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/).
const (
PageRuleActionsDisableSecurityIDDisableSecurity PageRuleActionsDisableSecurityID = "disable_security"
)
func (PageRuleActionsDisableSecurityID) IsKnown ¶
func (r PageRuleActionsDisableSecurityID) IsKnown() bool
type PageRuleActionsDisableZaraz ¶
type PageRuleActionsDisableZaraz struct {
// Turn off [Zaraz](https://developers.cloudflare.com/zaraz/).
ID PageRuleActionsDisableZarazID `json:"id"`
JSON pageRuleActionsDisableZarazJSON `json:"-"`
}
func (PageRuleActionsDisableZaraz) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsDisableZaraz) ImplementsPageRuleAction()
func (*PageRuleActionsDisableZaraz) UnmarshalJSON ¶
func (r *PageRuleActionsDisableZaraz) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsDisableZarazID ¶
type PageRuleActionsDisableZarazID string
Turn off [Zaraz](https://developers.cloudflare.com/zaraz/).
const (
PageRuleActionsDisableZarazIDDisableZaraz PageRuleActionsDisableZarazID = "disable_zaraz"
)
func (PageRuleActionsDisableZarazID) IsKnown ¶
func (r PageRuleActionsDisableZarazID) IsKnown() bool
type PageRuleActionsEdgeCacheTTL ¶
type PageRuleActionsEdgeCacheTTL struct {
// Specify how long to cache a resource in the Cloudflare global network. _Edge
// Cache TTL_ is not visible in response headers.
ID PageRuleActionsEdgeCacheTTLID `json:"id"`
Value int64 `json:"value"`
JSON pageRuleActionsEdgeCacheTTLJSON `json:"-"`
}
func (PageRuleActionsEdgeCacheTTL) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsEdgeCacheTTL) ImplementsPageRuleAction()
func (*PageRuleActionsEdgeCacheTTL) UnmarshalJSON ¶
func (r *PageRuleActionsEdgeCacheTTL) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsEdgeCacheTTLID ¶
type PageRuleActionsEdgeCacheTTLID string
Specify how long to cache a resource in the Cloudflare global network. _Edge Cache TTL_ is not visible in response headers.
const (
PageRuleActionsEdgeCacheTTLIDEdgeCacheTTL PageRuleActionsEdgeCacheTTLID = "edge_cache_ttl"
)
func (PageRuleActionsEdgeCacheTTLID) IsKnown ¶
func (r PageRuleActionsEdgeCacheTTLID) IsKnown() bool
type PageRuleActionsExplicitCacheControl ¶
type PageRuleActionsExplicitCacheControl struct {
// Origin Cache Control is enabled by default for Free, Pro, and Business domains
// and disabled by default for Enterprise domains.
ID PageRuleActionsExplicitCacheControlID `json:"id"`
// The status of Origin Cache Control.
Value PageRuleActionsExplicitCacheControlValue `json:"value"`
JSON pageRuleActionsExplicitCacheControlJSON `json:"-"`
}
func (PageRuleActionsExplicitCacheControl) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsExplicitCacheControl) ImplementsPageRuleAction()
func (*PageRuleActionsExplicitCacheControl) UnmarshalJSON ¶
func (r *PageRuleActionsExplicitCacheControl) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsExplicitCacheControlID ¶
type PageRuleActionsExplicitCacheControlID string
Origin Cache Control is enabled by default for Free, Pro, and Business domains and disabled by default for Enterprise domains.
const (
PageRuleActionsExplicitCacheControlIDExplicitCacheControl PageRuleActionsExplicitCacheControlID = "explicit_cache_control"
)
func (PageRuleActionsExplicitCacheControlID) IsKnown ¶
func (r PageRuleActionsExplicitCacheControlID) IsKnown() bool
type PageRuleActionsExplicitCacheControlValue ¶
type PageRuleActionsExplicitCacheControlValue string
The status of Origin Cache Control.
const ( PageRuleActionsExplicitCacheControlValueOn PageRuleActionsExplicitCacheControlValue = "on" PageRuleActionsExplicitCacheControlValueOff PageRuleActionsExplicitCacheControlValue = "off" )
func (PageRuleActionsExplicitCacheControlValue) IsKnown ¶
func (r PageRuleActionsExplicitCacheControlValue) IsKnown() bool
type PageRuleActionsForwardingURL ¶
type PageRuleActionsForwardingURL struct {
// Redirects one URL to another using an `HTTP 301/302` redirect. Refer to
// [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
ID PageRuleActionsForwardingURLID `json:"id"`
Value PageRuleActionsForwardingURLValue `json:"value"`
JSON pageRuleActionsForwardingURLJSON `json:"-"`
}
func (PageRuleActionsForwardingURL) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsForwardingURL) ImplementsPageRuleAction()
func (*PageRuleActionsForwardingURL) UnmarshalJSON ¶
func (r *PageRuleActionsForwardingURL) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsForwardingURLID ¶
type PageRuleActionsForwardingURLID string
Redirects one URL to another using an `HTTP 301/302` redirect. Refer to [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
const (
PageRuleActionsForwardingURLIDForwardingURL PageRuleActionsForwardingURLID = "forwarding_url"
)
func (PageRuleActionsForwardingURLID) IsKnown ¶
func (r PageRuleActionsForwardingURLID) IsKnown() bool
type PageRuleActionsForwardingURLValue ¶
type PageRuleActionsForwardingURLValue struct {
// The status code to use for the URL redirect. 301 is a permanent redirect. 302 is
// a temporary redirect.
StatusCode PageRuleActionsForwardingURLValueStatusCode `json:"status_code"`
// The URL to redirect the request to. Notes: ${num} refers to the position of '\*'
// in the constraint value.
URL string `json:"url"`
JSON pageRuleActionsForwardingURLValueJSON `json:"-"`
}
func (*PageRuleActionsForwardingURLValue) UnmarshalJSON ¶
func (r *PageRuleActionsForwardingURLValue) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsForwardingURLValueStatusCode ¶
type PageRuleActionsForwardingURLValueStatusCode int64
The status code to use for the URL redirect. 301 is a permanent redirect. 302 is a temporary redirect.
const ( PageRuleActionsForwardingURLValueStatusCode301 PageRuleActionsForwardingURLValueStatusCode = 301 PageRuleActionsForwardingURLValueStatusCode302 PageRuleActionsForwardingURLValueStatusCode = 302 )
func (PageRuleActionsForwardingURLValueStatusCode) IsKnown ¶
func (r PageRuleActionsForwardingURLValueStatusCode) IsKnown() bool
type PageRuleActionsHostHeaderOverride ¶
type PageRuleActionsHostHeaderOverride struct {
// Apply a specific host header.
ID PageRuleActionsHostHeaderOverrideID `json:"id"`
// The hostname to use in the `Host` header
Value string `json:"value"`
JSON pageRuleActionsHostHeaderOverrideJSON `json:"-"`
}
func (PageRuleActionsHostHeaderOverride) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsHostHeaderOverride) ImplementsPageRuleAction()
func (*PageRuleActionsHostHeaderOverride) UnmarshalJSON ¶
func (r *PageRuleActionsHostHeaderOverride) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsHostHeaderOverrideID ¶
type PageRuleActionsHostHeaderOverrideID string
Apply a specific host header.
const (
PageRuleActionsHostHeaderOverrideIDHostHeaderOverride PageRuleActionsHostHeaderOverrideID = "host_header_override"
)
func (PageRuleActionsHostHeaderOverrideID) IsKnown ¶
func (r PageRuleActionsHostHeaderOverrideID) IsKnown() bool
type PageRuleActionsID ¶
type PageRuleActionsID string
If enabled, any ` http://“ URL is converted to `https://` through a 301 redirect.
const ( PageRuleActionsIDAlwaysUseHTTPS PageRuleActionsID = "always_use_https" PageRuleActionsIDAutomaticHTTPSRewrites PageRuleActionsID = "automatic_https_rewrites" PageRuleActionsIDBrowserCacheTTL PageRuleActionsID = "browser_cache_ttl" PageRuleActionsIDBrowserCheck PageRuleActionsID = "browser_check" PageRuleActionsIDBypassCacheOnCookie PageRuleActionsID = "bypass_cache_on_cookie" PageRuleActionsIDCacheByDeviceType PageRuleActionsID = "cache_by_device_type" PageRuleActionsIDCacheDeceptionArmor PageRuleActionsID = "cache_deception_armor" PageRuleActionsIDCacheKeyFields PageRuleActionsID = "cache_key_fields" PageRuleActionsIDCacheLevel PageRuleActionsID = "cache_level" PageRuleActionsIDCacheOnCookie PageRuleActionsID = "cache_on_cookie" PageRuleActionsIDCacheTTLByStatus PageRuleActionsID = "cache_ttl_by_status" PageRuleActionsIDDisableApps PageRuleActionsID = "disable_apps" PageRuleActionsIDDisablePerformance PageRuleActionsID = "disable_performance" PageRuleActionsIDDisableSecurity PageRuleActionsID = "disable_security" PageRuleActionsIDDisableZaraz PageRuleActionsID = "disable_zaraz" PageRuleActionsIDEdgeCacheTTL PageRuleActionsID = "edge_cache_ttl" PageRuleActionsIDEmailObfuscation PageRuleActionsID = "email_obfuscation" PageRuleActionsIDExplicitCacheControl PageRuleActionsID = "explicit_cache_control" PageRuleActionsIDForwardingURL PageRuleActionsID = "forwarding_url" PageRuleActionsIDHostHeaderOverride PageRuleActionsID = "host_header_override" PageRuleActionsIDIPGeolocation PageRuleActionsID = "ip_geolocation" PageRuleActionsIDMirage PageRuleActionsID = "mirage" PageRuleActionsIDOpportunisticEncryption PageRuleActionsID = "opportunistic_encryption" PageRuleActionsIDOriginErrorPagePassThru PageRuleActionsID = "origin_error_page_pass_thru" PageRuleActionsIDPolish PageRuleActionsID = "polish" PageRuleActionsIDResolveOverride PageRuleActionsID = "resolve_override" PageRuleActionsIDRespectStrongEtag PageRuleActionsID = "respect_strong_etag" PageRuleActionsIDResponseBuffering PageRuleActionsID = "response_buffering" PageRuleActionsIDRocketLoader PageRuleActionsID = "rocket_loader" PageRuleActionsIDSecurityLevel PageRuleActionsID = "security_level" PageRuleActionsIDSortQueryStringForCache PageRuleActionsID = "sort_query_string_for_cache" PageRuleActionsIDSSL PageRuleActionsID = "ssl" PageRuleActionsIDTrueClientIPHeader PageRuleActionsID = "true_client_ip_header" PageRuleActionsIDWAF PageRuleActionsID = "waf" )
func (PageRuleActionsID) IsKnown ¶
func (r PageRuleActionsID) IsKnown() bool
type PageRuleActionsResolveOverride ¶
type PageRuleActionsResolveOverride struct {
// Change the origin address to the value specified in this setting.
ID PageRuleActionsResolveOverrideID `json:"id"`
// The origin address you want to override with.
Value string `json:"value"`
JSON pageRuleActionsResolveOverrideJSON `json:"-"`
}
func (PageRuleActionsResolveOverride) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsResolveOverride) ImplementsPageRuleAction()
func (*PageRuleActionsResolveOverride) UnmarshalJSON ¶
func (r *PageRuleActionsResolveOverride) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsResolveOverrideID ¶
type PageRuleActionsResolveOverrideID string
Change the origin address to the value specified in this setting.
const (
PageRuleActionsResolveOverrideIDResolveOverride PageRuleActionsResolveOverrideID = "resolve_override"
)
func (PageRuleActionsResolveOverrideID) IsKnown ¶
func (r PageRuleActionsResolveOverrideID) IsKnown() bool
type PageRuleActionsRespectStrongEtag ¶
type PageRuleActionsRespectStrongEtag struct {
// Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and
// the origin server.
ID PageRuleActionsRespectStrongEtagID `json:"id"`
// The status of Respect Strong ETags
Value PageRuleActionsRespectStrongEtagValue `json:"value"`
JSON pageRuleActionsRespectStrongEtagJSON `json:"-"`
}
func (PageRuleActionsRespectStrongEtag) ImplementsPageRuleAction ¶ added in v4.1.0
func (r PageRuleActionsRespectStrongEtag) ImplementsPageRuleAction()
func (*PageRuleActionsRespectStrongEtag) UnmarshalJSON ¶
func (r *PageRuleActionsRespectStrongEtag) UnmarshalJSON(data []byte) (err error)
type PageRuleActionsRespectStrongEtagID ¶
type PageRuleActionsRespectStrongEtagID string
Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and the origin server.
const (
PageRuleActionsRespectStrongEtagIDRespectStrongEtag PageRuleActionsRespectStrongEtagID = "respect_strong_etag"
)
func (PageRuleActionsRespectStrongEtagID) IsKnown ¶
func (r PageRuleActionsRespectStrongEtagID) IsKnown() bool
type PageRuleActionsRespectStrongEtagValue ¶
type PageRuleActionsRespectStrongEtagValue string
The status of Respect Strong ETags
const ( PageRuleActionsRespectStrongEtagValueOn PageRuleActionsRespectStrongEtagValue = "on" PageRuleActionsRespectStrongEtagValueOff PageRuleActionsRespectStrongEtagValue = "off" )
func (PageRuleActionsRespectStrongEtagValue) IsKnown ¶
func (r PageRuleActionsRespectStrongEtagValue) IsKnown() bool
type PageRuleActionsUnion ¶
type PageRuleActionsUnion interface {
ImplementsPageRuleAction()
}
Union satisfied by zones.AlwaysUseHTTPS, zones.AutomaticHTTPSRewrites, zones.BrowserCacheTTL, zones.BrowserCheck, PageRuleActionsBypassCacheOnCookie, PageRuleActionsCacheByDeviceType, PageRuleActionsCacheDeceptionArmor, PageRuleActionsCacheKeyFields, zones.CacheLevel, PageRuleActionsCacheOnCookie, PageRuleActionsCacheTTLByStatus, PageRuleActionsDisableApps, PageRuleActionsDisablePerformance, PageRuleActionsDisableSecurity, PageRuleActionsDisableZaraz, PageRuleActionsEdgeCacheTTL, zones.EmailObfuscation, PageRuleActionsExplicitCacheControl, PageRuleActionsForwardingURL, PageRuleActionsHostHeaderOverride, zones.IPGeolocation, zones.Mirage, zones.OpportunisticEncryption, zones.OriginErrorPagePassThru, zones.Polish, PageRuleActionsResolveOverride, PageRuleActionsRespectStrongEtag, zones.ResponseBuffering, zones.RocketLoader, zones.SecurityLevel, zones.SortQueryStringForCache, zones.SSL, zones.TrueClientIPHeader or zones.WAF.
type PageRuleDeleteParams ¶
type PageRuleDeleteResponse ¶
type PageRuleDeleteResponse struct {
// Identifier.
ID string `json:"id,required"`
JSON pageRuleDeleteResponseJSON `json:"-"`
}
func (*PageRuleDeleteResponse) UnmarshalJSON ¶
func (r *PageRuleDeleteResponse) UnmarshalJSON(data []byte) (err error)
type PageRuleDeleteResponseEnvelope ¶
type PageRuleDeleteResponseEnvelope struct {
Errors []PageRuleDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []PageRuleDeleteResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success PageRuleDeleteResponseEnvelopeSuccess `json:"success,required"`
Result PageRuleDeleteResponse `json:"result,nullable"`
JSON pageRuleDeleteResponseEnvelopeJSON `json:"-"`
}
func (*PageRuleDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *PageRuleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PageRuleDeleteResponseEnvelopeErrors ¶ added in v4.3.0
type PageRuleDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON pageRuleDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*PageRuleDeleteResponseEnvelopeErrors) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PageRuleDeleteResponseEnvelopeErrorsSource ¶ added in v4.3.0
type PageRuleDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON pageRuleDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*PageRuleDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type PageRuleDeleteResponseEnvelopeMessages ¶ added in v4.3.0
type PageRuleDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON pageRuleDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*PageRuleDeleteResponseEnvelopeMessages) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PageRuleDeleteResponseEnvelopeMessagesSource ¶ added in v4.3.0
type PageRuleDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON pageRuleDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*PageRuleDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type PageRuleDeleteResponseEnvelopeSuccess ¶
type PageRuleDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
PageRuleDeleteResponseEnvelopeSuccessTrue PageRuleDeleteResponseEnvelopeSuccess = true
)
func (PageRuleDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r PageRuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type PageRuleEditParams ¶
type PageRuleEditParams struct {
// Identifier.
ZoneID param.Field[string] `path:"zone_id,required"`
// The set of actions to perform if the targets of this rule match the request.
// Actions can redirect to another URL or override settings, but not both.
Actions param.Field[[]PageRuleEditParamsActionUnion] `json:"actions"`
// The priority of the rule, used to define which Page Rule is processed over
// another. A higher number indicates a higher priority. For example, if you have a
// catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
// take precedence (rule B: `/images/special/*`), specify a higher priority for
// rule B so it overrides rule A.
Priority param.Field[int64] `json:"priority"`
// The status of the Page Rule.
Status param.Field[PageRuleEditParamsStatus] `json:"status"`
// The rule targets to evaluate on each request.
Targets param.Field[[]TargetParam] `json:"targets"`
}
func (PageRuleEditParams) MarshalJSON ¶
func (r PageRuleEditParams) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsAction ¶
type PageRuleEditParamsAction struct {
// If enabled, any ` http://“ URL is converted to `https://` through a 301
// redirect.
ID param.Field[PageRuleEditParamsActionsID] `json:"id"`
Value param.Field[interface{}] `json:"value"`
}
func (PageRuleEditParamsAction) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsAction) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsAction) MarshalJSON ¶
func (r PageRuleEditParamsAction) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionUnion ¶
type PageRuleEditParamsActionUnion interface {
ImplementsPageRuleEditParamsActionUnion()
}
Satisfied by zones.AlwaysUseHTTPSParam, zones.AutomaticHTTPSRewritesParam, zones.BrowserCacheTTLParam, zones.BrowserCheckParam, page_rules.PageRuleEditParamsActionsBypassCacheOnCookie, page_rules.PageRuleEditParamsActionsCacheByDeviceType, page_rules.PageRuleEditParamsActionsCacheDeceptionArmor, page_rules.PageRuleEditParamsActionsCacheKeyFields, zones.CacheLevelParam, page_rules.PageRuleEditParamsActionsCacheOnCookie, page_rules.PageRuleEditParamsActionsCacheTTLByStatus, page_rules.PageRuleEditParamsActionsDisableApps, page_rules.PageRuleEditParamsActionsDisablePerformance, page_rules.PageRuleEditParamsActionsDisableSecurity, page_rules.PageRuleEditParamsActionsDisableZaraz, page_rules.PageRuleEditParamsActionsEdgeCacheTTL, zones.EmailObfuscationParam, page_rules.PageRuleEditParamsActionsExplicitCacheControl, page_rules.PageRuleEditParamsActionsForwardingURL, page_rules.PageRuleEditParamsActionsHostHeaderOverride, zones.IPGeolocationParam, zones.MirageParam, zones.OpportunisticEncryptionParam, zones.OriginErrorPagePassThruParam, zones.PolishParam, page_rules.PageRuleEditParamsActionsResolveOverride, page_rules.PageRuleEditParamsActionsRespectStrongEtag, zones.ResponseBufferingParam, zones.RocketLoaderParam, zones.SecurityLevelParam, zones.SortQueryStringForCacheParam, zones.SSLParam, zones.TrueClientIPHeaderParam, zones.WAFParam, PageRuleEditParamsAction.
type PageRuleEditParamsActionsBypassCacheOnCookie ¶
type PageRuleEditParamsActionsBypassCacheOnCookie struct {
// Bypass cache and fetch resources from the origin server if a regular expression
// matches against a cookie name present in the request.
ID param.Field[PageRuleEditParamsActionsBypassCacheOnCookieID] `json:"id"`
// The regular expression to use for matching cookie names in the request. Refer to
// [Bypass Cache on Cookie setting](https://developers.cloudflare.com/rules/page-rules/reference/additional-reference/#bypass-cache-on-cookie-setting)
// to learn about limited regular expression support.
Value param.Field[string] `json:"value"`
}
func (PageRuleEditParamsActionsBypassCacheOnCookie) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsBypassCacheOnCookie) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsBypassCacheOnCookie) MarshalJSON ¶
func (r PageRuleEditParamsActionsBypassCacheOnCookie) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsBypassCacheOnCookieID ¶
type PageRuleEditParamsActionsBypassCacheOnCookieID string
Bypass cache and fetch resources from the origin server if a regular expression matches against a cookie name present in the request.
const (
PageRuleEditParamsActionsBypassCacheOnCookieIDBypassCacheOnCookie PageRuleEditParamsActionsBypassCacheOnCookieID = "bypass_cache_on_cookie"
)
func (PageRuleEditParamsActionsBypassCacheOnCookieID) IsKnown ¶
func (r PageRuleEditParamsActionsBypassCacheOnCookieID) IsKnown() bool
type PageRuleEditParamsActionsCacheByDeviceType ¶
type PageRuleEditParamsActionsCacheByDeviceType struct {
// Separate cached content based on the visitor's device type.
ID param.Field[PageRuleEditParamsActionsCacheByDeviceTypeID] `json:"id"`
// The status of Cache By Device Type.
Value param.Field[PageRuleEditParamsActionsCacheByDeviceTypeValue] `json:"value"`
}
func (PageRuleEditParamsActionsCacheByDeviceType) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsCacheByDeviceType) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsCacheByDeviceType) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheByDeviceType) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheByDeviceTypeID ¶
type PageRuleEditParamsActionsCacheByDeviceTypeID string
Separate cached content based on the visitor's device type.
const (
PageRuleEditParamsActionsCacheByDeviceTypeIDCacheByDeviceType PageRuleEditParamsActionsCacheByDeviceTypeID = "cache_by_device_type"
)
func (PageRuleEditParamsActionsCacheByDeviceTypeID) IsKnown ¶
func (r PageRuleEditParamsActionsCacheByDeviceTypeID) IsKnown() bool
type PageRuleEditParamsActionsCacheByDeviceTypeValue ¶
type PageRuleEditParamsActionsCacheByDeviceTypeValue string
The status of Cache By Device Type.
const ( PageRuleEditParamsActionsCacheByDeviceTypeValueOn PageRuleEditParamsActionsCacheByDeviceTypeValue = "on" PageRuleEditParamsActionsCacheByDeviceTypeValueOff PageRuleEditParamsActionsCacheByDeviceTypeValue = "off" )
func (PageRuleEditParamsActionsCacheByDeviceTypeValue) IsKnown ¶
func (r PageRuleEditParamsActionsCacheByDeviceTypeValue) IsKnown() bool
type PageRuleEditParamsActionsCacheDeceptionArmor ¶
type PageRuleEditParamsActionsCacheDeceptionArmor struct {
// Protect from web cache deception attacks while still allowing static assets to
// be cached. This setting verifies that the URL's extension matches the returned
// `Content-Type`.
ID param.Field[PageRuleEditParamsActionsCacheDeceptionArmorID] `json:"id"`
// The status of Cache Deception Armor.
Value param.Field[PageRuleEditParamsActionsCacheDeceptionArmorValue] `json:"value"`
}
func (PageRuleEditParamsActionsCacheDeceptionArmor) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsCacheDeceptionArmor) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsCacheDeceptionArmor) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheDeceptionArmor) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheDeceptionArmorID ¶
type PageRuleEditParamsActionsCacheDeceptionArmorID string
Protect from web cache deception attacks while still allowing static assets to be cached. This setting verifies that the URL's extension matches the returned `Content-Type`.
const (
PageRuleEditParamsActionsCacheDeceptionArmorIDCacheDeceptionArmor PageRuleEditParamsActionsCacheDeceptionArmorID = "cache_deception_armor"
)
func (PageRuleEditParamsActionsCacheDeceptionArmorID) IsKnown ¶
func (r PageRuleEditParamsActionsCacheDeceptionArmorID) IsKnown() bool
type PageRuleEditParamsActionsCacheDeceptionArmorValue ¶
type PageRuleEditParamsActionsCacheDeceptionArmorValue string
The status of Cache Deception Armor.
const ( PageRuleEditParamsActionsCacheDeceptionArmorValueOn PageRuleEditParamsActionsCacheDeceptionArmorValue = "on" PageRuleEditParamsActionsCacheDeceptionArmorValueOff PageRuleEditParamsActionsCacheDeceptionArmorValue = "off" )
func (PageRuleEditParamsActionsCacheDeceptionArmorValue) IsKnown ¶
func (r PageRuleEditParamsActionsCacheDeceptionArmorValue) IsKnown() bool
type PageRuleEditParamsActionsCacheKeyFields ¶
type PageRuleEditParamsActionsCacheKeyFields struct {
// Control specifically what variables to include when deciding which resources to
// cache. This allows customers to determine what to cache based on something other
// than just the URL.
ID param.Field[PageRuleEditParamsActionsCacheKeyFieldsID] `json:"id"`
Value param.Field[PageRuleEditParamsActionsCacheKeyFieldsValue] `json:"value"`
}
func (PageRuleEditParamsActionsCacheKeyFields) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsCacheKeyFields) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsCacheKeyFields) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheKeyFields) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheKeyFieldsID ¶
type PageRuleEditParamsActionsCacheKeyFieldsID string
Control specifically what variables to include when deciding which resources to cache. This allows customers to determine what to cache based on something other than just the URL.
const (
PageRuleEditParamsActionsCacheKeyFieldsIDCacheKeyFields PageRuleEditParamsActionsCacheKeyFieldsID = "cache_key_fields"
)
func (PageRuleEditParamsActionsCacheKeyFieldsID) IsKnown ¶
func (r PageRuleEditParamsActionsCacheKeyFieldsID) IsKnown() bool
type PageRuleEditParamsActionsCacheKeyFieldsValue ¶
type PageRuleEditParamsActionsCacheKeyFieldsValue struct {
// Controls which cookies appear in the Cache Key.
Cookie param.Field[PageRuleEditParamsActionsCacheKeyFieldsValueCookie] `json:"cookie"`
// Controls which headers go into the Cache Key. Exactly one of `include` or
// `exclude` is expected.
Header param.Field[PageRuleEditParamsActionsCacheKeyFieldsValueHeader] `json:"header"`
// Determines which host header to include in the Cache Key.
Host param.Field[PageRuleEditParamsActionsCacheKeyFieldsValueHost] `json:"host"`
// Controls which URL query string parameters go into the Cache Key. Exactly one of
// `include` or `exclude` is expected.
QueryString param.Field[PageRuleEditParamsActionsCacheKeyFieldsValueQueryString] `json:"query_string"`
// Feature fields to add features about the end-user (client) into the Cache Key.
User param.Field[PageRuleEditParamsActionsCacheKeyFieldsValueUser] `json:"user"`
}
func (PageRuleEditParamsActionsCacheKeyFieldsValue) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheKeyFieldsValue) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheKeyFieldsValueCookie ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueCookie struct {
// A list of cookies to check for the presence of, without including their actual
// values.
CheckPresence param.Field[[]string] `json:"check_presence"`
// A list of cookies to include.
Include param.Field[[]string] `json:"include"`
}
Controls which cookies appear in the Cache Key.
func (PageRuleEditParamsActionsCacheKeyFieldsValueCookie) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheKeyFieldsValueCookie) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheKeyFieldsValueHeader ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueHeader struct {
// A list of headers to check for the presence of, without including their actual
// values.
CheckPresence param.Field[[]string] `json:"check_presence"`
// A list of headers to ignore.
Exclude param.Field[[]string] `json:"exclude"`
// A list of headers to include.
Include param.Field[[]string] `json:"include"`
}
Controls which headers go into the Cache Key. Exactly one of `include` or `exclude` is expected.
func (PageRuleEditParamsActionsCacheKeyFieldsValueHeader) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheKeyFieldsValueHeader) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheKeyFieldsValueHost ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueHost struct {
// Whether to include the Host header in the HTTP request sent to the origin.
Resolved param.Field[bool] `json:"resolved"`
}
Determines which host header to include in the Cache Key.
func (PageRuleEditParamsActionsCacheKeyFieldsValueHost) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheKeyFieldsValueHost) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryString ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryString struct {
// Ignore all query string parameters.
Exclude param.Field[PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion] `json:"exclude"`
// Include all query string parameters.
Include param.Field[PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion] `json:"include"`
}
Controls which URL query string parameters go into the Cache Key. Exactly one of `include` or `exclude` is expected.
func (PageRuleEditParamsActionsCacheKeyFieldsValueQueryString) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheKeyFieldsValueQueryString) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeArray ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeArray []string
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeString ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeString string
Ignore all query string parameters.
const (
PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeStringStar PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeString = "*"
)
func (PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeString) IsKnown ¶
func (r PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeString) IsKnown() bool
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion interface {
// contains filtered or unexported methods
}
Ignore all query string parameters.
Satisfied by page_rules.PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeString, page_rules.PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringExcludeArray.
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeArray ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeArray []string
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeString ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeString string
Include all query string parameters.
const (
PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeStringStar PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeString = "*"
)
func (PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeString) IsKnown ¶
func (r PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeString) IsKnown() bool
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion interface {
// contains filtered or unexported methods
}
Include all query string parameters.
Satisfied by page_rules.PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeString, page_rules.PageRuleEditParamsActionsCacheKeyFieldsValueQueryStringIncludeArray.
type PageRuleEditParamsActionsCacheKeyFieldsValueUser ¶
type PageRuleEditParamsActionsCacheKeyFieldsValueUser struct {
// Classifies a request as `mobile`, `desktop`, or `tablet` based on the User
// Agent.
DeviceType param.Field[bool] `json:"device_type"`
// Includes the client's country, derived from the IP address.
Geo param.Field[bool] `json:"geo"`
// Includes the first language code contained in the `Accept-Language` header sent
// by the client.
Lang param.Field[bool] `json:"lang"`
}
Feature fields to add features about the end-user (client) into the Cache Key.
func (PageRuleEditParamsActionsCacheKeyFieldsValueUser) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheKeyFieldsValueUser) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheOnCookie ¶
type PageRuleEditParamsActionsCacheOnCookie struct {
// Apply the Cache Everything option (Cache Level setting) based on a regular
// expression match against a cookie name.
ID param.Field[PageRuleEditParamsActionsCacheOnCookieID] `json:"id"`
// The regular expression to use for matching cookie names in the request.
Value param.Field[string] `json:"value"`
}
func (PageRuleEditParamsActionsCacheOnCookie) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsCacheOnCookie) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsCacheOnCookie) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheOnCookie) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheOnCookieID ¶
type PageRuleEditParamsActionsCacheOnCookieID string
Apply the Cache Everything option (Cache Level setting) based on a regular expression match against a cookie name.
const (
PageRuleEditParamsActionsCacheOnCookieIDCacheOnCookie PageRuleEditParamsActionsCacheOnCookieID = "cache_on_cookie"
)
func (PageRuleEditParamsActionsCacheOnCookieID) IsKnown ¶
func (r PageRuleEditParamsActionsCacheOnCookieID) IsKnown() bool
type PageRuleEditParamsActionsCacheTTLByStatus ¶
type PageRuleEditParamsActionsCacheTTLByStatus struct {
// Enterprise customers can set cache time-to-live (TTL) based on the response
// status from the origin web server. Cache TTL refers to the duration of a
// resource in the Cloudflare network before being marked as stale or discarded
// from cache. Status codes are returned by a resource's origin. Setting cache TTL
// based on response status overrides the default cache behavior (standard caching)
// for static files and overrides cache instructions sent by the origin web server.
// To cache non-static assets, set a Cache Level of Cache Everything using a Page
// Rule. Setting no-store Cache-Control or a low TTL (using `max-age`/`s-maxage`)
// increases requests to origin web servers and decreases performance.
ID param.Field[PageRuleEditParamsActionsCacheTTLByStatusID] `json:"id"`
// A JSON object containing status codes and their corresponding TTLs. Each
// key-value pair in the cache TTL by status cache rule has the following syntax
//
// - `status_code`: An integer value such as 200 or 500. status_code matches the
// exact status code from the origin web server. Valid status codes are between
// 100-999.
// - `status_code_range`: Integer values for from and to. status_code_range matches
// any status code from the origin web server within the specified range.
// - `value`: An integer value that defines the duration an asset is valid in
// seconds or one of the following strings: no-store (equivalent to -1), no-cache
// (equivalent to 0).
Value param.Field[map[string]PageRuleEditParamsActionsCacheTTLByStatusValueUnion] `json:"value"`
}
func (PageRuleEditParamsActionsCacheTTLByStatus) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsCacheTTLByStatus) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsCacheTTLByStatus) MarshalJSON ¶
func (r PageRuleEditParamsActionsCacheTTLByStatus) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsCacheTTLByStatusID ¶
type PageRuleEditParamsActionsCacheTTLByStatusID string
Enterprise customers can set cache time-to-live (TTL) based on the response status from the origin web server. Cache TTL refers to the duration of a resource in the Cloudflare network before being marked as stale or discarded from cache. Status codes are returned by a resource's origin. Setting cache TTL based on response status overrides the default cache behavior (standard caching) for static files and overrides cache instructions sent by the origin web server. To cache non-static assets, set a Cache Level of Cache Everything using a Page Rule. Setting no-store Cache-Control or a low TTL (using `max-age`/`s-maxage`) increases requests to origin web servers and decreases performance.
const (
PageRuleEditParamsActionsCacheTTLByStatusIDCacheTTLByStatus PageRuleEditParamsActionsCacheTTLByStatusID = "cache_ttl_by_status"
)
func (PageRuleEditParamsActionsCacheTTLByStatusID) IsKnown ¶
func (r PageRuleEditParamsActionsCacheTTLByStatusID) IsKnown() bool
type PageRuleEditParamsActionsCacheTTLByStatusValueString ¶
type PageRuleEditParamsActionsCacheTTLByStatusValueString string
`no-store` (equivalent to -1), `no-cache` (equivalent to 0)
const ( PageRuleEditParamsActionsCacheTTLByStatusValueStringNoCache PageRuleEditParamsActionsCacheTTLByStatusValueString = "no-cache" PageRuleEditParamsActionsCacheTTLByStatusValueStringNoStore PageRuleEditParamsActionsCacheTTLByStatusValueString = "no-store" )
func (PageRuleEditParamsActionsCacheTTLByStatusValueString) ImplementsPageRuleEditParamsActionsCacheTTLByStatusValueUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsCacheTTLByStatusValueString) ImplementsPageRuleEditParamsActionsCacheTTLByStatusValueUnion()
func (PageRuleEditParamsActionsCacheTTLByStatusValueString) IsKnown ¶
func (r PageRuleEditParamsActionsCacheTTLByStatusValueString) IsKnown() bool
type PageRuleEditParamsActionsCacheTTLByStatusValueUnion ¶
type PageRuleEditParamsActionsCacheTTLByStatusValueUnion interface {
ImplementsPageRuleEditParamsActionsCacheTTLByStatusValueUnion()
}
`no-store` (equivalent to -1), `no-cache` (equivalent to 0)
Satisfied by page_rules.PageRuleEditParamsActionsCacheTTLByStatusValueString, shared.UnionInt.
type PageRuleEditParamsActionsDisableApps ¶
type PageRuleEditParamsActionsDisableApps struct {
// Turn off all active
// [Cloudflare Apps](https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/)
// (deprecated).
ID param.Field[PageRuleEditParamsActionsDisableAppsID] `json:"id"`
}
func (PageRuleEditParamsActionsDisableApps) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsDisableApps) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsDisableApps) MarshalJSON ¶
func (r PageRuleEditParamsActionsDisableApps) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsDisableAppsID ¶
type PageRuleEditParamsActionsDisableAppsID string
Turn off all active [Cloudflare Apps](https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/) (deprecated).
const (
PageRuleEditParamsActionsDisableAppsIDDisableApps PageRuleEditParamsActionsDisableAppsID = "disable_apps"
)
func (PageRuleEditParamsActionsDisableAppsID) IsKnown ¶
func (r PageRuleEditParamsActionsDisableAppsID) IsKnown() bool
type PageRuleEditParamsActionsDisablePerformance ¶
type PageRuleEditParamsActionsDisablePerformance struct {
// Turn off
// [Rocket Loader](https://developers.cloudflare.com/speed/optimization/content/rocket-loader/),
// [Mirage](https://developers.cloudflare.com/speed/optimization/images/mirage/),
// and [Polish](https://developers.cloudflare.com/images/polish/).
ID param.Field[PageRuleEditParamsActionsDisablePerformanceID] `json:"id"`
}
func (PageRuleEditParamsActionsDisablePerformance) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsDisablePerformance) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsDisablePerformance) MarshalJSON ¶
func (r PageRuleEditParamsActionsDisablePerformance) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsDisablePerformanceID ¶
type PageRuleEditParamsActionsDisablePerformanceID string
Turn off [Rocket Loader](https://developers.cloudflare.com/speed/optimization/content/rocket-loader/), [Mirage](https://developers.cloudflare.com/speed/optimization/images/mirage/), and [Polish](https://developers.cloudflare.com/images/polish/).
const (
PageRuleEditParamsActionsDisablePerformanceIDDisablePerformance PageRuleEditParamsActionsDisablePerformanceID = "disable_performance"
)
func (PageRuleEditParamsActionsDisablePerformanceID) IsKnown ¶
func (r PageRuleEditParamsActionsDisablePerformanceID) IsKnown() bool
type PageRuleEditParamsActionsDisableSecurity ¶
type PageRuleEditParamsActionsDisableSecurity struct {
// Turn off
// [Email Obfuscation](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/),
// [Rate Limiting (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/),
// [Scrape Shield](https://developers.cloudflare.com/waf/tools/scrape-shield/),
// [URL (Zone) Lockdown](https://developers.cloudflare.com/waf/tools/zone-lockdown/),
// and
// [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/).
ID param.Field[PageRuleEditParamsActionsDisableSecurityID] `json:"id"`
}
func (PageRuleEditParamsActionsDisableSecurity) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsDisableSecurity) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsDisableSecurity) MarshalJSON ¶
func (r PageRuleEditParamsActionsDisableSecurity) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsDisableSecurityID ¶
type PageRuleEditParamsActionsDisableSecurityID string
Turn off [Email Obfuscation](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/), [Rate Limiting (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/), [Scrape Shield](https://developers.cloudflare.com/waf/tools/scrape-shield/), [URL (Zone) Lockdown](https://developers.cloudflare.com/waf/tools/zone-lockdown/), and [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/).
const (
PageRuleEditParamsActionsDisableSecurityIDDisableSecurity PageRuleEditParamsActionsDisableSecurityID = "disable_security"
)
func (PageRuleEditParamsActionsDisableSecurityID) IsKnown ¶
func (r PageRuleEditParamsActionsDisableSecurityID) IsKnown() bool
type PageRuleEditParamsActionsDisableZaraz ¶
type PageRuleEditParamsActionsDisableZaraz struct {
// Turn off [Zaraz](https://developers.cloudflare.com/zaraz/).
ID param.Field[PageRuleEditParamsActionsDisableZarazID] `json:"id"`
}
func (PageRuleEditParamsActionsDisableZaraz) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsDisableZaraz) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsDisableZaraz) MarshalJSON ¶
func (r PageRuleEditParamsActionsDisableZaraz) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsDisableZarazID ¶
type PageRuleEditParamsActionsDisableZarazID string
Turn off [Zaraz](https://developers.cloudflare.com/zaraz/).
const (
PageRuleEditParamsActionsDisableZarazIDDisableZaraz PageRuleEditParamsActionsDisableZarazID = "disable_zaraz"
)
func (PageRuleEditParamsActionsDisableZarazID) IsKnown ¶
func (r PageRuleEditParamsActionsDisableZarazID) IsKnown() bool
type PageRuleEditParamsActionsEdgeCacheTTL ¶
type PageRuleEditParamsActionsEdgeCacheTTL struct {
// Specify how long to cache a resource in the Cloudflare global network. _Edge
// Cache TTL_ is not visible in response headers.
ID param.Field[PageRuleEditParamsActionsEdgeCacheTTLID] `json:"id"`
Value param.Field[int64] `json:"value"`
}
func (PageRuleEditParamsActionsEdgeCacheTTL) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsEdgeCacheTTL) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsEdgeCacheTTL) MarshalJSON ¶
func (r PageRuleEditParamsActionsEdgeCacheTTL) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsEdgeCacheTTLID ¶
type PageRuleEditParamsActionsEdgeCacheTTLID string
Specify how long to cache a resource in the Cloudflare global network. _Edge Cache TTL_ is not visible in response headers.
const (
PageRuleEditParamsActionsEdgeCacheTTLIDEdgeCacheTTL PageRuleEditParamsActionsEdgeCacheTTLID = "edge_cache_ttl"
)
func (PageRuleEditParamsActionsEdgeCacheTTLID) IsKnown ¶
func (r PageRuleEditParamsActionsEdgeCacheTTLID) IsKnown() bool
type PageRuleEditParamsActionsExplicitCacheControl ¶
type PageRuleEditParamsActionsExplicitCacheControl struct {
// Origin Cache Control is enabled by default for Free, Pro, and Business domains
// and disabled by default for Enterprise domains.
ID param.Field[PageRuleEditParamsActionsExplicitCacheControlID] `json:"id"`
// The status of Origin Cache Control.
Value param.Field[PageRuleEditParamsActionsExplicitCacheControlValue] `json:"value"`
}
func (PageRuleEditParamsActionsExplicitCacheControl) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsExplicitCacheControl) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsExplicitCacheControl) MarshalJSON ¶
func (r PageRuleEditParamsActionsExplicitCacheControl) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsExplicitCacheControlID ¶
type PageRuleEditParamsActionsExplicitCacheControlID string
Origin Cache Control is enabled by default for Free, Pro, and Business domains and disabled by default for Enterprise domains.
const (
PageRuleEditParamsActionsExplicitCacheControlIDExplicitCacheControl PageRuleEditParamsActionsExplicitCacheControlID = "explicit_cache_control"
)
func (PageRuleEditParamsActionsExplicitCacheControlID) IsKnown ¶
func (r PageRuleEditParamsActionsExplicitCacheControlID) IsKnown() bool
type PageRuleEditParamsActionsExplicitCacheControlValue ¶
type PageRuleEditParamsActionsExplicitCacheControlValue string
The status of Origin Cache Control.
const ( PageRuleEditParamsActionsExplicitCacheControlValueOn PageRuleEditParamsActionsExplicitCacheControlValue = "on" PageRuleEditParamsActionsExplicitCacheControlValueOff PageRuleEditParamsActionsExplicitCacheControlValue = "off" )
func (PageRuleEditParamsActionsExplicitCacheControlValue) IsKnown ¶
func (r PageRuleEditParamsActionsExplicitCacheControlValue) IsKnown() bool
type PageRuleEditParamsActionsForwardingURL ¶
type PageRuleEditParamsActionsForwardingURL struct {
// Redirects one URL to another using an `HTTP 301/302` redirect. Refer to
// [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
ID param.Field[PageRuleEditParamsActionsForwardingURLID] `json:"id"`
Value param.Field[PageRuleEditParamsActionsForwardingURLValue] `json:"value"`
}
func (PageRuleEditParamsActionsForwardingURL) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsForwardingURL) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsForwardingURL) MarshalJSON ¶
func (r PageRuleEditParamsActionsForwardingURL) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsForwardingURLID ¶
type PageRuleEditParamsActionsForwardingURLID string
Redirects one URL to another using an `HTTP 301/302` redirect. Refer to [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
const (
PageRuleEditParamsActionsForwardingURLIDForwardingURL PageRuleEditParamsActionsForwardingURLID = "forwarding_url"
)
func (PageRuleEditParamsActionsForwardingURLID) IsKnown ¶
func (r PageRuleEditParamsActionsForwardingURLID) IsKnown() bool
type PageRuleEditParamsActionsForwardingURLValue ¶
type PageRuleEditParamsActionsForwardingURLValue struct {
// The status code to use for the URL redirect. 301 is a permanent redirect. 302 is
// a temporary redirect.
StatusCode param.Field[PageRuleEditParamsActionsForwardingURLValueStatusCode] `json:"status_code"`
// The URL to redirect the request to. Notes: ${num} refers to the position of '\*'
// in the constraint value.
URL param.Field[string] `json:"url"`
}
func (PageRuleEditParamsActionsForwardingURLValue) MarshalJSON ¶
func (r PageRuleEditParamsActionsForwardingURLValue) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsForwardingURLValueStatusCode ¶
type PageRuleEditParamsActionsForwardingURLValueStatusCode int64
The status code to use for the URL redirect. 301 is a permanent redirect. 302 is a temporary redirect.
const ( PageRuleEditParamsActionsForwardingURLValueStatusCode301 PageRuleEditParamsActionsForwardingURLValueStatusCode = 301 PageRuleEditParamsActionsForwardingURLValueStatusCode302 PageRuleEditParamsActionsForwardingURLValueStatusCode = 302 )
func (PageRuleEditParamsActionsForwardingURLValueStatusCode) IsKnown ¶
func (r PageRuleEditParamsActionsForwardingURLValueStatusCode) IsKnown() bool
type PageRuleEditParamsActionsHostHeaderOverride ¶
type PageRuleEditParamsActionsHostHeaderOverride struct {
// Apply a specific host header.
ID param.Field[PageRuleEditParamsActionsHostHeaderOverrideID] `json:"id"`
// The hostname to use in the `Host` header
Value param.Field[string] `json:"value"`
}
func (PageRuleEditParamsActionsHostHeaderOverride) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsHostHeaderOverride) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsHostHeaderOverride) MarshalJSON ¶
func (r PageRuleEditParamsActionsHostHeaderOverride) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsHostHeaderOverrideID ¶
type PageRuleEditParamsActionsHostHeaderOverrideID string
Apply a specific host header.
const (
PageRuleEditParamsActionsHostHeaderOverrideIDHostHeaderOverride PageRuleEditParamsActionsHostHeaderOverrideID = "host_header_override"
)
func (PageRuleEditParamsActionsHostHeaderOverrideID) IsKnown ¶
func (r PageRuleEditParamsActionsHostHeaderOverrideID) IsKnown() bool
type PageRuleEditParamsActionsID ¶
type PageRuleEditParamsActionsID string
If enabled, any ` http://“ URL is converted to `https://` through a 301 redirect.
const ( PageRuleEditParamsActionsIDAlwaysUseHTTPS PageRuleEditParamsActionsID = "always_use_https" PageRuleEditParamsActionsIDAutomaticHTTPSRewrites PageRuleEditParamsActionsID = "automatic_https_rewrites" PageRuleEditParamsActionsIDBrowserCacheTTL PageRuleEditParamsActionsID = "browser_cache_ttl" PageRuleEditParamsActionsIDBrowserCheck PageRuleEditParamsActionsID = "browser_check" PageRuleEditParamsActionsIDBypassCacheOnCookie PageRuleEditParamsActionsID = "bypass_cache_on_cookie" PageRuleEditParamsActionsIDCacheByDeviceType PageRuleEditParamsActionsID = "cache_by_device_type" PageRuleEditParamsActionsIDCacheDeceptionArmor PageRuleEditParamsActionsID = "cache_deception_armor" PageRuleEditParamsActionsIDCacheKeyFields PageRuleEditParamsActionsID = "cache_key_fields" PageRuleEditParamsActionsIDCacheLevel PageRuleEditParamsActionsID = "cache_level" PageRuleEditParamsActionsIDCacheOnCookie PageRuleEditParamsActionsID = "cache_on_cookie" PageRuleEditParamsActionsIDCacheTTLByStatus PageRuleEditParamsActionsID = "cache_ttl_by_status" PageRuleEditParamsActionsIDDisableApps PageRuleEditParamsActionsID = "disable_apps" PageRuleEditParamsActionsIDDisablePerformance PageRuleEditParamsActionsID = "disable_performance" PageRuleEditParamsActionsIDDisableSecurity PageRuleEditParamsActionsID = "disable_security" PageRuleEditParamsActionsIDDisableZaraz PageRuleEditParamsActionsID = "disable_zaraz" PageRuleEditParamsActionsIDEdgeCacheTTL PageRuleEditParamsActionsID = "edge_cache_ttl" PageRuleEditParamsActionsIDEmailObfuscation PageRuleEditParamsActionsID = "email_obfuscation" PageRuleEditParamsActionsIDExplicitCacheControl PageRuleEditParamsActionsID = "explicit_cache_control" PageRuleEditParamsActionsIDForwardingURL PageRuleEditParamsActionsID = "forwarding_url" PageRuleEditParamsActionsIDHostHeaderOverride PageRuleEditParamsActionsID = "host_header_override" PageRuleEditParamsActionsIDIPGeolocation PageRuleEditParamsActionsID = "ip_geolocation" PageRuleEditParamsActionsIDMirage PageRuleEditParamsActionsID = "mirage" PageRuleEditParamsActionsIDOpportunisticEncryption PageRuleEditParamsActionsID = "opportunistic_encryption" PageRuleEditParamsActionsIDOriginErrorPagePassThru PageRuleEditParamsActionsID = "origin_error_page_pass_thru" PageRuleEditParamsActionsIDPolish PageRuleEditParamsActionsID = "polish" PageRuleEditParamsActionsIDResolveOverride PageRuleEditParamsActionsID = "resolve_override" PageRuleEditParamsActionsIDRespectStrongEtag PageRuleEditParamsActionsID = "respect_strong_etag" PageRuleEditParamsActionsIDResponseBuffering PageRuleEditParamsActionsID = "response_buffering" PageRuleEditParamsActionsIDRocketLoader PageRuleEditParamsActionsID = "rocket_loader" PageRuleEditParamsActionsIDSecurityLevel PageRuleEditParamsActionsID = "security_level" PageRuleEditParamsActionsIDSortQueryStringForCache PageRuleEditParamsActionsID = "sort_query_string_for_cache" PageRuleEditParamsActionsIDSSL PageRuleEditParamsActionsID = "ssl" PageRuleEditParamsActionsIDTrueClientIPHeader PageRuleEditParamsActionsID = "true_client_ip_header" PageRuleEditParamsActionsIDWAF PageRuleEditParamsActionsID = "waf" )
func (PageRuleEditParamsActionsID) IsKnown ¶
func (r PageRuleEditParamsActionsID) IsKnown() bool
type PageRuleEditParamsActionsResolveOverride ¶
type PageRuleEditParamsActionsResolveOverride struct {
// Change the origin address to the value specified in this setting.
ID param.Field[PageRuleEditParamsActionsResolveOverrideID] `json:"id"`
// The origin address you want to override with.
Value param.Field[string] `json:"value"`
}
func (PageRuleEditParamsActionsResolveOverride) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsResolveOverride) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsResolveOverride) MarshalJSON ¶
func (r PageRuleEditParamsActionsResolveOverride) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsResolveOverrideID ¶
type PageRuleEditParamsActionsResolveOverrideID string
Change the origin address to the value specified in this setting.
const (
PageRuleEditParamsActionsResolveOverrideIDResolveOverride PageRuleEditParamsActionsResolveOverrideID = "resolve_override"
)
func (PageRuleEditParamsActionsResolveOverrideID) IsKnown ¶
func (r PageRuleEditParamsActionsResolveOverrideID) IsKnown() bool
type PageRuleEditParamsActionsRespectStrongEtag ¶
type PageRuleEditParamsActionsRespectStrongEtag struct {
// Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and
// the origin server.
ID param.Field[PageRuleEditParamsActionsRespectStrongEtagID] `json:"id"`
// The status of Respect Strong ETags
Value param.Field[PageRuleEditParamsActionsRespectStrongEtagValue] `json:"value"`
}
func (PageRuleEditParamsActionsRespectStrongEtag) ImplementsPageRuleEditParamsActionUnion ¶ added in v4.1.0
func (r PageRuleEditParamsActionsRespectStrongEtag) ImplementsPageRuleEditParamsActionUnion()
func (PageRuleEditParamsActionsRespectStrongEtag) MarshalJSON ¶
func (r PageRuleEditParamsActionsRespectStrongEtag) MarshalJSON() (data []byte, err error)
type PageRuleEditParamsActionsRespectStrongEtagID ¶
type PageRuleEditParamsActionsRespectStrongEtagID string
Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and the origin server.
const (
PageRuleEditParamsActionsRespectStrongEtagIDRespectStrongEtag PageRuleEditParamsActionsRespectStrongEtagID = "respect_strong_etag"
)
func (PageRuleEditParamsActionsRespectStrongEtagID) IsKnown ¶
func (r PageRuleEditParamsActionsRespectStrongEtagID) IsKnown() bool
type PageRuleEditParamsActionsRespectStrongEtagValue ¶
type PageRuleEditParamsActionsRespectStrongEtagValue string
The status of Respect Strong ETags
const ( PageRuleEditParamsActionsRespectStrongEtagValueOn PageRuleEditParamsActionsRespectStrongEtagValue = "on" PageRuleEditParamsActionsRespectStrongEtagValueOff PageRuleEditParamsActionsRespectStrongEtagValue = "off" )
func (PageRuleEditParamsActionsRespectStrongEtagValue) IsKnown ¶
func (r PageRuleEditParamsActionsRespectStrongEtagValue) IsKnown() bool
type PageRuleEditParamsStatus ¶
type PageRuleEditParamsStatus string
The status of the Page Rule.
const ( PageRuleEditParamsStatusActive PageRuleEditParamsStatus = "active" PageRuleEditParamsStatusDisabled PageRuleEditParamsStatus = "disabled" )
func (PageRuleEditParamsStatus) IsKnown ¶
func (r PageRuleEditParamsStatus) IsKnown() bool
type PageRuleEditResponseEnvelope ¶
type PageRuleEditResponseEnvelope struct {
Errors []PageRuleEditResponseEnvelopeErrors `json:"errors,required"`
Messages []PageRuleEditResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success PageRuleEditResponseEnvelopeSuccess `json:"success,required"`
Result PageRule `json:"result"`
JSON pageRuleEditResponseEnvelopeJSON `json:"-"`
}
func (*PageRuleEditResponseEnvelope) UnmarshalJSON ¶
func (r *PageRuleEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PageRuleEditResponseEnvelopeErrors ¶ added in v4.3.0
type PageRuleEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleEditResponseEnvelopeErrorsSource `json:"source"`
JSON pageRuleEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*PageRuleEditResponseEnvelopeErrors) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PageRuleEditResponseEnvelopeErrorsSource ¶ added in v4.3.0
type PageRuleEditResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON pageRuleEditResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*PageRuleEditResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleEditResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type PageRuleEditResponseEnvelopeMessages ¶ added in v4.3.0
type PageRuleEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleEditResponseEnvelopeMessagesSource `json:"source"`
JSON pageRuleEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*PageRuleEditResponseEnvelopeMessages) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PageRuleEditResponseEnvelopeMessagesSource ¶ added in v4.3.0
type PageRuleEditResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON pageRuleEditResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*PageRuleEditResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleEditResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type PageRuleEditResponseEnvelopeSuccess ¶
type PageRuleEditResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
PageRuleEditResponseEnvelopeSuccessTrue PageRuleEditResponseEnvelopeSuccess = true
)
func (PageRuleEditResponseEnvelopeSuccess) IsKnown ¶
func (r PageRuleEditResponseEnvelopeSuccess) IsKnown() bool
type PageRuleGetParams ¶
type PageRuleGetResponseEnvelope ¶
type PageRuleGetResponseEnvelope struct {
Errors []PageRuleGetResponseEnvelopeErrors `json:"errors,required"`
Messages []PageRuleGetResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success PageRuleGetResponseEnvelopeSuccess `json:"success,required"`
Result PageRule `json:"result"`
JSON pageRuleGetResponseEnvelopeJSON `json:"-"`
}
func (*PageRuleGetResponseEnvelope) UnmarshalJSON ¶
func (r *PageRuleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PageRuleGetResponseEnvelopeErrors ¶ added in v4.3.0
type PageRuleGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleGetResponseEnvelopeErrorsSource `json:"source"`
JSON pageRuleGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*PageRuleGetResponseEnvelopeErrors) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PageRuleGetResponseEnvelopeErrorsSource ¶ added in v4.3.0
type PageRuleGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON pageRuleGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*PageRuleGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type PageRuleGetResponseEnvelopeMessages ¶ added in v4.3.0
type PageRuleGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleGetResponseEnvelopeMessagesSource `json:"source"`
JSON pageRuleGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*PageRuleGetResponseEnvelopeMessages) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PageRuleGetResponseEnvelopeMessagesSource ¶ added in v4.3.0
type PageRuleGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON pageRuleGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*PageRuleGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type PageRuleGetResponseEnvelopeSuccess ¶
type PageRuleGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
PageRuleGetResponseEnvelopeSuccessTrue PageRuleGetResponseEnvelopeSuccess = true
)
func (PageRuleGetResponseEnvelopeSuccess) IsKnown ¶
func (r PageRuleGetResponseEnvelopeSuccess) IsKnown() bool
type PageRuleListParams ¶
type PageRuleListParams struct {
// Identifier.
ZoneID param.Field[string] `path:"zone_id,required"`
// The direction used to sort returned Page Rules.
Direction param.Field[PageRuleListParamsDirection] `query:"direction"`
// When set to `all`, all the search requirements must match. When set to `any`,
// only one of the search requirements has to match.
Match param.Field[PageRuleListParamsMatch] `query:"match"`
// The field used to sort returned Page Rules.
Order param.Field[PageRuleListParamsOrder] `query:"order"`
// The status of the Page Rule.
Status param.Field[PageRuleListParamsStatus] `query:"status"`
}
func (PageRuleListParams) URLQuery ¶
func (r PageRuleListParams) URLQuery() (v url.Values)
URLQuery serializes PageRuleListParams's query parameters as `url.Values`.
type PageRuleListParamsDirection ¶
type PageRuleListParamsDirection string
The direction used to sort returned Page Rules.
const ( PageRuleListParamsDirectionAsc PageRuleListParamsDirection = "asc" PageRuleListParamsDirectionDesc PageRuleListParamsDirection = "desc" )
func (PageRuleListParamsDirection) IsKnown ¶
func (r PageRuleListParamsDirection) IsKnown() bool
type PageRuleListParamsMatch ¶
type PageRuleListParamsMatch string
When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.
const ( PageRuleListParamsMatchAny PageRuleListParamsMatch = "any" PageRuleListParamsMatchAll PageRuleListParamsMatch = "all" )
func (PageRuleListParamsMatch) IsKnown ¶
func (r PageRuleListParamsMatch) IsKnown() bool
type PageRuleListParamsOrder ¶
type PageRuleListParamsOrder string
The field used to sort returned Page Rules.
const ( PageRuleListParamsOrderStatus PageRuleListParamsOrder = "status" PageRuleListParamsOrderPriority PageRuleListParamsOrder = "priority" )
func (PageRuleListParamsOrder) IsKnown ¶
func (r PageRuleListParamsOrder) IsKnown() bool
type PageRuleListParamsStatus ¶
type PageRuleListParamsStatus string
The status of the Page Rule.
const ( PageRuleListParamsStatusActive PageRuleListParamsStatus = "active" PageRuleListParamsStatusDisabled PageRuleListParamsStatus = "disabled" )
func (PageRuleListParamsStatus) IsKnown ¶
func (r PageRuleListParamsStatus) IsKnown() bool
type PageRuleListResponseEnvelope ¶
type PageRuleListResponseEnvelope struct {
Errors []PageRuleListResponseEnvelopeErrors `json:"errors,required"`
Messages []PageRuleListResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success PageRuleListResponseEnvelopeSuccess `json:"success,required"`
Result []PageRule `json:"result"`
JSON pageRuleListResponseEnvelopeJSON `json:"-"`
}
func (*PageRuleListResponseEnvelope) UnmarshalJSON ¶
func (r *PageRuleListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PageRuleListResponseEnvelopeErrors ¶ added in v4.3.0
type PageRuleListResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleListResponseEnvelopeErrorsSource `json:"source"`
JSON pageRuleListResponseEnvelopeErrorsJSON `json:"-"`
}
func (*PageRuleListResponseEnvelopeErrors) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PageRuleListResponseEnvelopeErrorsSource ¶ added in v4.3.0
type PageRuleListResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON pageRuleListResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*PageRuleListResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleListResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type PageRuleListResponseEnvelopeMessages ¶ added in v4.3.0
type PageRuleListResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleListResponseEnvelopeMessagesSource `json:"source"`
JSON pageRuleListResponseEnvelopeMessagesJSON `json:"-"`
}
func (*PageRuleListResponseEnvelopeMessages) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PageRuleListResponseEnvelopeMessagesSource ¶ added in v4.3.0
type PageRuleListResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON pageRuleListResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*PageRuleListResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleListResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type PageRuleListResponseEnvelopeSuccess ¶
type PageRuleListResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
PageRuleListResponseEnvelopeSuccessTrue PageRuleListResponseEnvelopeSuccess = true
)
func (PageRuleListResponseEnvelopeSuccess) IsKnown ¶
func (r PageRuleListResponseEnvelopeSuccess) IsKnown() bool
type PageRuleNewParams ¶
type PageRuleNewParams struct {
// Identifier.
ZoneID param.Field[string] `path:"zone_id,required"`
// The set of actions to perform if the targets of this rule match the request.
// Actions can redirect to another URL or override settings, but not both.
Actions param.Field[[]PageRuleNewParamsActionUnion] `json:"actions,required"`
// The rule targets to evaluate on each request.
Targets param.Field[[]TargetParam] `json:"targets,required"`
// The priority of the rule, used to define which Page Rule is processed over
// another. A higher number indicates a higher priority. For example, if you have a
// catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
// take precedence (rule B: `/images/special/*`), specify a higher priority for
// rule B so it overrides rule A.
Priority param.Field[int64] `json:"priority"`
// The status of the Page Rule.
Status param.Field[PageRuleNewParamsStatus] `json:"status"`
}
func (PageRuleNewParams) MarshalJSON ¶
func (r PageRuleNewParams) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsAction ¶
type PageRuleNewParamsAction struct {
// If enabled, any ` http://“ URL is converted to `https://` through a 301
// redirect.
ID param.Field[PageRuleNewParamsActionsID] `json:"id"`
Value param.Field[interface{}] `json:"value"`
}
func (PageRuleNewParamsAction) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsAction) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsAction) MarshalJSON ¶
func (r PageRuleNewParamsAction) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionUnion ¶
type PageRuleNewParamsActionUnion interface {
ImplementsPageRuleNewParamsActionUnion()
}
Satisfied by zones.AlwaysUseHTTPSParam, zones.AutomaticHTTPSRewritesParam, zones.BrowserCacheTTLParam, zones.BrowserCheckParam, page_rules.PageRuleNewParamsActionsBypassCacheOnCookie, page_rules.PageRuleNewParamsActionsCacheByDeviceType, page_rules.PageRuleNewParamsActionsCacheDeceptionArmor, page_rules.PageRuleNewParamsActionsCacheKeyFields, zones.CacheLevelParam, page_rules.PageRuleNewParamsActionsCacheOnCookie, page_rules.PageRuleNewParamsActionsCacheTTLByStatus, page_rules.PageRuleNewParamsActionsDisableApps, page_rules.PageRuleNewParamsActionsDisablePerformance, page_rules.PageRuleNewParamsActionsDisableSecurity, page_rules.PageRuleNewParamsActionsDisableZaraz, page_rules.PageRuleNewParamsActionsEdgeCacheTTL, zones.EmailObfuscationParam, page_rules.PageRuleNewParamsActionsExplicitCacheControl, page_rules.PageRuleNewParamsActionsForwardingURL, page_rules.PageRuleNewParamsActionsHostHeaderOverride, zones.IPGeolocationParam, zones.MirageParam, zones.OpportunisticEncryptionParam, zones.OriginErrorPagePassThruParam, zones.PolishParam, page_rules.PageRuleNewParamsActionsResolveOverride, page_rules.PageRuleNewParamsActionsRespectStrongEtag, zones.ResponseBufferingParam, zones.RocketLoaderParam, zones.SecurityLevelParam, zones.SortQueryStringForCacheParam, zones.SSLParam, zones.TrueClientIPHeaderParam, zones.WAFParam, PageRuleNewParamsAction.
type PageRuleNewParamsActionsBypassCacheOnCookie ¶
type PageRuleNewParamsActionsBypassCacheOnCookie struct {
// Bypass cache and fetch resources from the origin server if a regular expression
// matches against a cookie name present in the request.
ID param.Field[PageRuleNewParamsActionsBypassCacheOnCookieID] `json:"id"`
// The regular expression to use for matching cookie names in the request. Refer to
// [Bypass Cache on Cookie setting](https://developers.cloudflare.com/rules/page-rules/reference/additional-reference/#bypass-cache-on-cookie-setting)
// to learn about limited regular expression support.
Value param.Field[string] `json:"value"`
}
func (PageRuleNewParamsActionsBypassCacheOnCookie) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsBypassCacheOnCookie) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsBypassCacheOnCookie) MarshalJSON ¶
func (r PageRuleNewParamsActionsBypassCacheOnCookie) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsBypassCacheOnCookieID ¶
type PageRuleNewParamsActionsBypassCacheOnCookieID string
Bypass cache and fetch resources from the origin server if a regular expression matches against a cookie name present in the request.
const (
PageRuleNewParamsActionsBypassCacheOnCookieIDBypassCacheOnCookie PageRuleNewParamsActionsBypassCacheOnCookieID = "bypass_cache_on_cookie"
)
func (PageRuleNewParamsActionsBypassCacheOnCookieID) IsKnown ¶
func (r PageRuleNewParamsActionsBypassCacheOnCookieID) IsKnown() bool
type PageRuleNewParamsActionsCacheByDeviceType ¶
type PageRuleNewParamsActionsCacheByDeviceType struct {
// Separate cached content based on the visitor's device type.
ID param.Field[PageRuleNewParamsActionsCacheByDeviceTypeID] `json:"id"`
// The status of Cache By Device Type.
Value param.Field[PageRuleNewParamsActionsCacheByDeviceTypeValue] `json:"value"`
}
func (PageRuleNewParamsActionsCacheByDeviceType) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsCacheByDeviceType) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsCacheByDeviceType) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheByDeviceType) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheByDeviceTypeID ¶
type PageRuleNewParamsActionsCacheByDeviceTypeID string
Separate cached content based on the visitor's device type.
const (
PageRuleNewParamsActionsCacheByDeviceTypeIDCacheByDeviceType PageRuleNewParamsActionsCacheByDeviceTypeID = "cache_by_device_type"
)
func (PageRuleNewParamsActionsCacheByDeviceTypeID) IsKnown ¶
func (r PageRuleNewParamsActionsCacheByDeviceTypeID) IsKnown() bool
type PageRuleNewParamsActionsCacheByDeviceTypeValue ¶
type PageRuleNewParamsActionsCacheByDeviceTypeValue string
The status of Cache By Device Type.
const ( PageRuleNewParamsActionsCacheByDeviceTypeValueOn PageRuleNewParamsActionsCacheByDeviceTypeValue = "on" PageRuleNewParamsActionsCacheByDeviceTypeValueOff PageRuleNewParamsActionsCacheByDeviceTypeValue = "off" )
func (PageRuleNewParamsActionsCacheByDeviceTypeValue) IsKnown ¶
func (r PageRuleNewParamsActionsCacheByDeviceTypeValue) IsKnown() bool
type PageRuleNewParamsActionsCacheDeceptionArmor ¶
type PageRuleNewParamsActionsCacheDeceptionArmor struct {
// Protect from web cache deception attacks while still allowing static assets to
// be cached. This setting verifies that the URL's extension matches the returned
// `Content-Type`.
ID param.Field[PageRuleNewParamsActionsCacheDeceptionArmorID] `json:"id"`
// The status of Cache Deception Armor.
Value param.Field[PageRuleNewParamsActionsCacheDeceptionArmorValue] `json:"value"`
}
func (PageRuleNewParamsActionsCacheDeceptionArmor) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsCacheDeceptionArmor) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsCacheDeceptionArmor) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheDeceptionArmor) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheDeceptionArmorID ¶
type PageRuleNewParamsActionsCacheDeceptionArmorID string
Protect from web cache deception attacks while still allowing static assets to be cached. This setting verifies that the URL's extension matches the returned `Content-Type`.
const (
PageRuleNewParamsActionsCacheDeceptionArmorIDCacheDeceptionArmor PageRuleNewParamsActionsCacheDeceptionArmorID = "cache_deception_armor"
)
func (PageRuleNewParamsActionsCacheDeceptionArmorID) IsKnown ¶
func (r PageRuleNewParamsActionsCacheDeceptionArmorID) IsKnown() bool
type PageRuleNewParamsActionsCacheDeceptionArmorValue ¶
type PageRuleNewParamsActionsCacheDeceptionArmorValue string
The status of Cache Deception Armor.
const ( PageRuleNewParamsActionsCacheDeceptionArmorValueOn PageRuleNewParamsActionsCacheDeceptionArmorValue = "on" PageRuleNewParamsActionsCacheDeceptionArmorValueOff PageRuleNewParamsActionsCacheDeceptionArmorValue = "off" )
func (PageRuleNewParamsActionsCacheDeceptionArmorValue) IsKnown ¶
func (r PageRuleNewParamsActionsCacheDeceptionArmorValue) IsKnown() bool
type PageRuleNewParamsActionsCacheKeyFields ¶
type PageRuleNewParamsActionsCacheKeyFields struct {
// Control specifically what variables to include when deciding which resources to
// cache. This allows customers to determine what to cache based on something other
// than just the URL.
ID param.Field[PageRuleNewParamsActionsCacheKeyFieldsID] `json:"id"`
Value param.Field[PageRuleNewParamsActionsCacheKeyFieldsValue] `json:"value"`
}
func (PageRuleNewParamsActionsCacheKeyFields) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsCacheKeyFields) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsCacheKeyFields) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheKeyFields) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheKeyFieldsID ¶
type PageRuleNewParamsActionsCacheKeyFieldsID string
Control specifically what variables to include when deciding which resources to cache. This allows customers to determine what to cache based on something other than just the URL.
const (
PageRuleNewParamsActionsCacheKeyFieldsIDCacheKeyFields PageRuleNewParamsActionsCacheKeyFieldsID = "cache_key_fields"
)
func (PageRuleNewParamsActionsCacheKeyFieldsID) IsKnown ¶
func (r PageRuleNewParamsActionsCacheKeyFieldsID) IsKnown() bool
type PageRuleNewParamsActionsCacheKeyFieldsValue ¶
type PageRuleNewParamsActionsCacheKeyFieldsValue struct {
// Controls which cookies appear in the Cache Key.
Cookie param.Field[PageRuleNewParamsActionsCacheKeyFieldsValueCookie] `json:"cookie"`
// Controls which headers go into the Cache Key. Exactly one of `include` or
// `exclude` is expected.
Header param.Field[PageRuleNewParamsActionsCacheKeyFieldsValueHeader] `json:"header"`
// Determines which host header to include in the Cache Key.
Host param.Field[PageRuleNewParamsActionsCacheKeyFieldsValueHost] `json:"host"`
// Controls which URL query string parameters go into the Cache Key. Exactly one of
// `include` or `exclude` is expected.
QueryString param.Field[PageRuleNewParamsActionsCacheKeyFieldsValueQueryString] `json:"query_string"`
// Feature fields to add features about the end-user (client) into the Cache Key.
User param.Field[PageRuleNewParamsActionsCacheKeyFieldsValueUser] `json:"user"`
}
func (PageRuleNewParamsActionsCacheKeyFieldsValue) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheKeyFieldsValue) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheKeyFieldsValueCookie ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueCookie struct {
// A list of cookies to check for the presence of, without including their actual
// values.
CheckPresence param.Field[[]string] `json:"check_presence"`
// A list of cookies to include.
Include param.Field[[]string] `json:"include"`
}
Controls which cookies appear in the Cache Key.
func (PageRuleNewParamsActionsCacheKeyFieldsValueCookie) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheKeyFieldsValueCookie) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheKeyFieldsValueHeader ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueHeader struct {
// A list of headers to check for the presence of, without including their actual
// values.
CheckPresence param.Field[[]string] `json:"check_presence"`
// A list of headers to ignore.
Exclude param.Field[[]string] `json:"exclude"`
// A list of headers to include.
Include param.Field[[]string] `json:"include"`
}
Controls which headers go into the Cache Key. Exactly one of `include` or `exclude` is expected.
func (PageRuleNewParamsActionsCacheKeyFieldsValueHeader) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheKeyFieldsValueHeader) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheKeyFieldsValueHost ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueHost struct {
// Whether to include the Host header in the HTTP request sent to the origin.
Resolved param.Field[bool] `json:"resolved"`
}
Determines which host header to include in the Cache Key.
func (PageRuleNewParamsActionsCacheKeyFieldsValueHost) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheKeyFieldsValueHost) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryString ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryString struct {
// Ignore all query string parameters.
Exclude param.Field[PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion] `json:"exclude"`
// Include all query string parameters.
Include param.Field[PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion] `json:"include"`
}
Controls which URL query string parameters go into the Cache Key. Exactly one of `include` or `exclude` is expected.
func (PageRuleNewParamsActionsCacheKeyFieldsValueQueryString) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheKeyFieldsValueQueryString) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeArray ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeArray []string
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeString ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeString string
Ignore all query string parameters.
const (
PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeStringStar PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeString = "*"
)
func (PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeString) IsKnown ¶
func (r PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeString) IsKnown() bool
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion interface {
// contains filtered or unexported methods
}
Ignore all query string parameters.
Satisfied by page_rules.PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeString, page_rules.PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringExcludeArray.
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeArray ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeArray []string
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeString ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeString string
Include all query string parameters.
const (
PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeStringStar PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeString = "*"
)
func (PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeString) IsKnown ¶
func (r PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeString) IsKnown() bool
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion interface {
// contains filtered or unexported methods
}
Include all query string parameters.
Satisfied by page_rules.PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeString, page_rules.PageRuleNewParamsActionsCacheKeyFieldsValueQueryStringIncludeArray.
type PageRuleNewParamsActionsCacheKeyFieldsValueUser ¶
type PageRuleNewParamsActionsCacheKeyFieldsValueUser struct {
// Classifies a request as `mobile`, `desktop`, or `tablet` based on the User
// Agent.
DeviceType param.Field[bool] `json:"device_type"`
// Includes the client's country, derived from the IP address.
Geo param.Field[bool] `json:"geo"`
// Includes the first language code contained in the `Accept-Language` header sent
// by the client.
Lang param.Field[bool] `json:"lang"`
}
Feature fields to add features about the end-user (client) into the Cache Key.
func (PageRuleNewParamsActionsCacheKeyFieldsValueUser) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheKeyFieldsValueUser) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheOnCookie ¶
type PageRuleNewParamsActionsCacheOnCookie struct {
// Apply the Cache Everything option (Cache Level setting) based on a regular
// expression match against a cookie name.
ID param.Field[PageRuleNewParamsActionsCacheOnCookieID] `json:"id"`
// The regular expression to use for matching cookie names in the request.
Value param.Field[string] `json:"value"`
}
func (PageRuleNewParamsActionsCacheOnCookie) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsCacheOnCookie) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsCacheOnCookie) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheOnCookie) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheOnCookieID ¶
type PageRuleNewParamsActionsCacheOnCookieID string
Apply the Cache Everything option (Cache Level setting) based on a regular expression match against a cookie name.
const (
PageRuleNewParamsActionsCacheOnCookieIDCacheOnCookie PageRuleNewParamsActionsCacheOnCookieID = "cache_on_cookie"
)
func (PageRuleNewParamsActionsCacheOnCookieID) IsKnown ¶
func (r PageRuleNewParamsActionsCacheOnCookieID) IsKnown() bool
type PageRuleNewParamsActionsCacheTTLByStatus ¶
type PageRuleNewParamsActionsCacheTTLByStatus struct {
// Enterprise customers can set cache time-to-live (TTL) based on the response
// status from the origin web server. Cache TTL refers to the duration of a
// resource in the Cloudflare network before being marked as stale or discarded
// from cache. Status codes are returned by a resource's origin. Setting cache TTL
// based on response status overrides the default cache behavior (standard caching)
// for static files and overrides cache instructions sent by the origin web server.
// To cache non-static assets, set a Cache Level of Cache Everything using a Page
// Rule. Setting no-store Cache-Control or a low TTL (using `max-age`/`s-maxage`)
// increases requests to origin web servers and decreases performance.
ID param.Field[PageRuleNewParamsActionsCacheTTLByStatusID] `json:"id"`
// A JSON object containing status codes and their corresponding TTLs. Each
// key-value pair in the cache TTL by status cache rule has the following syntax
//
// - `status_code`: An integer value such as 200 or 500. status_code matches the
// exact status code from the origin web server. Valid status codes are between
// 100-999.
// - `status_code_range`: Integer values for from and to. status_code_range matches
// any status code from the origin web server within the specified range.
// - `value`: An integer value that defines the duration an asset is valid in
// seconds or one of the following strings: no-store (equivalent to -1), no-cache
// (equivalent to 0).
Value param.Field[map[string]PageRuleNewParamsActionsCacheTTLByStatusValueUnion] `json:"value"`
}
func (PageRuleNewParamsActionsCacheTTLByStatus) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsCacheTTLByStatus) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsCacheTTLByStatus) MarshalJSON ¶
func (r PageRuleNewParamsActionsCacheTTLByStatus) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsCacheTTLByStatusID ¶
type PageRuleNewParamsActionsCacheTTLByStatusID string
Enterprise customers can set cache time-to-live (TTL) based on the response status from the origin web server. Cache TTL refers to the duration of a resource in the Cloudflare network before being marked as stale or discarded from cache. Status codes are returned by a resource's origin. Setting cache TTL based on response status overrides the default cache behavior (standard caching) for static files and overrides cache instructions sent by the origin web server. To cache non-static assets, set a Cache Level of Cache Everything using a Page Rule. Setting no-store Cache-Control or a low TTL (using `max-age`/`s-maxage`) increases requests to origin web servers and decreases performance.
const (
PageRuleNewParamsActionsCacheTTLByStatusIDCacheTTLByStatus PageRuleNewParamsActionsCacheTTLByStatusID = "cache_ttl_by_status"
)
func (PageRuleNewParamsActionsCacheTTLByStatusID) IsKnown ¶
func (r PageRuleNewParamsActionsCacheTTLByStatusID) IsKnown() bool
type PageRuleNewParamsActionsCacheTTLByStatusValueString ¶
type PageRuleNewParamsActionsCacheTTLByStatusValueString string
`no-store` (equivalent to -1), `no-cache` (equivalent to 0)
const ( PageRuleNewParamsActionsCacheTTLByStatusValueStringNoCache PageRuleNewParamsActionsCacheTTLByStatusValueString = "no-cache" PageRuleNewParamsActionsCacheTTLByStatusValueStringNoStore PageRuleNewParamsActionsCacheTTLByStatusValueString = "no-store" )
func (PageRuleNewParamsActionsCacheTTLByStatusValueString) ImplementsPageRuleNewParamsActionsCacheTTLByStatusValueUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsCacheTTLByStatusValueString) ImplementsPageRuleNewParamsActionsCacheTTLByStatusValueUnion()
func (PageRuleNewParamsActionsCacheTTLByStatusValueString) IsKnown ¶
func (r PageRuleNewParamsActionsCacheTTLByStatusValueString) IsKnown() bool
type PageRuleNewParamsActionsCacheTTLByStatusValueUnion ¶
type PageRuleNewParamsActionsCacheTTLByStatusValueUnion interface {
ImplementsPageRuleNewParamsActionsCacheTTLByStatusValueUnion()
}
`no-store` (equivalent to -1), `no-cache` (equivalent to 0)
Satisfied by page_rules.PageRuleNewParamsActionsCacheTTLByStatusValueString, shared.UnionInt.
type PageRuleNewParamsActionsDisableApps ¶
type PageRuleNewParamsActionsDisableApps struct {
// Turn off all active
// [Cloudflare Apps](https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/)
// (deprecated).
ID param.Field[PageRuleNewParamsActionsDisableAppsID] `json:"id"`
}
func (PageRuleNewParamsActionsDisableApps) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsDisableApps) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsDisableApps) MarshalJSON ¶
func (r PageRuleNewParamsActionsDisableApps) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsDisableAppsID ¶
type PageRuleNewParamsActionsDisableAppsID string
Turn off all active [Cloudflare Apps](https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/) (deprecated).
const (
PageRuleNewParamsActionsDisableAppsIDDisableApps PageRuleNewParamsActionsDisableAppsID = "disable_apps"
)
func (PageRuleNewParamsActionsDisableAppsID) IsKnown ¶
func (r PageRuleNewParamsActionsDisableAppsID) IsKnown() bool
type PageRuleNewParamsActionsDisablePerformance ¶
type PageRuleNewParamsActionsDisablePerformance struct {
// Turn off
// [Rocket Loader](https://developers.cloudflare.com/speed/optimization/content/rocket-loader/),
// [Mirage](https://developers.cloudflare.com/speed/optimization/images/mirage/),
// and [Polish](https://developers.cloudflare.com/images/polish/).
ID param.Field[PageRuleNewParamsActionsDisablePerformanceID] `json:"id"`
}
func (PageRuleNewParamsActionsDisablePerformance) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsDisablePerformance) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsDisablePerformance) MarshalJSON ¶
func (r PageRuleNewParamsActionsDisablePerformance) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsDisablePerformanceID ¶
type PageRuleNewParamsActionsDisablePerformanceID string
Turn off [Rocket Loader](https://developers.cloudflare.com/speed/optimization/content/rocket-loader/), [Mirage](https://developers.cloudflare.com/speed/optimization/images/mirage/), and [Polish](https://developers.cloudflare.com/images/polish/).
const (
PageRuleNewParamsActionsDisablePerformanceIDDisablePerformance PageRuleNewParamsActionsDisablePerformanceID = "disable_performance"
)
func (PageRuleNewParamsActionsDisablePerformanceID) IsKnown ¶
func (r PageRuleNewParamsActionsDisablePerformanceID) IsKnown() bool
type PageRuleNewParamsActionsDisableSecurity ¶
type PageRuleNewParamsActionsDisableSecurity struct {
// Turn off
// [Email Obfuscation](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/),
// [Rate Limiting (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/),
// [Scrape Shield](https://developers.cloudflare.com/waf/tools/scrape-shield/),
// [URL (Zone) Lockdown](https://developers.cloudflare.com/waf/tools/zone-lockdown/),
// and
// [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/).
ID param.Field[PageRuleNewParamsActionsDisableSecurityID] `json:"id"`
}
func (PageRuleNewParamsActionsDisableSecurity) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsDisableSecurity) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsDisableSecurity) MarshalJSON ¶
func (r PageRuleNewParamsActionsDisableSecurity) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsDisableSecurityID ¶
type PageRuleNewParamsActionsDisableSecurityID string
Turn off [Email Obfuscation](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/), [Rate Limiting (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/), [Scrape Shield](https://developers.cloudflare.com/waf/tools/scrape-shield/), [URL (Zone) Lockdown](https://developers.cloudflare.com/waf/tools/zone-lockdown/), and [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/).
const (
PageRuleNewParamsActionsDisableSecurityIDDisableSecurity PageRuleNewParamsActionsDisableSecurityID = "disable_security"
)
func (PageRuleNewParamsActionsDisableSecurityID) IsKnown ¶
func (r PageRuleNewParamsActionsDisableSecurityID) IsKnown() bool
type PageRuleNewParamsActionsDisableZaraz ¶
type PageRuleNewParamsActionsDisableZaraz struct {
// Turn off [Zaraz](https://developers.cloudflare.com/zaraz/).
ID param.Field[PageRuleNewParamsActionsDisableZarazID] `json:"id"`
}
func (PageRuleNewParamsActionsDisableZaraz) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsDisableZaraz) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsDisableZaraz) MarshalJSON ¶
func (r PageRuleNewParamsActionsDisableZaraz) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsDisableZarazID ¶
type PageRuleNewParamsActionsDisableZarazID string
Turn off [Zaraz](https://developers.cloudflare.com/zaraz/).
const (
PageRuleNewParamsActionsDisableZarazIDDisableZaraz PageRuleNewParamsActionsDisableZarazID = "disable_zaraz"
)
func (PageRuleNewParamsActionsDisableZarazID) IsKnown ¶
func (r PageRuleNewParamsActionsDisableZarazID) IsKnown() bool
type PageRuleNewParamsActionsEdgeCacheTTL ¶
type PageRuleNewParamsActionsEdgeCacheTTL struct {
// Specify how long to cache a resource in the Cloudflare global network. _Edge
// Cache TTL_ is not visible in response headers.
ID param.Field[PageRuleNewParamsActionsEdgeCacheTTLID] `json:"id"`
Value param.Field[int64] `json:"value"`
}
func (PageRuleNewParamsActionsEdgeCacheTTL) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsEdgeCacheTTL) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsEdgeCacheTTL) MarshalJSON ¶
func (r PageRuleNewParamsActionsEdgeCacheTTL) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsEdgeCacheTTLID ¶
type PageRuleNewParamsActionsEdgeCacheTTLID string
Specify how long to cache a resource in the Cloudflare global network. _Edge Cache TTL_ is not visible in response headers.
const (
PageRuleNewParamsActionsEdgeCacheTTLIDEdgeCacheTTL PageRuleNewParamsActionsEdgeCacheTTLID = "edge_cache_ttl"
)
func (PageRuleNewParamsActionsEdgeCacheTTLID) IsKnown ¶
func (r PageRuleNewParamsActionsEdgeCacheTTLID) IsKnown() bool
type PageRuleNewParamsActionsExplicitCacheControl ¶
type PageRuleNewParamsActionsExplicitCacheControl struct {
// Origin Cache Control is enabled by default for Free, Pro, and Business domains
// and disabled by default for Enterprise domains.
ID param.Field[PageRuleNewParamsActionsExplicitCacheControlID] `json:"id"`
// The status of Origin Cache Control.
Value param.Field[PageRuleNewParamsActionsExplicitCacheControlValue] `json:"value"`
}
func (PageRuleNewParamsActionsExplicitCacheControl) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsExplicitCacheControl) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsExplicitCacheControl) MarshalJSON ¶
func (r PageRuleNewParamsActionsExplicitCacheControl) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsExplicitCacheControlID ¶
type PageRuleNewParamsActionsExplicitCacheControlID string
Origin Cache Control is enabled by default for Free, Pro, and Business domains and disabled by default for Enterprise domains.
const (
PageRuleNewParamsActionsExplicitCacheControlIDExplicitCacheControl PageRuleNewParamsActionsExplicitCacheControlID = "explicit_cache_control"
)
func (PageRuleNewParamsActionsExplicitCacheControlID) IsKnown ¶
func (r PageRuleNewParamsActionsExplicitCacheControlID) IsKnown() bool
type PageRuleNewParamsActionsExplicitCacheControlValue ¶
type PageRuleNewParamsActionsExplicitCacheControlValue string
The status of Origin Cache Control.
const ( PageRuleNewParamsActionsExplicitCacheControlValueOn PageRuleNewParamsActionsExplicitCacheControlValue = "on" PageRuleNewParamsActionsExplicitCacheControlValueOff PageRuleNewParamsActionsExplicitCacheControlValue = "off" )
func (PageRuleNewParamsActionsExplicitCacheControlValue) IsKnown ¶
func (r PageRuleNewParamsActionsExplicitCacheControlValue) IsKnown() bool
type PageRuleNewParamsActionsForwardingURL ¶
type PageRuleNewParamsActionsForwardingURL struct {
// Redirects one URL to another using an `HTTP 301/302` redirect. Refer to
// [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
ID param.Field[PageRuleNewParamsActionsForwardingURLID] `json:"id"`
Value param.Field[PageRuleNewParamsActionsForwardingURLValue] `json:"value"`
}
func (PageRuleNewParamsActionsForwardingURL) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsForwardingURL) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsForwardingURL) MarshalJSON ¶
func (r PageRuleNewParamsActionsForwardingURL) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsForwardingURLID ¶
type PageRuleNewParamsActionsForwardingURLID string
Redirects one URL to another using an `HTTP 301/302` redirect. Refer to [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
const (
PageRuleNewParamsActionsForwardingURLIDForwardingURL PageRuleNewParamsActionsForwardingURLID = "forwarding_url"
)
func (PageRuleNewParamsActionsForwardingURLID) IsKnown ¶
func (r PageRuleNewParamsActionsForwardingURLID) IsKnown() bool
type PageRuleNewParamsActionsForwardingURLValue ¶
type PageRuleNewParamsActionsForwardingURLValue struct {
// The status code to use for the URL redirect. 301 is a permanent redirect. 302 is
// a temporary redirect.
StatusCode param.Field[PageRuleNewParamsActionsForwardingURLValueStatusCode] `json:"status_code"`
// The URL to redirect the request to. Notes: ${num} refers to the position of '\*'
// in the constraint value.
URL param.Field[string] `json:"url"`
}
func (PageRuleNewParamsActionsForwardingURLValue) MarshalJSON ¶
func (r PageRuleNewParamsActionsForwardingURLValue) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsForwardingURLValueStatusCode ¶
type PageRuleNewParamsActionsForwardingURLValueStatusCode int64
The status code to use for the URL redirect. 301 is a permanent redirect. 302 is a temporary redirect.
const ( PageRuleNewParamsActionsForwardingURLValueStatusCode301 PageRuleNewParamsActionsForwardingURLValueStatusCode = 301 PageRuleNewParamsActionsForwardingURLValueStatusCode302 PageRuleNewParamsActionsForwardingURLValueStatusCode = 302 )
func (PageRuleNewParamsActionsForwardingURLValueStatusCode) IsKnown ¶
func (r PageRuleNewParamsActionsForwardingURLValueStatusCode) IsKnown() bool
type PageRuleNewParamsActionsHostHeaderOverride ¶
type PageRuleNewParamsActionsHostHeaderOverride struct {
// Apply a specific host header.
ID param.Field[PageRuleNewParamsActionsHostHeaderOverrideID] `json:"id"`
// The hostname to use in the `Host` header
Value param.Field[string] `json:"value"`
}
func (PageRuleNewParamsActionsHostHeaderOverride) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsHostHeaderOverride) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsHostHeaderOverride) MarshalJSON ¶
func (r PageRuleNewParamsActionsHostHeaderOverride) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsHostHeaderOverrideID ¶
type PageRuleNewParamsActionsHostHeaderOverrideID string
Apply a specific host header.
const (
PageRuleNewParamsActionsHostHeaderOverrideIDHostHeaderOverride PageRuleNewParamsActionsHostHeaderOverrideID = "host_header_override"
)
func (PageRuleNewParamsActionsHostHeaderOverrideID) IsKnown ¶
func (r PageRuleNewParamsActionsHostHeaderOverrideID) IsKnown() bool
type PageRuleNewParamsActionsID ¶
type PageRuleNewParamsActionsID string
If enabled, any ` http://“ URL is converted to `https://` through a 301 redirect.
const ( PageRuleNewParamsActionsIDAlwaysUseHTTPS PageRuleNewParamsActionsID = "always_use_https" PageRuleNewParamsActionsIDAutomaticHTTPSRewrites PageRuleNewParamsActionsID = "automatic_https_rewrites" PageRuleNewParamsActionsIDBrowserCacheTTL PageRuleNewParamsActionsID = "browser_cache_ttl" PageRuleNewParamsActionsIDBrowserCheck PageRuleNewParamsActionsID = "browser_check" PageRuleNewParamsActionsIDBypassCacheOnCookie PageRuleNewParamsActionsID = "bypass_cache_on_cookie" PageRuleNewParamsActionsIDCacheByDeviceType PageRuleNewParamsActionsID = "cache_by_device_type" PageRuleNewParamsActionsIDCacheDeceptionArmor PageRuleNewParamsActionsID = "cache_deception_armor" PageRuleNewParamsActionsIDCacheKeyFields PageRuleNewParamsActionsID = "cache_key_fields" PageRuleNewParamsActionsIDCacheLevel PageRuleNewParamsActionsID = "cache_level" PageRuleNewParamsActionsIDCacheOnCookie PageRuleNewParamsActionsID = "cache_on_cookie" PageRuleNewParamsActionsIDCacheTTLByStatus PageRuleNewParamsActionsID = "cache_ttl_by_status" PageRuleNewParamsActionsIDDisableApps PageRuleNewParamsActionsID = "disable_apps" PageRuleNewParamsActionsIDDisablePerformance PageRuleNewParamsActionsID = "disable_performance" PageRuleNewParamsActionsIDDisableSecurity PageRuleNewParamsActionsID = "disable_security" PageRuleNewParamsActionsIDDisableZaraz PageRuleNewParamsActionsID = "disable_zaraz" PageRuleNewParamsActionsIDEdgeCacheTTL PageRuleNewParamsActionsID = "edge_cache_ttl" PageRuleNewParamsActionsIDEmailObfuscation PageRuleNewParamsActionsID = "email_obfuscation" PageRuleNewParamsActionsIDExplicitCacheControl PageRuleNewParamsActionsID = "explicit_cache_control" PageRuleNewParamsActionsIDForwardingURL PageRuleNewParamsActionsID = "forwarding_url" PageRuleNewParamsActionsIDHostHeaderOverride PageRuleNewParamsActionsID = "host_header_override" PageRuleNewParamsActionsIDIPGeolocation PageRuleNewParamsActionsID = "ip_geolocation" PageRuleNewParamsActionsIDMirage PageRuleNewParamsActionsID = "mirage" PageRuleNewParamsActionsIDOpportunisticEncryption PageRuleNewParamsActionsID = "opportunistic_encryption" PageRuleNewParamsActionsIDOriginErrorPagePassThru PageRuleNewParamsActionsID = "origin_error_page_pass_thru" PageRuleNewParamsActionsIDPolish PageRuleNewParamsActionsID = "polish" PageRuleNewParamsActionsIDResolveOverride PageRuleNewParamsActionsID = "resolve_override" PageRuleNewParamsActionsIDRespectStrongEtag PageRuleNewParamsActionsID = "respect_strong_etag" PageRuleNewParamsActionsIDResponseBuffering PageRuleNewParamsActionsID = "response_buffering" PageRuleNewParamsActionsIDRocketLoader PageRuleNewParamsActionsID = "rocket_loader" PageRuleNewParamsActionsIDSecurityLevel PageRuleNewParamsActionsID = "security_level" PageRuleNewParamsActionsIDSortQueryStringForCache PageRuleNewParamsActionsID = "sort_query_string_for_cache" PageRuleNewParamsActionsIDSSL PageRuleNewParamsActionsID = "ssl" PageRuleNewParamsActionsIDTrueClientIPHeader PageRuleNewParamsActionsID = "true_client_ip_header" PageRuleNewParamsActionsIDWAF PageRuleNewParamsActionsID = "waf" )
func (PageRuleNewParamsActionsID) IsKnown ¶
func (r PageRuleNewParamsActionsID) IsKnown() bool
type PageRuleNewParamsActionsResolveOverride ¶
type PageRuleNewParamsActionsResolveOverride struct {
// Change the origin address to the value specified in this setting.
ID param.Field[PageRuleNewParamsActionsResolveOverrideID] `json:"id"`
// The origin address you want to override with.
Value param.Field[string] `json:"value"`
}
func (PageRuleNewParamsActionsResolveOverride) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsResolveOverride) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsResolveOverride) MarshalJSON ¶
func (r PageRuleNewParamsActionsResolveOverride) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsResolveOverrideID ¶
type PageRuleNewParamsActionsResolveOverrideID string
Change the origin address to the value specified in this setting.
const (
PageRuleNewParamsActionsResolveOverrideIDResolveOverride PageRuleNewParamsActionsResolveOverrideID = "resolve_override"
)
func (PageRuleNewParamsActionsResolveOverrideID) IsKnown ¶
func (r PageRuleNewParamsActionsResolveOverrideID) IsKnown() bool
type PageRuleNewParamsActionsRespectStrongEtag ¶
type PageRuleNewParamsActionsRespectStrongEtag struct {
// Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and
// the origin server.
ID param.Field[PageRuleNewParamsActionsRespectStrongEtagID] `json:"id"`
// The status of Respect Strong ETags
Value param.Field[PageRuleNewParamsActionsRespectStrongEtagValue] `json:"value"`
}
func (PageRuleNewParamsActionsRespectStrongEtag) ImplementsPageRuleNewParamsActionUnion ¶ added in v4.1.0
func (r PageRuleNewParamsActionsRespectStrongEtag) ImplementsPageRuleNewParamsActionUnion()
func (PageRuleNewParamsActionsRespectStrongEtag) MarshalJSON ¶
func (r PageRuleNewParamsActionsRespectStrongEtag) MarshalJSON() (data []byte, err error)
type PageRuleNewParamsActionsRespectStrongEtagID ¶
type PageRuleNewParamsActionsRespectStrongEtagID string
Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and the origin server.
const (
PageRuleNewParamsActionsRespectStrongEtagIDRespectStrongEtag PageRuleNewParamsActionsRespectStrongEtagID = "respect_strong_etag"
)
func (PageRuleNewParamsActionsRespectStrongEtagID) IsKnown ¶
func (r PageRuleNewParamsActionsRespectStrongEtagID) IsKnown() bool
type PageRuleNewParamsActionsRespectStrongEtagValue ¶
type PageRuleNewParamsActionsRespectStrongEtagValue string
The status of Respect Strong ETags
const ( PageRuleNewParamsActionsRespectStrongEtagValueOn PageRuleNewParamsActionsRespectStrongEtagValue = "on" PageRuleNewParamsActionsRespectStrongEtagValueOff PageRuleNewParamsActionsRespectStrongEtagValue = "off" )
func (PageRuleNewParamsActionsRespectStrongEtagValue) IsKnown ¶
func (r PageRuleNewParamsActionsRespectStrongEtagValue) IsKnown() bool
type PageRuleNewParamsStatus ¶
type PageRuleNewParamsStatus string
The status of the Page Rule.
const ( PageRuleNewParamsStatusActive PageRuleNewParamsStatus = "active" PageRuleNewParamsStatusDisabled PageRuleNewParamsStatus = "disabled" )
func (PageRuleNewParamsStatus) IsKnown ¶
func (r PageRuleNewParamsStatus) IsKnown() bool
type PageRuleNewResponseEnvelope ¶
type PageRuleNewResponseEnvelope struct {
Errors []PageRuleNewResponseEnvelopeErrors `json:"errors,required"`
Messages []PageRuleNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success PageRuleNewResponseEnvelopeSuccess `json:"success,required"`
Result PageRule `json:"result"`
JSON pageRuleNewResponseEnvelopeJSON `json:"-"`
}
func (*PageRuleNewResponseEnvelope) UnmarshalJSON ¶
func (r *PageRuleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PageRuleNewResponseEnvelopeErrors ¶ added in v4.3.0
type PageRuleNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleNewResponseEnvelopeErrorsSource `json:"source"`
JSON pageRuleNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*PageRuleNewResponseEnvelopeErrors) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PageRuleNewResponseEnvelopeErrorsSource ¶ added in v4.3.0
type PageRuleNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON pageRuleNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*PageRuleNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type PageRuleNewResponseEnvelopeMessages ¶ added in v4.3.0
type PageRuleNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleNewResponseEnvelopeMessagesSource `json:"source"`
JSON pageRuleNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*PageRuleNewResponseEnvelopeMessages) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PageRuleNewResponseEnvelopeMessagesSource ¶ added in v4.3.0
type PageRuleNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON pageRuleNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*PageRuleNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type PageRuleNewResponseEnvelopeSuccess ¶
type PageRuleNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
PageRuleNewResponseEnvelopeSuccessTrue PageRuleNewResponseEnvelopeSuccess = true
)
func (PageRuleNewResponseEnvelopeSuccess) IsKnown ¶
func (r PageRuleNewResponseEnvelopeSuccess) IsKnown() bool
type PageRuleService ¶
type PageRuleService struct {
Options []option.RequestOption
}
PageRuleService 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 NewPageRuleService method instead.
func NewPageRuleService ¶
func NewPageRuleService(opts ...option.RequestOption) (r *PageRuleService)
NewPageRuleService 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 (*PageRuleService) Delete ¶
func (r *PageRuleService) Delete(ctx context.Context, pageruleID string, body PageRuleDeleteParams, opts ...option.RequestOption) (res *PageRuleDeleteResponse, err error)
Deletes an existing Page Rule.
func (*PageRuleService) Edit ¶
func (r *PageRuleService) Edit(ctx context.Context, pageruleID string, params PageRuleEditParams, opts ...option.RequestOption) (res *PageRule, err error)
Updates one or more fields of an existing Page Rule.
func (*PageRuleService) Get ¶
func (r *PageRuleService) Get(ctx context.Context, pageruleID string, query PageRuleGetParams, opts ...option.RequestOption) (res *PageRule, err error)
Fetches the details of a Page Rule.
func (*PageRuleService) List ¶
func (r *PageRuleService) List(ctx context.Context, params PageRuleListParams, opts ...option.RequestOption) (res *[]PageRule, err error)
Fetches Page Rules in a zone.
func (*PageRuleService) New ¶
func (r *PageRuleService) New(ctx context.Context, params PageRuleNewParams, opts ...option.RequestOption) (res *PageRule, err error)
Creates a new Page Rule.
func (*PageRuleService) Update ¶
func (r *PageRuleService) Update(ctx context.Context, pageruleID string, params PageRuleUpdateParams, opts ...option.RequestOption) (res *PageRule, err error)
Replaces the configuration of an existing Page Rule. The configuration of the updated Page Rule will exactly match the data passed in the API request.
type PageRuleStatus ¶
type PageRuleStatus string
The status of the Page Rule.
const ( PageRuleStatusActive PageRuleStatus = "active" PageRuleStatusDisabled PageRuleStatus = "disabled" )
func (PageRuleStatus) IsKnown ¶
func (r PageRuleStatus) IsKnown() bool
type PageRuleUpdateParams ¶
type PageRuleUpdateParams struct {
// Identifier.
ZoneID param.Field[string] `path:"zone_id,required"`
// The set of actions to perform if the targets of this rule match the request.
// Actions can redirect to another URL or override settings, but not both.
Actions param.Field[[]PageRuleUpdateParamsActionUnion] `json:"actions,required"`
// The rule targets to evaluate on each request.
Targets param.Field[[]TargetParam] `json:"targets,required"`
// The priority of the rule, used to define which Page Rule is processed over
// another. A higher number indicates a higher priority. For example, if you have a
// catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
// take precedence (rule B: `/images/special/*`), specify a higher priority for
// rule B so it overrides rule A.
Priority param.Field[int64] `json:"priority"`
// The status of the Page Rule.
Status param.Field[PageRuleUpdateParamsStatus] `json:"status"`
}
func (PageRuleUpdateParams) MarshalJSON ¶
func (r PageRuleUpdateParams) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsAction ¶
type PageRuleUpdateParamsAction struct {
// If enabled, any ` http://“ URL is converted to `https://` through a 301
// redirect.
ID param.Field[PageRuleUpdateParamsActionsID] `json:"id"`
Value param.Field[interface{}] `json:"value"`
}
func (PageRuleUpdateParamsAction) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsAction) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsAction) MarshalJSON ¶
func (r PageRuleUpdateParamsAction) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionUnion ¶
type PageRuleUpdateParamsActionUnion interface {
ImplementsPageRuleUpdateParamsActionUnion()
}
Satisfied by zones.AlwaysUseHTTPSParam, zones.AutomaticHTTPSRewritesParam, zones.BrowserCacheTTLParam, zones.BrowserCheckParam, page_rules.PageRuleUpdateParamsActionsBypassCacheOnCookie, page_rules.PageRuleUpdateParamsActionsCacheByDeviceType, page_rules.PageRuleUpdateParamsActionsCacheDeceptionArmor, page_rules.PageRuleUpdateParamsActionsCacheKeyFields, zones.CacheLevelParam, page_rules.PageRuleUpdateParamsActionsCacheOnCookie, page_rules.PageRuleUpdateParamsActionsCacheTTLByStatus, page_rules.PageRuleUpdateParamsActionsDisableApps, page_rules.PageRuleUpdateParamsActionsDisablePerformance, page_rules.PageRuleUpdateParamsActionsDisableSecurity, page_rules.PageRuleUpdateParamsActionsDisableZaraz, page_rules.PageRuleUpdateParamsActionsEdgeCacheTTL, zones.EmailObfuscationParam, page_rules.PageRuleUpdateParamsActionsExplicitCacheControl, page_rules.PageRuleUpdateParamsActionsForwardingURL, page_rules.PageRuleUpdateParamsActionsHostHeaderOverride, zones.IPGeolocationParam, zones.MirageParam, zones.OpportunisticEncryptionParam, zones.OriginErrorPagePassThruParam, zones.PolishParam, page_rules.PageRuleUpdateParamsActionsResolveOverride, page_rules.PageRuleUpdateParamsActionsRespectStrongEtag, zones.ResponseBufferingParam, zones.RocketLoaderParam, zones.SecurityLevelParam, zones.SortQueryStringForCacheParam, zones.SSLParam, zones.TrueClientIPHeaderParam, zones.WAFParam, PageRuleUpdateParamsAction.
type PageRuleUpdateParamsActionsBypassCacheOnCookie ¶
type PageRuleUpdateParamsActionsBypassCacheOnCookie struct {
// Bypass cache and fetch resources from the origin server if a regular expression
// matches against a cookie name present in the request.
ID param.Field[PageRuleUpdateParamsActionsBypassCacheOnCookieID] `json:"id"`
// The regular expression to use for matching cookie names in the request. Refer to
// [Bypass Cache on Cookie setting](https://developers.cloudflare.com/rules/page-rules/reference/additional-reference/#bypass-cache-on-cookie-setting)
// to learn about limited regular expression support.
Value param.Field[string] `json:"value"`
}
func (PageRuleUpdateParamsActionsBypassCacheOnCookie) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsBypassCacheOnCookie) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsBypassCacheOnCookie) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsBypassCacheOnCookie) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsBypassCacheOnCookieID ¶
type PageRuleUpdateParamsActionsBypassCacheOnCookieID string
Bypass cache and fetch resources from the origin server if a regular expression matches against a cookie name present in the request.
const (
PageRuleUpdateParamsActionsBypassCacheOnCookieIDBypassCacheOnCookie PageRuleUpdateParamsActionsBypassCacheOnCookieID = "bypass_cache_on_cookie"
)
func (PageRuleUpdateParamsActionsBypassCacheOnCookieID) IsKnown ¶
func (r PageRuleUpdateParamsActionsBypassCacheOnCookieID) IsKnown() bool
type PageRuleUpdateParamsActionsCacheByDeviceType ¶
type PageRuleUpdateParamsActionsCacheByDeviceType struct {
// Separate cached content based on the visitor's device type.
ID param.Field[PageRuleUpdateParamsActionsCacheByDeviceTypeID] `json:"id"`
// The status of Cache By Device Type.
Value param.Field[PageRuleUpdateParamsActionsCacheByDeviceTypeValue] `json:"value"`
}
func (PageRuleUpdateParamsActionsCacheByDeviceType) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsCacheByDeviceType) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsCacheByDeviceType) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheByDeviceType) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheByDeviceTypeID ¶
type PageRuleUpdateParamsActionsCacheByDeviceTypeID string
Separate cached content based on the visitor's device type.
const (
PageRuleUpdateParamsActionsCacheByDeviceTypeIDCacheByDeviceType PageRuleUpdateParamsActionsCacheByDeviceTypeID = "cache_by_device_type"
)
func (PageRuleUpdateParamsActionsCacheByDeviceTypeID) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheByDeviceTypeID) IsKnown() bool
type PageRuleUpdateParamsActionsCacheByDeviceTypeValue ¶
type PageRuleUpdateParamsActionsCacheByDeviceTypeValue string
The status of Cache By Device Type.
const ( PageRuleUpdateParamsActionsCacheByDeviceTypeValueOn PageRuleUpdateParamsActionsCacheByDeviceTypeValue = "on" PageRuleUpdateParamsActionsCacheByDeviceTypeValueOff PageRuleUpdateParamsActionsCacheByDeviceTypeValue = "off" )
func (PageRuleUpdateParamsActionsCacheByDeviceTypeValue) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheByDeviceTypeValue) IsKnown() bool
type PageRuleUpdateParamsActionsCacheDeceptionArmor ¶
type PageRuleUpdateParamsActionsCacheDeceptionArmor struct {
// Protect from web cache deception attacks while still allowing static assets to
// be cached. This setting verifies that the URL's extension matches the returned
// `Content-Type`.
ID param.Field[PageRuleUpdateParamsActionsCacheDeceptionArmorID] `json:"id"`
// The status of Cache Deception Armor.
Value param.Field[PageRuleUpdateParamsActionsCacheDeceptionArmorValue] `json:"value"`
}
func (PageRuleUpdateParamsActionsCacheDeceptionArmor) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsCacheDeceptionArmor) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsCacheDeceptionArmor) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheDeceptionArmor) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheDeceptionArmorID ¶
type PageRuleUpdateParamsActionsCacheDeceptionArmorID string
Protect from web cache deception attacks while still allowing static assets to be cached. This setting verifies that the URL's extension matches the returned `Content-Type`.
const (
PageRuleUpdateParamsActionsCacheDeceptionArmorIDCacheDeceptionArmor PageRuleUpdateParamsActionsCacheDeceptionArmorID = "cache_deception_armor"
)
func (PageRuleUpdateParamsActionsCacheDeceptionArmorID) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheDeceptionArmorID) IsKnown() bool
type PageRuleUpdateParamsActionsCacheDeceptionArmorValue ¶
type PageRuleUpdateParamsActionsCacheDeceptionArmorValue string
The status of Cache Deception Armor.
const ( PageRuleUpdateParamsActionsCacheDeceptionArmorValueOn PageRuleUpdateParamsActionsCacheDeceptionArmorValue = "on" PageRuleUpdateParamsActionsCacheDeceptionArmorValueOff PageRuleUpdateParamsActionsCacheDeceptionArmorValue = "off" )
func (PageRuleUpdateParamsActionsCacheDeceptionArmorValue) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheDeceptionArmorValue) IsKnown() bool
type PageRuleUpdateParamsActionsCacheKeyFields ¶
type PageRuleUpdateParamsActionsCacheKeyFields struct {
// Control specifically what variables to include when deciding which resources to
// cache. This allows customers to determine what to cache based on something other
// than just the URL.
ID param.Field[PageRuleUpdateParamsActionsCacheKeyFieldsID] `json:"id"`
Value param.Field[PageRuleUpdateParamsActionsCacheKeyFieldsValue] `json:"value"`
}
func (PageRuleUpdateParamsActionsCacheKeyFields) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsCacheKeyFields) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsCacheKeyFields) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheKeyFields) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheKeyFieldsID ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsID string
Control specifically what variables to include when deciding which resources to cache. This allows customers to determine what to cache based on something other than just the URL.
const (
PageRuleUpdateParamsActionsCacheKeyFieldsIDCacheKeyFields PageRuleUpdateParamsActionsCacheKeyFieldsID = "cache_key_fields"
)
func (PageRuleUpdateParamsActionsCacheKeyFieldsID) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheKeyFieldsID) IsKnown() bool
type PageRuleUpdateParamsActionsCacheKeyFieldsValue ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValue struct {
// Controls which cookies appear in the Cache Key.
Cookie param.Field[PageRuleUpdateParamsActionsCacheKeyFieldsValueCookie] `json:"cookie"`
// Controls which headers go into the Cache Key. Exactly one of `include` or
// `exclude` is expected.
Header param.Field[PageRuleUpdateParamsActionsCacheKeyFieldsValueHeader] `json:"header"`
// Determines which host header to include in the Cache Key.
Host param.Field[PageRuleUpdateParamsActionsCacheKeyFieldsValueHost] `json:"host"`
// Controls which URL query string parameters go into the Cache Key. Exactly one of
// `include` or `exclude` is expected.
QueryString param.Field[PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryString] `json:"query_string"`
// Feature fields to add features about the end-user (client) into the Cache Key.
User param.Field[PageRuleUpdateParamsActionsCacheKeyFieldsValueUser] `json:"user"`
}
func (PageRuleUpdateParamsActionsCacheKeyFieldsValue) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheKeyFieldsValue) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheKeyFieldsValueCookie ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueCookie struct {
// A list of cookies to check for the presence of, without including their actual
// values.
CheckPresence param.Field[[]string] `json:"check_presence"`
// A list of cookies to include.
Include param.Field[[]string] `json:"include"`
}
Controls which cookies appear in the Cache Key.
func (PageRuleUpdateParamsActionsCacheKeyFieldsValueCookie) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheKeyFieldsValueCookie) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheKeyFieldsValueHeader ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueHeader struct {
// A list of headers to check for the presence of, without including their actual
// values.
CheckPresence param.Field[[]string] `json:"check_presence"`
// A list of headers to ignore.
Exclude param.Field[[]string] `json:"exclude"`
// A list of headers to include.
Include param.Field[[]string] `json:"include"`
}
Controls which headers go into the Cache Key. Exactly one of `include` or `exclude` is expected.
func (PageRuleUpdateParamsActionsCacheKeyFieldsValueHeader) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheKeyFieldsValueHeader) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheKeyFieldsValueHost ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueHost struct {
// Whether to include the Host header in the HTTP request sent to the origin.
Resolved param.Field[bool] `json:"resolved"`
}
Determines which host header to include in the Cache Key.
func (PageRuleUpdateParamsActionsCacheKeyFieldsValueHost) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheKeyFieldsValueHost) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryString ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryString struct {
// Ignore all query string parameters.
Exclude param.Field[PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion] `json:"exclude"`
// Include all query string parameters.
Include param.Field[PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion] `json:"include"`
}
Controls which URL query string parameters go into the Cache Key. Exactly one of `include` or `exclude` is expected.
func (PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryString) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryString) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeArray ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeArray []string
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeString ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeString string
Ignore all query string parameters.
const (
PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeStringStar PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeString = "*"
)
func (PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeString) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeString) IsKnown() bool
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeUnion interface {
// contains filtered or unexported methods
}
Ignore all query string parameters.
Satisfied by page_rules.PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeString, page_rules.PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringExcludeArray.
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeArray ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeArray []string
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeString ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeString string
Include all query string parameters.
const (
PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeStringStar PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeString = "*"
)
func (PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeString) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeString) IsKnown() bool
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeUnion interface {
// contains filtered or unexported methods
}
Include all query string parameters.
Satisfied by page_rules.PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeString, page_rules.PageRuleUpdateParamsActionsCacheKeyFieldsValueQueryStringIncludeArray.
type PageRuleUpdateParamsActionsCacheKeyFieldsValueUser ¶
type PageRuleUpdateParamsActionsCacheKeyFieldsValueUser struct {
// Classifies a request as `mobile`, `desktop`, or `tablet` based on the User
// Agent.
DeviceType param.Field[bool] `json:"device_type"`
// Includes the client's country, derived from the IP address.
Geo param.Field[bool] `json:"geo"`
// Includes the first language code contained in the `Accept-Language` header sent
// by the client.
Lang param.Field[bool] `json:"lang"`
}
Feature fields to add features about the end-user (client) into the Cache Key.
func (PageRuleUpdateParamsActionsCacheKeyFieldsValueUser) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheKeyFieldsValueUser) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheOnCookie ¶
type PageRuleUpdateParamsActionsCacheOnCookie struct {
// Apply the Cache Everything option (Cache Level setting) based on a regular
// expression match against a cookie name.
ID param.Field[PageRuleUpdateParamsActionsCacheOnCookieID] `json:"id"`
// The regular expression to use for matching cookie names in the request.
Value param.Field[string] `json:"value"`
}
func (PageRuleUpdateParamsActionsCacheOnCookie) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsCacheOnCookie) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsCacheOnCookie) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheOnCookie) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheOnCookieID ¶
type PageRuleUpdateParamsActionsCacheOnCookieID string
Apply the Cache Everything option (Cache Level setting) based on a regular expression match against a cookie name.
const (
PageRuleUpdateParamsActionsCacheOnCookieIDCacheOnCookie PageRuleUpdateParamsActionsCacheOnCookieID = "cache_on_cookie"
)
func (PageRuleUpdateParamsActionsCacheOnCookieID) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheOnCookieID) IsKnown() bool
type PageRuleUpdateParamsActionsCacheTTLByStatus ¶
type PageRuleUpdateParamsActionsCacheTTLByStatus struct {
// Enterprise customers can set cache time-to-live (TTL) based on the response
// status from the origin web server. Cache TTL refers to the duration of a
// resource in the Cloudflare network before being marked as stale or discarded
// from cache. Status codes are returned by a resource's origin. Setting cache TTL
// based on response status overrides the default cache behavior (standard caching)
// for static files and overrides cache instructions sent by the origin web server.
// To cache non-static assets, set a Cache Level of Cache Everything using a Page
// Rule. Setting no-store Cache-Control or a low TTL (using `max-age`/`s-maxage`)
// increases requests to origin web servers and decreases performance.
ID param.Field[PageRuleUpdateParamsActionsCacheTTLByStatusID] `json:"id"`
// A JSON object containing status codes and their corresponding TTLs. Each
// key-value pair in the cache TTL by status cache rule has the following syntax
//
// - `status_code`: An integer value such as 200 or 500. status_code matches the
// exact status code from the origin web server. Valid status codes are between
// 100-999.
// - `status_code_range`: Integer values for from and to. status_code_range matches
// any status code from the origin web server within the specified range.
// - `value`: An integer value that defines the duration an asset is valid in
// seconds or one of the following strings: no-store (equivalent to -1), no-cache
// (equivalent to 0).
Value param.Field[map[string]PageRuleUpdateParamsActionsCacheTTLByStatusValueUnion] `json:"value"`
}
func (PageRuleUpdateParamsActionsCacheTTLByStatus) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsCacheTTLByStatus) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsCacheTTLByStatus) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsCacheTTLByStatus) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsCacheTTLByStatusID ¶
type PageRuleUpdateParamsActionsCacheTTLByStatusID string
Enterprise customers can set cache time-to-live (TTL) based on the response status from the origin web server. Cache TTL refers to the duration of a resource in the Cloudflare network before being marked as stale or discarded from cache. Status codes are returned by a resource's origin. Setting cache TTL based on response status overrides the default cache behavior (standard caching) for static files and overrides cache instructions sent by the origin web server. To cache non-static assets, set a Cache Level of Cache Everything using a Page Rule. Setting no-store Cache-Control or a low TTL (using `max-age`/`s-maxage`) increases requests to origin web servers and decreases performance.
const (
PageRuleUpdateParamsActionsCacheTTLByStatusIDCacheTTLByStatus PageRuleUpdateParamsActionsCacheTTLByStatusID = "cache_ttl_by_status"
)
func (PageRuleUpdateParamsActionsCacheTTLByStatusID) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheTTLByStatusID) IsKnown() bool
type PageRuleUpdateParamsActionsCacheTTLByStatusValueString ¶
type PageRuleUpdateParamsActionsCacheTTLByStatusValueString string
`no-store` (equivalent to -1), `no-cache` (equivalent to 0)
const ( PageRuleUpdateParamsActionsCacheTTLByStatusValueStringNoCache PageRuleUpdateParamsActionsCacheTTLByStatusValueString = "no-cache" PageRuleUpdateParamsActionsCacheTTLByStatusValueStringNoStore PageRuleUpdateParamsActionsCacheTTLByStatusValueString = "no-store" )
func (PageRuleUpdateParamsActionsCacheTTLByStatusValueString) ImplementsPageRuleUpdateParamsActionsCacheTTLByStatusValueUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsCacheTTLByStatusValueString) ImplementsPageRuleUpdateParamsActionsCacheTTLByStatusValueUnion()
func (PageRuleUpdateParamsActionsCacheTTLByStatusValueString) IsKnown ¶
func (r PageRuleUpdateParamsActionsCacheTTLByStatusValueString) IsKnown() bool
type PageRuleUpdateParamsActionsCacheTTLByStatusValueUnion ¶
type PageRuleUpdateParamsActionsCacheTTLByStatusValueUnion interface {
ImplementsPageRuleUpdateParamsActionsCacheTTLByStatusValueUnion()
}
`no-store` (equivalent to -1), `no-cache` (equivalent to 0)
Satisfied by page_rules.PageRuleUpdateParamsActionsCacheTTLByStatusValueString, shared.UnionInt.
type PageRuleUpdateParamsActionsDisableApps ¶
type PageRuleUpdateParamsActionsDisableApps struct {
// Turn off all active
// [Cloudflare Apps](https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/)
// (deprecated).
ID param.Field[PageRuleUpdateParamsActionsDisableAppsID] `json:"id"`
}
func (PageRuleUpdateParamsActionsDisableApps) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsDisableApps) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsDisableApps) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsDisableApps) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsDisableAppsID ¶
type PageRuleUpdateParamsActionsDisableAppsID string
Turn off all active [Cloudflare Apps](https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/) (deprecated).
const (
PageRuleUpdateParamsActionsDisableAppsIDDisableApps PageRuleUpdateParamsActionsDisableAppsID = "disable_apps"
)
func (PageRuleUpdateParamsActionsDisableAppsID) IsKnown ¶
func (r PageRuleUpdateParamsActionsDisableAppsID) IsKnown() bool
type PageRuleUpdateParamsActionsDisablePerformance ¶
type PageRuleUpdateParamsActionsDisablePerformance struct {
// Turn off
// [Rocket Loader](https://developers.cloudflare.com/speed/optimization/content/rocket-loader/),
// [Mirage](https://developers.cloudflare.com/speed/optimization/images/mirage/),
// and [Polish](https://developers.cloudflare.com/images/polish/).
ID param.Field[PageRuleUpdateParamsActionsDisablePerformanceID] `json:"id"`
}
func (PageRuleUpdateParamsActionsDisablePerformance) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsDisablePerformance) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsDisablePerformance) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsDisablePerformance) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsDisablePerformanceID ¶
type PageRuleUpdateParamsActionsDisablePerformanceID string
Turn off [Rocket Loader](https://developers.cloudflare.com/speed/optimization/content/rocket-loader/), [Mirage](https://developers.cloudflare.com/speed/optimization/images/mirage/), and [Polish](https://developers.cloudflare.com/images/polish/).
const (
PageRuleUpdateParamsActionsDisablePerformanceIDDisablePerformance PageRuleUpdateParamsActionsDisablePerformanceID = "disable_performance"
)
func (PageRuleUpdateParamsActionsDisablePerformanceID) IsKnown ¶
func (r PageRuleUpdateParamsActionsDisablePerformanceID) IsKnown() bool
type PageRuleUpdateParamsActionsDisableSecurity ¶
type PageRuleUpdateParamsActionsDisableSecurity struct {
// Turn off
// [Email Obfuscation](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/),
// [Rate Limiting (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/),
// [Scrape Shield](https://developers.cloudflare.com/waf/tools/scrape-shield/),
// [URL (Zone) Lockdown](https://developers.cloudflare.com/waf/tools/zone-lockdown/),
// and
// [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/).
ID param.Field[PageRuleUpdateParamsActionsDisableSecurityID] `json:"id"`
}
func (PageRuleUpdateParamsActionsDisableSecurity) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsDisableSecurity) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsDisableSecurity) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsDisableSecurity) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsDisableSecurityID ¶
type PageRuleUpdateParamsActionsDisableSecurityID string
Turn off [Email Obfuscation](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/), [Rate Limiting (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/), [Scrape Shield](https://developers.cloudflare.com/waf/tools/scrape-shield/), [URL (Zone) Lockdown](https://developers.cloudflare.com/waf/tools/zone-lockdown/), and [WAF managed rules (previous version, deprecated)](https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/).
const (
PageRuleUpdateParamsActionsDisableSecurityIDDisableSecurity PageRuleUpdateParamsActionsDisableSecurityID = "disable_security"
)
func (PageRuleUpdateParamsActionsDisableSecurityID) IsKnown ¶
func (r PageRuleUpdateParamsActionsDisableSecurityID) IsKnown() bool
type PageRuleUpdateParamsActionsDisableZaraz ¶
type PageRuleUpdateParamsActionsDisableZaraz struct {
// Turn off [Zaraz](https://developers.cloudflare.com/zaraz/).
ID param.Field[PageRuleUpdateParamsActionsDisableZarazID] `json:"id"`
}
func (PageRuleUpdateParamsActionsDisableZaraz) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsDisableZaraz) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsDisableZaraz) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsDisableZaraz) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsDisableZarazID ¶
type PageRuleUpdateParamsActionsDisableZarazID string
Turn off [Zaraz](https://developers.cloudflare.com/zaraz/).
const (
PageRuleUpdateParamsActionsDisableZarazIDDisableZaraz PageRuleUpdateParamsActionsDisableZarazID = "disable_zaraz"
)
func (PageRuleUpdateParamsActionsDisableZarazID) IsKnown ¶
func (r PageRuleUpdateParamsActionsDisableZarazID) IsKnown() bool
type PageRuleUpdateParamsActionsEdgeCacheTTL ¶
type PageRuleUpdateParamsActionsEdgeCacheTTL struct {
// Specify how long to cache a resource in the Cloudflare global network. _Edge
// Cache TTL_ is not visible in response headers.
ID param.Field[PageRuleUpdateParamsActionsEdgeCacheTTLID] `json:"id"`
Value param.Field[int64] `json:"value"`
}
func (PageRuleUpdateParamsActionsEdgeCacheTTL) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsEdgeCacheTTL) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsEdgeCacheTTL) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsEdgeCacheTTL) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsEdgeCacheTTLID ¶
type PageRuleUpdateParamsActionsEdgeCacheTTLID string
Specify how long to cache a resource in the Cloudflare global network. _Edge Cache TTL_ is not visible in response headers.
const (
PageRuleUpdateParamsActionsEdgeCacheTTLIDEdgeCacheTTL PageRuleUpdateParamsActionsEdgeCacheTTLID = "edge_cache_ttl"
)
func (PageRuleUpdateParamsActionsEdgeCacheTTLID) IsKnown ¶
func (r PageRuleUpdateParamsActionsEdgeCacheTTLID) IsKnown() bool
type PageRuleUpdateParamsActionsExplicitCacheControl ¶
type PageRuleUpdateParamsActionsExplicitCacheControl struct {
// Origin Cache Control is enabled by default for Free, Pro, and Business domains
// and disabled by default for Enterprise domains.
ID param.Field[PageRuleUpdateParamsActionsExplicitCacheControlID] `json:"id"`
// The status of Origin Cache Control.
Value param.Field[PageRuleUpdateParamsActionsExplicitCacheControlValue] `json:"value"`
}
func (PageRuleUpdateParamsActionsExplicitCacheControl) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsExplicitCacheControl) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsExplicitCacheControl) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsExplicitCacheControl) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsExplicitCacheControlID ¶
type PageRuleUpdateParamsActionsExplicitCacheControlID string
Origin Cache Control is enabled by default for Free, Pro, and Business domains and disabled by default for Enterprise domains.
const (
PageRuleUpdateParamsActionsExplicitCacheControlIDExplicitCacheControl PageRuleUpdateParamsActionsExplicitCacheControlID = "explicit_cache_control"
)
func (PageRuleUpdateParamsActionsExplicitCacheControlID) IsKnown ¶
func (r PageRuleUpdateParamsActionsExplicitCacheControlID) IsKnown() bool
type PageRuleUpdateParamsActionsExplicitCacheControlValue ¶
type PageRuleUpdateParamsActionsExplicitCacheControlValue string
The status of Origin Cache Control.
const ( PageRuleUpdateParamsActionsExplicitCacheControlValueOn PageRuleUpdateParamsActionsExplicitCacheControlValue = "on" PageRuleUpdateParamsActionsExplicitCacheControlValueOff PageRuleUpdateParamsActionsExplicitCacheControlValue = "off" )
func (PageRuleUpdateParamsActionsExplicitCacheControlValue) IsKnown ¶
func (r PageRuleUpdateParamsActionsExplicitCacheControlValue) IsKnown() bool
type PageRuleUpdateParamsActionsForwardingURL ¶
type PageRuleUpdateParamsActionsForwardingURL struct {
// Redirects one URL to another using an `HTTP 301/302` redirect. Refer to
// [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
ID param.Field[PageRuleUpdateParamsActionsForwardingURLID] `json:"id"`
Value param.Field[PageRuleUpdateParamsActionsForwardingURLValue] `json:"value"`
}
func (PageRuleUpdateParamsActionsForwardingURL) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsForwardingURL) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsForwardingURL) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsForwardingURL) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsForwardingURLID ¶
type PageRuleUpdateParamsActionsForwardingURLID string
Redirects one URL to another using an `HTTP 301/302` redirect. Refer to [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
const (
PageRuleUpdateParamsActionsForwardingURLIDForwardingURL PageRuleUpdateParamsActionsForwardingURLID = "forwarding_url"
)
func (PageRuleUpdateParamsActionsForwardingURLID) IsKnown ¶
func (r PageRuleUpdateParamsActionsForwardingURLID) IsKnown() bool
type PageRuleUpdateParamsActionsForwardingURLValue ¶
type PageRuleUpdateParamsActionsForwardingURLValue struct {
// The status code to use for the URL redirect. 301 is a permanent redirect. 302 is
// a temporary redirect.
StatusCode param.Field[PageRuleUpdateParamsActionsForwardingURLValueStatusCode] `json:"status_code"`
// The URL to redirect the request to. Notes: ${num} refers to the position of '\*'
// in the constraint value.
URL param.Field[string] `json:"url"`
}
func (PageRuleUpdateParamsActionsForwardingURLValue) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsForwardingURLValue) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsForwardingURLValueStatusCode ¶
type PageRuleUpdateParamsActionsForwardingURLValueStatusCode int64
The status code to use for the URL redirect. 301 is a permanent redirect. 302 is a temporary redirect.
const ( PageRuleUpdateParamsActionsForwardingURLValueStatusCode301 PageRuleUpdateParamsActionsForwardingURLValueStatusCode = 301 PageRuleUpdateParamsActionsForwardingURLValueStatusCode302 PageRuleUpdateParamsActionsForwardingURLValueStatusCode = 302 )
func (PageRuleUpdateParamsActionsForwardingURLValueStatusCode) IsKnown ¶
func (r PageRuleUpdateParamsActionsForwardingURLValueStatusCode) IsKnown() bool
type PageRuleUpdateParamsActionsHostHeaderOverride ¶
type PageRuleUpdateParamsActionsHostHeaderOverride struct {
// Apply a specific host header.
ID param.Field[PageRuleUpdateParamsActionsHostHeaderOverrideID] `json:"id"`
// The hostname to use in the `Host` header
Value param.Field[string] `json:"value"`
}
func (PageRuleUpdateParamsActionsHostHeaderOverride) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsHostHeaderOverride) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsHostHeaderOverride) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsHostHeaderOverride) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsHostHeaderOverrideID ¶
type PageRuleUpdateParamsActionsHostHeaderOverrideID string
Apply a specific host header.
const (
PageRuleUpdateParamsActionsHostHeaderOverrideIDHostHeaderOverride PageRuleUpdateParamsActionsHostHeaderOverrideID = "host_header_override"
)
func (PageRuleUpdateParamsActionsHostHeaderOverrideID) IsKnown ¶
func (r PageRuleUpdateParamsActionsHostHeaderOverrideID) IsKnown() bool
type PageRuleUpdateParamsActionsID ¶
type PageRuleUpdateParamsActionsID string
If enabled, any ` http://“ URL is converted to `https://` through a 301 redirect.
const ( PageRuleUpdateParamsActionsIDAlwaysUseHTTPS PageRuleUpdateParamsActionsID = "always_use_https" PageRuleUpdateParamsActionsIDAutomaticHTTPSRewrites PageRuleUpdateParamsActionsID = "automatic_https_rewrites" PageRuleUpdateParamsActionsIDBrowserCacheTTL PageRuleUpdateParamsActionsID = "browser_cache_ttl" PageRuleUpdateParamsActionsIDBrowserCheck PageRuleUpdateParamsActionsID = "browser_check" PageRuleUpdateParamsActionsIDBypassCacheOnCookie PageRuleUpdateParamsActionsID = "bypass_cache_on_cookie" PageRuleUpdateParamsActionsIDCacheByDeviceType PageRuleUpdateParamsActionsID = "cache_by_device_type" PageRuleUpdateParamsActionsIDCacheDeceptionArmor PageRuleUpdateParamsActionsID = "cache_deception_armor" PageRuleUpdateParamsActionsIDCacheKeyFields PageRuleUpdateParamsActionsID = "cache_key_fields" PageRuleUpdateParamsActionsIDCacheLevel PageRuleUpdateParamsActionsID = "cache_level" PageRuleUpdateParamsActionsIDCacheOnCookie PageRuleUpdateParamsActionsID = "cache_on_cookie" PageRuleUpdateParamsActionsIDCacheTTLByStatus PageRuleUpdateParamsActionsID = "cache_ttl_by_status" PageRuleUpdateParamsActionsIDDisableApps PageRuleUpdateParamsActionsID = "disable_apps" PageRuleUpdateParamsActionsIDDisablePerformance PageRuleUpdateParamsActionsID = "disable_performance" PageRuleUpdateParamsActionsIDDisableSecurity PageRuleUpdateParamsActionsID = "disable_security" PageRuleUpdateParamsActionsIDDisableZaraz PageRuleUpdateParamsActionsID = "disable_zaraz" PageRuleUpdateParamsActionsIDEdgeCacheTTL PageRuleUpdateParamsActionsID = "edge_cache_ttl" PageRuleUpdateParamsActionsIDEmailObfuscation PageRuleUpdateParamsActionsID = "email_obfuscation" PageRuleUpdateParamsActionsIDExplicitCacheControl PageRuleUpdateParamsActionsID = "explicit_cache_control" PageRuleUpdateParamsActionsIDForwardingURL PageRuleUpdateParamsActionsID = "forwarding_url" PageRuleUpdateParamsActionsIDHostHeaderOverride PageRuleUpdateParamsActionsID = "host_header_override" PageRuleUpdateParamsActionsIDIPGeolocation PageRuleUpdateParamsActionsID = "ip_geolocation" PageRuleUpdateParamsActionsIDMirage PageRuleUpdateParamsActionsID = "mirage" PageRuleUpdateParamsActionsIDOpportunisticEncryption PageRuleUpdateParamsActionsID = "opportunistic_encryption" PageRuleUpdateParamsActionsIDOriginErrorPagePassThru PageRuleUpdateParamsActionsID = "origin_error_page_pass_thru" PageRuleUpdateParamsActionsIDPolish PageRuleUpdateParamsActionsID = "polish" PageRuleUpdateParamsActionsIDResolveOverride PageRuleUpdateParamsActionsID = "resolve_override" PageRuleUpdateParamsActionsIDRespectStrongEtag PageRuleUpdateParamsActionsID = "respect_strong_etag" PageRuleUpdateParamsActionsIDResponseBuffering PageRuleUpdateParamsActionsID = "response_buffering" PageRuleUpdateParamsActionsIDRocketLoader PageRuleUpdateParamsActionsID = "rocket_loader" PageRuleUpdateParamsActionsIDSecurityLevel PageRuleUpdateParamsActionsID = "security_level" PageRuleUpdateParamsActionsIDSortQueryStringForCache PageRuleUpdateParamsActionsID = "sort_query_string_for_cache" PageRuleUpdateParamsActionsIDSSL PageRuleUpdateParamsActionsID = "ssl" PageRuleUpdateParamsActionsIDTrueClientIPHeader PageRuleUpdateParamsActionsID = "true_client_ip_header" PageRuleUpdateParamsActionsIDWAF PageRuleUpdateParamsActionsID = "waf" )
func (PageRuleUpdateParamsActionsID) IsKnown ¶
func (r PageRuleUpdateParamsActionsID) IsKnown() bool
type PageRuleUpdateParamsActionsResolveOverride ¶
type PageRuleUpdateParamsActionsResolveOverride struct {
// Change the origin address to the value specified in this setting.
ID param.Field[PageRuleUpdateParamsActionsResolveOverrideID] `json:"id"`
// The origin address you want to override with.
Value param.Field[string] `json:"value"`
}
func (PageRuleUpdateParamsActionsResolveOverride) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsResolveOverride) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsResolveOverride) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsResolveOverride) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsResolveOverrideID ¶
type PageRuleUpdateParamsActionsResolveOverrideID string
Change the origin address to the value specified in this setting.
const (
PageRuleUpdateParamsActionsResolveOverrideIDResolveOverride PageRuleUpdateParamsActionsResolveOverrideID = "resolve_override"
)
func (PageRuleUpdateParamsActionsResolveOverrideID) IsKnown ¶
func (r PageRuleUpdateParamsActionsResolveOverrideID) IsKnown() bool
type PageRuleUpdateParamsActionsRespectStrongEtag ¶
type PageRuleUpdateParamsActionsRespectStrongEtag struct {
// Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and
// the origin server.
ID param.Field[PageRuleUpdateParamsActionsRespectStrongEtagID] `json:"id"`
// The status of Respect Strong ETags
Value param.Field[PageRuleUpdateParamsActionsRespectStrongEtagValue] `json:"value"`
}
func (PageRuleUpdateParamsActionsRespectStrongEtag) ImplementsPageRuleUpdateParamsActionUnion ¶ added in v4.1.0
func (r PageRuleUpdateParamsActionsRespectStrongEtag) ImplementsPageRuleUpdateParamsActionUnion()
func (PageRuleUpdateParamsActionsRespectStrongEtag) MarshalJSON ¶
func (r PageRuleUpdateParamsActionsRespectStrongEtag) MarshalJSON() (data []byte, err error)
type PageRuleUpdateParamsActionsRespectStrongEtagID ¶
type PageRuleUpdateParamsActionsRespectStrongEtagID string
Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and the origin server.
const (
PageRuleUpdateParamsActionsRespectStrongEtagIDRespectStrongEtag PageRuleUpdateParamsActionsRespectStrongEtagID = "respect_strong_etag"
)
func (PageRuleUpdateParamsActionsRespectStrongEtagID) IsKnown ¶
func (r PageRuleUpdateParamsActionsRespectStrongEtagID) IsKnown() bool
type PageRuleUpdateParamsActionsRespectStrongEtagValue ¶
type PageRuleUpdateParamsActionsRespectStrongEtagValue string
The status of Respect Strong ETags
const ( PageRuleUpdateParamsActionsRespectStrongEtagValueOn PageRuleUpdateParamsActionsRespectStrongEtagValue = "on" PageRuleUpdateParamsActionsRespectStrongEtagValueOff PageRuleUpdateParamsActionsRespectStrongEtagValue = "off" )
func (PageRuleUpdateParamsActionsRespectStrongEtagValue) IsKnown ¶
func (r PageRuleUpdateParamsActionsRespectStrongEtagValue) IsKnown() bool
type PageRuleUpdateParamsStatus ¶
type PageRuleUpdateParamsStatus string
The status of the Page Rule.
const ( PageRuleUpdateParamsStatusActive PageRuleUpdateParamsStatus = "active" PageRuleUpdateParamsStatusDisabled PageRuleUpdateParamsStatus = "disabled" )
func (PageRuleUpdateParamsStatus) IsKnown ¶
func (r PageRuleUpdateParamsStatus) IsKnown() bool
type PageRuleUpdateResponseEnvelope ¶
type PageRuleUpdateResponseEnvelope struct {
Errors []PageRuleUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []PageRuleUpdateResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success PageRuleUpdateResponseEnvelopeSuccess `json:"success,required"`
Result PageRule `json:"result"`
JSON pageRuleUpdateResponseEnvelopeJSON `json:"-"`
}
func (*PageRuleUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *PageRuleUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PageRuleUpdateResponseEnvelopeErrors ¶ added in v4.3.0
type PageRuleUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON pageRuleUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*PageRuleUpdateResponseEnvelopeErrors) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PageRuleUpdateResponseEnvelopeErrorsSource ¶ added in v4.3.0
type PageRuleUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON pageRuleUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*PageRuleUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type PageRuleUpdateResponseEnvelopeMessages ¶ added in v4.3.0
type PageRuleUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source PageRuleUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON pageRuleUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*PageRuleUpdateResponseEnvelopeMessages) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PageRuleUpdateResponseEnvelopeMessagesSource ¶ added in v4.3.0
type PageRuleUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON pageRuleUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*PageRuleUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v4.3.0
func (r *PageRuleUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type PageRuleUpdateResponseEnvelopeSuccess ¶
type PageRuleUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
PageRuleUpdateResponseEnvelopeSuccessTrue PageRuleUpdateResponseEnvelopeSuccess = true
)
func (PageRuleUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r PageRuleUpdateResponseEnvelopeSuccess) IsKnown() bool
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 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 ResponseInfoSource ¶ added in v4.3.0
type ResponseInfoSource = shared.ResponseInfoSource
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 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 Target ¶
type Target struct {
// String constraint.
Constraint TargetConstraint `json:"constraint"`
// A target based on the URL of the request.
Target TargetTarget `json:"target"`
JSON targetJSON `json:"-"`
}
URL target.
func (*Target) UnmarshalJSON ¶
type TargetConstraint ¶
type TargetConstraint struct {
// The matches operator can use asterisks and pipes as wildcard and 'or' operators.
Operator TargetConstraintOperator `json:"operator,required"`
// The URL pattern to match against the current request. The pattern may contain up
// to four asterisks ('\*') as placeholders.
Value string `json:"value,required"`
JSON targetConstraintJSON `json:"-"`
}
String constraint.
func (*TargetConstraint) UnmarshalJSON ¶
func (r *TargetConstraint) UnmarshalJSON(data []byte) (err error)
type TargetConstraintOperator ¶
type TargetConstraintOperator string
The matches operator can use asterisks and pipes as wildcard and 'or' operators.
const ( TargetConstraintOperatorMatches TargetConstraintOperator = "matches" TargetConstraintOperatorContains TargetConstraintOperator = "contains" TargetConstraintOperatorEquals TargetConstraintOperator = "equals" TargetConstraintOperatorNotEqual TargetConstraintOperator = "not_equal" TargetConstraintOperatorNotContain TargetConstraintOperator = "not_contain" )
func (TargetConstraintOperator) IsKnown ¶
func (r TargetConstraintOperator) IsKnown() bool
type TargetConstraintParam ¶
type TargetConstraintParam struct {
// The matches operator can use asterisks and pipes as wildcard and 'or' operators.
Operator param.Field[TargetConstraintOperator] `json:"operator,required"`
// The URL pattern to match against the current request. The pattern may contain up
// to four asterisks ('\*') as placeholders.
Value param.Field[string] `json:"value,required"`
}
String constraint.
func (TargetConstraintParam) MarshalJSON ¶
func (r TargetConstraintParam) MarshalJSON() (data []byte, err error)
type TargetParam ¶
type TargetParam struct {
// String constraint.
Constraint param.Field[TargetConstraintParam] `json:"constraint"`
// A target based on the URL of the request.
Target param.Field[TargetTarget] `json:"target"`
}
URL target.
func (TargetParam) MarshalJSON ¶
func (r TargetParam) MarshalJSON() (data []byte, err error)
type TargetTarget ¶
type TargetTarget string
A target based on the URL of the request.
const (
TargetTargetURL TargetTarget = "url"
)
func (TargetTarget) IsKnown ¶
func (r TargetTarget) IsKnown() bool
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 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.