Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNConfiguration
- type ASNConfigurationParam
- type ASNConfigurationTarget
- type ASNParam
- type AccessRuleCIDRConfiguration
- type AccessRuleCIDRConfigurationParam
- type AccessRuleCIDRConfigurationTarget
- type AccessRuleDeleteParams
- type AccessRuleDeleteResponse
- type AccessRuleDeleteResponseEnvelope
- type AccessRuleDeleteResponseEnvelopeSuccess
- type AccessRuleEditParams
- type AccessRuleEditParamsConfiguration
- type AccessRuleEditParamsConfigurationTarget
- type AccessRuleEditParamsConfigurationUnion
- type AccessRuleEditParamsMode
- type AccessRuleEditResponse
- type AccessRuleEditResponseAllowedMode
- type AccessRuleEditResponseConfiguration
- type AccessRuleEditResponseConfigurationTarget
- type AccessRuleEditResponseConfigurationUnion
- type AccessRuleEditResponseEnvelope
- type AccessRuleEditResponseEnvelopeSuccess
- type AccessRuleEditResponseMode
- type AccessRuleEditResponseScope
- type AccessRuleEditResponseScopeType
- type AccessRuleGetParams
- type AccessRuleGetResponse
- type AccessRuleGetResponseAllowedMode
- type AccessRuleGetResponseConfiguration
- type AccessRuleGetResponseConfigurationTarget
- type AccessRuleGetResponseConfigurationUnion
- type AccessRuleGetResponseEnvelope
- type AccessRuleGetResponseEnvelopeSuccess
- type AccessRuleGetResponseMode
- type AccessRuleGetResponseScope
- type AccessRuleGetResponseScopeType
- type AccessRuleIPConfiguration
- type AccessRuleIPConfigurationParam
- type AccessRuleIPConfigurationTarget
- type AccessRuleListParams
- type AccessRuleListParamsConfiguration
- type AccessRuleListParamsConfigurationTarget
- type AccessRuleListParamsDirection
- type AccessRuleListParamsMatch
- type AccessRuleListParamsMode
- type AccessRuleListParamsOrder
- type AccessRuleListResponse
- type AccessRuleListResponseAllowedMode
- type AccessRuleListResponseConfiguration
- type AccessRuleListResponseConfigurationTarget
- type AccessRuleListResponseConfigurationUnion
- type AccessRuleListResponseMode
- type AccessRuleListResponseScope
- type AccessRuleListResponseScopeType
- type AccessRuleNewParams
- type AccessRuleNewParamsConfiguration
- type AccessRuleNewParamsConfigurationTarget
- type AccessRuleNewParamsConfigurationUnion
- type AccessRuleNewParamsMode
- type AccessRuleNewResponse
- type AccessRuleNewResponseAllowedMode
- type AccessRuleNewResponseConfiguration
- type AccessRuleNewResponseConfigurationTarget
- type AccessRuleNewResponseConfigurationUnion
- type AccessRuleNewResponseEnvelope
- type AccessRuleNewResponseEnvelopeSuccess
- type AccessRuleNewResponseMode
- type AccessRuleNewResponseScope
- type AccessRuleNewResponseScopeType
- type AccessRuleService
- func (r *AccessRuleService) Delete(ctx context.Context, ruleID string, body AccessRuleDeleteParams, ...) (res *AccessRuleDeleteResponse, err error)
- func (r *AccessRuleService) Edit(ctx context.Context, ruleID string, params AccessRuleEditParams, ...) (res *AccessRuleEditResponse, err error)
- func (r *AccessRuleService) Get(ctx context.Context, ruleID string, query AccessRuleGetParams, ...) (res *AccessRuleGetResponse, err error)
- func (r *AccessRuleService) List(ctx context.Context, params AccessRuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AccessRuleListResponse], err error)
- func (r *AccessRuleService) ListAutoPaging(ctx context.Context, params AccessRuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AccessRuleListResponse]
- func (r *AccessRuleService) New(ctx context.Context, params AccessRuleNewParams, opts ...option.RequestOption) (res *AccessRuleNewResponse, err error)
- type AllowedModesAnomaly
- 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 Configuration
- type ConfigurationItem
- type ConfigurationItemParam
- type ConfigurationItemTarget
- type ConfigurationItemUnion
- type ConfigurationItemUnionParam
- type ConfigurationParam
- type CountryConfiguration
- type CountryConfigurationParam
- type CountryConfigurationTarget
- type DeletedFilter
- type Error
- type ErrorData
- type ErrorDataSource
- type FirewallRule
- type FirewallRuleFilter
- type FirewallRuleFilterUnion
- type FirewallService
- type Group
- type GroupAllowedMode
- type GroupMode
- type IPV6Configuration
- type IPV6ConfigurationParam
- type IPV6ConfigurationTarget
- type Lockdown
- type LockdownCIDRConfiguration
- type LockdownCIDRConfigurationParam
- type LockdownCIDRConfigurationTarget
- type LockdownDeleteParams
- type LockdownDeleteResponse
- type LockdownDeleteResponseEnvelope
- type LockdownGetParams
- type LockdownGetResponseEnvelope
- type LockdownGetResponseEnvelopeSuccess
- type LockdownIPConfiguration
- type LockdownIPConfigurationParam
- type LockdownIPConfigurationTarget
- type LockdownListParams
- type LockdownNewParams
- type LockdownNewResponseEnvelope
- type LockdownNewResponseEnvelopeSuccess
- type LockdownService
- func (r *LockdownService) Delete(ctx context.Context, lockDownsID string, body LockdownDeleteParams, ...) (res *LockdownDeleteResponse, err error)
- func (r *LockdownService) Get(ctx context.Context, lockDownsID string, query LockdownGetParams, ...) (res *Lockdown, err error)
- func (r *LockdownService) List(ctx context.Context, params LockdownListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Lockdown], err error)
- func (r *LockdownService) ListAutoPaging(ctx context.Context, params LockdownListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Lockdown]
- func (r *LockdownService) New(ctx context.Context, params LockdownNewParams, opts ...option.RequestOption) (res *Lockdown, err error)
- func (r *LockdownService) Update(ctx context.Context, lockDownsID string, params LockdownUpdateParams, ...) (res *Lockdown, err error)
- type LockdownURL
- type LockdownUpdateParams
- type LockdownUpdateResponseEnvelope
- type LockdownUpdateResponseEnvelopeSuccess
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Override
- type OverrideURL
- type OverrideURLParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type Product
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type RewriteAction
- type RewriteActionBlock
- type RewriteActionChallenge
- type RewriteActionDefault
- type RewriteActionDisable
- type RewriteActionParam
- type RewriteActionSimulate
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type RuleBulkDeleteParams
- type RuleBulkEditParams
- type RuleBulkUpdateParams
- type RuleDeleteParams
- type RuleDeleteResponseEnvelope
- type RuleDeleteResponseEnvelopeSuccess
- type RuleEditParams
- type RuleGetParams
- type RuleGetResponseEnvelope
- type RuleGetResponseEnvelopeSuccess
- type RuleListParams
- type RuleNewParams
- type RuleNewParamsAction
- type RuleNewParamsActionMode
- type RuleNewParamsActionResponse
- type RuleServicedeprecated
- func (r *RuleService) BulkDelete(ctx context.Context, body RuleBulkDeleteParams, opts ...option.RequestOption) (res *pagination.SinglePage[FirewallRule], err error)deprecated
- func (r *RuleService) BulkDeleteAutoPaging(ctx context.Context, body RuleBulkDeleteParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FirewallRule]deprecated
- func (r *RuleService) BulkEdit(ctx context.Context, params RuleBulkEditParams, opts ...option.RequestOption) (res *pagination.SinglePage[FirewallRule], err error)deprecated
- func (r *RuleService) BulkEditAutoPaging(ctx context.Context, params RuleBulkEditParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FirewallRule]deprecated
- func (r *RuleService) BulkUpdate(ctx context.Context, params RuleBulkUpdateParams, opts ...option.RequestOption) (res *pagination.SinglePage[FirewallRule], err error)deprecated
- func (r *RuleService) BulkUpdateAutoPaging(ctx context.Context, params RuleBulkUpdateParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FirewallRule]deprecated
- func (r *RuleService) Delete(ctx context.Context, ruleID string, body RuleDeleteParams, ...) (res *FirewallRule, err error)deprecated
- func (r *RuleService) Edit(ctx context.Context, ruleID string, body RuleEditParams, ...) (res *pagination.SinglePage[FirewallRule], err error)deprecated
- func (r *RuleService) EditAutoPaging(ctx context.Context, ruleID string, body RuleEditParams, ...) *pagination.SinglePageAutoPager[FirewallRule]deprecated
- func (r *RuleService) Get(ctx context.Context, ruleID string, query RuleGetParams, ...) (res *FirewallRule, err error)deprecated
- func (r *RuleService) List(ctx context.Context, params RuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[FirewallRule], err error)deprecated
- func (r *RuleService) ListAutoPaging(ctx context.Context, params RuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[FirewallRule]deprecated
- func (r *RuleService) New(ctx context.Context, params RuleNewParams, opts ...option.RequestOption) (res *pagination.SinglePage[FirewallRule], err error)deprecated
- func (r *RuleService) NewAutoPaging(ctx context.Context, params RuleNewParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FirewallRule]deprecated
- func (r *RuleService) Update(ctx context.Context, ruleID string, params RuleUpdateParams, ...) (res *FirewallRule, err error)deprecated
- type RuleUpdateParams
- type RuleUpdateParamsAction
- type RuleUpdateParamsActionMode
- type RuleUpdateParamsActionResponse
- type RuleUpdateResponseEnvelope
- type RuleUpdateResponseEnvelopeSuccess
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenStatus
- type TokenValue
- type UARuleDeleteParams
- type UARuleDeleteResponse
- type UARuleDeleteResponseEnvelope
- type UARuleDeleteResponseEnvelopeSuccess
- type UARuleGetParams
- type UARuleGetResponseEnvelope
- type UARuleGetResponseEnvelopeSuccess
- type UARuleListParams
- type UARuleListResponse
- type UARuleListResponseConfiguration
- type UARuleListResponseMode
- type UARuleNewParams
- type UARuleNewParamsConfiguration
- type UARuleNewParamsConfigurationTarget
- type UARuleNewParamsConfigurationUnion
- type UARuleNewParamsMode
- type UARuleNewResponseEnvelope
- type UARuleNewResponseEnvelopeSuccess
- type UARuleService
- func (r *UARuleService) Delete(ctx context.Context, uaRuleID string, body UARuleDeleteParams, ...) (res *UARuleDeleteResponse, err error)
- func (r *UARuleService) Get(ctx context.Context, uaRuleID string, query UARuleGetParams, ...) (res *interface{}, err error)
- func (r *UARuleService) List(ctx context.Context, params UARuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[UARuleListResponse], err error)
- func (r *UARuleService) ListAutoPaging(ctx context.Context, params UARuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[UARuleListResponse]
- func (r *UARuleService) New(ctx context.Context, params UARuleNewParams, opts ...option.RequestOption) (res *interface{}, err error)
- func (r *UARuleService) Update(ctx context.Context, uaRuleID string, params UARuleUpdateParams, ...) (res *interface{}, err error)
- type UARuleUpdateParams
- type UARuleUpdateParamsConfiguration
- type UARuleUpdateParamsConfigurationTarget
- type UARuleUpdateParamsConfigurationUnion
- type UARuleUpdateParamsMode
- type UARuleUpdateResponseEnvelope
- type UARuleUpdateResponseEnvelopeSuccess
- type WAFOverrideDeleteParams
- type WAFOverrideDeleteResponse
- type WAFOverrideDeleteResponseEnvelope
- type WAFOverrideGetParams
- type WAFOverrideGetResponseEnvelope
- type WAFOverrideGetResponseEnvelopeSuccess
- type WAFOverrideListParams
- type WAFOverrideNewParams
- type WAFOverrideNewResponseEnvelope
- type WAFOverrideNewResponseEnvelopeSuccess
- type WAFOverrideService
- func (r *WAFOverrideService) Delete(ctx context.Context, overridesID string, body WAFOverrideDeleteParams, ...) (res *WAFOverrideDeleteResponse, err error)
- func (r *WAFOverrideService) Get(ctx context.Context, overridesID string, query WAFOverrideGetParams, ...) (res *Override, err error)
- func (r *WAFOverrideService) List(ctx context.Context, params WAFOverrideListParams, ...) (res *pagination.V4PagePaginationArray[Override], err error)
- func (r *WAFOverrideService) ListAutoPaging(ctx context.Context, params WAFOverrideListParams, ...) *pagination.V4PagePaginationArrayAutoPager[Override]
- func (r *WAFOverrideService) New(ctx context.Context, params WAFOverrideNewParams, opts ...option.RequestOption) (res *Override, err error)
- func (r *WAFOverrideService) Update(ctx context.Context, overridesID string, params WAFOverrideUpdateParams, ...) (res *Override, err error)
- type WAFOverrideUpdateParams
- type WAFOverrideUpdateResponseEnvelope
- type WAFOverrideUpdateResponseEnvelopeSuccess
- type WAFPackageGetParams
- type WAFPackageGetResponse
- type WAFPackageGetResponseFirewallAPIResponseSingle
- type WAFPackageGetResponseFirewallAPIResponseSingleSuccess
- type WAFPackageGetResponseResult
- type WAFPackageGetResponseSuccess
- type WAFPackageGetResponseUnion
- type WAFPackageGroupEditParams
- type WAFPackageGroupEditParamsMode
- type WAFPackageGroupEditResponseEnvelope
- type WAFPackageGroupEditResponseEnvelopeSuccess
- type WAFPackageGroupGetParams
- type WAFPackageGroupGetResponseEnvelope
- type WAFPackageGroupGetResponseEnvelopeSuccess
- type WAFPackageGroupListParams
- type WAFPackageGroupListParamsDirection
- type WAFPackageGroupListParamsMatch
- type WAFPackageGroupListParamsMode
- type WAFPackageGroupListParamsOrder
- type WAFPackageGroupService
- func (r *WAFPackageGroupService) Edit(ctx context.Context, packageID string, groupID string, ...) (res *interface{}, err error)
- func (r *WAFPackageGroupService) Get(ctx context.Context, packageID string, groupID string, ...) (res *interface{}, err error)
- func (r *WAFPackageGroupService) List(ctx context.Context, packageID string, params WAFPackageGroupListParams, ...) (res *pagination.V4PagePaginationArray[Group], err error)
- func (r *WAFPackageGroupService) ListAutoPaging(ctx context.Context, packageID string, params WAFPackageGroupListParams, ...) *pagination.V4PagePaginationArrayAutoPager[Group]
- type WAFPackageListParams
- type WAFPackageListParamsDirection
- type WAFPackageListParamsMatch
- type WAFPackageListParamsOrder
- type WAFPackageListResponse
- type WAFPackageRuleEditParams
- type WAFPackageRuleEditParamsMode
- type WAFPackageRuleEditResponse
- type WAFPackageRuleEditResponseDefaultMode
- type WAFPackageRuleEditResponseEnvelope
- type WAFPackageRuleEditResponseEnvelopeSuccess
- type WAFPackageRuleEditResponseUnion
- type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRule
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRule
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode
- type WAFPackageRuleGetParams
- type WAFPackageRuleGetResponseEnvelope
- type WAFPackageRuleGetResponseEnvelopeSuccess
- type WAFPackageRuleListParams
- type WAFPackageRuleListParamsDirection
- type WAFPackageRuleListParamsMatch
- type WAFPackageRuleListParamsMode
- type WAFPackageRuleListParamsOrder
- type WAFPackageRuleListResponse
- type WAFPackageRuleListResponseDefaultMode
- type WAFPackageRuleListResponseUnion
- type WAFPackageRuleListResponseWAFManagedRulesAnomalyRule
- type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRule
- type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode
- type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleMode
- type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRule
- type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode
- type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode
- type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode
- type WAFPackageRuleService
- func (r *WAFPackageRuleService) Edit(ctx context.Context, packageID string, ruleID string, ...) (res *WAFPackageRuleEditResponse, err error)
- func (r *WAFPackageRuleService) Get(ctx context.Context, packageID string, ruleID string, ...) (res *interface{}, err error)
- func (r *WAFPackageRuleService) List(ctx context.Context, packageID string, params WAFPackageRuleListParams, ...) (res *pagination.V4PagePaginationArray[WAFPackageRuleListResponse], err error)
- func (r *WAFPackageRuleService) ListAutoPaging(ctx context.Context, packageID string, params WAFPackageRuleListParams, ...) *pagination.V4PagePaginationArrayAutoPager[WAFPackageRuleListResponse]
- type WAFPackageService
- func (r *WAFPackageService) Get(ctx context.Context, packageID string, query WAFPackageGetParams, ...) (res *WAFPackageGetResponse, err error)
- func (r *WAFPackageService) List(ctx context.Context, params WAFPackageListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[WAFPackageListResponse], err error)
- func (r *WAFPackageService) ListAutoPaging(ctx context.Context, params WAFPackageListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[WAFPackageListResponse]
- type WAFRule
- type WAFRuleGroup
- type WAFRuleItem
- type WAFRuleParam
- type WAFServicedeprecated
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 ASNConfiguration ¶
type ASNConfiguration struct {
// The configuration target. You must set the target to `asn` when specifying an
// Autonomous System Number (ASN) in the rule.
Target ASNConfigurationTarget `json:"target"`
// The AS number to match.
Value string `json:"value"`
JSON asnConfigurationJSON `json:"-"`
}
func (*ASNConfiguration) UnmarshalJSON ¶
func (r *ASNConfiguration) UnmarshalJSON(data []byte) (err error)
type ASNConfigurationParam ¶
type ASNConfigurationParam struct {
// The configuration target. You must set the target to `asn` when specifying an
// Autonomous System Number (ASN) in the rule.
Target param.Field[ASNConfigurationTarget] `json:"target"`
// The AS number to match.
Value param.Field[string] `json:"value"`
}
func (ASNConfigurationParam) MarshalJSON ¶
func (r ASNConfigurationParam) MarshalJSON() (data []byte, err error)
type ASNConfigurationTarget ¶
type ASNConfigurationTarget string
The configuration target. You must set the target to `asn` when specifying an Autonomous System Number (ASN) in the rule.
const (
ASNConfigurationTargetASN ASNConfigurationTarget = "asn"
)
func (ASNConfigurationTarget) IsKnown ¶
func (r ASNConfigurationTarget) IsKnown() bool
type AccessRuleCIDRConfiguration ¶
type AccessRuleCIDRConfiguration struct {
// The configuration target. You must set the target to `ip_range` when specifying
// an IP address range in the rule.
Target AccessRuleCIDRConfigurationTarget `json:"target"`
// The IP address range to match. You can only use prefix lengths `/16` and `/24`
// for IPv4 ranges, and prefix lengths `/32`, `/48`, and `/64` for IPv6 ranges.
Value string `json:"value"`
JSON accessRuleCIDRConfigurationJSON `json:"-"`
}
func (*AccessRuleCIDRConfiguration) UnmarshalJSON ¶
func (r *AccessRuleCIDRConfiguration) UnmarshalJSON(data []byte) (err error)
type AccessRuleCIDRConfigurationParam ¶
type AccessRuleCIDRConfigurationParam struct {
// The configuration target. You must set the target to `ip_range` when specifying
// an IP address range in the rule.
Target param.Field[AccessRuleCIDRConfigurationTarget] `json:"target"`
// The IP address range to match. You can only use prefix lengths `/16` and `/24`
// for IPv4 ranges, and prefix lengths `/32`, `/48`, and `/64` for IPv6 ranges.
Value param.Field[string] `json:"value"`
}
func (AccessRuleCIDRConfigurationParam) MarshalJSON ¶
func (r AccessRuleCIDRConfigurationParam) MarshalJSON() (data []byte, err error)
type AccessRuleCIDRConfigurationTarget ¶
type AccessRuleCIDRConfigurationTarget string
The configuration target. You must set the target to `ip_range` when specifying an IP address range in the rule.
const (
AccessRuleCIDRConfigurationTargetIPRange AccessRuleCIDRConfigurationTarget = "ip_range"
)
func (AccessRuleCIDRConfigurationTarget) IsKnown ¶
func (r AccessRuleCIDRConfigurationTarget) IsKnown() bool
type AccessRuleDeleteParams ¶
type AccessRuleDeleteResponse ¶
type AccessRuleDeleteResponse struct {
// Identifier
ID string `json:"id,required"`
JSON accessRuleDeleteResponseJSON `json:"-"`
}
func (*AccessRuleDeleteResponse) UnmarshalJSON ¶
func (r *AccessRuleDeleteResponse) UnmarshalJSON(data []byte) (err error)
type AccessRuleDeleteResponseEnvelope ¶
type AccessRuleDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result AccessRuleDeleteResponse `json:"result,required,nullable"`
// Whether the API call was successful
Success AccessRuleDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON accessRuleDeleteResponseEnvelopeJSON `json:"-"`
}
func (*AccessRuleDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *AccessRuleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AccessRuleDeleteResponseEnvelopeSuccess ¶
type AccessRuleDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AccessRuleDeleteResponseEnvelopeSuccessTrue AccessRuleDeleteResponseEnvelopeSuccess = true
)
func (AccessRuleDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r AccessRuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type AccessRuleEditParams ¶
type AccessRuleEditParams struct {
// The rule configuration.
Configuration param.Field[AccessRuleEditParamsConfigurationUnion] `json:"configuration,required"`
// The action to apply to a matched request.
Mode param.Field[AccessRuleEditParamsMode] `json:"mode,required"`
// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
AccountID param.Field[string] `path:"account_id"`
// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
ZoneID param.Field[string] `path:"zone_id"`
// An informative summary of the rule, typically used as a reminder or explanation.
Notes param.Field[string] `json:"notes"`
}
func (AccessRuleEditParams) MarshalJSON ¶
func (r AccessRuleEditParams) MarshalJSON() (data []byte, err error)
type AccessRuleEditParamsConfiguration ¶
type AccessRuleEditParamsConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target param.Field[AccessRuleEditParamsConfigurationTarget] `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value param.Field[string] `json:"value"`
}
The rule configuration.
func (AccessRuleEditParamsConfiguration) MarshalJSON ¶
func (r AccessRuleEditParamsConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleEditParamsConfigurationTarget ¶
type AccessRuleEditParamsConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const ( AccessRuleEditParamsConfigurationTargetIP AccessRuleEditParamsConfigurationTarget = "ip" AccessRuleEditParamsConfigurationTargetIp6 AccessRuleEditParamsConfigurationTarget = "ip6" AccessRuleEditParamsConfigurationTargetIPRange AccessRuleEditParamsConfigurationTarget = "ip_range" AccessRuleEditParamsConfigurationTargetASN AccessRuleEditParamsConfigurationTarget = "asn" AccessRuleEditParamsConfigurationTargetCountry AccessRuleEditParamsConfigurationTarget = "country" )
func (AccessRuleEditParamsConfigurationTarget) IsKnown ¶
func (r AccessRuleEditParamsConfigurationTarget) IsKnown() bool
type AccessRuleEditParamsConfigurationUnion ¶
type AccessRuleEditParamsConfigurationUnion interface {
// contains filtered or unexported methods
}
The rule configuration.
Satisfied by firewall.AccessRuleIPConfigurationParam, firewall.IPV6ConfigurationParam, firewall.AccessRuleCIDRConfigurationParam, firewall.ASNConfigurationParam, firewall.CountryConfigurationParam, AccessRuleEditParamsConfiguration.
type AccessRuleEditParamsMode ¶
type AccessRuleEditParamsMode string
The action to apply to a matched request.
const ( AccessRuleEditParamsModeBlock AccessRuleEditParamsMode = "block" AccessRuleEditParamsModeChallenge AccessRuleEditParamsMode = "challenge" AccessRuleEditParamsModeWhitelist AccessRuleEditParamsMode = "whitelist" AccessRuleEditParamsModeJSChallenge AccessRuleEditParamsMode = "js_challenge" AccessRuleEditParamsModeManagedChallenge AccessRuleEditParamsMode = "managed_challenge" )
func (AccessRuleEditParamsMode) IsKnown ¶
func (r AccessRuleEditParamsMode) IsKnown() bool
type AccessRuleEditResponse ¶
type AccessRuleEditResponse struct {
// The unique identifier of the IP Access rule.
ID string `json:"id,required"`
// The available actions that a rule can apply to a matched request.
AllowedModes []AccessRuleEditResponseAllowedMode `json:"allowed_modes,required"`
// The rule configuration.
Configuration AccessRuleEditResponseConfiguration `json:"configuration,required"`
// The action to apply to a matched request.
Mode AccessRuleEditResponseMode `json:"mode,required"`
// The timestamp of when the rule was created.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// The timestamp of when the rule was last modified.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// An informative summary of the rule, typically used as a reminder or explanation.
Notes string `json:"notes"`
// All zones owned by the user will have the rule applied.
Scope AccessRuleEditResponseScope `json:"scope"`
JSON accessRuleEditResponseJSON `json:"-"`
}
func (*AccessRuleEditResponse) UnmarshalJSON ¶
func (r *AccessRuleEditResponse) UnmarshalJSON(data []byte) (err error)
type AccessRuleEditResponseAllowedMode ¶
type AccessRuleEditResponseAllowedMode string
The action to apply to a matched request.
const ( AccessRuleEditResponseAllowedModeBlock AccessRuleEditResponseAllowedMode = "block" AccessRuleEditResponseAllowedModeChallenge AccessRuleEditResponseAllowedMode = "challenge" AccessRuleEditResponseAllowedModeWhitelist AccessRuleEditResponseAllowedMode = "whitelist" AccessRuleEditResponseAllowedModeJSChallenge AccessRuleEditResponseAllowedMode = "js_challenge" AccessRuleEditResponseAllowedModeManagedChallenge AccessRuleEditResponseAllowedMode = "managed_challenge" )
func (AccessRuleEditResponseAllowedMode) IsKnown ¶
func (r AccessRuleEditResponseAllowedMode) IsKnown() bool
type AccessRuleEditResponseConfiguration ¶
type AccessRuleEditResponseConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target AccessRuleEditResponseConfigurationTarget `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value string `json:"value"`
JSON accessRuleEditResponseConfigurationJSON `json:"-"`
// contains filtered or unexported fields
}
The rule configuration.
func (AccessRuleEditResponseConfiguration) AsUnion ¶
func (r AccessRuleEditResponseConfiguration) AsUnion() AccessRuleEditResponseConfigurationUnion
AsUnion returns a AccessRuleEditResponseConfigurationUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are firewall.AccessRuleIPConfiguration, firewall.IPV6Configuration, firewall.AccessRuleCIDRConfiguration, firewall.ASNConfiguration, firewall.CountryConfiguration.
func (*AccessRuleEditResponseConfiguration) UnmarshalJSON ¶
func (r *AccessRuleEditResponseConfiguration) UnmarshalJSON(data []byte) (err error)
type AccessRuleEditResponseConfigurationTarget ¶
type AccessRuleEditResponseConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const ( AccessRuleEditResponseConfigurationTargetIP AccessRuleEditResponseConfigurationTarget = "ip" AccessRuleEditResponseConfigurationTargetIp6 AccessRuleEditResponseConfigurationTarget = "ip6" AccessRuleEditResponseConfigurationTargetIPRange AccessRuleEditResponseConfigurationTarget = "ip_range" AccessRuleEditResponseConfigurationTargetASN AccessRuleEditResponseConfigurationTarget = "asn" AccessRuleEditResponseConfigurationTargetCountry AccessRuleEditResponseConfigurationTarget = "country" )
func (AccessRuleEditResponseConfigurationTarget) IsKnown ¶
func (r AccessRuleEditResponseConfigurationTarget) IsKnown() bool
type AccessRuleEditResponseConfigurationUnion ¶
type AccessRuleEditResponseConfigurationUnion interface {
// contains filtered or unexported methods
}
The rule configuration.
Union satisfied by firewall.AccessRuleIPConfiguration, firewall.IPV6Configuration, firewall.AccessRuleCIDRConfiguration, firewall.ASNConfiguration or firewall.CountryConfiguration.
type AccessRuleEditResponseEnvelope ¶
type AccessRuleEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result AccessRuleEditResponse `json:"result,required"`
// Whether the API call was successful
Success AccessRuleEditResponseEnvelopeSuccess `json:"success,required"`
JSON accessRuleEditResponseEnvelopeJSON `json:"-"`
}
func (*AccessRuleEditResponseEnvelope) UnmarshalJSON ¶
func (r *AccessRuleEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AccessRuleEditResponseEnvelopeSuccess ¶
type AccessRuleEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AccessRuleEditResponseEnvelopeSuccessTrue AccessRuleEditResponseEnvelopeSuccess = true
)
func (AccessRuleEditResponseEnvelopeSuccess) IsKnown ¶
func (r AccessRuleEditResponseEnvelopeSuccess) IsKnown() bool
type AccessRuleEditResponseMode ¶
type AccessRuleEditResponseMode string
The action to apply to a matched request.
const ( AccessRuleEditResponseModeBlock AccessRuleEditResponseMode = "block" AccessRuleEditResponseModeChallenge AccessRuleEditResponseMode = "challenge" AccessRuleEditResponseModeWhitelist AccessRuleEditResponseMode = "whitelist" AccessRuleEditResponseModeJSChallenge AccessRuleEditResponseMode = "js_challenge" AccessRuleEditResponseModeManagedChallenge AccessRuleEditResponseMode = "managed_challenge" )
func (AccessRuleEditResponseMode) IsKnown ¶
func (r AccessRuleEditResponseMode) IsKnown() bool
type AccessRuleEditResponseScope ¶
type AccessRuleEditResponseScope struct {
// Identifier
ID string `json:"id"`
// The contact email address of the user.
Email string `json:"email"`
// The scope of the rule.
Type AccessRuleEditResponseScopeType `json:"type"`
JSON accessRuleEditResponseScopeJSON `json:"-"`
}
All zones owned by the user will have the rule applied.
func (*AccessRuleEditResponseScope) UnmarshalJSON ¶
func (r *AccessRuleEditResponseScope) UnmarshalJSON(data []byte) (err error)
type AccessRuleEditResponseScopeType ¶
type AccessRuleEditResponseScopeType string
The scope of the rule.
const ( AccessRuleEditResponseScopeTypeUser AccessRuleEditResponseScopeType = "user" AccessRuleEditResponseScopeTypeOrganization AccessRuleEditResponseScopeType = "organization" )
func (AccessRuleEditResponseScopeType) IsKnown ¶
func (r AccessRuleEditResponseScopeType) IsKnown() bool
type AccessRuleGetParams ¶
type AccessRuleGetResponse ¶
type AccessRuleGetResponse struct {
// The unique identifier of the IP Access rule.
ID string `json:"id,required"`
// The available actions that a rule can apply to a matched request.
AllowedModes []AccessRuleGetResponseAllowedMode `json:"allowed_modes,required"`
// The rule configuration.
Configuration AccessRuleGetResponseConfiguration `json:"configuration,required"`
// The action to apply to a matched request.
Mode AccessRuleGetResponseMode `json:"mode,required"`
// The timestamp of when the rule was created.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// The timestamp of when the rule was last modified.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// An informative summary of the rule, typically used as a reminder or explanation.
Notes string `json:"notes"`
// All zones owned by the user will have the rule applied.
Scope AccessRuleGetResponseScope `json:"scope"`
JSON accessRuleGetResponseJSON `json:"-"`
}
func (*AccessRuleGetResponse) UnmarshalJSON ¶
func (r *AccessRuleGetResponse) UnmarshalJSON(data []byte) (err error)
type AccessRuleGetResponseAllowedMode ¶
type AccessRuleGetResponseAllowedMode string
The action to apply to a matched request.
const ( AccessRuleGetResponseAllowedModeBlock AccessRuleGetResponseAllowedMode = "block" AccessRuleGetResponseAllowedModeChallenge AccessRuleGetResponseAllowedMode = "challenge" AccessRuleGetResponseAllowedModeWhitelist AccessRuleGetResponseAllowedMode = "whitelist" AccessRuleGetResponseAllowedModeJSChallenge AccessRuleGetResponseAllowedMode = "js_challenge" AccessRuleGetResponseAllowedModeManagedChallenge AccessRuleGetResponseAllowedMode = "managed_challenge" )
func (AccessRuleGetResponseAllowedMode) IsKnown ¶
func (r AccessRuleGetResponseAllowedMode) IsKnown() bool
type AccessRuleGetResponseConfiguration ¶
type AccessRuleGetResponseConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target AccessRuleGetResponseConfigurationTarget `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value string `json:"value"`
JSON accessRuleGetResponseConfigurationJSON `json:"-"`
// contains filtered or unexported fields
}
The rule configuration.
func (AccessRuleGetResponseConfiguration) AsUnion ¶
func (r AccessRuleGetResponseConfiguration) AsUnion() AccessRuleGetResponseConfigurationUnion
AsUnion returns a AccessRuleGetResponseConfigurationUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are firewall.AccessRuleIPConfiguration, firewall.IPV6Configuration, firewall.AccessRuleCIDRConfiguration, firewall.ASNConfiguration, firewall.CountryConfiguration.
func (*AccessRuleGetResponseConfiguration) UnmarshalJSON ¶
func (r *AccessRuleGetResponseConfiguration) UnmarshalJSON(data []byte) (err error)
type AccessRuleGetResponseConfigurationTarget ¶
type AccessRuleGetResponseConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const ( AccessRuleGetResponseConfigurationTargetIP AccessRuleGetResponseConfigurationTarget = "ip" AccessRuleGetResponseConfigurationTargetIp6 AccessRuleGetResponseConfigurationTarget = "ip6" AccessRuleGetResponseConfigurationTargetIPRange AccessRuleGetResponseConfigurationTarget = "ip_range" AccessRuleGetResponseConfigurationTargetASN AccessRuleGetResponseConfigurationTarget = "asn" AccessRuleGetResponseConfigurationTargetCountry AccessRuleGetResponseConfigurationTarget = "country" )
func (AccessRuleGetResponseConfigurationTarget) IsKnown ¶
func (r AccessRuleGetResponseConfigurationTarget) IsKnown() bool
type AccessRuleGetResponseConfigurationUnion ¶
type AccessRuleGetResponseConfigurationUnion interface {
// contains filtered or unexported methods
}
The rule configuration.
Union satisfied by firewall.AccessRuleIPConfiguration, firewall.IPV6Configuration, firewall.AccessRuleCIDRConfiguration, firewall.ASNConfiguration or firewall.CountryConfiguration.
type AccessRuleGetResponseEnvelope ¶
type AccessRuleGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result AccessRuleGetResponse `json:"result,required"`
// Whether the API call was successful
Success AccessRuleGetResponseEnvelopeSuccess `json:"success,required"`
JSON accessRuleGetResponseEnvelopeJSON `json:"-"`
}
func (*AccessRuleGetResponseEnvelope) UnmarshalJSON ¶
func (r *AccessRuleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AccessRuleGetResponseEnvelopeSuccess ¶
type AccessRuleGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AccessRuleGetResponseEnvelopeSuccessTrue AccessRuleGetResponseEnvelopeSuccess = true
)
func (AccessRuleGetResponseEnvelopeSuccess) IsKnown ¶
func (r AccessRuleGetResponseEnvelopeSuccess) IsKnown() bool
type AccessRuleGetResponseMode ¶
type AccessRuleGetResponseMode string
The action to apply to a matched request.
const ( AccessRuleGetResponseModeBlock AccessRuleGetResponseMode = "block" AccessRuleGetResponseModeChallenge AccessRuleGetResponseMode = "challenge" AccessRuleGetResponseModeWhitelist AccessRuleGetResponseMode = "whitelist" AccessRuleGetResponseModeJSChallenge AccessRuleGetResponseMode = "js_challenge" AccessRuleGetResponseModeManagedChallenge AccessRuleGetResponseMode = "managed_challenge" )
func (AccessRuleGetResponseMode) IsKnown ¶
func (r AccessRuleGetResponseMode) IsKnown() bool
type AccessRuleGetResponseScope ¶
type AccessRuleGetResponseScope struct {
// Identifier
ID string `json:"id"`
// The contact email address of the user.
Email string `json:"email"`
// The scope of the rule.
Type AccessRuleGetResponseScopeType `json:"type"`
JSON accessRuleGetResponseScopeJSON `json:"-"`
}
All zones owned by the user will have the rule applied.
func (*AccessRuleGetResponseScope) UnmarshalJSON ¶
func (r *AccessRuleGetResponseScope) UnmarshalJSON(data []byte) (err error)
type AccessRuleGetResponseScopeType ¶
type AccessRuleGetResponseScopeType string
The scope of the rule.
const ( AccessRuleGetResponseScopeTypeUser AccessRuleGetResponseScopeType = "user" AccessRuleGetResponseScopeTypeOrganization AccessRuleGetResponseScopeType = "organization" )
func (AccessRuleGetResponseScopeType) IsKnown ¶
func (r AccessRuleGetResponseScopeType) IsKnown() bool
type AccessRuleIPConfiguration ¶
type AccessRuleIPConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target AccessRuleIPConfigurationTarget `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value string `json:"value"`
JSON accessRuleIPConfigurationJSON `json:"-"`
}
func (*AccessRuleIPConfiguration) UnmarshalJSON ¶
func (r *AccessRuleIPConfiguration) UnmarshalJSON(data []byte) (err error)
type AccessRuleIPConfigurationParam ¶
type AccessRuleIPConfigurationParam struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target param.Field[AccessRuleIPConfigurationTarget] `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value param.Field[string] `json:"value"`
}
func (AccessRuleIPConfigurationParam) MarshalJSON ¶
func (r AccessRuleIPConfigurationParam) MarshalJSON() (data []byte, err error)
type AccessRuleIPConfigurationTarget ¶
type AccessRuleIPConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const (
AccessRuleIPConfigurationTargetIP AccessRuleIPConfigurationTarget = "ip"
)
func (AccessRuleIPConfigurationTarget) IsKnown ¶
func (r AccessRuleIPConfigurationTarget) IsKnown() bool
type AccessRuleListParams ¶
type AccessRuleListParams struct {
// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
AccountID param.Field[string] `path:"account_id"`
// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
ZoneID param.Field[string] `path:"zone_id"`
Configuration param.Field[AccessRuleListParamsConfiguration] `query:"configuration"`
// The direction used to sort returned rules.
Direction param.Field[AccessRuleListParamsDirection] `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[AccessRuleListParamsMatch] `query:"match"`
// The action to apply to a matched request.
Mode param.Field[AccessRuleListParamsMode] `query:"mode"`
// The string to search for in the notes of existing IP Access rules. Notes: For
// example, the string 'attack' would match IP Access rules with notes 'Attack
// 26/02' and 'Attack 27/02'. The search is case insensitive.
Notes param.Field[string] `query:"notes"`
// The field used to sort returned rules.
Order param.Field[AccessRuleListParamsOrder] `query:"order"`
// Requested page within paginated list of results.
Page param.Field[float64] `query:"page"`
// Maximum number of results requested.
PerPage param.Field[float64] `query:"per_page"`
}
func (AccessRuleListParams) URLQuery ¶
func (r AccessRuleListParams) URLQuery() (v url.Values)
URLQuery serializes AccessRuleListParams's query parameters as `url.Values`.
type AccessRuleListParamsConfiguration ¶
type AccessRuleListParamsConfiguration struct {
// The target to search in existing rules.
Target param.Field[AccessRuleListParamsConfigurationTarget] `query:"target"`
// The target value to search for in existing rules: an IP address, an IP address
// range, or a country code, depending on the provided `configuration.target`.
// Notes: You can search for a single IPv4 address, an IP address range with a
// subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code.
Value param.Field[string] `query:"value"`
}
func (AccessRuleListParamsConfiguration) URLQuery ¶
func (r AccessRuleListParamsConfiguration) URLQuery() (v url.Values)
URLQuery serializes AccessRuleListParamsConfiguration's query parameters as `url.Values`.
type AccessRuleListParamsConfigurationTarget ¶
type AccessRuleListParamsConfigurationTarget string
The target to search in existing rules.
const ( AccessRuleListParamsConfigurationTargetIP AccessRuleListParamsConfigurationTarget = "ip" AccessRuleListParamsConfigurationTargetIPRange AccessRuleListParamsConfigurationTarget = "ip_range" AccessRuleListParamsConfigurationTargetASN AccessRuleListParamsConfigurationTarget = "asn" AccessRuleListParamsConfigurationTargetCountry AccessRuleListParamsConfigurationTarget = "country" )
func (AccessRuleListParamsConfigurationTarget) IsKnown ¶
func (r AccessRuleListParamsConfigurationTarget) IsKnown() bool
type AccessRuleListParamsDirection ¶
type AccessRuleListParamsDirection string
The direction used to sort returned rules.
const ( AccessRuleListParamsDirectionAsc AccessRuleListParamsDirection = "asc" AccessRuleListParamsDirectionDesc AccessRuleListParamsDirection = "desc" )
func (AccessRuleListParamsDirection) IsKnown ¶
func (r AccessRuleListParamsDirection) IsKnown() bool
type AccessRuleListParamsMatch ¶
type AccessRuleListParamsMatch 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 ( AccessRuleListParamsMatchAny AccessRuleListParamsMatch = "any" AccessRuleListParamsMatchAll AccessRuleListParamsMatch = "all" )
func (AccessRuleListParamsMatch) IsKnown ¶
func (r AccessRuleListParamsMatch) IsKnown() bool
type AccessRuleListParamsMode ¶
type AccessRuleListParamsMode string
The action to apply to a matched request.
const ( AccessRuleListParamsModeBlock AccessRuleListParamsMode = "block" AccessRuleListParamsModeChallenge AccessRuleListParamsMode = "challenge" AccessRuleListParamsModeWhitelist AccessRuleListParamsMode = "whitelist" AccessRuleListParamsModeJSChallenge AccessRuleListParamsMode = "js_challenge" AccessRuleListParamsModeManagedChallenge AccessRuleListParamsMode = "managed_challenge" )
func (AccessRuleListParamsMode) IsKnown ¶
func (r AccessRuleListParamsMode) IsKnown() bool
type AccessRuleListParamsOrder ¶
type AccessRuleListParamsOrder string
The field used to sort returned rules.
const ( AccessRuleListParamsOrderConfigurationTarget AccessRuleListParamsOrder = "configuration.target" AccessRuleListParamsOrderConfigurationValue AccessRuleListParamsOrder = "configuration.value" AccessRuleListParamsOrderMode AccessRuleListParamsOrder = "mode" )
func (AccessRuleListParamsOrder) IsKnown ¶
func (r AccessRuleListParamsOrder) IsKnown() bool
type AccessRuleListResponse ¶
type AccessRuleListResponse struct {
// The unique identifier of the IP Access rule.
ID string `json:"id,required"`
// The available actions that a rule can apply to a matched request.
AllowedModes []AccessRuleListResponseAllowedMode `json:"allowed_modes,required"`
// The rule configuration.
Configuration AccessRuleListResponseConfiguration `json:"configuration,required"`
// The action to apply to a matched request.
Mode AccessRuleListResponseMode `json:"mode,required"`
// The timestamp of when the rule was created.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// The timestamp of when the rule was last modified.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// An informative summary of the rule, typically used as a reminder or explanation.
Notes string `json:"notes"`
// All zones owned by the user will have the rule applied.
Scope AccessRuleListResponseScope `json:"scope"`
JSON accessRuleListResponseJSON `json:"-"`
}
func (*AccessRuleListResponse) UnmarshalJSON ¶
func (r *AccessRuleListResponse) UnmarshalJSON(data []byte) (err error)
type AccessRuleListResponseAllowedMode ¶
type AccessRuleListResponseAllowedMode string
The action to apply to a matched request.
const ( AccessRuleListResponseAllowedModeBlock AccessRuleListResponseAllowedMode = "block" AccessRuleListResponseAllowedModeChallenge AccessRuleListResponseAllowedMode = "challenge" AccessRuleListResponseAllowedModeWhitelist AccessRuleListResponseAllowedMode = "whitelist" AccessRuleListResponseAllowedModeJSChallenge AccessRuleListResponseAllowedMode = "js_challenge" AccessRuleListResponseAllowedModeManagedChallenge AccessRuleListResponseAllowedMode = "managed_challenge" )
func (AccessRuleListResponseAllowedMode) IsKnown ¶
func (r AccessRuleListResponseAllowedMode) IsKnown() bool
type AccessRuleListResponseConfiguration ¶
type AccessRuleListResponseConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target AccessRuleListResponseConfigurationTarget `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value string `json:"value"`
JSON accessRuleListResponseConfigurationJSON `json:"-"`
// contains filtered or unexported fields
}
The rule configuration.
func (AccessRuleListResponseConfiguration) AsUnion ¶
func (r AccessRuleListResponseConfiguration) AsUnion() AccessRuleListResponseConfigurationUnion
AsUnion returns a AccessRuleListResponseConfigurationUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are firewall.AccessRuleIPConfiguration, firewall.IPV6Configuration, firewall.AccessRuleCIDRConfiguration, firewall.ASNConfiguration, firewall.CountryConfiguration.
func (*AccessRuleListResponseConfiguration) UnmarshalJSON ¶
func (r *AccessRuleListResponseConfiguration) UnmarshalJSON(data []byte) (err error)
type AccessRuleListResponseConfigurationTarget ¶
type AccessRuleListResponseConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const ( AccessRuleListResponseConfigurationTargetIP AccessRuleListResponseConfigurationTarget = "ip" AccessRuleListResponseConfigurationTargetIp6 AccessRuleListResponseConfigurationTarget = "ip6" AccessRuleListResponseConfigurationTargetIPRange AccessRuleListResponseConfigurationTarget = "ip_range" AccessRuleListResponseConfigurationTargetASN AccessRuleListResponseConfigurationTarget = "asn" AccessRuleListResponseConfigurationTargetCountry AccessRuleListResponseConfigurationTarget = "country" )
func (AccessRuleListResponseConfigurationTarget) IsKnown ¶
func (r AccessRuleListResponseConfigurationTarget) IsKnown() bool
type AccessRuleListResponseConfigurationUnion ¶
type AccessRuleListResponseConfigurationUnion interface {
// contains filtered or unexported methods
}
The rule configuration.
Union satisfied by firewall.AccessRuleIPConfiguration, firewall.IPV6Configuration, firewall.AccessRuleCIDRConfiguration, firewall.ASNConfiguration or firewall.CountryConfiguration.
type AccessRuleListResponseMode ¶
type AccessRuleListResponseMode string
The action to apply to a matched request.
const ( AccessRuleListResponseModeBlock AccessRuleListResponseMode = "block" AccessRuleListResponseModeChallenge AccessRuleListResponseMode = "challenge" AccessRuleListResponseModeWhitelist AccessRuleListResponseMode = "whitelist" AccessRuleListResponseModeJSChallenge AccessRuleListResponseMode = "js_challenge" AccessRuleListResponseModeManagedChallenge AccessRuleListResponseMode = "managed_challenge" )
func (AccessRuleListResponseMode) IsKnown ¶
func (r AccessRuleListResponseMode) IsKnown() bool
type AccessRuleListResponseScope ¶
type AccessRuleListResponseScope struct {
// Identifier
ID string `json:"id"`
// The contact email address of the user.
Email string `json:"email"`
// The scope of the rule.
Type AccessRuleListResponseScopeType `json:"type"`
JSON accessRuleListResponseScopeJSON `json:"-"`
}
All zones owned by the user will have the rule applied.
func (*AccessRuleListResponseScope) UnmarshalJSON ¶
func (r *AccessRuleListResponseScope) UnmarshalJSON(data []byte) (err error)
type AccessRuleListResponseScopeType ¶
type AccessRuleListResponseScopeType string
The scope of the rule.
const ( AccessRuleListResponseScopeTypeUser AccessRuleListResponseScopeType = "user" AccessRuleListResponseScopeTypeOrganization AccessRuleListResponseScopeType = "organization" )
func (AccessRuleListResponseScopeType) IsKnown ¶
func (r AccessRuleListResponseScopeType) IsKnown() bool
type AccessRuleNewParams ¶
type AccessRuleNewParams struct {
// The rule configuration.
Configuration param.Field[AccessRuleNewParamsConfigurationUnion] `json:"configuration,required"`
// The action to apply to a matched request.
Mode param.Field[AccessRuleNewParamsMode] `json:"mode,required"`
// The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
AccountID param.Field[string] `path:"account_id"`
// The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
ZoneID param.Field[string] `path:"zone_id"`
// An informative summary of the rule, typically used as a reminder or explanation.
Notes param.Field[string] `json:"notes"`
}
func (AccessRuleNewParams) MarshalJSON ¶
func (r AccessRuleNewParams) MarshalJSON() (data []byte, err error)
type AccessRuleNewParamsConfiguration ¶
type AccessRuleNewParamsConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target param.Field[AccessRuleNewParamsConfigurationTarget] `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value param.Field[string] `json:"value"`
}
The rule configuration.
func (AccessRuleNewParamsConfiguration) MarshalJSON ¶
func (r AccessRuleNewParamsConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleNewParamsConfigurationTarget ¶
type AccessRuleNewParamsConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const ( AccessRuleNewParamsConfigurationTargetIP AccessRuleNewParamsConfigurationTarget = "ip" AccessRuleNewParamsConfigurationTargetIp6 AccessRuleNewParamsConfigurationTarget = "ip6" AccessRuleNewParamsConfigurationTargetIPRange AccessRuleNewParamsConfigurationTarget = "ip_range" AccessRuleNewParamsConfigurationTargetASN AccessRuleNewParamsConfigurationTarget = "asn" AccessRuleNewParamsConfigurationTargetCountry AccessRuleNewParamsConfigurationTarget = "country" )
func (AccessRuleNewParamsConfigurationTarget) IsKnown ¶
func (r AccessRuleNewParamsConfigurationTarget) IsKnown() bool
type AccessRuleNewParamsConfigurationUnion ¶
type AccessRuleNewParamsConfigurationUnion interface {
// contains filtered or unexported methods
}
The rule configuration.
Satisfied by firewall.AccessRuleIPConfigurationParam, firewall.IPV6ConfigurationParam, firewall.AccessRuleCIDRConfigurationParam, firewall.ASNConfigurationParam, firewall.CountryConfigurationParam, AccessRuleNewParamsConfiguration.
type AccessRuleNewParamsMode ¶
type AccessRuleNewParamsMode string
The action to apply to a matched request.
const ( AccessRuleNewParamsModeBlock AccessRuleNewParamsMode = "block" AccessRuleNewParamsModeChallenge AccessRuleNewParamsMode = "challenge" AccessRuleNewParamsModeWhitelist AccessRuleNewParamsMode = "whitelist" AccessRuleNewParamsModeJSChallenge AccessRuleNewParamsMode = "js_challenge" AccessRuleNewParamsModeManagedChallenge AccessRuleNewParamsMode = "managed_challenge" )
func (AccessRuleNewParamsMode) IsKnown ¶
func (r AccessRuleNewParamsMode) IsKnown() bool
type AccessRuleNewResponse ¶
type AccessRuleNewResponse struct {
// The unique identifier of the IP Access rule.
ID string `json:"id,required"`
// The available actions that a rule can apply to a matched request.
AllowedModes []AccessRuleNewResponseAllowedMode `json:"allowed_modes,required"`
// The rule configuration.
Configuration AccessRuleNewResponseConfiguration `json:"configuration,required"`
// The action to apply to a matched request.
Mode AccessRuleNewResponseMode `json:"mode,required"`
// The timestamp of when the rule was created.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// The timestamp of when the rule was last modified.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// An informative summary of the rule, typically used as a reminder or explanation.
Notes string `json:"notes"`
// All zones owned by the user will have the rule applied.
Scope AccessRuleNewResponseScope `json:"scope"`
JSON accessRuleNewResponseJSON `json:"-"`
}
func (*AccessRuleNewResponse) UnmarshalJSON ¶
func (r *AccessRuleNewResponse) UnmarshalJSON(data []byte) (err error)
type AccessRuleNewResponseAllowedMode ¶
type AccessRuleNewResponseAllowedMode string
The action to apply to a matched request.
const ( AccessRuleNewResponseAllowedModeBlock AccessRuleNewResponseAllowedMode = "block" AccessRuleNewResponseAllowedModeChallenge AccessRuleNewResponseAllowedMode = "challenge" AccessRuleNewResponseAllowedModeWhitelist AccessRuleNewResponseAllowedMode = "whitelist" AccessRuleNewResponseAllowedModeJSChallenge AccessRuleNewResponseAllowedMode = "js_challenge" AccessRuleNewResponseAllowedModeManagedChallenge AccessRuleNewResponseAllowedMode = "managed_challenge" )
func (AccessRuleNewResponseAllowedMode) IsKnown ¶
func (r AccessRuleNewResponseAllowedMode) IsKnown() bool
type AccessRuleNewResponseConfiguration ¶
type AccessRuleNewResponseConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target AccessRuleNewResponseConfigurationTarget `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value string `json:"value"`
JSON accessRuleNewResponseConfigurationJSON `json:"-"`
// contains filtered or unexported fields
}
The rule configuration.
func (AccessRuleNewResponseConfiguration) AsUnion ¶
func (r AccessRuleNewResponseConfiguration) AsUnion() AccessRuleNewResponseConfigurationUnion
AsUnion returns a AccessRuleNewResponseConfigurationUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are firewall.AccessRuleIPConfiguration, firewall.IPV6Configuration, firewall.AccessRuleCIDRConfiguration, firewall.ASNConfiguration, firewall.CountryConfiguration.
func (*AccessRuleNewResponseConfiguration) UnmarshalJSON ¶
func (r *AccessRuleNewResponseConfiguration) UnmarshalJSON(data []byte) (err error)
type AccessRuleNewResponseConfigurationTarget ¶
type AccessRuleNewResponseConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const ( AccessRuleNewResponseConfigurationTargetIP AccessRuleNewResponseConfigurationTarget = "ip" AccessRuleNewResponseConfigurationTargetIp6 AccessRuleNewResponseConfigurationTarget = "ip6" AccessRuleNewResponseConfigurationTargetIPRange AccessRuleNewResponseConfigurationTarget = "ip_range" AccessRuleNewResponseConfigurationTargetASN AccessRuleNewResponseConfigurationTarget = "asn" AccessRuleNewResponseConfigurationTargetCountry AccessRuleNewResponseConfigurationTarget = "country" )
func (AccessRuleNewResponseConfigurationTarget) IsKnown ¶
func (r AccessRuleNewResponseConfigurationTarget) IsKnown() bool
type AccessRuleNewResponseConfigurationUnion ¶
type AccessRuleNewResponseConfigurationUnion interface {
// contains filtered or unexported methods
}
The rule configuration.
Union satisfied by firewall.AccessRuleIPConfiguration, firewall.IPV6Configuration, firewall.AccessRuleCIDRConfiguration, firewall.ASNConfiguration or firewall.CountryConfiguration.
type AccessRuleNewResponseEnvelope ¶
type AccessRuleNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result AccessRuleNewResponse `json:"result,required"`
// Whether the API call was successful
Success AccessRuleNewResponseEnvelopeSuccess `json:"success,required"`
JSON accessRuleNewResponseEnvelopeJSON `json:"-"`
}
func (*AccessRuleNewResponseEnvelope) UnmarshalJSON ¶
func (r *AccessRuleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AccessRuleNewResponseEnvelopeSuccess ¶
type AccessRuleNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AccessRuleNewResponseEnvelopeSuccessTrue AccessRuleNewResponseEnvelopeSuccess = true
)
func (AccessRuleNewResponseEnvelopeSuccess) IsKnown ¶
func (r AccessRuleNewResponseEnvelopeSuccess) IsKnown() bool
type AccessRuleNewResponseMode ¶
type AccessRuleNewResponseMode string
The action to apply to a matched request.
const ( AccessRuleNewResponseModeBlock AccessRuleNewResponseMode = "block" AccessRuleNewResponseModeChallenge AccessRuleNewResponseMode = "challenge" AccessRuleNewResponseModeWhitelist AccessRuleNewResponseMode = "whitelist" AccessRuleNewResponseModeJSChallenge AccessRuleNewResponseMode = "js_challenge" AccessRuleNewResponseModeManagedChallenge AccessRuleNewResponseMode = "managed_challenge" )
func (AccessRuleNewResponseMode) IsKnown ¶
func (r AccessRuleNewResponseMode) IsKnown() bool
type AccessRuleNewResponseScope ¶
type AccessRuleNewResponseScope struct {
// Identifier
ID string `json:"id"`
// The contact email address of the user.
Email string `json:"email"`
// The scope of the rule.
Type AccessRuleNewResponseScopeType `json:"type"`
JSON accessRuleNewResponseScopeJSON `json:"-"`
}
All zones owned by the user will have the rule applied.
func (*AccessRuleNewResponseScope) UnmarshalJSON ¶
func (r *AccessRuleNewResponseScope) UnmarshalJSON(data []byte) (err error)
type AccessRuleNewResponseScopeType ¶
type AccessRuleNewResponseScopeType string
The scope of the rule.
const ( AccessRuleNewResponseScopeTypeUser AccessRuleNewResponseScopeType = "user" AccessRuleNewResponseScopeTypeOrganization AccessRuleNewResponseScopeType = "organization" )
func (AccessRuleNewResponseScopeType) IsKnown ¶
func (r AccessRuleNewResponseScopeType) IsKnown() bool
type AccessRuleService ¶
type AccessRuleService struct {
Options []option.RequestOption
}
AccessRuleService 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 NewAccessRuleService method instead.
func NewAccessRuleService ¶
func NewAccessRuleService(opts ...option.RequestOption) (r *AccessRuleService)
NewAccessRuleService 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 (*AccessRuleService) Delete ¶
func (r *AccessRuleService) Delete(ctx context.Context, ruleID string, body AccessRuleDeleteParams, opts ...option.RequestOption) (res *AccessRuleDeleteResponse, err error)
Deletes an existing IP Access rule defined.
Note: This operation will affect all zones in the account or zone.
func (*AccessRuleService) Edit ¶
func (r *AccessRuleService) Edit(ctx context.Context, ruleID string, params AccessRuleEditParams, opts ...option.RequestOption) (res *AccessRuleEditResponse, err error)
Updates an IP Access rule defined.
Note: This operation will affect all zones in the account or zone.
func (*AccessRuleService) Get ¶
func (r *AccessRuleService) Get(ctx context.Context, ruleID string, query AccessRuleGetParams, opts ...option.RequestOption) (res *AccessRuleGetResponse, err error)
Fetches the details of an IP Access rule defined.
func (*AccessRuleService) List ¶
func (r *AccessRuleService) List(ctx context.Context, params AccessRuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AccessRuleListResponse], err error)
Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.
func (*AccessRuleService) ListAutoPaging ¶
func (r *AccessRuleService) ListAutoPaging(ctx context.Context, params AccessRuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AccessRuleListResponse]
Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.
func (*AccessRuleService) New ¶
func (r *AccessRuleService) New(ctx context.Context, params AccessRuleNewParams, opts ...option.RequestOption) (res *AccessRuleNewResponse, err error)
Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone.
Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.
type AllowedModesAnomaly ¶
type AllowedModesAnomaly string
When set to `on`, the current WAF rule will be used when evaluating the request. Applies to anomaly detection WAF rules.
const ( AllowedModesAnomalyOn AllowedModesAnomaly = "on" AllowedModesAnomalyOff AllowedModesAnomaly = "off" )
func (AllowedModesAnomaly) IsKnown ¶
func (r AllowedModesAnomaly) IsKnown() bool
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 Configuration ¶
type Configuration []ConfigurationItem
type ConfigurationItem ¶
type ConfigurationItem struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the Zone Lockdown rule.
Target ConfigurationItemTarget `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value string `json:"value"`
JSON configurationItemJSON `json:"-"`
// contains filtered or unexported fields
}
func (ConfigurationItem) AsUnion ¶
func (r ConfigurationItem) AsUnion() ConfigurationItemUnion
AsUnion returns a ConfigurationItemUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are firewall.LockdownIPConfiguration, firewall.LockdownCIDRConfiguration.
func (*ConfigurationItem) UnmarshalJSON ¶
func (r *ConfigurationItem) UnmarshalJSON(data []byte) (err error)
type ConfigurationItemParam ¶
type ConfigurationItemParam struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the Zone Lockdown rule.
Target param.Field[ConfigurationItemTarget] `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value param.Field[string] `json:"value"`
}
func (ConfigurationItemParam) MarshalJSON ¶
func (r ConfigurationItemParam) MarshalJSON() (data []byte, err error)
type ConfigurationItemTarget ¶
type ConfigurationItemTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the Zone Lockdown rule.
const ( ConfigurationItemTargetIP ConfigurationItemTarget = "ip" ConfigurationItemTargetIPRange ConfigurationItemTarget = "ip_range" )
func (ConfigurationItemTarget) IsKnown ¶
func (r ConfigurationItemTarget) IsKnown() bool
type ConfigurationItemUnion ¶
type ConfigurationItemUnion interface {
// contains filtered or unexported methods
}
Union satisfied by firewall.LockdownIPConfiguration or firewall.LockdownCIDRConfiguration.
type ConfigurationItemUnionParam ¶
type ConfigurationItemUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by firewall.LockdownIPConfigurationParam, firewall.LockdownCIDRConfigurationParam, ConfigurationItemParam.
type ConfigurationParam ¶
type ConfigurationParam []ConfigurationItemUnionParam
type CountryConfiguration ¶
type CountryConfiguration struct {
// The configuration target. You must set the target to `country` when specifying a
// country code in the rule.
Target CountryConfigurationTarget `json:"target"`
// The two-letter ISO-3166-1 alpha-2 code to match. For more information, refer to
// [IP Access rules: Parameters](https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/#country).
Value string `json:"value"`
JSON countryConfigurationJSON `json:"-"`
}
func (*CountryConfiguration) UnmarshalJSON ¶
func (r *CountryConfiguration) UnmarshalJSON(data []byte) (err error)
type CountryConfigurationParam ¶
type CountryConfigurationParam struct {
// The configuration target. You must set the target to `country` when specifying a
// country code in the rule.
Target param.Field[CountryConfigurationTarget] `json:"target"`
// The two-letter ISO-3166-1 alpha-2 code to match. For more information, refer to
// [IP Access rules: Parameters](https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/#country).
Value param.Field[string] `json:"value"`
}
func (CountryConfigurationParam) MarshalJSON ¶
func (r CountryConfigurationParam) MarshalJSON() (data []byte, err error)
type CountryConfigurationTarget ¶
type CountryConfigurationTarget string
The configuration target. You must set the target to `country` when specifying a country code in the rule.
const (
CountryConfigurationTargetCountry CountryConfigurationTarget = "country"
)
func (CountryConfigurationTarget) IsKnown ¶
func (r CountryConfigurationTarget) IsKnown() bool
type DeletedFilter ¶
type DeletedFilter struct {
// The unique identifier of the filter.
ID string `json:"id,required"`
// When true, indicates that the firewall rule was deleted.
Deleted bool `json:"deleted,required"`
JSON deletedFilterJSON `json:"-"`
}
func (DeletedFilter) ImplementsFirewallRuleFilter ¶ added in v4.1.0
func (r DeletedFilter) ImplementsFirewallRuleFilter()
func (*DeletedFilter) UnmarshalJSON ¶
func (r *DeletedFilter) UnmarshalJSON(data []byte) (err error)
type ErrorDataSource ¶ added in v4.2.0
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type FirewallRule ¶
type FirewallRule struct {
// The unique identifier of the firewall rule.
ID string `json:"id"`
// The action to apply to a matched request. The `log` action is only available on
// an Enterprise plan.
Action rate_limits.Action `json:"action"`
// An informative summary of the firewall rule.
Description string `json:"description"`
Filter FirewallRuleFilter `json:"filter"`
// When true, indicates that the firewall rule is currently paused.
Paused bool `json:"paused"`
// The priority of the rule. Optional value used to define the processing order. A
// lower number indicates a higher priority. If not provided, rules with a defined
// priority will be processed before rules without a priority.
Priority float64 `json:"priority"`
Products []Product `json:"products"`
// A short reference tag. Allows you to select related firewall rules.
Ref string `json:"ref"`
JSON firewallRuleJSON `json:"-"`
}
func (*FirewallRule) UnmarshalJSON ¶
func (r *FirewallRule) UnmarshalJSON(data []byte) (err error)
type FirewallRuleFilter ¶
type FirewallRuleFilter struct {
// The unique identifier of the filter.
ID string `json:"id"`
// When true, indicates that the firewall rule was deleted.
Deleted bool `json:"deleted"`
// An informative summary of the filter.
Description string `json:"description"`
// The filter expression. For more information, refer to
// [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/).
Expression string `json:"expression"`
// When true, indicates that the filter is currently paused.
Paused bool `json:"paused"`
// A short reference tag. Allows you to select related filters.
Ref string `json:"ref"`
JSON firewallRuleFilterJSON `json:"-"`
// contains filtered or unexported fields
}
func (FirewallRuleFilter) AsUnion ¶
func (r FirewallRuleFilter) AsUnion() FirewallRuleFilterUnion
AsUnion returns a FirewallRuleFilterUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are filters.FirewallFilter, firewall.DeletedFilter.
func (*FirewallRuleFilter) UnmarshalJSON ¶
func (r *FirewallRuleFilter) UnmarshalJSON(data []byte) (err error)
type FirewallRuleFilterUnion ¶
type FirewallRuleFilterUnion interface {
ImplementsFirewallRuleFilter()
}
Union satisfied by filters.FirewallFilter or firewall.DeletedFilter.
type FirewallService ¶
type FirewallService struct {
Options []option.RequestOption
Lockdowns *LockdownService
// Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset
// Engine. See
// https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api
// for full details.
Rules *RuleService
AccessRules *AccessRuleService
UARules *UARuleService
// Deprecated: WAF managed rules API is deprecated in favour of using the Ruleset
// Engine. See
// https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#waf-managed-rules-apis-previous-version
// for full details.
WAF *WAFService
}
FirewallService 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 NewFirewallService method instead.
func NewFirewallService ¶
func NewFirewallService(opts ...option.RequestOption) (r *FirewallService)
NewFirewallService 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.
type Group ¶
type Group struct {
// The unique identifier of the rule group.
ID string `json:"id,required"`
// An informative summary of what the rule group does.
Description string `json:"description,required,nullable"`
// The state of the rules contained in the rule group. When `on`, the rules in the
// group are configurable/usable.
Mode GroupMode `json:"mode,required"`
// The name of the rule group.
Name string `json:"name,required"`
// The number of rules in the current rule group.
RulesCount float64 `json:"rules_count,required"`
// The available states for the rule group.
AllowedModes []GroupAllowedMode `json:"allowed_modes"`
// The number of rules within the group that have been modified from their default
// configuration.
ModifiedRulesCount float64 `json:"modified_rules_count"`
// The unique identifier of a WAF package.
PackageID string `json:"package_id"`
JSON groupJSON `json:"-"`
}
func (*Group) UnmarshalJSON ¶
type GroupAllowedMode ¶
type GroupAllowedMode string
The state of the rules contained in the rule group. When `on`, the rules in the group are configurable/usable.
const ( GroupAllowedModeOn GroupAllowedMode = "on" GroupAllowedModeOff GroupAllowedMode = "off" )
func (GroupAllowedMode) IsKnown ¶
func (r GroupAllowedMode) IsKnown() bool
type GroupMode ¶
type GroupMode string
The state of the rules contained in the rule group. When `on`, the rules in the group are configurable/usable.
type IPV6Configuration ¶
type IPV6Configuration struct {
// The configuration target. You must set the target to `ip6` when specifying an
// IPv6 address in the rule.
Target IPV6ConfigurationTarget `json:"target"`
// The IPv6 address to match.
Value string `json:"value"`
JSON ipv6ConfigurationJSON `json:"-"`
}
func (*IPV6Configuration) UnmarshalJSON ¶
func (r *IPV6Configuration) UnmarshalJSON(data []byte) (err error)
type IPV6ConfigurationParam ¶
type IPV6ConfigurationParam struct {
// The configuration target. You must set the target to `ip6` when specifying an
// IPv6 address in the rule.
Target param.Field[IPV6ConfigurationTarget] `json:"target"`
// The IPv6 address to match.
Value param.Field[string] `json:"value"`
}
func (IPV6ConfigurationParam) MarshalJSON ¶
func (r IPV6ConfigurationParam) MarshalJSON() (data []byte, err error)
type IPV6ConfigurationTarget ¶
type IPV6ConfigurationTarget string
The configuration target. You must set the target to `ip6` when specifying an IPv6 address in the rule.
const (
IPV6ConfigurationTargetIp6 IPV6ConfigurationTarget = "ip6"
)
func (IPV6ConfigurationTarget) IsKnown ¶
func (r IPV6ConfigurationTarget) IsKnown() bool
type Lockdown ¶
type Lockdown struct {
// The unique identifier of the Zone Lockdown rule.
ID string `json:"id,required"`
// A list of IP addresses or CIDR ranges that will be allowed to access the URLs
// specified in the Zone Lockdown rule. You can include any number of `ip` or
// `ip_range` configurations.
Configurations Configuration `json:"configurations,required"`
// The timestamp of when the rule was created.
CreatedOn time.Time `json:"created_on,required" format:"date-time"`
// An informative summary of the rule.
Description string `json:"description,required"`
// The timestamp of when the rule was last modified.
ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
// When true, indicates that the rule is currently paused.
Paused bool `json:"paused,required"`
// The URLs to include in the rule definition. You can use wildcards. Each entered
// URL will be escaped before use, which means you can only use simple wildcard
// patterns.
URLs []LockdownURL `json:"urls,required"`
JSON lockdownJSON `json:"-"`
}
func (*Lockdown) UnmarshalJSON ¶
type LockdownCIDRConfiguration ¶
type LockdownCIDRConfiguration struct {
// The configuration target. You must set the target to `ip_range` when specifying
// an IP address range in the Zone Lockdown rule.
Target LockdownCIDRConfigurationTarget `json:"target"`
// The IP address range to match. You can only use prefix lengths `/16` and `/24`.
Value string `json:"value"`
JSON lockdownCIDRConfigurationJSON `json:"-"`
}
func (*LockdownCIDRConfiguration) UnmarshalJSON ¶
func (r *LockdownCIDRConfiguration) UnmarshalJSON(data []byte) (err error)
type LockdownCIDRConfigurationParam ¶
type LockdownCIDRConfigurationParam struct {
// The configuration target. You must set the target to `ip_range` when specifying
// an IP address range in the Zone Lockdown rule.
Target param.Field[LockdownCIDRConfigurationTarget] `json:"target"`
// The IP address range to match. You can only use prefix lengths `/16` and `/24`.
Value param.Field[string] `json:"value"`
}
func (LockdownCIDRConfigurationParam) MarshalJSON ¶
func (r LockdownCIDRConfigurationParam) MarshalJSON() (data []byte, err error)
type LockdownCIDRConfigurationTarget ¶
type LockdownCIDRConfigurationTarget string
The configuration target. You must set the target to `ip_range` when specifying an IP address range in the Zone Lockdown rule.
const (
LockdownCIDRConfigurationTargetIPRange LockdownCIDRConfigurationTarget = "ip_range"
)
func (LockdownCIDRConfigurationTarget) IsKnown ¶
func (r LockdownCIDRConfigurationTarget) IsKnown() bool
type LockdownDeleteParams ¶
type LockdownDeleteResponse ¶
type LockdownDeleteResponse struct {
// The unique identifier of the Zone Lockdown rule.
ID string `json:"id"`
JSON lockdownDeleteResponseJSON `json:"-"`
}
func (*LockdownDeleteResponse) UnmarshalJSON ¶
func (r *LockdownDeleteResponse) UnmarshalJSON(data []byte) (err error)
type LockdownDeleteResponseEnvelope ¶
type LockdownDeleteResponseEnvelope struct {
Result LockdownDeleteResponse `json:"result"`
JSON lockdownDeleteResponseEnvelopeJSON `json:"-"`
}
func (*LockdownDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *LockdownDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LockdownGetParams ¶
type LockdownGetResponseEnvelope ¶
type LockdownGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result Lockdown `json:"result,required"`
// Whether the API call was successful
Success LockdownGetResponseEnvelopeSuccess `json:"success,required"`
JSON lockdownGetResponseEnvelopeJSON `json:"-"`
}
func (*LockdownGetResponseEnvelope) UnmarshalJSON ¶
func (r *LockdownGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LockdownGetResponseEnvelopeSuccess ¶
type LockdownGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LockdownGetResponseEnvelopeSuccessTrue LockdownGetResponseEnvelopeSuccess = true
)
func (LockdownGetResponseEnvelopeSuccess) IsKnown ¶
func (r LockdownGetResponseEnvelopeSuccess) IsKnown() bool
type LockdownIPConfiguration ¶
type LockdownIPConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the Zone Lockdown rule.
Target LockdownIPConfigurationTarget `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value string `json:"value"`
JSON lockdownIPConfigurationJSON `json:"-"`
}
func (*LockdownIPConfiguration) UnmarshalJSON ¶
func (r *LockdownIPConfiguration) UnmarshalJSON(data []byte) (err error)
type LockdownIPConfigurationParam ¶
type LockdownIPConfigurationParam struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the Zone Lockdown rule.
Target param.Field[LockdownIPConfigurationTarget] `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value param.Field[string] `json:"value"`
}
func (LockdownIPConfigurationParam) MarshalJSON ¶
func (r LockdownIPConfigurationParam) MarshalJSON() (data []byte, err error)
type LockdownIPConfigurationTarget ¶
type LockdownIPConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the Zone Lockdown rule.
const (
LockdownIPConfigurationTargetIP LockdownIPConfigurationTarget = "ip"
)
func (LockdownIPConfigurationTarget) IsKnown ¶
func (r LockdownIPConfigurationTarget) IsKnown() bool
type LockdownListParams ¶
type LockdownListParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The timestamp of when the rule was created.
CreatedOn param.Field[time.Time] `query:"created_on" format:"date-time"`
// A string to search for in the description of existing rules.
Description param.Field[string] `query:"description"`
// A string to search for in the description of existing rules.
DescriptionSearch param.Field[string] `query:"description_search"`
// A single IP address to search for in existing rules.
IP param.Field[string] `query:"ip"`
// A single IP address range to search for in existing rules.
IPRangeSearch param.Field[string] `query:"ip_range_search"`
// A single IP address to search for in existing rules.
IPSearch param.Field[string] `query:"ip_search"`
// The timestamp of when the rule was last modified.
ModifiedOn param.Field[time.Time] `query:"modified_on" format:"date-time"`
// Page number of paginated results.
Page param.Field[float64] `query:"page"`
// The maximum number of results per page. You can only set the value to `1` or to
// a multiple of 5 such as `5`, `10`, `15`, or `20`.
PerPage param.Field[float64] `query:"per_page"`
// The priority of the rule to control the processing order. A lower number
// indicates higher priority. If not provided, any rules with a configured priority
// will be processed before rules without a priority.
Priority param.Field[float64] `query:"priority"`
// A single URI to search for in the list of URLs of existing rules.
URISearch param.Field[string] `query:"uri_search"`
}
func (LockdownListParams) URLQuery ¶
func (r LockdownListParams) URLQuery() (v url.Values)
URLQuery serializes LockdownListParams's query parameters as `url.Values`.
type LockdownNewParams ¶
type LockdownNewParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// A list of IP addresses or CIDR ranges that will be allowed to access the URLs
// specified in the Zone Lockdown rule. You can include any number of `ip` or
// `ip_range` configurations.
Configurations param.Field[ConfigurationParam] `json:"configurations,required"`
// The URLs to include in the current WAF override. You can use wildcards. Each
// entered URL will be escaped before use, which means you can only use simple
// wildcard patterns.
URLs param.Field[[]OverrideURLParam] `json:"urls,required"`
}
func (LockdownNewParams) MarshalJSON ¶
func (r LockdownNewParams) MarshalJSON() (data []byte, err error)
type LockdownNewResponseEnvelope ¶
type LockdownNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result Lockdown `json:"result,required"`
// Whether the API call was successful
Success LockdownNewResponseEnvelopeSuccess `json:"success,required"`
JSON lockdownNewResponseEnvelopeJSON `json:"-"`
}
func (*LockdownNewResponseEnvelope) UnmarshalJSON ¶
func (r *LockdownNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LockdownNewResponseEnvelopeSuccess ¶
type LockdownNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LockdownNewResponseEnvelopeSuccessTrue LockdownNewResponseEnvelopeSuccess = true
)
func (LockdownNewResponseEnvelopeSuccess) IsKnown ¶
func (r LockdownNewResponseEnvelopeSuccess) IsKnown() bool
type LockdownService ¶
type LockdownService struct {
Options []option.RequestOption
}
LockdownService 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 NewLockdownService method instead.
func NewLockdownService ¶
func NewLockdownService(opts ...option.RequestOption) (r *LockdownService)
NewLockdownService 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 (*LockdownService) Delete ¶
func (r *LockdownService) Delete(ctx context.Context, lockDownsID string, body LockdownDeleteParams, opts ...option.RequestOption) (res *LockdownDeleteResponse, err error)
Deletes an existing Zone Lockdown rule.
func (*LockdownService) Get ¶
func (r *LockdownService) Get(ctx context.Context, lockDownsID string, query LockdownGetParams, opts ...option.RequestOption) (res *Lockdown, err error)
Fetches the details of a Zone Lockdown rule.
func (*LockdownService) List ¶
func (r *LockdownService) List(ctx context.Context, params LockdownListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Lockdown], err error)
Fetches Zone Lockdown rules. You can filter the results using several optional parameters.
func (*LockdownService) ListAutoPaging ¶
func (r *LockdownService) ListAutoPaging(ctx context.Context, params LockdownListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Lockdown]
Fetches Zone Lockdown rules. You can filter the results using several optional parameters.
func (*LockdownService) New ¶
func (r *LockdownService) New(ctx context.Context, params LockdownNewParams, opts ...option.RequestOption) (res *Lockdown, err error)
Creates a new Zone Lockdown rule.
func (*LockdownService) Update ¶
func (r *LockdownService) Update(ctx context.Context, lockDownsID string, params LockdownUpdateParams, opts ...option.RequestOption) (res *Lockdown, err error)
Updates an existing Zone Lockdown rule.
type LockdownURL ¶
type LockdownURL = string
type LockdownUpdateParams ¶
type LockdownUpdateParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// A list of IP addresses or CIDR ranges that will be allowed to access the URLs
// specified in the Zone Lockdown rule. You can include any number of `ip` or
// `ip_range` configurations.
Configurations param.Field[ConfigurationParam] `json:"configurations,required"`
// The URLs to include in the current WAF override. You can use wildcards. Each
// entered URL will be escaped before use, which means you can only use simple
// wildcard patterns.
URLs param.Field[[]OverrideURLParam] `json:"urls,required"`
}
func (LockdownUpdateParams) MarshalJSON ¶
func (r LockdownUpdateParams) MarshalJSON() (data []byte, err error)
type LockdownUpdateResponseEnvelope ¶
type LockdownUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result Lockdown `json:"result,required"`
// Whether the API call was successful
Success LockdownUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON lockdownUpdateResponseEnvelopeJSON `json:"-"`
}
func (*LockdownUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *LockdownUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LockdownUpdateResponseEnvelopeSuccess ¶
type LockdownUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LockdownUpdateResponseEnvelopeSuccessTrue LockdownUpdateResponseEnvelopeSuccess = true
)
func (LockdownUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r LockdownUpdateResponseEnvelopeSuccess) IsKnown() bool
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 Override ¶
type Override struct {
// The unique identifier of the WAF override.
ID string `json:"id"`
// An informative summary of the current URI-based WAF override.
Description string `json:"description,nullable"`
// An object that allows you to enable or disable WAF rule groups for the current
// WAF override. Each key of this object must be the ID of a WAF rule group, and
// each value must be a valid WAF action (usually `default` or `disable`). When
// creating a new URI-based WAF override, you must provide a `groups` object or a
// `rules` object.
Groups map[string]interface{} `json:"groups"`
// When true, indicates that the WAF package is currently paused.
Paused bool `json:"paused"`
// The relative priority of the current URI-based WAF override when multiple
// overrides match a single URL. A lower number indicates higher priority. Higher
// priority overrides may overwrite values set by lower priority overrides.
Priority float64 `json:"priority"`
// Specifies that, when a WAF rule matches, its configured action will be replaced
// by the action configured in this object.
RewriteAction RewriteAction `json:"rewrite_action"`
// An object that allows you to override the action of specific WAF rules. Each key
// of this object must be the ID of a WAF rule, and each value must be a valid WAF
// action. Unless you are disabling a rule, ensure that you also enable the rule
// group that this WAF rule belongs to. When creating a new URI-based WAF override,
// you must provide a `groups` object or a `rules` object.
Rules WAFRule `json:"rules"`
// The URLs to include in the current WAF override. You can use wildcards. Each
// entered URL will be escaped before use, which means you can only use simple
// wildcard patterns.
URLs []OverrideURL `json:"urls"`
JSON overrideJSON `json:"-"`
}
func (*Override) UnmarshalJSON ¶
type OverrideURL ¶
type OverrideURL = string
type OverrideURLParam ¶
type OverrideURLParam = string
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 Product ¶
type Product string
A list of products to bypass for a request when using the `bypass` action.
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 RewriteAction ¶
type RewriteAction struct {
// The WAF rule action to apply.
Block RewriteActionBlock `json:"block"`
// The WAF rule action to apply.
Challenge RewriteActionChallenge `json:"challenge"`
// The WAF rule action to apply.
Default RewriteActionDefault `json:"default"`
// The WAF rule action to apply.
Disable RewriteActionDisable `json:"disable"`
// The WAF rule action to apply.
Simulate RewriteActionSimulate `json:"simulate"`
JSON rewriteActionJSON `json:"-"`
}
Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object.
func (*RewriteAction) UnmarshalJSON ¶
func (r *RewriteAction) UnmarshalJSON(data []byte) (err error)
type RewriteActionBlock ¶
type RewriteActionBlock string
The WAF rule action to apply.
const ( RewriteActionBlockChallenge RewriteActionBlock = "challenge" RewriteActionBlockBlock RewriteActionBlock = "block" RewriteActionBlockSimulate RewriteActionBlock = "simulate" RewriteActionBlockDisable RewriteActionBlock = "disable" RewriteActionBlockDefault RewriteActionBlock = "default" )
func (RewriteActionBlock) IsKnown ¶
func (r RewriteActionBlock) IsKnown() bool
type RewriteActionChallenge ¶
type RewriteActionChallenge string
The WAF rule action to apply.
const ( RewriteActionChallengeChallenge RewriteActionChallenge = "challenge" RewriteActionChallengeBlock RewriteActionChallenge = "block" RewriteActionChallengeSimulate RewriteActionChallenge = "simulate" RewriteActionChallengeDisable RewriteActionChallenge = "disable" RewriteActionChallengeDefault RewriteActionChallenge = "default" )
func (RewriteActionChallenge) IsKnown ¶
func (r RewriteActionChallenge) IsKnown() bool
type RewriteActionDefault ¶
type RewriteActionDefault string
The WAF rule action to apply.
const ( RewriteActionDefaultChallenge RewriteActionDefault = "challenge" RewriteActionDefaultBlock RewriteActionDefault = "block" RewriteActionDefaultSimulate RewriteActionDefault = "simulate" RewriteActionDefaultDisable RewriteActionDefault = "disable" RewriteActionDefaultDefault RewriteActionDefault = "default" )
func (RewriteActionDefault) IsKnown ¶
func (r RewriteActionDefault) IsKnown() bool
type RewriteActionDisable ¶
type RewriteActionDisable string
The WAF rule action to apply.
const ( RewriteActionDisableChallenge RewriteActionDisable = "challenge" RewriteActionDisableBlock RewriteActionDisable = "block" RewriteActionDisableSimulate RewriteActionDisable = "simulate" RewriteActionDisableDisable RewriteActionDisable = "disable" RewriteActionDisableDefault RewriteActionDisable = "default" )
func (RewriteActionDisable) IsKnown ¶
func (r RewriteActionDisable) IsKnown() bool
type RewriteActionParam ¶
type RewriteActionParam struct {
// The WAF rule action to apply.
Block param.Field[RewriteActionBlock] `json:"block"`
// The WAF rule action to apply.
Challenge param.Field[RewriteActionChallenge] `json:"challenge"`
// The WAF rule action to apply.
Default param.Field[RewriteActionDefault] `json:"default"`
// The WAF rule action to apply.
Disable param.Field[RewriteActionDisable] `json:"disable"`
// The WAF rule action to apply.
Simulate param.Field[RewriteActionSimulate] `json:"simulate"`
}
Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object.
func (RewriteActionParam) MarshalJSON ¶
func (r RewriteActionParam) MarshalJSON() (data []byte, err error)
type RewriteActionSimulate ¶
type RewriteActionSimulate string
The WAF rule action to apply.
const ( RewriteActionSimulateChallenge RewriteActionSimulate = "challenge" RewriteActionSimulateBlock RewriteActionSimulate = "block" RewriteActionSimulateSimulate RewriteActionSimulate = "simulate" RewriteActionSimulateDisable RewriteActionSimulate = "disable" RewriteActionSimulateDefault RewriteActionSimulate = "default" )
func (RewriteActionSimulate) IsKnown ¶
func (r RewriteActionSimulate) IsKnown() bool
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 RuleBulkDeleteParams ¶
type RuleBulkEditParams ¶
type RuleBulkEditParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
Body interface{} `json:"body,required"`
}
func (RuleBulkEditParams) MarshalJSON ¶
func (r RuleBulkEditParams) MarshalJSON() (data []byte, err error)
type RuleBulkUpdateParams ¶
type RuleBulkUpdateParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
Body interface{} `json:"body,required"`
}
func (RuleBulkUpdateParams) MarshalJSON ¶
func (r RuleBulkUpdateParams) MarshalJSON() (data []byte, err error)
type RuleDeleteParams ¶
type RuleDeleteResponseEnvelope ¶
type RuleDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result FirewallRule `json:"result,required"`
// Whether the API call was successful
Success RuleDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON ruleDeleteResponseEnvelopeJSON `json:"-"`
}
func (*RuleDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeSuccess ¶
type RuleDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleDeleteResponseEnvelopeSuccessTrue RuleDeleteResponseEnvelopeSuccess = true
)
func (RuleDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type RuleEditParams ¶
func (RuleEditParams) MarshalJSON ¶
func (r RuleEditParams) MarshalJSON() (data []byte, err error)
type RuleGetParams ¶
type RuleGetResponseEnvelope ¶
type RuleGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result FirewallRule `json:"result,required"`
// Whether the API call was successful
Success RuleGetResponseEnvelopeSuccess `json:"success,required"`
JSON ruleGetResponseEnvelopeJSON `json:"-"`
}
func (*RuleGetResponseEnvelope) UnmarshalJSON ¶
func (r *RuleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleGetResponseEnvelopeSuccess ¶
type RuleGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleGetResponseEnvelopeSuccessTrue RuleGetResponseEnvelopeSuccess = true
)
func (RuleGetResponseEnvelopeSuccess) IsKnown ¶
func (r RuleGetResponseEnvelopeSuccess) IsKnown() bool
type RuleListParams ¶
type RuleListParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The unique identifier of the firewall rule.
ID param.Field[string] `query:"id"`
// The action to search for. Must be an exact match.
Action param.Field[string] `query:"action"`
// A case-insensitive string to find in the description.
Description param.Field[string] `query:"description"`
// Page number of paginated results.
Page param.Field[float64] `query:"page"`
// When true, indicates that the firewall rule is currently paused.
Paused param.Field[bool] `query:"paused"`
// Number of firewall rules per page.
PerPage param.Field[float64] `query:"per_page"`
}
func (RuleListParams) URLQuery ¶
func (r RuleListParams) URLQuery() (v url.Values)
URLQuery serializes RuleListParams's query parameters as `url.Values`.
type RuleNewParams ¶
type RuleNewParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The action to perform when the threshold of matched traffic within the
// configured period is exceeded.
Action param.Field[RuleNewParamsAction] `json:"action,required"`
Filter param.Field[filters.FirewallFilterParam] `json:"filter,required"`
}
func (RuleNewParams) MarshalJSON ¶
func (r RuleNewParams) MarshalJSON() (data []byte, err error)
type RuleNewParamsAction ¶
type RuleNewParamsAction struct {
// The action to perform.
Mode param.Field[RuleNewParamsActionMode] `json:"mode"`
// A custom content type and reponse to return when the threshold is exceeded. The
// custom response configured in this object will override the custom error for the
// zone. This object is optional. Notes: If you omit this object, Cloudflare will
// use the default HTML error page. If "mode" is "challenge", "managed_challenge",
// or "js_challenge", Cloudflare will use the zone challenge pages and you should
// not provide the "response" object.
Response param.Field[RuleNewParamsActionResponse] `json:"response"`
// The time in seconds during which Cloudflare will perform the mitigation action.
// Must be an integer value greater than or equal to the period. Notes: If "mode"
// is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the
// zone's Challenge Passage time and you should not provide this value.
Timeout param.Field[float64] `json:"timeout"`
}
The action to perform when the threshold of matched traffic within the configured period is exceeded.
func (RuleNewParamsAction) MarshalJSON ¶
func (r RuleNewParamsAction) MarshalJSON() (data []byte, err error)
type RuleNewParamsActionMode ¶
type RuleNewParamsActionMode string
The action to perform.
const ( RuleNewParamsActionModeSimulate RuleNewParamsActionMode = "simulate" RuleNewParamsActionModeBan RuleNewParamsActionMode = "ban" RuleNewParamsActionModeChallenge RuleNewParamsActionMode = "challenge" RuleNewParamsActionModeJSChallenge RuleNewParamsActionMode = "js_challenge" RuleNewParamsActionModeManagedChallenge RuleNewParamsActionMode = "managed_challenge" )
func (RuleNewParamsActionMode) IsKnown ¶
func (r RuleNewParamsActionMode) IsKnown() bool
type RuleNewParamsActionResponse ¶
type RuleNewParamsActionResponse struct {
// The response body to return. The value must conform to the configured content
// type.
Body param.Field[string] `json:"body"`
// The content type of the body. Must be one of the following: `text/plain`,
// `text/xml`, or `application/json`.
ContentType param.Field[string] `json:"content_type"`
}
A custom content type and reponse to return when the threshold is exceeded. The custom response configured in this object will override the custom error for the zone. This object is optional. Notes: If you omit this object, Cloudflare will use the default HTML error page. If "mode" is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the zone challenge pages and you should not provide the "response" object.
func (RuleNewParamsActionResponse) MarshalJSON ¶
func (r RuleNewParamsActionResponse) MarshalJSON() (data []byte, err error)
type RuleService
deprecated
type RuleService struct {
Options []option.RequestOption
}
RuleService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRuleService method instead.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func NewRuleService ¶
func NewRuleService(opts ...option.RequestOption) (r *RuleService)
NewRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RuleService) BulkDelete
deprecated
func (r *RuleService) BulkDelete(ctx context.Context, body RuleBulkDeleteParams, opts ...option.RequestOption) (res *pagination.SinglePage[FirewallRule], err error)
Deletes existing firewall rules.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) BulkDeleteAutoPaging
deprecated
added in
v4.1.0
func (r *RuleService) BulkDeleteAutoPaging(ctx context.Context, body RuleBulkDeleteParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FirewallRule]
Deletes existing firewall rules.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) BulkEdit
deprecated
func (r *RuleService) BulkEdit(ctx context.Context, params RuleBulkEditParams, opts ...option.RequestOption) (res *pagination.SinglePage[FirewallRule], err error)
Updates the priority of existing firewall rules.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) BulkEditAutoPaging
deprecated
added in
v4.1.0
func (r *RuleService) BulkEditAutoPaging(ctx context.Context, params RuleBulkEditParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FirewallRule]
Updates the priority of existing firewall rules.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) BulkUpdate
deprecated
func (r *RuleService) BulkUpdate(ctx context.Context, params RuleBulkUpdateParams, opts ...option.RequestOption) (res *pagination.SinglePage[FirewallRule], err error)
Updates one or more existing firewall rules.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) BulkUpdateAutoPaging
deprecated
added in
v4.1.0
func (r *RuleService) BulkUpdateAutoPaging(ctx context.Context, params RuleBulkUpdateParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FirewallRule]
Updates one or more existing firewall rules.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) Delete
deprecated
func (r *RuleService) Delete(ctx context.Context, ruleID string, body RuleDeleteParams, opts ...option.RequestOption) (res *FirewallRule, err error)
Deletes an existing firewall rule.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) Edit
deprecated
func (r *RuleService) Edit(ctx context.Context, ruleID string, body RuleEditParams, opts ...option.RequestOption) (res *pagination.SinglePage[FirewallRule], err error)
Updates the priority of an existing firewall rule.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) EditAutoPaging
deprecated
added in
v4.1.0
func (r *RuleService) EditAutoPaging(ctx context.Context, ruleID string, body RuleEditParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FirewallRule]
Updates the priority of an existing firewall rule.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) Get
deprecated
func (r *RuleService) Get(ctx context.Context, ruleID string, query RuleGetParams, opts ...option.RequestOption) (res *FirewallRule, err error)
Fetches the details of a firewall rule.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) List
deprecated
func (r *RuleService) List(ctx context.Context, params RuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[FirewallRule], err error)
Fetches firewall rules in a zone. You can filter the results using several optional parameters.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) ListAutoPaging
deprecated
func (r *RuleService) ListAutoPaging(ctx context.Context, params RuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[FirewallRule]
Fetches firewall rules in a zone. You can filter the results using several optional parameters.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) New
deprecated
func (r *RuleService) New(ctx context.Context, params RuleNewParams, opts ...option.RequestOption) (res *pagination.SinglePage[FirewallRule], err error)
Create one or more firewall rules.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) NewAutoPaging
deprecated
added in
v4.1.0
func (r *RuleService) NewAutoPaging(ctx context.Context, params RuleNewParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[FirewallRule]
Create one or more firewall rules.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
func (*RuleService) Update
deprecated
func (r *RuleService) Update(ctx context.Context, ruleID string, params RuleUpdateParams, opts ...option.RequestOption) (res *FirewallRule, err error)
Updates an existing firewall rule.
Deprecated: The Firewall Rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#firewall-rules-api-and-filters-api for full details.
type RuleUpdateParams ¶
type RuleUpdateParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The action to perform when the threshold of matched traffic within the
// configured period is exceeded.
Action param.Field[RuleUpdateParamsAction] `json:"action,required"`
Filter param.Field[filters.FirewallFilterParam] `json:"filter,required"`
}
func (RuleUpdateParams) MarshalJSON ¶
func (r RuleUpdateParams) MarshalJSON() (data []byte, err error)
type RuleUpdateParamsAction ¶
type RuleUpdateParamsAction struct {
// The action to perform.
Mode param.Field[RuleUpdateParamsActionMode] `json:"mode"`
// A custom content type and reponse to return when the threshold is exceeded. The
// custom response configured in this object will override the custom error for the
// zone. This object is optional. Notes: If you omit this object, Cloudflare will
// use the default HTML error page. If "mode" is "challenge", "managed_challenge",
// or "js_challenge", Cloudflare will use the zone challenge pages and you should
// not provide the "response" object.
Response param.Field[RuleUpdateParamsActionResponse] `json:"response"`
// The time in seconds during which Cloudflare will perform the mitigation action.
// Must be an integer value greater than or equal to the period. Notes: If "mode"
// is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the
// zone's Challenge Passage time and you should not provide this value.
Timeout param.Field[float64] `json:"timeout"`
}
The action to perform when the threshold of matched traffic within the configured period is exceeded.
func (RuleUpdateParamsAction) MarshalJSON ¶
func (r RuleUpdateParamsAction) MarshalJSON() (data []byte, err error)
type RuleUpdateParamsActionMode ¶
type RuleUpdateParamsActionMode string
The action to perform.
const ( RuleUpdateParamsActionModeSimulate RuleUpdateParamsActionMode = "simulate" RuleUpdateParamsActionModeBan RuleUpdateParamsActionMode = "ban" RuleUpdateParamsActionModeChallenge RuleUpdateParamsActionMode = "challenge" RuleUpdateParamsActionModeJSChallenge RuleUpdateParamsActionMode = "js_challenge" RuleUpdateParamsActionModeManagedChallenge RuleUpdateParamsActionMode = "managed_challenge" )
func (RuleUpdateParamsActionMode) IsKnown ¶
func (r RuleUpdateParamsActionMode) IsKnown() bool
type RuleUpdateParamsActionResponse ¶
type RuleUpdateParamsActionResponse struct {
// The response body to return. The value must conform to the configured content
// type.
Body param.Field[string] `json:"body"`
// The content type of the body. Must be one of the following: `text/plain`,
// `text/xml`, or `application/json`.
ContentType param.Field[string] `json:"content_type"`
}
A custom content type and reponse to return when the threshold is exceeded. The custom response configured in this object will override the custom error for the zone. This object is optional. Notes: If you omit this object, Cloudflare will use the default HTML error page. If "mode" is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the zone challenge pages and you should not provide the "response" object.
func (RuleUpdateParamsActionResponse) MarshalJSON ¶
func (r RuleUpdateParamsActionResponse) MarshalJSON() (data []byte, err error)
type RuleUpdateResponseEnvelope ¶
type RuleUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result FirewallRule `json:"result,required"`
// Whether the API call was successful
Success RuleUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON ruleUpdateResponseEnvelopeJSON `json:"-"`
}
func (*RuleUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *RuleUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleUpdateResponseEnvelopeSuccess ¶
type RuleUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleUpdateResponseEnvelopeSuccessTrue RuleUpdateResponseEnvelopeSuccess = true
)
func (RuleUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r RuleUpdateResponseEnvelopeSuccess) IsKnown() bool
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.
type UARuleDeleteParams ¶
type UARuleDeleteResponse ¶
type UARuleDeleteResponse struct {
// The unique identifier of the User Agent Blocking rule.
ID string `json:"id"`
JSON uaRuleDeleteResponseJSON `json:"-"`
}
func (*UARuleDeleteResponse) UnmarshalJSON ¶
func (r *UARuleDeleteResponse) UnmarshalJSON(data []byte) (err error)
type UARuleDeleteResponseEnvelope ¶
type UARuleDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result UARuleDeleteResponse `json:"result,required"`
// Whether the API call was successful
Success UARuleDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON uaRuleDeleteResponseEnvelopeJSON `json:"-"`
}
func (*UARuleDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *UARuleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type UARuleDeleteResponseEnvelopeSuccess ¶
type UARuleDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
UARuleDeleteResponseEnvelopeSuccessTrue UARuleDeleteResponseEnvelopeSuccess = true
)
func (UARuleDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r UARuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type UARuleGetParams ¶
type UARuleGetResponseEnvelope ¶
type UARuleGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result interface{} `json:"result,required"`
// Whether the API call was successful
Success UARuleGetResponseEnvelopeSuccess `json:"success,required"`
JSON uaRuleGetResponseEnvelopeJSON `json:"-"`
}
func (*UARuleGetResponseEnvelope) UnmarshalJSON ¶
func (r *UARuleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type UARuleGetResponseEnvelopeSuccess ¶
type UARuleGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
UARuleGetResponseEnvelopeSuccessTrue UARuleGetResponseEnvelopeSuccess = true
)
func (UARuleGetResponseEnvelopeSuccess) IsKnown ¶
func (r UARuleGetResponseEnvelopeSuccess) IsKnown() bool
type UARuleListParams ¶
type UARuleListParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// A string to search for in the description of existing rules.
Description param.Field[string] `query:"description"`
// A string to search for in the description of existing rules.
DescriptionSearch param.Field[string] `query:"description_search"`
// Page number of paginated results.
Page param.Field[float64] `query:"page"`
// The maximum number of results per page. You can only set the value to `1` or to
// a multiple of 5 such as `5`, `10`, `15`, or `20`.
PerPage param.Field[float64] `query:"per_page"`
// A string to search for in the user agent values of existing rules.
UASearch param.Field[string] `query:"ua_search"`
}
func (UARuleListParams) URLQuery ¶
func (r UARuleListParams) URLQuery() (v url.Values)
URLQuery serializes UARuleListParams's query parameters as `url.Values`.
type UARuleListResponse ¶
type UARuleListResponse struct {
// The unique identifier of the User Agent Blocking rule.
ID string `json:"id"`
// The configuration object for the current rule.
Configuration UARuleListResponseConfiguration `json:"configuration"`
// An informative summary of the rule.
Description string `json:"description"`
// The action to apply to a matched request.
Mode UARuleListResponseMode `json:"mode"`
// When true, indicates that the rule is currently paused.
Paused bool `json:"paused"`
JSON uaRuleListResponseJSON `json:"-"`
}
func (*UARuleListResponse) UnmarshalJSON ¶
func (r *UARuleListResponse) UnmarshalJSON(data []byte) (err error)
type UARuleListResponseConfiguration ¶
type UARuleListResponseConfiguration struct {
// The configuration target for this rule. You must set the target to `ua` for User
// Agent Blocking rules.
Target string `json:"target"`
// The exact user agent string to match. This value will be compared to the
// received `User-Agent` HTTP header value.
Value string `json:"value"`
JSON uaRuleListResponseConfigurationJSON `json:"-"`
}
The configuration object for the current rule.
func (*UARuleListResponseConfiguration) UnmarshalJSON ¶
func (r *UARuleListResponseConfiguration) UnmarshalJSON(data []byte) (err error)
type UARuleListResponseMode ¶
type UARuleListResponseMode string
The action to apply to a matched request.
const ( UARuleListResponseModeBlock UARuleListResponseMode = "block" UARuleListResponseModeChallenge UARuleListResponseMode = "challenge" UARuleListResponseModeJSChallenge UARuleListResponseMode = "js_challenge" UARuleListResponseModeManagedChallenge UARuleListResponseMode = "managed_challenge" )
func (UARuleListResponseMode) IsKnown ¶
func (r UARuleListResponseMode) IsKnown() bool
type UARuleNewParams ¶
type UARuleNewParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The rule configuration.
Configuration param.Field[UARuleNewParamsConfigurationUnion] `json:"configuration,required"`
// The action to apply to a matched request.
Mode param.Field[UARuleNewParamsMode] `json:"mode,required"`
}
func (UARuleNewParams) MarshalJSON ¶
func (r UARuleNewParams) MarshalJSON() (data []byte, err error)
type UARuleNewParamsConfiguration ¶
type UARuleNewParamsConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target param.Field[UARuleNewParamsConfigurationTarget] `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value param.Field[string] `json:"value"`
}
The rule configuration.
func (UARuleNewParamsConfiguration) MarshalJSON ¶
func (r UARuleNewParamsConfiguration) MarshalJSON() (data []byte, err error)
type UARuleNewParamsConfigurationTarget ¶
type UARuleNewParamsConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const ( UARuleNewParamsConfigurationTargetIP UARuleNewParamsConfigurationTarget = "ip" UARuleNewParamsConfigurationTargetIp6 UARuleNewParamsConfigurationTarget = "ip6" UARuleNewParamsConfigurationTargetIPRange UARuleNewParamsConfigurationTarget = "ip_range" UARuleNewParamsConfigurationTargetASN UARuleNewParamsConfigurationTarget = "asn" UARuleNewParamsConfigurationTargetCountry UARuleNewParamsConfigurationTarget = "country" )
func (UARuleNewParamsConfigurationTarget) IsKnown ¶
func (r UARuleNewParamsConfigurationTarget) IsKnown() bool
type UARuleNewParamsConfigurationUnion ¶
type UARuleNewParamsConfigurationUnion interface {
// contains filtered or unexported methods
}
The rule configuration.
Satisfied by firewall.AccessRuleIPConfigurationParam, firewall.IPV6ConfigurationParam, firewall.AccessRuleCIDRConfigurationParam, firewall.ASNConfigurationParam, firewall.CountryConfigurationParam, UARuleNewParamsConfiguration.
type UARuleNewParamsMode ¶
type UARuleNewParamsMode string
The action to apply to a matched request.
const ( UARuleNewParamsModeBlock UARuleNewParamsMode = "block" UARuleNewParamsModeChallenge UARuleNewParamsMode = "challenge" UARuleNewParamsModeWhitelist UARuleNewParamsMode = "whitelist" UARuleNewParamsModeJSChallenge UARuleNewParamsMode = "js_challenge" UARuleNewParamsModeManagedChallenge UARuleNewParamsMode = "managed_challenge" )
func (UARuleNewParamsMode) IsKnown ¶
func (r UARuleNewParamsMode) IsKnown() bool
type UARuleNewResponseEnvelope ¶
type UARuleNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result interface{} `json:"result,required"`
// Whether the API call was successful
Success UARuleNewResponseEnvelopeSuccess `json:"success,required"`
JSON uaRuleNewResponseEnvelopeJSON `json:"-"`
}
func (*UARuleNewResponseEnvelope) UnmarshalJSON ¶
func (r *UARuleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type UARuleNewResponseEnvelopeSuccess ¶
type UARuleNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
UARuleNewResponseEnvelopeSuccessTrue UARuleNewResponseEnvelopeSuccess = true
)
func (UARuleNewResponseEnvelopeSuccess) IsKnown ¶
func (r UARuleNewResponseEnvelopeSuccess) IsKnown() bool
type UARuleService ¶
type UARuleService struct {
Options []option.RequestOption
}
UARuleService 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 NewUARuleService method instead.
func NewUARuleService ¶
func NewUARuleService(opts ...option.RequestOption) (r *UARuleService)
NewUARuleService 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 (*UARuleService) Delete ¶
func (r *UARuleService) Delete(ctx context.Context, uaRuleID string, body UARuleDeleteParams, opts ...option.RequestOption) (res *UARuleDeleteResponse, err error)
Deletes an existing User Agent Blocking rule.
func (*UARuleService) Get ¶
func (r *UARuleService) Get(ctx context.Context, uaRuleID string, query UARuleGetParams, opts ...option.RequestOption) (res *interface{}, err error)
Fetches the details of a User Agent Blocking rule.
func (*UARuleService) List ¶
func (r *UARuleService) List(ctx context.Context, params UARuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[UARuleListResponse], err error)
Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters.
func (*UARuleService) ListAutoPaging ¶
func (r *UARuleService) ListAutoPaging(ctx context.Context, params UARuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[UARuleListResponse]
Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters.
func (*UARuleService) New ¶
func (r *UARuleService) New(ctx context.Context, params UARuleNewParams, opts ...option.RequestOption) (res *interface{}, err error)
Creates a new User Agent Blocking rule in a zone.
func (*UARuleService) Update ¶
func (r *UARuleService) Update(ctx context.Context, uaRuleID string, params UARuleUpdateParams, opts ...option.RequestOption) (res *interface{}, err error)
Updates an existing User Agent Blocking rule.
type UARuleUpdateParams ¶
type UARuleUpdateParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The rule configuration.
Configuration param.Field[UARuleUpdateParamsConfigurationUnion] `json:"configuration,required"`
// The action to apply to a matched request.
Mode param.Field[UARuleUpdateParamsMode] `json:"mode,required"`
}
func (UARuleUpdateParams) MarshalJSON ¶
func (r UARuleUpdateParams) MarshalJSON() (data []byte, err error)
type UARuleUpdateParamsConfiguration ¶
type UARuleUpdateParamsConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target param.Field[UARuleUpdateParamsConfigurationTarget] `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value param.Field[string] `json:"value"`
}
The rule configuration.
func (UARuleUpdateParamsConfiguration) MarshalJSON ¶
func (r UARuleUpdateParamsConfiguration) MarshalJSON() (data []byte, err error)
type UARuleUpdateParamsConfigurationTarget ¶
type UARuleUpdateParamsConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const ( UARuleUpdateParamsConfigurationTargetIP UARuleUpdateParamsConfigurationTarget = "ip" UARuleUpdateParamsConfigurationTargetIp6 UARuleUpdateParamsConfigurationTarget = "ip6" UARuleUpdateParamsConfigurationTargetIPRange UARuleUpdateParamsConfigurationTarget = "ip_range" UARuleUpdateParamsConfigurationTargetASN UARuleUpdateParamsConfigurationTarget = "asn" UARuleUpdateParamsConfigurationTargetCountry UARuleUpdateParamsConfigurationTarget = "country" )
func (UARuleUpdateParamsConfigurationTarget) IsKnown ¶
func (r UARuleUpdateParamsConfigurationTarget) IsKnown() bool
type UARuleUpdateParamsConfigurationUnion ¶
type UARuleUpdateParamsConfigurationUnion interface {
// contains filtered or unexported methods
}
The rule configuration.
Satisfied by firewall.AccessRuleIPConfigurationParam, firewall.IPV6ConfigurationParam, firewall.AccessRuleCIDRConfigurationParam, firewall.ASNConfigurationParam, firewall.CountryConfigurationParam, UARuleUpdateParamsConfiguration.
type UARuleUpdateParamsMode ¶
type UARuleUpdateParamsMode string
The action to apply to a matched request.
const ( UARuleUpdateParamsModeBlock UARuleUpdateParamsMode = "block" UARuleUpdateParamsModeChallenge UARuleUpdateParamsMode = "challenge" UARuleUpdateParamsModeWhitelist UARuleUpdateParamsMode = "whitelist" UARuleUpdateParamsModeJSChallenge UARuleUpdateParamsMode = "js_challenge" UARuleUpdateParamsModeManagedChallenge UARuleUpdateParamsMode = "managed_challenge" )
func (UARuleUpdateParamsMode) IsKnown ¶
func (r UARuleUpdateParamsMode) IsKnown() bool
type UARuleUpdateResponseEnvelope ¶
type UARuleUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result interface{} `json:"result,required"`
// Whether the API call was successful
Success UARuleUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON uaRuleUpdateResponseEnvelopeJSON `json:"-"`
}
func (*UARuleUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *UARuleUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type UARuleUpdateResponseEnvelopeSuccess ¶
type UARuleUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
UARuleUpdateResponseEnvelopeSuccessTrue UARuleUpdateResponseEnvelopeSuccess = true
)
func (UARuleUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r UARuleUpdateResponseEnvelopeSuccess) IsKnown() bool
type WAFOverrideDeleteParams ¶
type WAFOverrideDeleteResponse ¶
type WAFOverrideDeleteResponse struct {
// The unique identifier of the WAF override.
ID string `json:"id"`
JSON wafOverrideDeleteResponseJSON `json:"-"`
}
func (*WAFOverrideDeleteResponse) UnmarshalJSON ¶
func (r *WAFOverrideDeleteResponse) UnmarshalJSON(data []byte) (err error)
type WAFOverrideDeleteResponseEnvelope ¶
type WAFOverrideDeleteResponseEnvelope struct {
Result WAFOverrideDeleteResponse `json:"result"`
JSON wafOverrideDeleteResponseEnvelopeJSON `json:"-"`
}
func (*WAFOverrideDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *WAFOverrideDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WAFOverrideGetParams ¶
type WAFOverrideGetResponseEnvelope ¶
type WAFOverrideGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result Override `json:"result,required"`
// Whether the API call was successful
Success WAFOverrideGetResponseEnvelopeSuccess `json:"success,required"`
JSON wafOverrideGetResponseEnvelopeJSON `json:"-"`
}
func (*WAFOverrideGetResponseEnvelope) UnmarshalJSON ¶
func (r *WAFOverrideGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WAFOverrideGetResponseEnvelopeSuccess ¶
type WAFOverrideGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
WAFOverrideGetResponseEnvelopeSuccessTrue WAFOverrideGetResponseEnvelopeSuccess = true
)
func (WAFOverrideGetResponseEnvelopeSuccess) IsKnown ¶
func (r WAFOverrideGetResponseEnvelopeSuccess) IsKnown() bool
type WAFOverrideListParams ¶
type WAFOverrideListParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The page number of paginated results.
Page param.Field[float64] `query:"page"`
// The number of WAF overrides per page.
PerPage param.Field[float64] `query:"per_page"`
}
func (WAFOverrideListParams) URLQuery ¶
func (r WAFOverrideListParams) URLQuery() (v url.Values)
URLQuery serializes WAFOverrideListParams's query parameters as `url.Values`.
type WAFOverrideNewParams ¶
type WAFOverrideNewParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The URLs to include in the current WAF override. You can use wildcards. Each
// entered URL will be escaped before use, which means you can only use simple
// wildcard patterns.
URLs param.Field[[]OverrideURLParam] `json:"urls,required"`
}
func (WAFOverrideNewParams) MarshalJSON ¶
func (r WAFOverrideNewParams) MarshalJSON() (data []byte, err error)
type WAFOverrideNewResponseEnvelope ¶
type WAFOverrideNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result Override `json:"result,required"`
// Whether the API call was successful
Success WAFOverrideNewResponseEnvelopeSuccess `json:"success,required"`
JSON wafOverrideNewResponseEnvelopeJSON `json:"-"`
}
func (*WAFOverrideNewResponseEnvelope) UnmarshalJSON ¶
func (r *WAFOverrideNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WAFOverrideNewResponseEnvelopeSuccess ¶
type WAFOverrideNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
WAFOverrideNewResponseEnvelopeSuccessTrue WAFOverrideNewResponseEnvelopeSuccess = true
)
func (WAFOverrideNewResponseEnvelopeSuccess) IsKnown ¶
func (r WAFOverrideNewResponseEnvelopeSuccess) IsKnown() bool
type WAFOverrideService ¶
type WAFOverrideService struct {
Options []option.RequestOption
}
WAFOverrideService 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 NewWAFOverrideService method instead.
func NewWAFOverrideService ¶
func NewWAFOverrideService(opts ...option.RequestOption) (r *WAFOverrideService)
NewWAFOverrideService 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 (*WAFOverrideService) Delete ¶
func (r *WAFOverrideService) Delete(ctx context.Context, overridesID string, body WAFOverrideDeleteParams, opts ...option.RequestOption) (res *WAFOverrideDeleteResponse, err error)
Deletes an existing URI-based WAF override.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFOverrideService) Get ¶
func (r *WAFOverrideService) Get(ctx context.Context, overridesID string, query WAFOverrideGetParams, opts ...option.RequestOption) (res *Override, err error)
Fetches the details of a URI-based WAF override.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFOverrideService) List ¶
func (r *WAFOverrideService) List(ctx context.Context, params WAFOverrideListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Override], err error)
Fetches the URI-based WAF overrides in a zone.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFOverrideService) ListAutoPaging ¶
func (r *WAFOverrideService) ListAutoPaging(ctx context.Context, params WAFOverrideListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Override]
Fetches the URI-based WAF overrides in a zone.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFOverrideService) New ¶
func (r *WAFOverrideService) New(ctx context.Context, params WAFOverrideNewParams, opts ...option.RequestOption) (res *Override, err error)
Creates a URI-based WAF override for a zone.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFOverrideService) Update ¶
func (r *WAFOverrideService) Update(ctx context.Context, overridesID string, params WAFOverrideUpdateParams, opts ...option.RequestOption) (res *Override, err error)
Updates an existing URI-based WAF override.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
type WAFOverrideUpdateParams ¶
type WAFOverrideUpdateParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// Identifier
ID param.Field[string] `json:"id,required"`
// Specifies that, when a WAF rule matches, its configured action will be replaced
// by the action configured in this object.
RewriteAction param.Field[RewriteActionParam] `json:"rewrite_action,required"`
// An object that allows you to override the action of specific WAF rules. Each key
// of this object must be the ID of a WAF rule, and each value must be a valid WAF
// action. Unless you are disabling a rule, ensure that you also enable the rule
// group that this WAF rule belongs to. When creating a new URI-based WAF override,
// you must provide a `groups` object or a `rules` object.
Rules param.Field[WAFRuleParam] `json:"rules,required"`
// The URLs to include in the current WAF override. You can use wildcards. Each
// entered URL will be escaped before use, which means you can only use simple
// wildcard patterns.
URLs param.Field[[]OverrideURLParam] `json:"urls,required"`
}
func (WAFOverrideUpdateParams) MarshalJSON ¶
func (r WAFOverrideUpdateParams) MarshalJSON() (data []byte, err error)
type WAFOverrideUpdateResponseEnvelope ¶
type WAFOverrideUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result Override `json:"result,required"`
// Whether the API call was successful
Success WAFOverrideUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON wafOverrideUpdateResponseEnvelopeJSON `json:"-"`
}
func (*WAFOverrideUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *WAFOverrideUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WAFOverrideUpdateResponseEnvelopeSuccess ¶
type WAFOverrideUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
WAFOverrideUpdateResponseEnvelopeSuccessTrue WAFOverrideUpdateResponseEnvelopeSuccess = true
)
func (WAFOverrideUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r WAFOverrideUpdateResponseEnvelopeSuccess) IsKnown() bool
type WAFPackageGetParams ¶
type WAFPackageGetResponse ¶
type WAFPackageGetResponse struct {
// This field can have the runtime type of [[]shared.ResponseInfo].
Errors interface{} `json:"errors"`
// This field can have the runtime type of [[]shared.ResponseInfo].
Messages interface{} `json:"messages"`
// This field can have the runtime type of [interface{}].
Result interface{} `json:"result"`
// Whether the API call was successful
Success WAFPackageGetResponseSuccess `json:"success"`
JSON wafPackageGetResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (WAFPackageGetResponse) AsUnion ¶
func (r WAFPackageGetResponse) AsUnion() WAFPackageGetResponseUnion
AsUnion returns a WAFPackageGetResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are firewall.WAFPackageGetResponseFirewallAPIResponseSingle, firewall.WAFPackageGetResponseResult.
func (*WAFPackageGetResponse) UnmarshalJSON ¶
func (r *WAFPackageGetResponse) UnmarshalJSON(data []byte) (err error)
type WAFPackageGetResponseFirewallAPIResponseSingle ¶
type WAFPackageGetResponseFirewallAPIResponseSingle struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result interface{} `json:"result,required"`
// Whether the API call was successful
Success WAFPackageGetResponseFirewallAPIResponseSingleSuccess `json:"success,required"`
JSON wafPackageGetResponseFirewallAPIResponseSingleJSON `json:"-"`
}
func (*WAFPackageGetResponseFirewallAPIResponseSingle) UnmarshalJSON ¶
func (r *WAFPackageGetResponseFirewallAPIResponseSingle) UnmarshalJSON(data []byte) (err error)
type WAFPackageGetResponseFirewallAPIResponseSingleSuccess ¶
type WAFPackageGetResponseFirewallAPIResponseSingleSuccess bool
Whether the API call was successful
const (
WAFPackageGetResponseFirewallAPIResponseSingleSuccessTrue WAFPackageGetResponseFirewallAPIResponseSingleSuccess = true
)
func (WAFPackageGetResponseFirewallAPIResponseSingleSuccess) IsKnown ¶
func (r WAFPackageGetResponseFirewallAPIResponseSingleSuccess) IsKnown() bool
type WAFPackageGetResponseResult ¶
type WAFPackageGetResponseResult struct {
Result interface{} `json:"result"`
JSON wafPackageGetResponseResultJSON `json:"-"`
}
func (*WAFPackageGetResponseResult) UnmarshalJSON ¶
func (r *WAFPackageGetResponseResult) UnmarshalJSON(data []byte) (err error)
type WAFPackageGetResponseSuccess ¶
type WAFPackageGetResponseSuccess bool
Whether the API call was successful
const (
WAFPackageGetResponseSuccessTrue WAFPackageGetResponseSuccess = true
)
func (WAFPackageGetResponseSuccess) IsKnown ¶
func (r WAFPackageGetResponseSuccess) IsKnown() bool
type WAFPackageGetResponseUnion ¶
type WAFPackageGetResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by firewall.WAFPackageGetResponseFirewallAPIResponseSingle or firewall.WAFPackageGetResponseResult.
type WAFPackageGroupEditParams ¶
type WAFPackageGroupEditParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The state of the rules contained in the rule group. When `on`, the rules in the
// group are configurable/usable.
Mode param.Field[WAFPackageGroupEditParamsMode] `json:"mode"`
}
func (WAFPackageGroupEditParams) MarshalJSON ¶
func (r WAFPackageGroupEditParams) MarshalJSON() (data []byte, err error)
type WAFPackageGroupEditParamsMode ¶
type WAFPackageGroupEditParamsMode string
The state of the rules contained in the rule group. When `on`, the rules in the group are configurable/usable.
const ( WAFPackageGroupEditParamsModeOn WAFPackageGroupEditParamsMode = "on" WAFPackageGroupEditParamsModeOff WAFPackageGroupEditParamsMode = "off" )
func (WAFPackageGroupEditParamsMode) IsKnown ¶
func (r WAFPackageGroupEditParamsMode) IsKnown() bool
type WAFPackageGroupEditResponseEnvelope ¶
type WAFPackageGroupEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result interface{} `json:"result,required"`
// Whether the API call was successful
Success WAFPackageGroupEditResponseEnvelopeSuccess `json:"success,required"`
JSON wafPackageGroupEditResponseEnvelopeJSON `json:"-"`
}
func (*WAFPackageGroupEditResponseEnvelope) UnmarshalJSON ¶
func (r *WAFPackageGroupEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WAFPackageGroupEditResponseEnvelopeSuccess ¶
type WAFPackageGroupEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
WAFPackageGroupEditResponseEnvelopeSuccessTrue WAFPackageGroupEditResponseEnvelopeSuccess = true
)
func (WAFPackageGroupEditResponseEnvelopeSuccess) IsKnown ¶
func (r WAFPackageGroupEditResponseEnvelopeSuccess) IsKnown() bool
type WAFPackageGroupGetResponseEnvelope ¶
type WAFPackageGroupGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result interface{} `json:"result,required"`
// Whether the API call was successful
Success WAFPackageGroupGetResponseEnvelopeSuccess `json:"success,required"`
JSON wafPackageGroupGetResponseEnvelopeJSON `json:"-"`
}
func (*WAFPackageGroupGetResponseEnvelope) UnmarshalJSON ¶
func (r *WAFPackageGroupGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WAFPackageGroupGetResponseEnvelopeSuccess ¶
type WAFPackageGroupGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
WAFPackageGroupGetResponseEnvelopeSuccessTrue WAFPackageGroupGetResponseEnvelopeSuccess = true
)
func (WAFPackageGroupGetResponseEnvelopeSuccess) IsKnown ¶
func (r WAFPackageGroupGetResponseEnvelopeSuccess) IsKnown() bool
type WAFPackageGroupListParams ¶
type WAFPackageGroupListParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The direction used to sort returned rule groups.
Direction param.Field[WAFPackageGroupListParamsDirection] `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[WAFPackageGroupListParamsMatch] `query:"match"`
// The state of the rules contained in the rule group. When `on`, the rules in the
// group are configurable/usable.
Mode param.Field[WAFPackageGroupListParamsMode] `query:"mode"`
// The name of the rule group.
Name param.Field[string] `query:"name"`
// The field used to sort returned rule groups.
Order param.Field[WAFPackageGroupListParamsOrder] `query:"order"`
// The page number of paginated results.
Page param.Field[float64] `query:"page"`
// The number of rule groups per page.
PerPage param.Field[float64] `query:"per_page"`
// The number of rules in the current rule group.
RulesCount param.Field[float64] `query:"rules_count"`
}
func (WAFPackageGroupListParams) URLQuery ¶
func (r WAFPackageGroupListParams) URLQuery() (v url.Values)
URLQuery serializes WAFPackageGroupListParams's query parameters as `url.Values`.
type WAFPackageGroupListParamsDirection ¶
type WAFPackageGroupListParamsDirection string
The direction used to sort returned rule groups.
const ( WAFPackageGroupListParamsDirectionAsc WAFPackageGroupListParamsDirection = "asc" WAFPackageGroupListParamsDirectionDesc WAFPackageGroupListParamsDirection = "desc" )
func (WAFPackageGroupListParamsDirection) IsKnown ¶
func (r WAFPackageGroupListParamsDirection) IsKnown() bool
type WAFPackageGroupListParamsMatch ¶
type WAFPackageGroupListParamsMatch 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 ( WAFPackageGroupListParamsMatchAny WAFPackageGroupListParamsMatch = "any" WAFPackageGroupListParamsMatchAll WAFPackageGroupListParamsMatch = "all" )
func (WAFPackageGroupListParamsMatch) IsKnown ¶
func (r WAFPackageGroupListParamsMatch) IsKnown() bool
type WAFPackageGroupListParamsMode ¶
type WAFPackageGroupListParamsMode string
The state of the rules contained in the rule group. When `on`, the rules in the group are configurable/usable.
const ( WAFPackageGroupListParamsModeOn WAFPackageGroupListParamsMode = "on" WAFPackageGroupListParamsModeOff WAFPackageGroupListParamsMode = "off" )
func (WAFPackageGroupListParamsMode) IsKnown ¶
func (r WAFPackageGroupListParamsMode) IsKnown() bool
type WAFPackageGroupListParamsOrder ¶
type WAFPackageGroupListParamsOrder string
The field used to sort returned rule groups.
const ( WAFPackageGroupListParamsOrderMode WAFPackageGroupListParamsOrder = "mode" WAFPackageGroupListParamsOrderRulesCount WAFPackageGroupListParamsOrder = "rules_count" )
func (WAFPackageGroupListParamsOrder) IsKnown ¶
func (r WAFPackageGroupListParamsOrder) IsKnown() bool
type WAFPackageGroupService ¶
type WAFPackageGroupService struct {
Options []option.RequestOption
}
WAFPackageGroupService 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 NewWAFPackageGroupService method instead.
func NewWAFPackageGroupService ¶
func NewWAFPackageGroupService(opts ...option.RequestOption) (r *WAFPackageGroupService)
NewWAFPackageGroupService 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 (*WAFPackageGroupService) Edit ¶
func (r *WAFPackageGroupService) Edit(ctx context.Context, packageID string, groupID string, params WAFPackageGroupEditParams, opts ...option.RequestOption) (res *interface{}, err error)
Updates a WAF rule group. You can update the state (`mode` parameter) of a rule group.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFPackageGroupService) Get ¶
func (r *WAFPackageGroupService) Get(ctx context.Context, packageID string, groupID string, query WAFPackageGroupGetParams, opts ...option.RequestOption) (res *interface{}, err error)
Fetches the details of a WAF rule group.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFPackageGroupService) List ¶
func (r *WAFPackageGroupService) List(ctx context.Context, packageID string, params WAFPackageGroupListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Group], err error)
Fetches the WAF rule groups in a WAF package.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFPackageGroupService) ListAutoPaging ¶
func (r *WAFPackageGroupService) ListAutoPaging(ctx context.Context, packageID string, params WAFPackageGroupListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Group]
Fetches the WAF rule groups in a WAF package.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
type WAFPackageListParams ¶
type WAFPackageListParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The direction used to sort returned packages.
Direction param.Field[WAFPackageListParamsDirection] `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[WAFPackageListParamsMatch] `query:"match"`
// The name of the WAF package.
Name param.Field[string] `query:"name"`
// The field used to sort returned packages.
Order param.Field[WAFPackageListParamsOrder] `query:"order"`
// The page number of paginated results.
Page param.Field[float64] `query:"page"`
// The number of packages per page.
PerPage param.Field[float64] `query:"per_page"`
}
func (WAFPackageListParams) URLQuery ¶
func (r WAFPackageListParams) URLQuery() (v url.Values)
URLQuery serializes WAFPackageListParams's query parameters as `url.Values`.
type WAFPackageListParamsDirection ¶
type WAFPackageListParamsDirection string
The direction used to sort returned packages.
const ( WAFPackageListParamsDirectionAsc WAFPackageListParamsDirection = "asc" WAFPackageListParamsDirectionDesc WAFPackageListParamsDirection = "desc" )
func (WAFPackageListParamsDirection) IsKnown ¶
func (r WAFPackageListParamsDirection) IsKnown() bool
type WAFPackageListParamsMatch ¶
type WAFPackageListParamsMatch 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 ( WAFPackageListParamsMatchAny WAFPackageListParamsMatch = "any" WAFPackageListParamsMatchAll WAFPackageListParamsMatch = "all" )
func (WAFPackageListParamsMatch) IsKnown ¶
func (r WAFPackageListParamsMatch) IsKnown() bool
type WAFPackageListParamsOrder ¶
type WAFPackageListParamsOrder string
The field used to sort returned packages.
const (
WAFPackageListParamsOrderName WAFPackageListParamsOrder = "name"
)
func (WAFPackageListParamsOrder) IsKnown ¶
func (r WAFPackageListParamsOrder) IsKnown() bool
type WAFPackageListResponse ¶
type WAFPackageListResponse = interface{}
type WAFPackageRuleEditParams ¶
type WAFPackageRuleEditParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The mode/action of the rule when triggered. You must use a value from the
// `allowed_modes` array of the current rule.
Mode param.Field[WAFPackageRuleEditParamsMode] `json:"mode"`
}
func (WAFPackageRuleEditParams) MarshalJSON ¶
func (r WAFPackageRuleEditParams) MarshalJSON() (data []byte, err error)
type WAFPackageRuleEditParamsMode ¶
type WAFPackageRuleEditParamsMode string
The mode/action of the rule when triggered. You must use a value from the `allowed_modes` array of the current rule.
const ( WAFPackageRuleEditParamsModeDefault WAFPackageRuleEditParamsMode = "default" WAFPackageRuleEditParamsModeDisable WAFPackageRuleEditParamsMode = "disable" WAFPackageRuleEditParamsModeSimulate WAFPackageRuleEditParamsMode = "simulate" WAFPackageRuleEditParamsModeBlock WAFPackageRuleEditParamsMode = "block" WAFPackageRuleEditParamsModeChallenge WAFPackageRuleEditParamsMode = "challenge" WAFPackageRuleEditParamsModeOn WAFPackageRuleEditParamsMode = "on" WAFPackageRuleEditParamsModeOff WAFPackageRuleEditParamsMode = "off" )
func (WAFPackageRuleEditParamsMode) IsKnown ¶
func (r WAFPackageRuleEditParamsMode) IsKnown() bool
type WAFPackageRuleEditResponse ¶
type WAFPackageRuleEditResponse struct {
// The unique identifier of the WAF rule.
ID string `json:"id,required"`
// This field can have the runtime type of [[]AllowedModesAnomaly],
// [[]WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode],
// [[]WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode].
AllowedModes interface{} `json:"allowed_modes,required"`
// The public description of the WAF rule.
Description string `json:"description,required"`
// The rule group to which the current WAF rule belongs.
Group WAFRuleGroup `json:"group,required"`
// When set to `on`, the current WAF rule will be used when evaluating the request.
// Applies to anomaly detection WAF rules.
Mode AllowedModesAnomaly `json:"mode,required"`
// The unique identifier of a WAF package.
PackageID string `json:"package_id,required"`
// The order in which the individual WAF rule is executed within its rule group.
Priority string `json:"priority,required"`
// The default action/mode of a rule.
DefaultMode WAFPackageRuleEditResponseDefaultMode `json:"default_mode"`
JSON wafPackageRuleEditResponseJSON `json:"-"`
// contains filtered or unexported fields
}
When triggered, anomaly detection WAF rules contribute to an overall threat score that will determine if a request is considered malicious. You can configure the total scoring threshold through the 'sensitivity' property of the WAF package.
func (WAFPackageRuleEditResponse) AsUnion ¶
func (r WAFPackageRuleEditResponse) AsUnion() WAFPackageRuleEditResponseUnion
AsUnion returns a WAFPackageRuleEditResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are firewall.WAFPackageRuleEditResponseWAFManagedRulesAnomalyRule, firewall.WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRule, firewall.WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule.
func (*WAFPackageRuleEditResponse) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponse) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleEditResponseDefaultMode ¶
type WAFPackageRuleEditResponseDefaultMode string
The default action/mode of a rule.
const ( WAFPackageRuleEditResponseDefaultModeDisable WAFPackageRuleEditResponseDefaultMode = "disable" WAFPackageRuleEditResponseDefaultModeSimulate WAFPackageRuleEditResponseDefaultMode = "simulate" WAFPackageRuleEditResponseDefaultModeBlock WAFPackageRuleEditResponseDefaultMode = "block" WAFPackageRuleEditResponseDefaultModeChallenge WAFPackageRuleEditResponseDefaultMode = "challenge" )
func (WAFPackageRuleEditResponseDefaultMode) IsKnown ¶
func (r WAFPackageRuleEditResponseDefaultMode) IsKnown() bool
type WAFPackageRuleEditResponseEnvelope ¶
type WAFPackageRuleEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// When triggered, anomaly detection WAF rules contribute to an overall threat
// score that will determine if a request is considered malicious. You can
// configure the total scoring threshold through the 'sensitivity' property of the
// WAF package.
Result WAFPackageRuleEditResponse `json:"result,required"`
// Whether the API call was successful
Success WAFPackageRuleEditResponseEnvelopeSuccess `json:"success,required"`
JSON wafPackageRuleEditResponseEnvelopeJSON `json:"-"`
}
func (*WAFPackageRuleEditResponseEnvelope) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleEditResponseEnvelopeSuccess ¶
type WAFPackageRuleEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
WAFPackageRuleEditResponseEnvelopeSuccessTrue WAFPackageRuleEditResponseEnvelopeSuccess = true
)
func (WAFPackageRuleEditResponseEnvelopeSuccess) IsKnown ¶
func (r WAFPackageRuleEditResponseEnvelopeSuccess) IsKnown() bool
type WAFPackageRuleEditResponseUnion ¶
type WAFPackageRuleEditResponseUnion interface {
// contains filtered or unexported methods
}
When triggered, anomaly detection WAF rules contribute to an overall threat score that will determine if a request is considered malicious. You can configure the total scoring threshold through the 'sensitivity' property of the WAF package.
Union satisfied by firewall.WAFPackageRuleEditResponseWAFManagedRulesAnomalyRule, firewall.WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRule or firewall.WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule.
type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRule ¶
type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRule struct {
// The unique identifier of the WAF rule.
ID string `json:"id,required"`
// Defines the available modes for the current WAF rule. Applies to anomaly
// detection WAF rules.
AllowedModes []AllowedModesAnomaly `json:"allowed_modes,required"`
// The public description of the WAF rule.
Description string `json:"description,required"`
// The rule group to which the current WAF rule belongs.
Group WAFRuleGroup `json:"group,required"`
// When set to `on`, the current WAF rule will be used when evaluating the request.
// Applies to anomaly detection WAF rules.
Mode AllowedModesAnomaly `json:"mode,required"`
// The unique identifier of a WAF package.
PackageID string `json:"package_id,required"`
// The order in which the individual WAF rule is executed within its rule group.
Priority string `json:"priority,required"`
JSON wafPackageRuleEditResponseWAFManagedRulesAnomalyRuleJSON `json:"-"`
}
When triggered, anomaly detection WAF rules contribute to an overall threat score that will determine if a request is considered malicious. You can configure the total scoring threshold through the 'sensitivity' property of the WAF package.
func (*WAFPackageRuleEditResponseWAFManagedRulesAnomalyRule) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponseWAFManagedRulesAnomalyRule) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule ¶
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule struct {
// The unique identifier of the WAF rule.
ID string `json:"id,required"`
// Defines the available modes for the current WAF rule.
AllowedModes []WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode `json:"allowed_modes,required"`
// The public description of the WAF rule.
Description string `json:"description,required"`
// The rule group to which the current WAF rule belongs.
Group WAFRuleGroup `json:"group,required"`
// When set to `on`, the current rule will be used when evaluating the request.
// Applies to traditional (allow) WAF rules.
Mode WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode `json:"mode,required"`
// The unique identifier of a WAF package.
PackageID string `json:"package_id,required"`
// The order in which the individual WAF rule is executed within its rule group.
Priority string `json:"priority,required"`
JSON wafPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleJSON `json:"-"`
}
When triggered, traditional WAF rules cause the firewall to immediately act on the request based on the rule configuration. An 'allow' rule will immediately allow the request and no other rules will be processed.
func (*WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode ¶
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode string
When set to `on`, the current rule will be used when evaluating the request. Applies to traditional (allow) WAF rules.
const ( WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedModeOn WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode = "on" WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedModeOff WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode = "off" )
func (WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode) IsKnown ¶
func (r WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode) IsKnown() bool
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode ¶
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode string
When set to `on`, the current rule will be used when evaluating the request. Applies to traditional (allow) WAF rules.
const ( WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleModeOn WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode = "on" WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleModeOff WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode = "off" )
func (WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode) IsKnown ¶
func (r WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode) IsKnown() bool
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRule ¶
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRule struct {
// The unique identifier of the WAF rule.
ID string `json:"id,required"`
// The list of possible actions of the WAF rule when it is triggered.
AllowedModes []WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode `json:"allowed_modes,required"`
// The default action/mode of a rule.
DefaultMode WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode `json:"default_mode,required"`
// The public description of the WAF rule.
Description string `json:"description,required"`
// The rule group to which the current WAF rule belongs.
Group WAFRuleGroup `json:"group,required"`
// The action that the current WAF rule will perform when triggered. Applies to
// traditional (deny) WAF rules.
Mode WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode `json:"mode,required"`
// The unique identifier of a WAF package.
PackageID string `json:"package_id,required"`
// The order in which the individual WAF rule is executed within its rule group.
Priority string `json:"priority,required"`
JSON wafPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleJSON `json:"-"`
}
When triggered, traditional WAF rules cause the firewall to immediately act upon the request based on the configuration of the rule. A 'deny' rule will immediately respond to the request based on the configured rule action/mode (for example, 'block') and no other rules will be processed.
func (*WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRule) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRule) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode ¶
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode string
The action that the current WAF rule will perform when triggered. Applies to traditional (deny) WAF rules.
const ( WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedModeDefault WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "default" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedModeDisable WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "disable" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedModeSimulate WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "simulate" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedModeBlock WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "block" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedModeChallenge WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "challenge" )
func (WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode) IsKnown ¶
func (r WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode) IsKnown() bool
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode ¶
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode string
The default action/mode of a rule.
const ( WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultModeDisable WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode = "disable" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultModeSimulate WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode = "simulate" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultModeBlock WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode = "block" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultModeChallenge WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode = "challenge" )
func (WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode) IsKnown ¶
func (r WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode) IsKnown() bool
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode ¶
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode string
The action that the current WAF rule will perform when triggered. Applies to traditional (deny) WAF rules.
const ( WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleModeDefault WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode = "default" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleModeDisable WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode = "disable" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleModeSimulate WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode = "simulate" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleModeBlock WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode = "block" WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleModeChallenge WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode = "challenge" )
func (WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode) IsKnown ¶
func (r WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode) IsKnown() bool
type WAFPackageRuleGetParams ¶
type WAFPackageRuleGetResponseEnvelope ¶
type WAFPackageRuleGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result interface{} `json:"result,required"`
// Whether the API call was successful
Success WAFPackageRuleGetResponseEnvelopeSuccess `json:"success,required"`
JSON wafPackageRuleGetResponseEnvelopeJSON `json:"-"`
}
func (*WAFPackageRuleGetResponseEnvelope) UnmarshalJSON ¶
func (r *WAFPackageRuleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleGetResponseEnvelopeSuccess ¶
type WAFPackageRuleGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
WAFPackageRuleGetResponseEnvelopeSuccessTrue WAFPackageRuleGetResponseEnvelopeSuccess = true
)
func (WAFPackageRuleGetResponseEnvelopeSuccess) IsKnown ¶
func (r WAFPackageRuleGetResponseEnvelopeSuccess) IsKnown() bool
type WAFPackageRuleListParams ¶
type WAFPackageRuleListParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The public description of the WAF rule.
Description param.Field[string] `query:"description"`
// The direction used to sort returned rules.
Direction param.Field[WAFPackageRuleListParamsDirection] `query:"direction"`
// The unique identifier of the rule group.
GroupID param.Field[string] `query:"group_id"`
// 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[WAFPackageRuleListParamsMatch] `query:"match"`
// The action/mode a rule has been overridden to perform.
Mode param.Field[WAFPackageRuleListParamsMode] `query:"mode"`
// The field used to sort returned rules.
Order param.Field[WAFPackageRuleListParamsOrder] `query:"order"`
// The page number of paginated results.
Page param.Field[float64] `query:"page"`
// The number of rules per page.
PerPage param.Field[float64] `query:"per_page"`
// The order in which the individual WAF rule is executed within its rule group.
Priority param.Field[string] `query:"priority"`
}
func (WAFPackageRuleListParams) URLQuery ¶
func (r WAFPackageRuleListParams) URLQuery() (v url.Values)
URLQuery serializes WAFPackageRuleListParams's query parameters as `url.Values`.
type WAFPackageRuleListParamsDirection ¶
type WAFPackageRuleListParamsDirection string
The direction used to sort returned rules.
const ( WAFPackageRuleListParamsDirectionAsc WAFPackageRuleListParamsDirection = "asc" WAFPackageRuleListParamsDirectionDesc WAFPackageRuleListParamsDirection = "desc" )
func (WAFPackageRuleListParamsDirection) IsKnown ¶
func (r WAFPackageRuleListParamsDirection) IsKnown() bool
type WAFPackageRuleListParamsMatch ¶
type WAFPackageRuleListParamsMatch 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 ( WAFPackageRuleListParamsMatchAny WAFPackageRuleListParamsMatch = "any" WAFPackageRuleListParamsMatchAll WAFPackageRuleListParamsMatch = "all" )
func (WAFPackageRuleListParamsMatch) IsKnown ¶
func (r WAFPackageRuleListParamsMatch) IsKnown() bool
type WAFPackageRuleListParamsMode ¶
type WAFPackageRuleListParamsMode string
The action/mode a rule has been overridden to perform.
const ( WAFPackageRuleListParamsModeDis WAFPackageRuleListParamsMode = "DIS" WAFPackageRuleListParamsModeChl WAFPackageRuleListParamsMode = "CHL" WAFPackageRuleListParamsModeBlk WAFPackageRuleListParamsMode = "BLK" WAFPackageRuleListParamsModeSim WAFPackageRuleListParamsMode = "SIM" )
func (WAFPackageRuleListParamsMode) IsKnown ¶
func (r WAFPackageRuleListParamsMode) IsKnown() bool
type WAFPackageRuleListParamsOrder ¶
type WAFPackageRuleListParamsOrder string
The field used to sort returned rules.
const ( WAFPackageRuleListParamsOrderPriority WAFPackageRuleListParamsOrder = "priority" WAFPackageRuleListParamsOrderGroupID WAFPackageRuleListParamsOrder = "group_id" WAFPackageRuleListParamsOrderDescription WAFPackageRuleListParamsOrder = "description" )
func (WAFPackageRuleListParamsOrder) IsKnown ¶
func (r WAFPackageRuleListParamsOrder) IsKnown() bool
type WAFPackageRuleListResponse ¶
type WAFPackageRuleListResponse struct {
// The unique identifier of the WAF rule.
ID string `json:"id,required"`
// This field can have the runtime type of [[]AllowedModesAnomaly],
// [[]WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode],
// [[]WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode].
AllowedModes interface{} `json:"allowed_modes,required"`
// The public description of the WAF rule.
Description string `json:"description,required"`
// The rule group to which the current WAF rule belongs.
Group WAFRuleGroup `json:"group,required"`
// When set to `on`, the current WAF rule will be used when evaluating the request.
// Applies to anomaly detection WAF rules.
Mode AllowedModesAnomaly `json:"mode,required"`
// The unique identifier of a WAF package.
PackageID string `json:"package_id,required"`
// The order in which the individual WAF rule is executed within its rule group.
Priority string `json:"priority,required"`
// The default action/mode of a rule.
DefaultMode WAFPackageRuleListResponseDefaultMode `json:"default_mode"`
JSON wafPackageRuleListResponseJSON `json:"-"`
// contains filtered or unexported fields
}
When triggered, anomaly detection WAF rules contribute to an overall threat score that will determine if a request is considered malicious. You can configure the total scoring threshold through the 'sensitivity' property of the WAF package.
func (WAFPackageRuleListResponse) AsUnion ¶
func (r WAFPackageRuleListResponse) AsUnion() WAFPackageRuleListResponseUnion
AsUnion returns a WAFPackageRuleListResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are firewall.WAFPackageRuleListResponseWAFManagedRulesAnomalyRule, firewall.WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRule, firewall.WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRule.
func (*WAFPackageRuleListResponse) UnmarshalJSON ¶
func (r *WAFPackageRuleListResponse) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleListResponseDefaultMode ¶
type WAFPackageRuleListResponseDefaultMode string
The default action/mode of a rule.
const ( WAFPackageRuleListResponseDefaultModeDisable WAFPackageRuleListResponseDefaultMode = "disable" WAFPackageRuleListResponseDefaultModeSimulate WAFPackageRuleListResponseDefaultMode = "simulate" WAFPackageRuleListResponseDefaultModeBlock WAFPackageRuleListResponseDefaultMode = "block" WAFPackageRuleListResponseDefaultModeChallenge WAFPackageRuleListResponseDefaultMode = "challenge" )
func (WAFPackageRuleListResponseDefaultMode) IsKnown ¶
func (r WAFPackageRuleListResponseDefaultMode) IsKnown() bool
type WAFPackageRuleListResponseUnion ¶
type WAFPackageRuleListResponseUnion interface {
// contains filtered or unexported methods
}
When triggered, anomaly detection WAF rules contribute to an overall threat score that will determine if a request is considered malicious. You can configure the total scoring threshold through the 'sensitivity' property of the WAF package.
Union satisfied by firewall.WAFPackageRuleListResponseWAFManagedRulesAnomalyRule, firewall.WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRule or firewall.WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRule.
type WAFPackageRuleListResponseWAFManagedRulesAnomalyRule ¶
type WAFPackageRuleListResponseWAFManagedRulesAnomalyRule struct {
// The unique identifier of the WAF rule.
ID string `json:"id,required"`
// Defines the available modes for the current WAF rule. Applies to anomaly
// detection WAF rules.
AllowedModes []AllowedModesAnomaly `json:"allowed_modes,required"`
// The public description of the WAF rule.
Description string `json:"description,required"`
// The rule group to which the current WAF rule belongs.
Group WAFRuleGroup `json:"group,required"`
// When set to `on`, the current WAF rule will be used when evaluating the request.
// Applies to anomaly detection WAF rules.
Mode AllowedModesAnomaly `json:"mode,required"`
// The unique identifier of a WAF package.
PackageID string `json:"package_id,required"`
// The order in which the individual WAF rule is executed within its rule group.
Priority string `json:"priority,required"`
JSON wafPackageRuleListResponseWAFManagedRulesAnomalyRuleJSON `json:"-"`
}
When triggered, anomaly detection WAF rules contribute to an overall threat score that will determine if a request is considered malicious. You can configure the total scoring threshold through the 'sensitivity' property of the WAF package.
func (*WAFPackageRuleListResponseWAFManagedRulesAnomalyRule) UnmarshalJSON ¶
func (r *WAFPackageRuleListResponseWAFManagedRulesAnomalyRule) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRule ¶
type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRule struct {
// The unique identifier of the WAF rule.
ID string `json:"id,required"`
// Defines the available modes for the current WAF rule.
AllowedModes []WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode `json:"allowed_modes,required"`
// The public description of the WAF rule.
Description string `json:"description,required"`
// The rule group to which the current WAF rule belongs.
Group WAFRuleGroup `json:"group,required"`
// When set to `on`, the current rule will be used when evaluating the request.
// Applies to traditional (allow) WAF rules.
Mode WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleMode `json:"mode,required"`
// The unique identifier of a WAF package.
PackageID string `json:"package_id,required"`
// The order in which the individual WAF rule is executed within its rule group.
Priority string `json:"priority,required"`
JSON wafPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleJSON `json:"-"`
}
When triggered, traditional WAF rules cause the firewall to immediately act on the request based on the rule configuration. An 'allow' rule will immediately allow the request and no other rules will be processed.
func (*WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRule) UnmarshalJSON ¶
func (r *WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRule) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode ¶
type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode string
When set to `on`, the current rule will be used when evaluating the request. Applies to traditional (allow) WAF rules.
const ( WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedModeOn WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode = "on" WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedModeOff WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode = "off" )
func (WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode) IsKnown ¶
func (r WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode) IsKnown() bool
type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleMode ¶
type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleMode string
When set to `on`, the current rule will be used when evaluating the request. Applies to traditional (allow) WAF rules.
const ( WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleModeOn WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleMode = "on" WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleModeOff WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleMode = "off" )
func (WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleMode) IsKnown ¶
func (r WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleMode) IsKnown() bool
type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRule ¶
type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRule struct {
// The unique identifier of the WAF rule.
ID string `json:"id,required"`
// The list of possible actions of the WAF rule when it is triggered.
AllowedModes []WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode `json:"allowed_modes,required"`
// The default action/mode of a rule.
DefaultMode WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode `json:"default_mode,required"`
// The public description of the WAF rule.
Description string `json:"description,required"`
// The rule group to which the current WAF rule belongs.
Group WAFRuleGroup `json:"group,required"`
// The action that the current WAF rule will perform when triggered. Applies to
// traditional (deny) WAF rules.
Mode WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode `json:"mode,required"`
// The unique identifier of a WAF package.
PackageID string `json:"package_id,required"`
// The order in which the individual WAF rule is executed within its rule group.
Priority string `json:"priority,required"`
JSON wafPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleJSON `json:"-"`
}
When triggered, traditional WAF rules cause the firewall to immediately act upon the request based on the configuration of the rule. A 'deny' rule will immediately respond to the request based on the configured rule action/mode (for example, 'block') and no other rules will be processed.
func (*WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRule) UnmarshalJSON ¶
func (r *WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRule) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode ¶
type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode string
The action that the current WAF rule will perform when triggered. Applies to traditional (deny) WAF rules.
const ( WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedModeDefault WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "default" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedModeDisable WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "disable" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedModeSimulate WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "simulate" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedModeBlock WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "block" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedModeChallenge WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode = "challenge" )
func (WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode) IsKnown ¶
func (r WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleAllowedMode) IsKnown() bool
type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode ¶
type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode string
The default action/mode of a rule.
const ( WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultModeDisable WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode = "disable" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultModeSimulate WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode = "simulate" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultModeBlock WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode = "block" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultModeChallenge WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode = "challenge" )
func (WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode) IsKnown ¶
func (r WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleDefaultMode) IsKnown() bool
type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode ¶
type WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode string
The action that the current WAF rule will perform when triggered. Applies to traditional (deny) WAF rules.
const ( WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleModeDefault WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode = "default" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleModeDisable WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode = "disable" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleModeSimulate WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode = "simulate" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleModeBlock WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode = "block" WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleModeChallenge WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode = "challenge" )
func (WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode) IsKnown ¶
func (r WAFPackageRuleListResponseWAFManagedRulesTraditionalDenyRuleMode) IsKnown() bool
type WAFPackageRuleService ¶
type WAFPackageRuleService struct {
Options []option.RequestOption
}
WAFPackageRuleService 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 NewWAFPackageRuleService method instead.
func NewWAFPackageRuleService ¶
func NewWAFPackageRuleService(opts ...option.RequestOption) (r *WAFPackageRuleService)
NewWAFPackageRuleService 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 (*WAFPackageRuleService) Edit ¶
func (r *WAFPackageRuleService) Edit(ctx context.Context, packageID string, ruleID string, params WAFPackageRuleEditParams, opts ...option.RequestOption) (res *WAFPackageRuleEditResponse, err error)
Updates a WAF rule. You can only update the mode/action of the rule.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFPackageRuleService) Get ¶
func (r *WAFPackageRuleService) Get(ctx context.Context, packageID string, ruleID string, query WAFPackageRuleGetParams, opts ...option.RequestOption) (res *interface{}, err error)
Fetches the details of a WAF rule in a WAF package.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFPackageRuleService) List ¶
func (r *WAFPackageRuleService) List(ctx context.Context, packageID string, params WAFPackageRuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[WAFPackageRuleListResponse], err error)
Fetches WAF rules in a WAF package.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFPackageRuleService) ListAutoPaging ¶
func (r *WAFPackageRuleService) ListAutoPaging(ctx context.Context, packageID string, params WAFPackageRuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[WAFPackageRuleListResponse]
Fetches WAF rules in a WAF package.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
type WAFPackageService ¶
type WAFPackageService struct {
Options []option.RequestOption
Groups *WAFPackageGroupService
Rules *WAFPackageRuleService
}
WAFPackageService 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 NewWAFPackageService method instead.
func NewWAFPackageService ¶
func NewWAFPackageService(opts ...option.RequestOption) (r *WAFPackageService)
NewWAFPackageService 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 (*WAFPackageService) Get ¶
func (r *WAFPackageService) Get(ctx context.Context, packageID string, query WAFPackageGetParams, opts ...option.RequestOption) (res *WAFPackageGetResponse, err error)
Fetches the details of a WAF package.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFPackageService) List ¶
func (r *WAFPackageService) List(ctx context.Context, params WAFPackageListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[WAFPackageListResponse], err error)
Fetches WAF packages for a zone.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
func (*WAFPackageService) ListAutoPaging ¶
func (r *WAFPackageService) ListAutoPaging(ctx context.Context, params WAFPackageListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[WAFPackageListResponse]
Fetches WAF packages for a zone.
**Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).
type WAFRule ¶
type WAFRule map[string]WAFRuleItem
type WAFRuleGroup ¶
type WAFRuleGroup struct {
// The unique identifier of the rule group.
ID string `json:"id"`
// The name of the rule group.
Name string `json:"name"`
JSON wafRuleGroupJSON `json:"-"`
}
The rule group to which the current WAF rule belongs.
func (*WAFRuleGroup) UnmarshalJSON ¶
func (r *WAFRuleGroup) UnmarshalJSON(data []byte) (err error)
type WAFRuleItem ¶
type WAFRuleItem string
The WAF rule action to apply.
const ( WAFRuleItemChallenge WAFRuleItem = "challenge" WAFRuleItemBlock WAFRuleItem = "block" WAFRuleItemSimulate WAFRuleItem = "simulate" WAFRuleItemDisable WAFRuleItem = "disable" WAFRuleItemDefault WAFRuleItem = "default" )
func (WAFRuleItem) IsKnown ¶
func (r WAFRuleItem) IsKnown() bool
type WAFRuleParam ¶
type WAFRuleParam map[string]WAFRuleItem
type WAFService
deprecated
type WAFService struct {
Options []option.RequestOption
Overrides *WAFOverrideService
Packages *WAFPackageService
}
WAFService 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 NewWAFService method instead.
Deprecated: WAF managed rules API is deprecated in favour of using the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#waf-managed-rules-apis-previous-version for full details.
func NewWAFService ¶
func NewWAFService(opts ...option.RequestOption) (r *WAFService)
NewWAFService 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.