Documentation
¶
Index ¶
- type AccessRuleDeleteParams
- type AccessRuleDeleteResponse
- type AccessRuleDeleteResponseEnvelope
- type AccessRuleDeleteResponseEnvelopeErrors
- type AccessRuleDeleteResponseEnvelopeMessages
- type AccessRuleDeleteResponseEnvelopeSuccess
- type AccessRuleEditParams
- type AccessRuleEditParamsConfiguration
- type AccessRuleEditParamsConfigurationLegacyJhsASNConfiguration
- type AccessRuleEditParamsConfigurationLegacyJhsASNConfigurationTarget
- type AccessRuleEditParamsConfigurationLegacyJhsCIDRConfiguration
- type AccessRuleEditParamsConfigurationLegacyJhsCIDRConfigurationTarget
- type AccessRuleEditParamsConfigurationLegacyJhsCountryConfiguration
- type AccessRuleEditParamsConfigurationLegacyJhsCountryConfigurationTarget
- type AccessRuleEditParamsConfigurationLegacyJhsIPConfiguration
- type AccessRuleEditParamsConfigurationLegacyJhsIPConfigurationTarget
- type AccessRuleEditParamsConfigurationLegacyJhsIPV6Configuration
- type AccessRuleEditParamsConfigurationLegacyJhsIPV6ConfigurationTarget
- type AccessRuleEditParamsMode
- type AccessRuleEditResponse
- type AccessRuleEditResponseEnvelope
- type AccessRuleEditResponseEnvelopeErrors
- type AccessRuleEditResponseEnvelopeMessages
- type AccessRuleEditResponseEnvelopeSuccess
- type AccessRuleGetParams
- type AccessRuleGetResponse
- type AccessRuleGetResponseEnvelope
- type AccessRuleGetResponseEnvelopeErrors
- type AccessRuleGetResponseEnvelopeMessages
- type AccessRuleGetResponseEnvelopeSuccess
- type AccessRuleListParams
- type AccessRuleListParamsDirection
- type AccessRuleListParamsEgsPagination
- type AccessRuleListParamsEgsPaginationJson
- type AccessRuleListParamsFilters
- type AccessRuleListParamsFiltersConfigurationTarget
- type AccessRuleListParamsFiltersMatch
- type AccessRuleListParamsFiltersMode
- type AccessRuleListParamsOrder
- type AccessRuleListResponse
- type AccessRuleNewParams
- type AccessRuleNewParamsConfiguration
- type AccessRuleNewParamsConfigurationLegacyJhsASNConfiguration
- type AccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget
- type AccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration
- type AccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget
- type AccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration
- type AccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget
- type AccessRuleNewParamsConfigurationLegacyJhsIPConfiguration
- type AccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget
- type AccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration
- type AccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget
- type AccessRuleNewParamsMode
- type AccessRuleNewResponse
- type AccessRuleNewResponseEnvelope
- type AccessRuleNewResponseEnvelopeErrors
- type AccessRuleNewResponseEnvelopeMessages
- type AccessRuleNewResponseEnvelopeSuccess
- type AccessRuleService
- func (r *AccessRuleService) Delete(ctx context.Context, identifier interface{}, body AccessRuleDeleteParams, ...) (res *AccessRuleDeleteResponse, err error)
- func (r *AccessRuleService) Edit(ctx context.Context, identifier interface{}, params AccessRuleEditParams, ...) (res *AccessRuleEditResponse, err error)
- func (r *AccessRuleService) Get(ctx context.Context, identifier interface{}, query AccessRuleGetParams, ...) (res *AccessRuleGetResponse, err error)
- func (r *AccessRuleService) List(ctx context.Context, params AccessRuleListParams, opts ...option.RequestOption) (res *shared.V4PagePaginationArray[AccessRuleListResponse], err error)
- func (r *AccessRuleService) ListAutoPaging(ctx context.Context, params AccessRuleListParams, opts ...option.RequestOption) *shared.V4PagePaginationArrayAutoPager[AccessRuleListResponse]
- func (r *AccessRuleService) New(ctx context.Context, params AccessRuleNewParams, opts ...option.RequestOption) (res *AccessRuleNewResponse, err error)
- type Error
- type ErrorData
- type FirewallService
- type LegacyJhsFilterRule
- type LegacyJhsFilterRuleAction
- type LegacyJhsFilterRuleFilter
- type LegacyJhsFilterRuleFilterLegacyJhsDeletedFilter
- type LegacyJhsFilterRuleProduct
- type LegacyJhsOverride
- type LegacyJhsOverrideRewriteAction
- type LegacyJhsOverrideRewriteActionBlock
- type LegacyJhsOverrideRewriteActionDisable
- type LegacyJhsOverrideRule
- type LegacyJhsZonelockdown
- type LegacyJhsZonelockdownConfigurations
- type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfiguration
- type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfigurationTarget
- type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfiguration
- type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfigurationTarget
- type LockdownDeleteResponse
- type LockdownDeleteResponseEnvelope
- type LockdownGetResponseEnvelope
- type LockdownGetResponseEnvelopeErrors
- type LockdownGetResponseEnvelopeMessages
- type LockdownGetResponseEnvelopeSuccess
- type LockdownListParams
- type LockdownNewParams
- type LockdownNewResponseEnvelope
- type LockdownNewResponseEnvelopeErrors
- type LockdownNewResponseEnvelopeMessages
- type LockdownNewResponseEnvelopeSuccess
- type LockdownService
- func (r *LockdownService) Delete(ctx context.Context, zoneIdentifier string, id string, ...) (res *LockdownDeleteResponse, err error)
- func (r *LockdownService) Get(ctx context.Context, zoneIdentifier string, id string, ...) (res *LegacyJhsZonelockdown, err error)
- func (r *LockdownService) List(ctx context.Context, zoneIdentifier string, query LockdownListParams, ...) (res *shared.V4PagePaginationArray[LegacyJhsZonelockdown], err error)
- func (r *LockdownService) ListAutoPaging(ctx context.Context, zoneIdentifier string, query LockdownListParams, ...) *shared.V4PagePaginationArrayAutoPager[LegacyJhsZonelockdown]
- func (r *LockdownService) New(ctx context.Context, zoneIdentifier string, body LockdownNewParams, ...) (res *LegacyJhsZonelockdown, err error)
- func (r *LockdownService) Update(ctx context.Context, zoneIdentifier string, id string, ...) (res *LegacyJhsZonelockdown, err error)
- type LockdownUpdateParams
- type LockdownUpdateResponseEnvelope
- type LockdownUpdateResponseEnvelopeErrors
- type LockdownUpdateResponseEnvelopeMessages
- type LockdownUpdateResponseEnvelopeSuccess
- type RuleDeleteParams
- type RuleDeleteResponseEnvelope
- type RuleDeleteResponseEnvelopeErrors
- type RuleDeleteResponseEnvelopeMessages
- type RuleDeleteResponseEnvelopeSuccess
- type RuleEditParams
- type RuleEditResponseEnvelope
- type RuleEditResponseEnvelopeErrors
- type RuleEditResponseEnvelopeMessages
- type RuleEditResponseEnvelopeResultInfo
- type RuleEditResponseEnvelopeSuccess
- type RuleGetParams
- type RuleGetResponseEnvelope
- type RuleGetResponseEnvelopeErrors
- type RuleGetResponseEnvelopeMessages
- type RuleGetResponseEnvelopeSuccess
- type RuleListParams
- type RuleNewParams
- type RuleNewResponseEnvelope
- type RuleNewResponseEnvelopeErrors
- type RuleNewResponseEnvelopeMessages
- type RuleNewResponseEnvelopeResultInfo
- type RuleNewResponseEnvelopeSuccess
- type RuleService
- func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, id string, body RuleDeleteParams, ...) (res *LegacyJhsFilterRule, err error)
- func (r *RuleService) Edit(ctx context.Context, zoneIdentifier string, id string, body RuleEditParams, ...) (res *[]LegacyJhsFilterRule, err error)
- func (r *RuleService) Get(ctx context.Context, zoneIdentifier string, id string, query RuleGetParams, ...) (res *LegacyJhsFilterRule, err error)
- func (r *RuleService) List(ctx context.Context, zoneIdentifier string, query RuleListParams, ...) (res *shared.V4PagePaginationArray[LegacyJhsFilterRule], err error)
- func (r *RuleService) ListAutoPaging(ctx context.Context, zoneIdentifier string, query RuleListParams, ...) *shared.V4PagePaginationArrayAutoPager[LegacyJhsFilterRule]
- func (r *RuleService) New(ctx context.Context, zoneIdentifier string, body RuleNewParams, ...) (res *[]LegacyJhsFilterRule, err error)
- func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, id string, body RuleUpdateParams, ...) (res *LegacyJhsFilterRule, err error)
- type RuleUpdateParams
- type RuleUpdateResponseEnvelope
- type RuleUpdateResponseEnvelopeErrors
- type RuleUpdateResponseEnvelopeMessages
- type RuleUpdateResponseEnvelopeSuccess
- type UARuleDeleteResponse
- type UARuleDeleteResponseEnvelope
- type UARuleDeleteResponseEnvelopeErrors
- type UARuleDeleteResponseEnvelopeMessages
- type UARuleDeleteResponseEnvelopeSuccess
- type UARuleGetResponse
- type UARuleGetResponseEnvelope
- type UARuleGetResponseEnvelopeErrors
- type UARuleGetResponseEnvelopeMessages
- type UARuleGetResponseEnvelopeSuccess
- type UARuleListParams
- type UARuleListResponse
- type UARuleListResponseConfiguration
- type UARuleListResponseMode
- type UARuleNewParams
- type UARuleNewResponse
- type UARuleNewResponseEnvelope
- type UARuleNewResponseEnvelopeErrors
- type UARuleNewResponseEnvelopeMessages
- type UARuleNewResponseEnvelopeSuccess
- type UARuleService
- func (r *UARuleService) Delete(ctx context.Context, zoneIdentifier string, id string, ...) (res *UARuleDeleteResponse, err error)
- func (r *UARuleService) Get(ctx context.Context, zoneIdentifier string, id string, ...) (res *UARuleGetResponse, err error)
- func (r *UARuleService) List(ctx context.Context, zoneIdentifier string, query UARuleListParams, ...) (res *shared.V4PagePaginationArray[UARuleListResponse], err error)
- func (r *UARuleService) ListAutoPaging(ctx context.Context, zoneIdentifier string, query UARuleListParams, ...) *shared.V4PagePaginationArrayAutoPager[UARuleListResponse]
- func (r *UARuleService) New(ctx context.Context, zoneIdentifier string, body UARuleNewParams, ...) (res *UARuleNewResponse, err error)
- func (r *UARuleService) Update(ctx context.Context, zoneIdentifier string, id string, body UARuleUpdateParams, ...) (res *UARuleUpdateResponse, err error)
- type UARuleUpdateParams
- type UARuleUpdateResponse
- type UARuleUpdateResponseEnvelope
- type UARuleUpdateResponseEnvelopeErrors
- type UARuleUpdateResponseEnvelopeMessages
- type UARuleUpdateResponseEnvelopeSuccess
- type WAFManagedRulesRule
- type WAFManagedRulesRuleWAFManagedRulesAnomalyRule
- type WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedMode
- type WAFManagedRulesRuleWAFManagedRulesAnomalyRuleGroup
- type WAFManagedRulesRuleWAFManagedRulesAnomalyRuleMode
- type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRule
- type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedMode
- type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleGroup
- type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleMode
- type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRule
- type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode
- type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode
- type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleGroup
- type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode
- type WAFManagedRulesSchemasGroup
- type WAFManagedRulesSchemasGroupAllowedMode
- type WAFManagedRulesSchemasGroupMode
- type WAFOverrideDeleteResponse
- type WAFOverrideDeleteResponseEnvelope
- type WAFOverrideGetResponseEnvelope
- type WAFOverrideGetResponseEnvelopeErrors
- type WAFOverrideGetResponseEnvelopeMessages
- type WAFOverrideGetResponseEnvelopeSuccess
- type WAFOverrideListParams
- type WAFOverrideNewParams
- type WAFOverrideNewResponseEnvelope
- type WAFOverrideNewResponseEnvelopeErrors
- type WAFOverrideNewResponseEnvelopeMessages
- type WAFOverrideNewResponseEnvelopeSuccess
- type WAFOverrideService
- func (r *WAFOverrideService) Delete(ctx context.Context, zoneIdentifier string, id string, ...) (res *WAFOverrideDeleteResponse, err error)
- func (r *WAFOverrideService) Get(ctx context.Context, zoneIdentifier string, id string, ...) (res *LegacyJhsOverride, err error)
- func (r *WAFOverrideService) List(ctx context.Context, zoneIdentifier string, query WAFOverrideListParams, ...) (res *shared.V4PagePaginationArray[LegacyJhsOverride], err error)
- func (r *WAFOverrideService) ListAutoPaging(ctx context.Context, zoneIdentifier string, query WAFOverrideListParams, ...) *shared.V4PagePaginationArrayAutoPager[LegacyJhsOverride]
- func (r *WAFOverrideService) New(ctx context.Context, zoneIdentifier string, body WAFOverrideNewParams, ...) (res *LegacyJhsOverride, err error)
- func (r *WAFOverrideService) Update(ctx context.Context, zoneIdentifier string, id string, ...) (res *LegacyJhsOverride, err error)
- type WAFOverrideUpdateParams
- type WAFOverrideUpdateResponseEnvelope
- type WAFOverrideUpdateResponseEnvelopeErrors
- type WAFOverrideUpdateResponseEnvelopeMessages
- type WAFOverrideUpdateResponseEnvelopeSuccess
- type WAFPackageGetResponse
- type WAFPackageGetResponseLegacyJhsAPIResponseSingle
- type WAFPackageGetResponseLegacyJhsAPIResponseSingleError
- type WAFPackageGetResponseLegacyJhsAPIResponseSingleMessage
- type WAFPackageGetResponseLegacyJhsAPIResponseSingleResult
- type WAFPackageGetResponseLegacyJhsAPIResponseSingleSuccess
- type WAFPackageGetResponseObject
- type WAFPackageGroupEditParams
- type WAFPackageGroupEditParamsMode
- type WAFPackageGroupEditResponse
- type WAFPackageGroupEditResponseArray
- type WAFPackageGroupEditResponseEnvelope
- type WAFPackageGroupEditResponseEnvelopeErrors
- type WAFPackageGroupEditResponseEnvelopeMessages
- type WAFPackageGroupEditResponseEnvelopeSuccess
- type WAFPackageGroupGetParams
- type WAFPackageGroupGetResponse
- type WAFPackageGroupGetResponseArray
- type WAFPackageGroupGetResponseEnvelope
- type WAFPackageGroupGetResponseEnvelopeErrors
- type WAFPackageGroupGetResponseEnvelopeMessages
- 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 *WAFPackageGroupEditResponse, err error)
- func (r *WAFPackageGroupService) Get(ctx context.Context, packageID string, groupID string, ...) (res *WAFPackageGroupGetResponse, err error)
- func (r *WAFPackageGroupService) List(ctx context.Context, packageID string, params WAFPackageGroupListParams, ...) (res *shared.V4PagePaginationArray[WAFManagedRulesSchemasGroup], err error)
- func (r *WAFPackageGroupService) ListAutoPaging(ctx context.Context, packageID string, params WAFPackageGroupListParams, ...) *shared.V4PagePaginationArrayAutoPager[WAFManagedRulesSchemasGroup]
- type WAFPackageListParams
- type WAFPackageListParamsDirection
- type WAFPackageListParamsMatch
- type WAFPackageListParamsOrder
- type WAFPackageListResponse
- type WAFPackageListResponseLegacyJhsAPIResponseCollection
- type WAFPackageListResponseLegacyJhsAPIResponseCollectionError
- type WAFPackageListResponseLegacyJhsAPIResponseCollectionMessage
- type WAFPackageListResponseLegacyJhsAPIResponseCollectionResult
- type WAFPackageListResponseLegacyJhsAPIResponseCollectionResultArray
- type WAFPackageListResponseLegacyJhsAPIResponseCollectionResultInfo
- type WAFPackageListResponseLegacyJhsAPIResponseCollectionSuccess
- type WAFPackageListResponseObject
- type WAFPackageListResponseObjectResult
- type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackage
- type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionMode
- type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionMode
- type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity
- type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageStatus
- type WAFPackageListResponseObjectResultLegacyJhsPackageDefinition
- type WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionMode
- type WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionStatus
- type WAFPackageRuleEditParams
- type WAFPackageRuleEditParamsMode
- type WAFPackageRuleEditResponse
- type WAFPackageRuleEditResponseEnvelope
- type WAFPackageRuleEditResponseEnvelopeErrors
- type WAFPackageRuleEditResponseEnvelopeMessages
- type WAFPackageRuleEditResponseEnvelopeSuccess
- type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRule
- type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedMode
- type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleGroup
- type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleMode
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleGroup
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRule
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleAllowedMode
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleDefaultMode
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleGroup
- type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleMode
- type WAFPackageRuleGetParams
- type WAFPackageRuleGetResponse
- type WAFPackageRuleGetResponseArray
- type WAFPackageRuleGetResponseEnvelope
- type WAFPackageRuleGetResponseEnvelopeErrors
- type WAFPackageRuleGetResponseEnvelopeMessages
- type WAFPackageRuleGetResponseEnvelopeSuccess
- type WAFPackageRuleListParams
- type WAFPackageRuleListParamsDirection
- type WAFPackageRuleListParamsMatch
- type WAFPackageRuleListParamsMode
- type WAFPackageRuleListParamsOrder
- 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 *WAFPackageRuleGetResponse, err error)
- func (r *WAFPackageRuleService) List(ctx context.Context, packageID string, params WAFPackageRuleListParams, ...) (res *shared.V4PagePaginationArray[WAFManagedRulesRule], err error)
- func (r *WAFPackageRuleService) ListAutoPaging(ctx context.Context, packageID string, params WAFPackageRuleListParams, ...) *shared.V4PagePaginationArrayAutoPager[WAFManagedRulesRule]
- type WAFPackageService
- func (r *WAFPackageService) Get(ctx context.Context, zoneIdentifier string, identifier string, ...) (res *WAFPackageGetResponse, err error)
- func (r *WAFPackageService) List(ctx context.Context, zoneIdentifier string, query WAFPackageListParams, ...) (res *shared.V4PagePaginationArray[WAFPackageListResponse], err error)
- func (r *WAFPackageService) ListAutoPaging(ctx context.Context, zoneIdentifier string, query WAFPackageListParams, ...) *shared.V4PagePaginationArrayAutoPager[WAFPackageListResponse]
- type WAFService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 []AccessRuleDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []AccessRuleDeleteResponseEnvelopeMessages `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 AccessRuleDeleteResponseEnvelopeErrors ¶
type AccessRuleDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON accessRuleDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AccessRuleDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AccessRuleDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AccessRuleDeleteResponseEnvelopeMessages ¶
type AccessRuleDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON accessRuleDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AccessRuleDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AccessRuleDeleteResponseEnvelopeMessages) 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[AccessRuleEditParamsConfiguration] `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 interface {
// contains filtered or unexported methods
}
The rule configuration.
Satisfied by firewall.AccessRuleEditParamsConfigurationLegacyJhsIPConfiguration, firewall.AccessRuleEditParamsConfigurationLegacyJhsIPV6Configuration, firewall.AccessRuleEditParamsConfigurationLegacyJhsCIDRConfiguration, firewall.AccessRuleEditParamsConfigurationLegacyJhsASNConfiguration, firewall.AccessRuleEditParamsConfigurationLegacyJhsCountryConfiguration.
type AccessRuleEditParamsConfigurationLegacyJhsASNConfiguration ¶
type AccessRuleEditParamsConfigurationLegacyJhsASNConfiguration struct {
// The configuration target. You must set the target to `asn` when specifying an
// Autonomous System Number (ASN) in the rule.
Target param.Field[AccessRuleEditParamsConfigurationLegacyJhsASNConfigurationTarget] `json:"target"`
// The AS number to match.
Value param.Field[string] `json:"value"`
}
func (AccessRuleEditParamsConfigurationLegacyJhsASNConfiguration) MarshalJSON ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsASNConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleEditParamsConfigurationLegacyJhsASNConfigurationTarget ¶
type AccessRuleEditParamsConfigurationLegacyJhsASNConfigurationTarget string
The configuration target. You must set the target to `asn` when specifying an Autonomous System Number (ASN) in the rule.
const (
AccessRuleEditParamsConfigurationLegacyJhsASNConfigurationTargetASN AccessRuleEditParamsConfigurationLegacyJhsASNConfigurationTarget = "asn"
)
func (AccessRuleEditParamsConfigurationLegacyJhsASNConfigurationTarget) IsKnown ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsASNConfigurationTarget) IsKnown() bool
type AccessRuleEditParamsConfigurationLegacyJhsCIDRConfiguration ¶
type AccessRuleEditParamsConfigurationLegacyJhsCIDRConfiguration struct {
// The configuration target. You must set the target to `ip_range` when specifying
// an IP address range in the rule.
Target param.Field[AccessRuleEditParamsConfigurationLegacyJhsCIDRConfigurationTarget] `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 (AccessRuleEditParamsConfigurationLegacyJhsCIDRConfiguration) MarshalJSON ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsCIDRConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleEditParamsConfigurationLegacyJhsCIDRConfigurationTarget ¶
type AccessRuleEditParamsConfigurationLegacyJhsCIDRConfigurationTarget string
The configuration target. You must set the target to `ip_range` when specifying an IP address range in the rule.
const (
AccessRuleEditParamsConfigurationLegacyJhsCIDRConfigurationTargetIPRange AccessRuleEditParamsConfigurationLegacyJhsCIDRConfigurationTarget = "ip_range"
)
func (AccessRuleEditParamsConfigurationLegacyJhsCIDRConfigurationTarget) IsKnown ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsCIDRConfigurationTarget) IsKnown() bool
type AccessRuleEditParamsConfigurationLegacyJhsCountryConfiguration ¶
type AccessRuleEditParamsConfigurationLegacyJhsCountryConfiguration struct {
// The configuration target. You must set the target to `country` when specifying a
// country code in the rule.
Target param.Field[AccessRuleEditParamsConfigurationLegacyJhsCountryConfigurationTarget] `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 (AccessRuleEditParamsConfigurationLegacyJhsCountryConfiguration) MarshalJSON ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsCountryConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleEditParamsConfigurationLegacyJhsCountryConfigurationTarget ¶
type AccessRuleEditParamsConfigurationLegacyJhsCountryConfigurationTarget string
The configuration target. You must set the target to `country` when specifying a country code in the rule.
const (
AccessRuleEditParamsConfigurationLegacyJhsCountryConfigurationTargetCountry AccessRuleEditParamsConfigurationLegacyJhsCountryConfigurationTarget = "country"
)
func (AccessRuleEditParamsConfigurationLegacyJhsCountryConfigurationTarget) IsKnown ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsCountryConfigurationTarget) IsKnown() bool
type AccessRuleEditParamsConfigurationLegacyJhsIPConfiguration ¶
type AccessRuleEditParamsConfigurationLegacyJhsIPConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target param.Field[AccessRuleEditParamsConfigurationLegacyJhsIPConfigurationTarget] `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 (AccessRuleEditParamsConfigurationLegacyJhsIPConfiguration) MarshalJSON ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsIPConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleEditParamsConfigurationLegacyJhsIPConfigurationTarget ¶
type AccessRuleEditParamsConfigurationLegacyJhsIPConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const (
AccessRuleEditParamsConfigurationLegacyJhsIPConfigurationTargetIP AccessRuleEditParamsConfigurationLegacyJhsIPConfigurationTarget = "ip"
)
func (AccessRuleEditParamsConfigurationLegacyJhsIPConfigurationTarget) IsKnown ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsIPConfigurationTarget) IsKnown() bool
type AccessRuleEditParamsConfigurationLegacyJhsIPV6Configuration ¶
type AccessRuleEditParamsConfigurationLegacyJhsIPV6Configuration struct {
// The configuration target. You must set the target to `ip6` when specifying an
// IPv6 address in the rule.
Target param.Field[AccessRuleEditParamsConfigurationLegacyJhsIPV6ConfigurationTarget] `json:"target"`
// The IPv6 address to match.
Value param.Field[string] `json:"value"`
}
func (AccessRuleEditParamsConfigurationLegacyJhsIPV6Configuration) MarshalJSON ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsIPV6Configuration) MarshalJSON() (data []byte, err error)
type AccessRuleEditParamsConfigurationLegacyJhsIPV6ConfigurationTarget ¶
type AccessRuleEditParamsConfigurationLegacyJhsIPV6ConfigurationTarget string
The configuration target. You must set the target to `ip6` when specifying an IPv6 address in the rule.
const (
AccessRuleEditParamsConfigurationLegacyJhsIPV6ConfigurationTargetIp6 AccessRuleEditParamsConfigurationLegacyJhsIPV6ConfigurationTarget = "ip6"
)
func (AccessRuleEditParamsConfigurationLegacyJhsIPV6ConfigurationTarget) IsKnown ¶
func (r AccessRuleEditParamsConfigurationLegacyJhsIPV6ConfigurationTarget) IsKnown() bool
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 interface {
ImplementsFirewallAccessRuleEditResponse()
}
Union satisfied by firewall.AccessRuleEditResponseUnknown or shared.UnionString.
type AccessRuleEditResponseEnvelope ¶
type AccessRuleEditResponseEnvelope struct {
Errors []AccessRuleEditResponseEnvelopeErrors `json:"errors,required"`
Messages []AccessRuleEditResponseEnvelopeMessages `json:"messages,required"`
Result AccessRuleEditResponse `json:"result,required,nullable"`
// 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 AccessRuleEditResponseEnvelopeErrors ¶
type AccessRuleEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON accessRuleEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AccessRuleEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AccessRuleEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AccessRuleEditResponseEnvelopeMessages ¶
type AccessRuleEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON accessRuleEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AccessRuleEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AccessRuleEditResponseEnvelopeMessages) 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 AccessRuleGetParams ¶
type AccessRuleGetResponse ¶
type AccessRuleGetResponse interface {
ImplementsFirewallAccessRuleGetResponse()
}
Union satisfied by firewall.AccessRuleGetResponseUnknown or shared.UnionString.
type AccessRuleGetResponseEnvelope ¶
type AccessRuleGetResponseEnvelope struct {
Errors []AccessRuleGetResponseEnvelopeErrors `json:"errors,required"`
Messages []AccessRuleGetResponseEnvelopeMessages `json:"messages,required"`
Result AccessRuleGetResponse `json:"result,required,nullable"`
// 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 AccessRuleGetResponseEnvelopeErrors ¶
type AccessRuleGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON accessRuleGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AccessRuleGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AccessRuleGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AccessRuleGetResponseEnvelopeMessages ¶
type AccessRuleGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON accessRuleGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AccessRuleGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AccessRuleGetResponseEnvelopeMessages) 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 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"`
// The direction used to sort returned rules.
Direction param.Field[AccessRuleListParamsDirection] `query:"direction"`
EgsPagination param.Field[AccessRuleListParamsEgsPagination] `query:"egs-pagination"`
Filters param.Field[AccessRuleListParamsFilters] `query:"filters"`
// 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 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 AccessRuleListParamsEgsPagination ¶
type AccessRuleListParamsEgsPagination struct {
Json param.Field[AccessRuleListParamsEgsPaginationJson] `query:"json"`
}
func (AccessRuleListParamsEgsPagination) URLQuery ¶
func (r AccessRuleListParamsEgsPagination) URLQuery() (v url.Values)
URLQuery serializes AccessRuleListParamsEgsPagination's query parameters as `url.Values`.
type AccessRuleListParamsEgsPaginationJson ¶
type AccessRuleListParamsEgsPaginationJson struct {
// The 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"`
}
func (AccessRuleListParamsEgsPaginationJson) URLQuery ¶
func (r AccessRuleListParamsEgsPaginationJson) URLQuery() (v url.Values)
URLQuery serializes AccessRuleListParamsEgsPaginationJson's query parameters as `url.Values`.
type AccessRuleListParamsFilters ¶
type AccessRuleListParamsFilters struct {
// The target to search in existing rules.
ConfigurationTarget param.Field[AccessRuleListParamsFiltersConfigurationTarget] `query:"configuration.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.
ConfigurationValue param.Field[string] `query:"configuration.value"`
// 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[AccessRuleListParamsFiltersMatch] `query:"match"`
// The action to apply to a matched request.
Mode param.Field[AccessRuleListParamsFiltersMode] `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"`
}
func (AccessRuleListParamsFilters) URLQuery ¶
func (r AccessRuleListParamsFilters) URLQuery() (v url.Values)
URLQuery serializes AccessRuleListParamsFilters's query parameters as `url.Values`.
type AccessRuleListParamsFiltersConfigurationTarget ¶
type AccessRuleListParamsFiltersConfigurationTarget string
The target to search in existing rules.
const ( AccessRuleListParamsFiltersConfigurationTargetIP AccessRuleListParamsFiltersConfigurationTarget = "ip" AccessRuleListParamsFiltersConfigurationTargetIPRange AccessRuleListParamsFiltersConfigurationTarget = "ip_range" AccessRuleListParamsFiltersConfigurationTargetASN AccessRuleListParamsFiltersConfigurationTarget = "asn" AccessRuleListParamsFiltersConfigurationTargetCountry AccessRuleListParamsFiltersConfigurationTarget = "country" )
func (AccessRuleListParamsFiltersConfigurationTarget) IsKnown ¶
func (r AccessRuleListParamsFiltersConfigurationTarget) IsKnown() bool
type AccessRuleListParamsFiltersMatch ¶
type AccessRuleListParamsFiltersMatch 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 ( AccessRuleListParamsFiltersMatchAny AccessRuleListParamsFiltersMatch = "any" AccessRuleListParamsFiltersMatchAll AccessRuleListParamsFiltersMatch = "all" )
func (AccessRuleListParamsFiltersMatch) IsKnown ¶
func (r AccessRuleListParamsFiltersMatch) IsKnown() bool
type AccessRuleListParamsFiltersMode ¶
type AccessRuleListParamsFiltersMode string
The action to apply to a matched request.
const ( AccessRuleListParamsFiltersModeBlock AccessRuleListParamsFiltersMode = "block" AccessRuleListParamsFiltersModeChallenge AccessRuleListParamsFiltersMode = "challenge" AccessRuleListParamsFiltersModeWhitelist AccessRuleListParamsFiltersMode = "whitelist" AccessRuleListParamsFiltersModeJsChallenge AccessRuleListParamsFiltersMode = "js_challenge" AccessRuleListParamsFiltersModeManagedChallenge AccessRuleListParamsFiltersMode = "managed_challenge" )
func (AccessRuleListParamsFiltersMode) IsKnown ¶
func (r AccessRuleListParamsFiltersMode) 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 = interface{}
type AccessRuleNewParams ¶
type AccessRuleNewParams struct {
// The rule configuration.
Configuration param.Field[AccessRuleNewParamsConfiguration] `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 interface {
// contains filtered or unexported methods
}
The rule configuration.
Satisfied by firewall.AccessRuleNewParamsConfigurationLegacyJhsIPConfiguration, firewall.AccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration, firewall.AccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration, firewall.AccessRuleNewParamsConfigurationLegacyJhsASNConfiguration, firewall.AccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration.
type AccessRuleNewParamsConfigurationLegacyJhsASNConfiguration ¶
type AccessRuleNewParamsConfigurationLegacyJhsASNConfiguration struct {
// The configuration target. You must set the target to `asn` when specifying an
// Autonomous System Number (ASN) in the rule.
Target param.Field[AccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget] `json:"target"`
// The AS number to match.
Value param.Field[string] `json:"value"`
}
func (AccessRuleNewParamsConfigurationLegacyJhsASNConfiguration) MarshalJSON ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsASNConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget ¶
type AccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget string
The configuration target. You must set the target to `asn` when specifying an Autonomous System Number (ASN) in the rule.
const (
AccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTargetASN AccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget = "asn"
)
func (AccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget) IsKnown ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget) IsKnown() bool
type AccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration ¶
type AccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration struct {
// The configuration target. You must set the target to `ip_range` when specifying
// an IP address range in the rule.
Target param.Field[AccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget] `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 (AccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration) MarshalJSON ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget ¶
type AccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget string
The configuration target. You must set the target to `ip_range` when specifying an IP address range in the rule.
const (
AccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTargetIPRange AccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget = "ip_range"
)
func (AccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget) IsKnown ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget) IsKnown() bool
type AccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration ¶
type AccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration struct {
// The configuration target. You must set the target to `country` when specifying a
// country code in the rule.
Target param.Field[AccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget] `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 (AccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration) MarshalJSON ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget ¶
type AccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget string
The configuration target. You must set the target to `country` when specifying a country code in the rule.
const (
AccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTargetCountry AccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget = "country"
)
func (AccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget) IsKnown ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget) IsKnown() bool
type AccessRuleNewParamsConfigurationLegacyJhsIPConfiguration ¶
type AccessRuleNewParamsConfigurationLegacyJhsIPConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the rule.
Target param.Field[AccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget] `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 (AccessRuleNewParamsConfigurationLegacyJhsIPConfiguration) MarshalJSON ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsIPConfiguration) MarshalJSON() (data []byte, err error)
type AccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget ¶
type AccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const (
AccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTargetIP AccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget = "ip"
)
func (AccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget) IsKnown ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget) IsKnown() bool
type AccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration ¶
type AccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration struct {
// The configuration target. You must set the target to `ip6` when specifying an
// IPv6 address in the rule.
Target param.Field[AccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget] `json:"target"`
// The IPv6 address to match.
Value param.Field[string] `json:"value"`
}
func (AccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration) MarshalJSON ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration) MarshalJSON() (data []byte, err error)
type AccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget ¶
type AccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget string
The configuration target. You must set the target to `ip6` when specifying an IPv6 address in the rule.
const (
AccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTargetIp6 AccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget = "ip6"
)
func (AccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget) IsKnown ¶
func (r AccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget) IsKnown() bool
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 interface {
ImplementsFirewallAccessRuleNewResponse()
}
Union satisfied by firewall.AccessRuleNewResponseUnknown or shared.UnionString.
type AccessRuleNewResponseEnvelope ¶
type AccessRuleNewResponseEnvelope struct {
Errors []AccessRuleNewResponseEnvelopeErrors `json:"errors,required"`
Messages []AccessRuleNewResponseEnvelopeMessages `json:"messages,required"`
Result AccessRuleNewResponse `json:"result,required,nullable"`
// 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 AccessRuleNewResponseEnvelopeErrors ¶
type AccessRuleNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON accessRuleNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AccessRuleNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AccessRuleNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AccessRuleNewResponseEnvelopeMessages ¶
type AccessRuleNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON accessRuleNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AccessRuleNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AccessRuleNewResponseEnvelopeMessages) 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 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, identifier interface{}, 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, identifier interface{}, params AccessRuleEditParams, opts ...option.RequestOption) (res *AccessRuleEditResponse, err error)
Updates an IP Access rule defined at the account level.
Note: This operation will affect all zones in the account.
func (*AccessRuleService) Get ¶
func (r *AccessRuleService) Get(ctx context.Context, identifier interface{}, 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 *shared.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) *shared.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 FirewallService ¶
type FirewallService struct {
Options []option.RequestOption
Lockdowns *LockdownService
Rules *RuleService
AccessRules *AccessRuleService
UARules *UARuleService
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 LegacyJhsFilterRule ¶
type LegacyJhsFilterRule 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 LegacyJhsFilterRuleAction `json:"action"`
// An informative summary of the firewall rule.
Description string `json:"description"`
Filter LegacyJhsFilterRuleFilter `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 []LegacyJhsFilterRuleProduct `json:"products"`
// A short reference tag. Allows you to select related firewall rules.
Ref string `json:"ref"`
JSON legacyJhsFilterRuleJSON `json:"-"`
}
func (*LegacyJhsFilterRule) UnmarshalJSON ¶
func (r *LegacyJhsFilterRule) UnmarshalJSON(data []byte) (err error)
type LegacyJhsFilterRuleAction ¶
type LegacyJhsFilterRuleAction string
The action to apply to a matched request. The `log` action is only available on an Enterprise plan.
const ( LegacyJhsFilterRuleActionBlock LegacyJhsFilterRuleAction = "block" LegacyJhsFilterRuleActionChallenge LegacyJhsFilterRuleAction = "challenge" LegacyJhsFilterRuleActionJsChallenge LegacyJhsFilterRuleAction = "js_challenge" LegacyJhsFilterRuleActionManagedChallenge LegacyJhsFilterRuleAction = "managed_challenge" LegacyJhsFilterRuleActionAllow LegacyJhsFilterRuleAction = "allow" LegacyJhsFilterRuleActionLog LegacyJhsFilterRuleAction = "log" LegacyJhsFilterRuleActionBypass LegacyJhsFilterRuleAction = "bypass" )
func (LegacyJhsFilterRuleAction) IsKnown ¶
func (r LegacyJhsFilterRuleAction) IsKnown() bool
type LegacyJhsFilterRuleFilter ¶
type LegacyJhsFilterRuleFilter interface {
// contains filtered or unexported methods
}
Union satisfied by filters.LegacyJhsFilter or firewall.LegacyJhsFilterRuleFilterLegacyJhsDeletedFilter.
type LegacyJhsFilterRuleFilterLegacyJhsDeletedFilter ¶
type LegacyJhsFilterRuleFilterLegacyJhsDeletedFilter 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 legacyJhsFilterRuleFilterLegacyJhsDeletedFilterJSON `json:"-"`
}
func (*LegacyJhsFilterRuleFilterLegacyJhsDeletedFilter) UnmarshalJSON ¶
func (r *LegacyJhsFilterRuleFilterLegacyJhsDeletedFilter) UnmarshalJSON(data []byte) (err error)
type LegacyJhsFilterRuleProduct ¶
type LegacyJhsFilterRuleProduct string
A list of products to bypass for a request when using the `bypass` action.
const ( LegacyJhsFilterRuleProductZoneLockdown LegacyJhsFilterRuleProduct = "zoneLockdown" LegacyJhsFilterRuleProductUABlock LegacyJhsFilterRuleProduct = "uaBlock" LegacyJhsFilterRuleProductBic LegacyJhsFilterRuleProduct = "bic" LegacyJhsFilterRuleProductHot LegacyJhsFilterRuleProduct = "hot" LegacyJhsFilterRuleProductSecurityLevel LegacyJhsFilterRuleProduct = "securityLevel" LegacyJhsFilterRuleProductRateLimit LegacyJhsFilterRuleProduct = "rateLimit" LegacyJhsFilterRuleProductWAF LegacyJhsFilterRuleProduct = "waf" )
func (LegacyJhsFilterRuleProduct) IsKnown ¶
func (r LegacyJhsFilterRuleProduct) IsKnown() bool
type LegacyJhsOverride ¶
type LegacyJhsOverride 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 LegacyJhsOverrideRewriteAction `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 map[string]LegacyJhsOverrideRule `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 []string `json:"urls"`
JSON legacyJhsOverrideJSON `json:"-"`
}
func (*LegacyJhsOverride) UnmarshalJSON ¶
func (r *LegacyJhsOverride) UnmarshalJSON(data []byte) (err error)
type LegacyJhsOverrideRewriteAction ¶
type LegacyJhsOverrideRewriteAction struct {
// The WAF rule action to apply.
Block LegacyJhsOverrideRewriteActionBlock `json:"block"`
Challenge string `json:"challenge"`
Default string `json:"default"`
// The WAF rule action to apply.
Disable LegacyJhsOverrideRewriteActionDisable `json:"disable"`
Simulate string `json:"simulate"`
JSON legacyJhsOverrideRewriteActionJSON `json:"-"`
}
Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object.
func (*LegacyJhsOverrideRewriteAction) UnmarshalJSON ¶
func (r *LegacyJhsOverrideRewriteAction) UnmarshalJSON(data []byte) (err error)
type LegacyJhsOverrideRewriteActionBlock ¶
type LegacyJhsOverrideRewriteActionBlock string
The WAF rule action to apply.
const ( LegacyJhsOverrideRewriteActionBlockChallenge LegacyJhsOverrideRewriteActionBlock = "challenge" LegacyJhsOverrideRewriteActionBlockBlock LegacyJhsOverrideRewriteActionBlock = "block" LegacyJhsOverrideRewriteActionBlockSimulate LegacyJhsOverrideRewriteActionBlock = "simulate" LegacyJhsOverrideRewriteActionBlockDisable LegacyJhsOverrideRewriteActionBlock = "disable" LegacyJhsOverrideRewriteActionBlockDefault LegacyJhsOverrideRewriteActionBlock = "default" )
func (LegacyJhsOverrideRewriteActionBlock) IsKnown ¶
func (r LegacyJhsOverrideRewriteActionBlock) IsKnown() bool
type LegacyJhsOverrideRewriteActionDisable ¶
type LegacyJhsOverrideRewriteActionDisable string
The WAF rule action to apply.
const ( LegacyJhsOverrideRewriteActionDisableChallenge LegacyJhsOverrideRewriteActionDisable = "challenge" LegacyJhsOverrideRewriteActionDisableBlock LegacyJhsOverrideRewriteActionDisable = "block" LegacyJhsOverrideRewriteActionDisableSimulate LegacyJhsOverrideRewriteActionDisable = "simulate" LegacyJhsOverrideRewriteActionDisableDisable LegacyJhsOverrideRewriteActionDisable = "disable" LegacyJhsOverrideRewriteActionDisableDefault LegacyJhsOverrideRewriteActionDisable = "default" )
func (LegacyJhsOverrideRewriteActionDisable) IsKnown ¶
func (r LegacyJhsOverrideRewriteActionDisable) IsKnown() bool
type LegacyJhsOverrideRule ¶
type LegacyJhsOverrideRule string
The WAF rule action to apply.
const ( LegacyJhsOverrideRuleChallenge LegacyJhsOverrideRule = "challenge" LegacyJhsOverrideRuleBlock LegacyJhsOverrideRule = "block" LegacyJhsOverrideRuleSimulate LegacyJhsOverrideRule = "simulate" LegacyJhsOverrideRuleDisable LegacyJhsOverrideRule = "disable" LegacyJhsOverrideRuleDefault LegacyJhsOverrideRule = "default" )
func (LegacyJhsOverrideRule) IsKnown ¶
func (r LegacyJhsOverrideRule) IsKnown() bool
type LegacyJhsZonelockdown ¶
type LegacyJhsZonelockdown 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 LegacyJhsZonelockdownConfigurations `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 []string `json:"urls,required"`
JSON legacyJhsZonelockdownJSON `json:"-"`
}
func (*LegacyJhsZonelockdown) UnmarshalJSON ¶
func (r *LegacyJhsZonelockdown) UnmarshalJSON(data []byte) (err error)
type LegacyJhsZonelockdownConfigurations ¶
type LegacyJhsZonelockdownConfigurations interface {
// contains filtered or unexported methods
}
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.
Union satisfied by firewall.LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfiguration or firewall.LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfiguration.
type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfiguration ¶
type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfiguration struct {
// The configuration target. You must set the target to `ip_range` when specifying
// an IP address range in the Zone Lockdown rule.
Target LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfigurationTarget `json:"target"`
// The IP address range to match. You can only use prefix lengths `/16` and `/24`.
Value string `json:"value"`
JSON legacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfigurationJSON `json:"-"`
}
func (*LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfiguration) UnmarshalJSON ¶
func (r *LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfiguration) UnmarshalJSON(data []byte) (err error)
type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfigurationTarget ¶
type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfigurationTarget string
The configuration target. You must set the target to `ip_range` when specifying an IP address range in the Zone Lockdown rule.
const (
LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfigurationTargetIPRange LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfigurationTarget = "ip_range"
)
func (LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfigurationTarget) IsKnown ¶
func (r LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasCIDRConfigurationTarget) IsKnown() bool
type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfiguration ¶
type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfiguration struct {
// The configuration target. You must set the target to `ip` when specifying an IP
// address in the Zone Lockdown rule.
Target LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfigurationTarget `json:"target"`
// The IP address to match. This address will be compared to the IP address of
// incoming requests.
Value string `json:"value"`
JSON legacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfigurationJSON `json:"-"`
}
func (*LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfiguration) UnmarshalJSON ¶
func (r *LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfiguration) UnmarshalJSON(data []byte) (err error)
type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfigurationTarget ¶
type LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the Zone Lockdown rule.
const (
LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfigurationTargetIP LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfigurationTarget = "ip"
)
func (LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfigurationTarget) IsKnown ¶
func (r LegacyJhsZonelockdownConfigurationsLegacyJhsSchemasIPConfigurationTarget) IsKnown() bool
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 LockdownGetResponseEnvelope ¶
type LockdownGetResponseEnvelope struct {
Errors []LockdownGetResponseEnvelopeErrors `json:"errors,required"`
Messages []LockdownGetResponseEnvelopeMessages `json:"messages,required"`
Result LegacyJhsZonelockdown `json:"result,required,nullable"`
// 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 LockdownGetResponseEnvelopeErrors ¶
type LockdownGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON lockdownGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*LockdownGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LockdownGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LockdownGetResponseEnvelopeMessages ¶
type LockdownGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON lockdownGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*LockdownGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LockdownGetResponseEnvelopeMessages) 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 LockdownListParams ¶
type LockdownListParams struct {
// 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"`
// 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 ¶
func (LockdownNewParams) MarshalJSON ¶
func (r LockdownNewParams) MarshalJSON() (data []byte, err error)
type LockdownNewResponseEnvelope ¶
type LockdownNewResponseEnvelope struct {
Errors []LockdownNewResponseEnvelopeErrors `json:"errors,required"`
Messages []LockdownNewResponseEnvelopeMessages `json:"messages,required"`
Result LegacyJhsZonelockdown `json:"result,required,nullable"`
// 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 LockdownNewResponseEnvelopeErrors ¶
type LockdownNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON lockdownNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*LockdownNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LockdownNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LockdownNewResponseEnvelopeMessages ¶
type LockdownNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON lockdownNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*LockdownNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LockdownNewResponseEnvelopeMessages) 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, zoneIdentifier string, id string, opts ...option.RequestOption) (res *LockdownDeleteResponse, err error)
Deletes an existing Zone Lockdown rule.
func (*LockdownService) Get ¶
func (r *LockdownService) Get(ctx context.Context, zoneIdentifier string, id string, opts ...option.RequestOption) (res *LegacyJhsZonelockdown, err error)
Fetches the details of a Zone Lockdown rule.
func (*LockdownService) List ¶
func (r *LockdownService) List(ctx context.Context, zoneIdentifier string, query LockdownListParams, opts ...option.RequestOption) (res *shared.V4PagePaginationArray[LegacyJhsZonelockdown], 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, zoneIdentifier string, query LockdownListParams, opts ...option.RequestOption) *shared.V4PagePaginationArrayAutoPager[LegacyJhsZonelockdown]
Fetches Zone Lockdown rules. You can filter the results using several optional parameters.
func (*LockdownService) New ¶
func (r *LockdownService) New(ctx context.Context, zoneIdentifier string, body LockdownNewParams, opts ...option.RequestOption) (res *LegacyJhsZonelockdown, err error)
Creates a new Zone Lockdown rule.
func (*LockdownService) Update ¶
func (r *LockdownService) Update(ctx context.Context, zoneIdentifier string, id string, body LockdownUpdateParams, opts ...option.RequestOption) (res *LegacyJhsZonelockdown, err error)
Updates an existing Zone Lockdown rule.
type LockdownUpdateParams ¶
func (LockdownUpdateParams) MarshalJSON ¶
func (r LockdownUpdateParams) MarshalJSON() (data []byte, err error)
type LockdownUpdateResponseEnvelope ¶
type LockdownUpdateResponseEnvelope struct {
Errors []LockdownUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []LockdownUpdateResponseEnvelopeMessages `json:"messages,required"`
Result LegacyJhsZonelockdown `json:"result,required,nullable"`
// 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 LockdownUpdateResponseEnvelopeErrors ¶
type LockdownUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON lockdownUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*LockdownUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LockdownUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LockdownUpdateResponseEnvelopeMessages ¶
type LockdownUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON lockdownUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*LockdownUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LockdownUpdateResponseEnvelopeMessages) 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 RuleDeleteParams ¶
type RuleDeleteParams struct {
// When true, indicates that Cloudflare should also delete the associated filter if
// there are no other firewall rules referencing the filter.
DeleteFilterIfUnused param.Field[bool] `json:"delete_filter_if_unused"`
}
func (RuleDeleteParams) MarshalJSON ¶
func (r RuleDeleteParams) MarshalJSON() (data []byte, err error)
type RuleDeleteResponseEnvelope ¶
type RuleDeleteResponseEnvelope struct {
Errors []RuleDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleDeleteResponseEnvelopeMessages `json:"messages,required"`
Result LegacyJhsFilterRule `json:"result,required,nullable"`
// 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 RuleDeleteResponseEnvelopeErrors ¶
type RuleDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeMessages ¶
type RuleDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelopeMessages) 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 RuleEditResponseEnvelope ¶
type RuleEditResponseEnvelope struct {
Errors []RuleEditResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleEditResponseEnvelopeMessages `json:"messages,required"`
Result []LegacyJhsFilterRule `json:"result,required,nullable"`
// Whether the API call was successful
Success RuleEditResponseEnvelopeSuccess `json:"success,required"`
ResultInfo RuleEditResponseEnvelopeResultInfo `json:"result_info"`
JSON ruleEditResponseEnvelopeJSON `json:"-"`
}
func (*RuleEditResponseEnvelope) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeErrors ¶
type RuleEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeMessages ¶
type RuleEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeResultInfo ¶
type RuleEditResponseEnvelopeResultInfo struct {
// Total number of results for the requested service
Count float64 `json:"count"`
// Current page within paginated list of results
Page float64 `json:"page"`
// Number of results per page of results
PerPage float64 `json:"per_page"`
// Total results available without any search parameters
TotalCount float64 `json:"total_count"`
JSON ruleEditResponseEnvelopeResultInfoJSON `json:"-"`
}
func (*RuleEditResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeSuccess ¶
type RuleEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleEditResponseEnvelopeSuccessTrue RuleEditResponseEnvelopeSuccess = true
)
func (RuleEditResponseEnvelopeSuccess) IsKnown ¶
func (r RuleEditResponseEnvelopeSuccess) IsKnown() bool
type RuleGetParams ¶
type RuleGetParams struct {
}
type RuleGetResponseEnvelope ¶
type RuleGetResponseEnvelope struct {
Errors []RuleGetResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleGetResponseEnvelopeMessages `json:"messages,required"`
Result LegacyJhsFilterRule `json:"result,required,nullable"`
// 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 RuleGetResponseEnvelopeErrors ¶
type RuleGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleGetResponseEnvelopeMessages ¶
type RuleGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleGetResponseEnvelopeMessages) 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 {
// 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 ¶
func (RuleNewParams) MarshalJSON ¶
func (r RuleNewParams) MarshalJSON() (data []byte, err error)
type RuleNewResponseEnvelope ¶
type RuleNewResponseEnvelope struct {
Errors []RuleNewResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleNewResponseEnvelopeMessages `json:"messages,required"`
Result []LegacyJhsFilterRule `json:"result,required,nullable"`
// Whether the API call was successful
Success RuleNewResponseEnvelopeSuccess `json:"success,required"`
ResultInfo RuleNewResponseEnvelopeResultInfo `json:"result_info"`
JSON ruleNewResponseEnvelopeJSON `json:"-"`
}
func (*RuleNewResponseEnvelope) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeErrors ¶
type RuleNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeMessages ¶
type RuleNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeResultInfo ¶
type RuleNewResponseEnvelopeResultInfo struct {
// Total number of results for the requested service
Count float64 `json:"count"`
// Current page within paginated list of results
Page float64 `json:"page"`
// Number of results per page of results
PerPage float64 `json:"per_page"`
// Total results available without any search parameters
TotalCount float64 `json:"total_count"`
JSON ruleNewResponseEnvelopeResultInfoJSON `json:"-"`
}
func (*RuleNewResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeSuccess ¶
type RuleNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleNewResponseEnvelopeSuccessTrue RuleNewResponseEnvelopeSuccess = true
)
func (RuleNewResponseEnvelopeSuccess) IsKnown ¶
func (r RuleNewResponseEnvelopeSuccess) IsKnown() bool
type RuleService ¶
type RuleService struct {
Options []option.RequestOption
}
RuleService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRuleService method instead.
func NewRuleService ¶
func NewRuleService(opts ...option.RequestOption) (r *RuleService)
NewRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RuleService) Delete ¶
func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, id string, body RuleDeleteParams, opts ...option.RequestOption) (res *LegacyJhsFilterRule, err error)
Deletes an existing firewall rule.
func (*RuleService) Edit ¶
func (r *RuleService) Edit(ctx context.Context, zoneIdentifier string, id string, body RuleEditParams, opts ...option.RequestOption) (res *[]LegacyJhsFilterRule, err error)
Updates the priority of an existing firewall rule.
func (*RuleService) Get ¶
func (r *RuleService) Get(ctx context.Context, zoneIdentifier string, id string, query RuleGetParams, opts ...option.RequestOption) (res *LegacyJhsFilterRule, err error)
Fetches the details of a firewall rule.
func (*RuleService) List ¶
func (r *RuleService) List(ctx context.Context, zoneIdentifier string, query RuleListParams, opts ...option.RequestOption) (res *shared.V4PagePaginationArray[LegacyJhsFilterRule], err error)
Fetches firewall rules in a zone. You can filter the results using several optional parameters.
func (*RuleService) ListAutoPaging ¶
func (r *RuleService) ListAutoPaging(ctx context.Context, zoneIdentifier string, query RuleListParams, opts ...option.RequestOption) *shared.V4PagePaginationArrayAutoPager[LegacyJhsFilterRule]
Fetches firewall rules in a zone. You can filter the results using several optional parameters.
func (*RuleService) New ¶
func (r *RuleService) New(ctx context.Context, zoneIdentifier string, body RuleNewParams, opts ...option.RequestOption) (res *[]LegacyJhsFilterRule, err error)
Create one or more firewall rules.
func (*RuleService) Update ¶
func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, id string, body RuleUpdateParams, opts ...option.RequestOption) (res *LegacyJhsFilterRule, err error)
Updates an existing firewall rule.
type RuleUpdateParams ¶
func (RuleUpdateParams) MarshalJSON ¶
func (r RuleUpdateParams) MarshalJSON() (data []byte, err error)
type RuleUpdateResponseEnvelope ¶
type RuleUpdateResponseEnvelope struct {
Errors []RuleUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleUpdateResponseEnvelopeMessages `json:"messages,required"`
Result LegacyJhsFilterRule `json:"result,required,nullable"`
// 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 RuleUpdateResponseEnvelopeErrors ¶
type RuleUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleUpdateResponseEnvelopeMessages ¶
type RuleUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleUpdateResponseEnvelopeMessages) 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 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 []UARuleDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []UARuleDeleteResponseEnvelopeMessages `json:"messages,required"`
Result UARuleDeleteResponse `json:"result,required,nullable"`
// 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 UARuleDeleteResponseEnvelopeErrors ¶
type UARuleDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON uaRuleDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*UARuleDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *UARuleDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type UARuleDeleteResponseEnvelopeMessages ¶
type UARuleDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON uaRuleDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*UARuleDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *UARuleDeleteResponseEnvelopeMessages) 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 UARuleGetResponse ¶
type UARuleGetResponse interface {
ImplementsFirewallUARuleGetResponse()
}
Union satisfied by firewall.UARuleGetResponseUnknown or shared.UnionString.
type UARuleGetResponseEnvelope ¶
type UARuleGetResponseEnvelope struct {
Errors []UARuleGetResponseEnvelopeErrors `json:"errors,required"`
Messages []UARuleGetResponseEnvelopeMessages `json:"messages,required"`
Result UARuleGetResponse `json:"result,required,nullable"`
// 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 UARuleGetResponseEnvelopeErrors ¶
type UARuleGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON uaRuleGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*UARuleGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *UARuleGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type UARuleGetResponseEnvelopeMessages ¶
type UARuleGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON uaRuleGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*UARuleGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *UARuleGetResponseEnvelopeMessages) 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 {
// 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 ¶
func (UARuleNewParams) MarshalJSON ¶
func (r UARuleNewParams) MarshalJSON() (data []byte, err error)
type UARuleNewResponse ¶
type UARuleNewResponse interface {
ImplementsFirewallUARuleNewResponse()
}
Union satisfied by firewall.UARuleNewResponseUnknown or shared.UnionString.
type UARuleNewResponseEnvelope ¶
type UARuleNewResponseEnvelope struct {
Errors []UARuleNewResponseEnvelopeErrors `json:"errors,required"`
Messages []UARuleNewResponseEnvelopeMessages `json:"messages,required"`
Result UARuleNewResponse `json:"result,required,nullable"`
// 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 UARuleNewResponseEnvelopeErrors ¶
type UARuleNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON uaRuleNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*UARuleNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *UARuleNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type UARuleNewResponseEnvelopeMessages ¶
type UARuleNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON uaRuleNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*UARuleNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *UARuleNewResponseEnvelopeMessages) 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, zoneIdentifier string, id string, opts ...option.RequestOption) (res *UARuleDeleteResponse, err error)
Deletes an existing User Agent Blocking rule.
func (*UARuleService) Get ¶
func (r *UARuleService) Get(ctx context.Context, zoneIdentifier string, id string, opts ...option.RequestOption) (res *UARuleGetResponse, err error)
Fetches the details of a User Agent Blocking rule.
func (*UARuleService) List ¶
func (r *UARuleService) List(ctx context.Context, zoneIdentifier string, query UARuleListParams, opts ...option.RequestOption) (res *shared.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, zoneIdentifier string, query UARuleListParams, opts ...option.RequestOption) *shared.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, zoneIdentifier string, body UARuleNewParams, opts ...option.RequestOption) (res *UARuleNewResponse, err error)
Creates a new User Agent Blocking rule in a zone.
func (*UARuleService) Update ¶
func (r *UARuleService) Update(ctx context.Context, zoneIdentifier string, id string, body UARuleUpdateParams, opts ...option.RequestOption) (res *UARuleUpdateResponse, err error)
Updates an existing User Agent Blocking rule.
type UARuleUpdateParams ¶
func (UARuleUpdateParams) MarshalJSON ¶
func (r UARuleUpdateParams) MarshalJSON() (data []byte, err error)
type UARuleUpdateResponse ¶
type UARuleUpdateResponse interface {
ImplementsFirewallUARuleUpdateResponse()
}
Union satisfied by firewall.UARuleUpdateResponseUnknown or shared.UnionString.
type UARuleUpdateResponseEnvelope ¶
type UARuleUpdateResponseEnvelope struct {
Errors []UARuleUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []UARuleUpdateResponseEnvelopeMessages `json:"messages,required"`
Result UARuleUpdateResponse `json:"result,required,nullable"`
// 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 UARuleUpdateResponseEnvelopeErrors ¶
type UARuleUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON uaRuleUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*UARuleUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *UARuleUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type UARuleUpdateResponseEnvelopeMessages ¶
type UARuleUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON uaRuleUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*UARuleUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *UARuleUpdateResponseEnvelopeMessages) 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 WAFManagedRulesRule ¶
type WAFManagedRulesRule 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.WAFManagedRulesRuleWAFManagedRulesAnomalyRule, firewall.WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRule or firewall.WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRule.
type WAFManagedRulesRuleWAFManagedRulesAnomalyRule ¶
type WAFManagedRulesRuleWAFManagedRulesAnomalyRule 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 []WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedMode `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 WAFManagedRulesRuleWAFManagedRulesAnomalyRuleGroup `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 WAFManagedRulesRuleWAFManagedRulesAnomalyRuleMode `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 wafManagedRulesRuleWAFManagedRulesAnomalyRuleJSON `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 (*WAFManagedRulesRuleWAFManagedRulesAnomalyRule) UnmarshalJSON ¶
func (r *WAFManagedRulesRuleWAFManagedRulesAnomalyRule) UnmarshalJSON(data []byte) (err error)
type WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedMode ¶
type WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedMode string
When set to `on`, the current WAF rule will be used when evaluating the request. Applies to anomaly detection WAF rules.
const ( WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedModeOn WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedMode = "on" WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedModeOff WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedMode = "off" )
func (WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedMode) IsKnown ¶
func (r WAFManagedRulesRuleWAFManagedRulesAnomalyRuleAllowedMode) IsKnown() bool
type WAFManagedRulesRuleWAFManagedRulesAnomalyRuleGroup ¶
type WAFManagedRulesRuleWAFManagedRulesAnomalyRuleGroup struct {
// The unique identifier of the rule group.
ID string `json:"id"`
// The name of the rule group.
Name string `json:"name"`
JSON wafManagedRulesRuleWAFManagedRulesAnomalyRuleGroupJSON `json:"-"`
}
The rule group to which the current WAF rule belongs.
func (*WAFManagedRulesRuleWAFManagedRulesAnomalyRuleGroup) UnmarshalJSON ¶
func (r *WAFManagedRulesRuleWAFManagedRulesAnomalyRuleGroup) UnmarshalJSON(data []byte) (err error)
type WAFManagedRulesRuleWAFManagedRulesAnomalyRuleMode ¶
type WAFManagedRulesRuleWAFManagedRulesAnomalyRuleMode string
When set to `on`, the current WAF rule will be used when evaluating the request. Applies to anomaly detection WAF rules.
const ( WAFManagedRulesRuleWAFManagedRulesAnomalyRuleModeOn WAFManagedRulesRuleWAFManagedRulesAnomalyRuleMode = "on" WAFManagedRulesRuleWAFManagedRulesAnomalyRuleModeOff WAFManagedRulesRuleWAFManagedRulesAnomalyRuleMode = "off" )
func (WAFManagedRulesRuleWAFManagedRulesAnomalyRuleMode) IsKnown ¶
func (r WAFManagedRulesRuleWAFManagedRulesAnomalyRuleMode) IsKnown() bool
type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRule ¶
type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRule struct {
// The unique identifier of the WAF rule.
ID string `json:"id,required"`
// Defines the available modes for the current WAF rule.
AllowedModes []WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedMode `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 WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleGroup `json:"group,required"`
// When set to `on`, the current rule will be used when evaluating the request.
// Applies to traditional (allow) WAF rules.
Mode WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleMode `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 wafManagedRulesRuleWAFManagedRulesTraditionalAllowRuleJSON `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 (*WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRule) UnmarshalJSON ¶
func (r *WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRule) UnmarshalJSON(data []byte) (err error)
type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedMode ¶
type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedMode string
When set to `on`, the current rule will be used when evaluating the request. Applies to traditional (allow) WAF rules.
const ( WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedModeOn WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedMode = "on" WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedModeOff WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedMode = "off" )
func (WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedMode) IsKnown ¶
func (r WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleAllowedMode) IsKnown() bool
type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleGroup ¶
type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleGroup struct {
// The unique identifier of the rule group.
ID string `json:"id"`
// The name of the rule group.
Name string `json:"name"`
JSON wafManagedRulesRuleWAFManagedRulesTraditionalAllowRuleGroupJSON `json:"-"`
}
The rule group to which the current WAF rule belongs.
func (*WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleGroup) UnmarshalJSON ¶
func (r *WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleGroup) UnmarshalJSON(data []byte) (err error)
type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleMode ¶
type WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleMode string
When set to `on`, the current rule will be used when evaluating the request. Applies to traditional (allow) WAF rules.
const ( WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleModeOn WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleMode = "on" WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleModeOff WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleMode = "off" )
func (WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleMode) IsKnown ¶
func (r WAFManagedRulesRuleWAFManagedRulesTraditionalAllowRuleMode) IsKnown() bool
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRule ¶
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRule 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 []WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode `json:"allowed_modes,required"`
// The default action/mode of a rule.
DefaultMode WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode `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 WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleGroup `json:"group,required"`
// The action that the current WAF rule will perform when triggered. Applies to
// traditional (deny) WAF rules.
Mode WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode `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 wafManagedRulesRuleWAFManagedRulesTraditionalDenyRuleJSON `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 (*WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRule) UnmarshalJSON ¶
func (r *WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRule) UnmarshalJSON(data []byte) (err error)
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode ¶
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode string
The action that the current WAF rule will perform when triggered. Applies to traditional (deny) WAF rules.
const ( WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedModeDefault WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode = "default" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedModeDisable WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode = "disable" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedModeSimulate WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode = "simulate" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedModeBlock WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode = "block" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedModeChallenge WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode = "challenge" )
func (WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode) IsKnown ¶
func (r WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleAllowedMode) IsKnown() bool
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode ¶
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode string
The default action/mode of a rule.
const ( WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultModeDisable WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode = "disable" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultModeSimulate WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode = "simulate" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultModeBlock WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode = "block" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultModeChallenge WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode = "challenge" )
func (WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode) IsKnown ¶
func (r WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleDefaultMode) IsKnown() bool
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleGroup ¶
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleGroup struct {
// The unique identifier of the rule group.
ID string `json:"id"`
// The name of the rule group.
Name string `json:"name"`
JSON wafManagedRulesRuleWAFManagedRulesTraditionalDenyRuleGroupJSON `json:"-"`
}
The rule group to which the current WAF rule belongs.
func (*WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleGroup) UnmarshalJSON ¶
func (r *WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleGroup) UnmarshalJSON(data []byte) (err error)
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode ¶
type WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode string
The action that the current WAF rule will perform when triggered. Applies to traditional (deny) WAF rules.
const ( WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleModeDefault WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode = "default" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleModeDisable WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode = "disable" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleModeSimulate WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode = "simulate" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleModeBlock WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode = "block" WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleModeChallenge WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode = "challenge" )
func (WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode) IsKnown ¶
func (r WAFManagedRulesRuleWAFManagedRulesTraditionalDenyRuleMode) IsKnown() bool
type WAFManagedRulesSchemasGroup ¶
type WAFManagedRulesSchemasGroup 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 WAFManagedRulesSchemasGroupMode `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 []WAFManagedRulesSchemasGroupAllowedMode `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 wafManagedRulesSchemasGroupJSON `json:"-"`
}
func (*WAFManagedRulesSchemasGroup) UnmarshalJSON ¶
func (r *WAFManagedRulesSchemasGroup) UnmarshalJSON(data []byte) (err error)
type WAFManagedRulesSchemasGroupAllowedMode ¶
type WAFManagedRulesSchemasGroupAllowedMode string
The state of the rules contained in the rule group. When `on`, the rules in the group are configurable/usable.
const ( WAFManagedRulesSchemasGroupAllowedModeOn WAFManagedRulesSchemasGroupAllowedMode = "on" WAFManagedRulesSchemasGroupAllowedModeOff WAFManagedRulesSchemasGroupAllowedMode = "off" )
func (WAFManagedRulesSchemasGroupAllowedMode) IsKnown ¶
func (r WAFManagedRulesSchemasGroupAllowedMode) IsKnown() bool
type WAFManagedRulesSchemasGroupMode ¶
type WAFManagedRulesSchemasGroupMode string
The state of the rules contained in the rule group. When `on`, the rules in the group are configurable/usable.
const ( WAFManagedRulesSchemasGroupModeOn WAFManagedRulesSchemasGroupMode = "on" WAFManagedRulesSchemasGroupModeOff WAFManagedRulesSchemasGroupMode = "off" )
func (WAFManagedRulesSchemasGroupMode) IsKnown ¶
func (r WAFManagedRulesSchemasGroupMode) IsKnown() bool
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 WAFOverrideGetResponseEnvelope ¶
type WAFOverrideGetResponseEnvelope struct {
Errors []WAFOverrideGetResponseEnvelopeErrors `json:"errors,required"`
Messages []WAFOverrideGetResponseEnvelopeMessages `json:"messages,required"`
Result LegacyJhsOverride `json:"result,required,nullable"`
// 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 WAFOverrideGetResponseEnvelopeErrors ¶
type WAFOverrideGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafOverrideGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WAFOverrideGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WAFOverrideGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WAFOverrideGetResponseEnvelopeMessages ¶
type WAFOverrideGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafOverrideGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WAFOverrideGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WAFOverrideGetResponseEnvelopeMessages) 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 {
// 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 ¶
func (WAFOverrideNewParams) MarshalJSON ¶
func (r WAFOverrideNewParams) MarshalJSON() (data []byte, err error)
type WAFOverrideNewResponseEnvelope ¶
type WAFOverrideNewResponseEnvelope struct {
Errors []WAFOverrideNewResponseEnvelopeErrors `json:"errors,required"`
Messages []WAFOverrideNewResponseEnvelopeMessages `json:"messages,required"`
Result LegacyJhsOverride `json:"result,required,nullable"`
// 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 WAFOverrideNewResponseEnvelopeErrors ¶
type WAFOverrideNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafOverrideNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WAFOverrideNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WAFOverrideNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WAFOverrideNewResponseEnvelopeMessages ¶
type WAFOverrideNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafOverrideNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WAFOverrideNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WAFOverrideNewResponseEnvelopeMessages) 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, zoneIdentifier string, id string, 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, zoneIdentifier string, id string, opts ...option.RequestOption) (res *LegacyJhsOverride, 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, zoneIdentifier string, query WAFOverrideListParams, opts ...option.RequestOption) (res *shared.V4PagePaginationArray[LegacyJhsOverride], 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, zoneIdentifier string, query WAFOverrideListParams, opts ...option.RequestOption) *shared.V4PagePaginationArrayAutoPager[LegacyJhsOverride]
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, zoneIdentifier string, body WAFOverrideNewParams, opts ...option.RequestOption) (res *LegacyJhsOverride, 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, zoneIdentifier string, id string, body WAFOverrideUpdateParams, opts ...option.RequestOption) (res *LegacyJhsOverride, 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 ¶
func (WAFOverrideUpdateParams) MarshalJSON ¶
func (r WAFOverrideUpdateParams) MarshalJSON() (data []byte, err error)
type WAFOverrideUpdateResponseEnvelope ¶
type WAFOverrideUpdateResponseEnvelope struct {
Errors []WAFOverrideUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []WAFOverrideUpdateResponseEnvelopeMessages `json:"messages,required"`
Result LegacyJhsOverride `json:"result,required,nullable"`
// 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 WAFOverrideUpdateResponseEnvelopeErrors ¶
type WAFOverrideUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafOverrideUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WAFOverrideUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WAFOverrideUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WAFOverrideUpdateResponseEnvelopeMessages ¶
type WAFOverrideUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafOverrideUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WAFOverrideUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WAFOverrideUpdateResponseEnvelopeMessages) 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 WAFPackageGetResponse ¶
type WAFPackageGetResponse interface {
// contains filtered or unexported methods
}
Union satisfied by firewall.WAFPackageGetResponseLegacyJhsAPIResponseSingle or firewall.WAFPackageGetResponseObject.
type WAFPackageGetResponseLegacyJhsAPIResponseSingle ¶
type WAFPackageGetResponseLegacyJhsAPIResponseSingle struct {
Errors []WAFPackageGetResponseLegacyJhsAPIResponseSingleError `json:"errors,required"`
Messages []WAFPackageGetResponseLegacyJhsAPIResponseSingleMessage `json:"messages,required"`
Result WAFPackageGetResponseLegacyJhsAPIResponseSingleResult `json:"result,required,nullable"`
// Whether the API call was successful
Success WAFPackageGetResponseLegacyJhsAPIResponseSingleSuccess `json:"success,required"`
JSON wafPackageGetResponseLegacyJhsAPIResponseSingleJSON `json:"-"`
}
func (*WAFPackageGetResponseLegacyJhsAPIResponseSingle) UnmarshalJSON ¶
func (r *WAFPackageGetResponseLegacyJhsAPIResponseSingle) UnmarshalJSON(data []byte) (err error)
type WAFPackageGetResponseLegacyJhsAPIResponseSingleError ¶
type WAFPackageGetResponseLegacyJhsAPIResponseSingleError struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageGetResponseLegacyJhsAPIResponseSingleErrorJSON `json:"-"`
}
func (*WAFPackageGetResponseLegacyJhsAPIResponseSingleError) UnmarshalJSON ¶
func (r *WAFPackageGetResponseLegacyJhsAPIResponseSingleError) UnmarshalJSON(data []byte) (err error)
type WAFPackageGetResponseLegacyJhsAPIResponseSingleMessage ¶
type WAFPackageGetResponseLegacyJhsAPIResponseSingleMessage struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageGetResponseLegacyJhsAPIResponseSingleMessageJSON `json:"-"`
}
func (*WAFPackageGetResponseLegacyJhsAPIResponseSingleMessage) UnmarshalJSON ¶
func (r *WAFPackageGetResponseLegacyJhsAPIResponseSingleMessage) UnmarshalJSON(data []byte) (err error)
type WAFPackageGetResponseLegacyJhsAPIResponseSingleResult ¶
type WAFPackageGetResponseLegacyJhsAPIResponseSingleResult interface {
ImplementsFirewallWAFPackageGetResponseLegacyJhsAPIResponseSingleResult()
}
Union satisfied by firewall.WAFPackageGetResponseLegacyJhsAPIResponseSingleResultUnknown or shared.UnionString.
type WAFPackageGetResponseLegacyJhsAPIResponseSingleSuccess ¶
type WAFPackageGetResponseLegacyJhsAPIResponseSingleSuccess bool
Whether the API call was successful
const (
WAFPackageGetResponseLegacyJhsAPIResponseSingleSuccessTrue WAFPackageGetResponseLegacyJhsAPIResponseSingleSuccess = true
)
func (WAFPackageGetResponseLegacyJhsAPIResponseSingleSuccess) IsKnown ¶
func (r WAFPackageGetResponseLegacyJhsAPIResponseSingleSuccess) IsKnown() bool
type WAFPackageGetResponseObject ¶
type WAFPackageGetResponseObject struct {
Result interface{} `json:"result"`
JSON wafPackageGetResponseObjectJSON `json:"-"`
}
func (*WAFPackageGetResponseObject) UnmarshalJSON ¶
func (r *WAFPackageGetResponseObject) UnmarshalJSON(data []byte) (err error)
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 WAFPackageGroupEditResponse ¶
type WAFPackageGroupEditResponse interface {
ImplementsFirewallWAFPackageGroupEditResponse()
}
Union satisfied by firewall.WAFPackageGroupEditResponseUnknown, firewall.WAFPackageGroupEditResponseArray or shared.UnionString.
type WAFPackageGroupEditResponseArray ¶
type WAFPackageGroupEditResponseArray []interface{}
func (WAFPackageGroupEditResponseArray) ImplementsFirewallWAFPackageGroupEditResponse ¶
func (r WAFPackageGroupEditResponseArray) ImplementsFirewallWAFPackageGroupEditResponse()
type WAFPackageGroupEditResponseEnvelope ¶
type WAFPackageGroupEditResponseEnvelope struct {
Errors []WAFPackageGroupEditResponseEnvelopeErrors `json:"errors,required"`
Messages []WAFPackageGroupEditResponseEnvelopeMessages `json:"messages,required"`
Result WAFPackageGroupEditResponse `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 WAFPackageGroupEditResponseEnvelopeErrors ¶
type WAFPackageGroupEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageGroupEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WAFPackageGroupEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WAFPackageGroupEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WAFPackageGroupEditResponseEnvelopeMessages ¶
type WAFPackageGroupEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageGroupEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WAFPackageGroupEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WAFPackageGroupEditResponseEnvelopeMessages) 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 WAFPackageGroupGetResponse ¶
type WAFPackageGroupGetResponse interface {
ImplementsFirewallWAFPackageGroupGetResponse()
}
Union satisfied by firewall.WAFPackageGroupGetResponseUnknown, firewall.WAFPackageGroupGetResponseArray or shared.UnionString.
type WAFPackageGroupGetResponseArray ¶
type WAFPackageGroupGetResponseArray []interface{}
func (WAFPackageGroupGetResponseArray) ImplementsFirewallWAFPackageGroupGetResponse ¶
func (r WAFPackageGroupGetResponseArray) ImplementsFirewallWAFPackageGroupGetResponse()
type WAFPackageGroupGetResponseEnvelope ¶
type WAFPackageGroupGetResponseEnvelope struct {
Errors []WAFPackageGroupGetResponseEnvelopeErrors `json:"errors,required"`
Messages []WAFPackageGroupGetResponseEnvelopeMessages `json:"messages,required"`
Result WAFPackageGroupGetResponse `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 WAFPackageGroupGetResponseEnvelopeErrors ¶
type WAFPackageGroupGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageGroupGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WAFPackageGroupGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WAFPackageGroupGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WAFPackageGroupGetResponseEnvelopeMessages ¶
type WAFPackageGroupGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageGroupGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WAFPackageGroupGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WAFPackageGroupGetResponseEnvelopeMessages) 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 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"`
}
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 *WAFPackageGroupEditResponse, 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 *WAFPackageGroupGetResponse, 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 *shared.V4PagePaginationArray[WAFManagedRulesSchemasGroup], 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) *shared.V4PagePaginationArrayAutoPager[WAFManagedRulesSchemasGroup]
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 {
// 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 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 {
// contains filtered or unexported methods
}
Union satisfied by firewall.WAFPackageListResponseLegacyJhsAPIResponseCollection or firewall.WAFPackageListResponseObject.
type WAFPackageListResponseLegacyJhsAPIResponseCollection ¶
type WAFPackageListResponseLegacyJhsAPIResponseCollection struct {
Errors []WAFPackageListResponseLegacyJhsAPIResponseCollectionError `json:"errors,required"`
Messages []WAFPackageListResponseLegacyJhsAPIResponseCollectionMessage `json:"messages,required"`
Result WAFPackageListResponseLegacyJhsAPIResponseCollectionResult `json:"result,required,nullable"`
// Whether the API call was successful
Success WAFPackageListResponseLegacyJhsAPIResponseCollectionSuccess `json:"success,required"`
ResultInfo WAFPackageListResponseLegacyJhsAPIResponseCollectionResultInfo `json:"result_info"`
JSON wafPackageListResponseLegacyJhsAPIResponseCollectionJSON `json:"-"`
}
func (*WAFPackageListResponseLegacyJhsAPIResponseCollection) UnmarshalJSON ¶
func (r *WAFPackageListResponseLegacyJhsAPIResponseCollection) UnmarshalJSON(data []byte) (err error)
type WAFPackageListResponseLegacyJhsAPIResponseCollectionError ¶
type WAFPackageListResponseLegacyJhsAPIResponseCollectionError struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageListResponseLegacyJhsAPIResponseCollectionErrorJSON `json:"-"`
}
func (*WAFPackageListResponseLegacyJhsAPIResponseCollectionError) UnmarshalJSON ¶
func (r *WAFPackageListResponseLegacyJhsAPIResponseCollectionError) UnmarshalJSON(data []byte) (err error)
type WAFPackageListResponseLegacyJhsAPIResponseCollectionMessage ¶
type WAFPackageListResponseLegacyJhsAPIResponseCollectionMessage struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageListResponseLegacyJhsAPIResponseCollectionMessageJSON `json:"-"`
}
func (*WAFPackageListResponseLegacyJhsAPIResponseCollectionMessage) UnmarshalJSON ¶
func (r *WAFPackageListResponseLegacyJhsAPIResponseCollectionMessage) UnmarshalJSON(data []byte) (err error)
type WAFPackageListResponseLegacyJhsAPIResponseCollectionResult ¶
type WAFPackageListResponseLegacyJhsAPIResponseCollectionResult interface {
ImplementsFirewallWAFPackageListResponseLegacyJhsAPIResponseCollectionResult()
}
Union satisfied by firewall.WAFPackageListResponseLegacyJhsAPIResponseCollectionResultUnknown, firewall.WAFPackageListResponseLegacyJhsAPIResponseCollectionResultArray or shared.UnionString.
type WAFPackageListResponseLegacyJhsAPIResponseCollectionResultArray ¶
type WAFPackageListResponseLegacyJhsAPIResponseCollectionResultArray []interface{}
func (WAFPackageListResponseLegacyJhsAPIResponseCollectionResultArray) ImplementsFirewallWAFPackageListResponseLegacyJhsAPIResponseCollectionResult ¶
func (r WAFPackageListResponseLegacyJhsAPIResponseCollectionResultArray) ImplementsFirewallWAFPackageListResponseLegacyJhsAPIResponseCollectionResult()
type WAFPackageListResponseLegacyJhsAPIResponseCollectionResultInfo ¶
type WAFPackageListResponseLegacyJhsAPIResponseCollectionResultInfo struct {
// Total number of results for the requested service
Count float64 `json:"count"`
// Current page within paginated list of results
Page float64 `json:"page"`
// Number of results per page of results
PerPage float64 `json:"per_page"`
// Total results available without any search parameters
TotalCount float64 `json:"total_count"`
JSON wafPackageListResponseLegacyJhsAPIResponseCollectionResultInfoJSON `json:"-"`
}
func (*WAFPackageListResponseLegacyJhsAPIResponseCollectionResultInfo) UnmarshalJSON ¶
func (r *WAFPackageListResponseLegacyJhsAPIResponseCollectionResultInfo) UnmarshalJSON(data []byte) (err error)
type WAFPackageListResponseLegacyJhsAPIResponseCollectionSuccess ¶
type WAFPackageListResponseLegacyJhsAPIResponseCollectionSuccess bool
Whether the API call was successful
const (
WAFPackageListResponseLegacyJhsAPIResponseCollectionSuccessTrue WAFPackageListResponseLegacyJhsAPIResponseCollectionSuccess = true
)
func (WAFPackageListResponseLegacyJhsAPIResponseCollectionSuccess) IsKnown ¶
func (r WAFPackageListResponseLegacyJhsAPIResponseCollectionSuccess) IsKnown() bool
type WAFPackageListResponseObject ¶
type WAFPackageListResponseObject struct {
Result []WAFPackageListResponseObjectResult `json:"result"`
JSON wafPackageListResponseObjectJSON `json:"-"`
}
func (*WAFPackageListResponseObject) UnmarshalJSON ¶
func (r *WAFPackageListResponseObject) UnmarshalJSON(data []byte) (err error)
type WAFPackageListResponseObjectResult ¶
type WAFPackageListResponseObjectResult interface {
// contains filtered or unexported methods
}
Union satisfied by firewall.WAFPackageListResponseObjectResultLegacyJhsPackageDefinition or firewall.WAFPackageListResponseObjectResultLegacyJhsAnomalyPackage.
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackage ¶
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackage struct {
// The unique identifier of a WAF package.
ID string `json:"id,required"`
// A summary of the purpose/function of the WAF package.
Description string `json:"description,required"`
// When a WAF package uses anomaly detection, each rule is given a score when
// triggered. If the total score of all triggered rules exceeds the sensitivity
// defined on the WAF package, the action defined on the package will be taken.
DetectionMode WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionMode `json:"detection_mode,required"`
// The name of the WAF package.
Name string `json:"name,required"`
// Identifier
ZoneID string `json:"zone_id,required"`
// The default action performed by the rules in the WAF package.
ActionMode WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionMode `json:"action_mode"`
// The sensitivity of the WAF package.
Sensitivity WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity `json:"sensitivity"`
// When set to `active`, indicates that the WAF package will be applied to the
// zone.
Status WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageStatus `json:"status"`
JSON wafPackageListResponseObjectResultLegacyJhsAnomalyPackageJSON `json:"-"`
}
func (*WAFPackageListResponseObjectResultLegacyJhsAnomalyPackage) UnmarshalJSON ¶
func (r *WAFPackageListResponseObjectResultLegacyJhsAnomalyPackage) UnmarshalJSON(data []byte) (err error)
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionMode ¶
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionMode string
The default action performed by the rules in the WAF package.
const ( WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionModeSimulate WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionMode = "simulate" WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionModeBlock WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionMode = "block" WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionModeChallenge WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionMode = "challenge" )
func (WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionMode) IsKnown ¶
func (r WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageActionMode) IsKnown() bool
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionMode ¶
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionMode string
When a WAF package uses anomaly detection, each rule is given a score when triggered. If the total score of all triggered rules exceeds the sensitivity defined on the WAF package, the action defined on the package will be taken.
const ( WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionModeAnomaly WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionMode = "anomaly" WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionModeTraditional WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionMode = "traditional" )
func (WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionMode) IsKnown ¶
func (r WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageDetectionMode) IsKnown() bool
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity ¶
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity string
The sensitivity of the WAF package.
const ( WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivityHigh WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity = "high" WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivityMedium WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity = "medium" WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivityLow WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity = "low" WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivityOff WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity = "off" )
func (WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity) IsKnown ¶
func (r WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageSensitivity) IsKnown() bool
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageStatus ¶
type WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageStatus string
When set to `active`, indicates that the WAF package will be applied to the zone.
const (
WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageStatusActive WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageStatus = "active"
)
func (WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageStatus) IsKnown ¶
func (r WAFPackageListResponseObjectResultLegacyJhsAnomalyPackageStatus) IsKnown() bool
type WAFPackageListResponseObjectResultLegacyJhsPackageDefinition ¶
type WAFPackageListResponseObjectResultLegacyJhsPackageDefinition struct {
// The unique identifier of a WAF package.
ID string `json:"id,required"`
// A summary of the purpose/function of the WAF package.
Description string `json:"description,required"`
// The mode that defines how rules within the package are evaluated during the
// course of a request. When a package uses anomaly detection mode (`anomaly`
// value), each rule is given a score when triggered. If the total score of all
// triggered rules exceeds the sensitivity defined in the WAF package, the action
// configured in the package will be performed. Traditional detection mode
// (`traditional` value) will decide the action to take when it is triggered by the
// request. If multiple rules are triggered, the action providing the highest
// protection will be applied (for example, a 'block' action will win over a
// 'challenge' action).
DetectionMode WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionMode `json:"detection_mode,required"`
// The name of the WAF package.
Name string `json:"name,required"`
// Identifier
ZoneID string `json:"zone_id,required"`
// When set to `active`, indicates that the WAF package will be applied to the
// zone.
Status WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionStatus `json:"status"`
JSON wafPackageListResponseObjectResultLegacyJhsPackageDefinitionJSON `json:"-"`
}
func (*WAFPackageListResponseObjectResultLegacyJhsPackageDefinition) UnmarshalJSON ¶
func (r *WAFPackageListResponseObjectResultLegacyJhsPackageDefinition) UnmarshalJSON(data []byte) (err error)
type WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionMode ¶
type WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionMode string
The mode that defines how rules within the package are evaluated during the course of a request. When a package uses anomaly detection mode (`anomaly` value), each rule is given a score when triggered. If the total score of all triggered rules exceeds the sensitivity defined in the WAF package, the action configured in the package will be performed. Traditional detection mode (`traditional` value) will decide the action to take when it is triggered by the request. If multiple rules are triggered, the action providing the highest protection will be applied (for example, a 'block' action will win over a 'challenge' action).
const ( WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionModeAnomaly WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionMode = "anomaly" WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionModeTraditional WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionMode = "traditional" )
func (WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionMode) IsKnown ¶
func (r WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionDetectionMode) IsKnown() bool
type WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionStatus ¶
type WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionStatus string
When set to `active`, indicates that the WAF package will be applied to the zone.
const (
WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionStatusActive WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionStatus = "active"
)
func (WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionStatus) IsKnown ¶
func (r WAFPackageListResponseObjectResultLegacyJhsPackageDefinitionStatus) IsKnown() bool
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 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 WAFPackageRuleEditResponseEnvelope ¶
type WAFPackageRuleEditResponseEnvelope struct {
Errors []WAFPackageRuleEditResponseEnvelopeErrors `json:"errors,required"`
Messages []WAFPackageRuleEditResponseEnvelopeMessages `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 WAFPackageRuleEditResponseEnvelopeErrors ¶
type WAFPackageRuleEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageRuleEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WAFPackageRuleEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleEditResponseEnvelopeMessages ¶
type WAFPackageRuleEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageRuleEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WAFPackageRuleEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponseEnvelopeMessages) 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 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 []WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedMode `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 WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleGroup `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 WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleMode `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 WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedMode ¶
type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedMode string
When set to `on`, the current WAF rule will be used when evaluating the request. Applies to anomaly detection WAF rules.
const ( WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedModeOn WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedMode = "on" WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedModeOff WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedMode = "off" )
func (WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedMode) IsKnown ¶
func (r WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleAllowedMode) IsKnown() bool
type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleGroup ¶
type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleGroup struct {
// The unique identifier of the rule group.
ID string `json:"id"`
// The name of the rule group.
Name string `json:"name"`
JSON wafPackageRuleEditResponseWAFManagedRulesAnomalyRuleGroupJSON `json:"-"`
}
The rule group to which the current WAF rule belongs.
func (*WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleGroup) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleGroup) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleMode ¶
type WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleMode string
When set to `on`, the current WAF rule will be used when evaluating the request. Applies to anomaly detection WAF rules.
const ( WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleModeOn WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleMode = "on" WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleModeOff WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleMode = "off" )
func (WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleMode) IsKnown ¶
func (r WAFPackageRuleEditResponseWAFManagedRulesAnomalyRuleMode) IsKnown() bool
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 WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleGroup `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 WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleGroup ¶
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleGroup struct {
// The unique identifier of the rule group.
ID string `json:"id"`
// The name of the rule group.
Name string `json:"name"`
JSON wafPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleGroupJSON `json:"-"`
}
The rule group to which the current WAF rule belongs.
func (*WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleGroup) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleGroup) UnmarshalJSON(data []byte) (err error)
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 WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleGroup `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 WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleGroup ¶
type WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleGroup struct {
// The unique identifier of the rule group.
ID string `json:"id"`
// The name of the rule group.
Name string `json:"name"`
JSON wafPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleGroupJSON `json:"-"`
}
The rule group to which the current WAF rule belongs.
func (*WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleGroup) UnmarshalJSON ¶
func (r *WAFPackageRuleEditResponseWAFManagedRulesTraditionalDenyRuleGroup) UnmarshalJSON(data []byte) (err error)
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 WAFPackageRuleGetResponse ¶
type WAFPackageRuleGetResponse interface {
ImplementsFirewallWAFPackageRuleGetResponse()
}
Union satisfied by firewall.WAFPackageRuleGetResponseUnknown, firewall.WAFPackageRuleGetResponseArray or shared.UnionString.
type WAFPackageRuleGetResponseArray ¶
type WAFPackageRuleGetResponseArray []interface{}
func (WAFPackageRuleGetResponseArray) ImplementsFirewallWAFPackageRuleGetResponse ¶
func (r WAFPackageRuleGetResponseArray) ImplementsFirewallWAFPackageRuleGetResponse()
type WAFPackageRuleGetResponseEnvelope ¶
type WAFPackageRuleGetResponseEnvelope struct {
Errors []WAFPackageRuleGetResponseEnvelopeErrors `json:"errors,required"`
Messages []WAFPackageRuleGetResponseEnvelopeMessages `json:"messages,required"`
Result WAFPackageRuleGetResponse `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 WAFPackageRuleGetResponseEnvelopeErrors ¶
type WAFPackageRuleGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageRuleGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WAFPackageRuleGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WAFPackageRuleGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WAFPackageRuleGetResponseEnvelopeMessages ¶
type WAFPackageRuleGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON wafPackageRuleGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WAFPackageRuleGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WAFPackageRuleGetResponseEnvelopeMessages) 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 direction used to sort returned rules.
Direction param.Field[WAFPackageRuleListParamsDirection] `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[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"`
}
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 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 *WAFPackageRuleGetResponse, 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 *shared.V4PagePaginationArray[WAFManagedRulesRule], 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) *shared.V4PagePaginationArrayAutoPager[WAFManagedRulesRule]
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, zoneIdentifier string, identifier string, 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, zoneIdentifier string, query WAFPackageListParams, opts ...option.RequestOption) (res *shared.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, zoneIdentifier string, query WAFPackageListParams, opts ...option.RequestOption) *shared.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 WAFService ¶
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.
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.