Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AlertingService
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type AvailableAlertListParams
- type AvailableAlertListResponse
- type AvailableAlertListResponseEnvelope
- type AvailableAlertListResponseEnvelopeResultInfo
- type AvailableAlertListResponseEnvelopeSuccess
- type AvailableAlertListResponseItem
- type AvailableAlertService
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type DestinationEligibleGetParams
- type DestinationEligibleGetResponse
- type DestinationEligibleGetResponseEnvelope
- type DestinationEligibleGetResponseEnvelopeResultInfo
- type DestinationEligibleGetResponseEnvelopeSuccess
- type DestinationEligibleGetResponseItem
- type DestinationEligibleGetResponseItemType
- type DestinationEligibleService
- type DestinationPagerdutyDeleteParams
- type DestinationPagerdutyDeleteResponse
- type DestinationPagerdutyDeleteResponseResultInfo
- type DestinationPagerdutyDeleteResponseSuccess
- type DestinationPagerdutyGetParams
- type DestinationPagerdutyGetResponseEnvelope
- type DestinationPagerdutyGetResponseEnvelopeResultInfo
- type DestinationPagerdutyGetResponseEnvelopeSuccess
- type DestinationPagerdutyLinkParams
- type DestinationPagerdutyLinkResponse
- type DestinationPagerdutyLinkResponseEnvelope
- type DestinationPagerdutyNewParams
- type DestinationPagerdutyNewResponse
- type DestinationPagerdutyNewResponseEnvelope
- type DestinationPagerdutyService
- func (r *DestinationPagerdutyService) Delete(ctx context.Context, body DestinationPagerdutyDeleteParams, ...) (res *DestinationPagerdutyDeleteResponse, err error)
- func (r *DestinationPagerdutyService) Get(ctx context.Context, query DestinationPagerdutyGetParams, ...) (res *[]Pagerduty, err error)
- func (r *DestinationPagerdutyService) Link(ctx context.Context, tokenID string, query DestinationPagerdutyLinkParams, ...) (res *DestinationPagerdutyLinkResponse, err error)
- func (r *DestinationPagerdutyService) New(ctx context.Context, body DestinationPagerdutyNewParams, ...) (res *DestinationPagerdutyNewResponse, err error)
- type DestinationService
- type DestinationWebhookDeleteParams
- type DestinationWebhookDeleteResponse
- type DestinationWebhookDeleteResponseResultInfo
- type DestinationWebhookDeleteResponseSuccess
- type DestinationWebhookGetParams
- type DestinationWebhookGetResponseEnvelope
- type DestinationWebhookListParams
- type DestinationWebhookNewParams
- type DestinationWebhookNewResponse
- type DestinationWebhookNewResponseEnvelope
- type DestinationWebhookService
- func (r *DestinationWebhookService) Delete(ctx context.Context, webhookID string, body DestinationWebhookDeleteParams, ...) (res *DestinationWebhookDeleteResponse, err error)
- func (r *DestinationWebhookService) Get(ctx context.Context, webhookID string, query DestinationWebhookGetParams, ...) (res *Webhooks, err error)
- func (r *DestinationWebhookService) List(ctx context.Context, query DestinationWebhookListParams, ...) (res *pagination.SinglePage[Webhooks], err error)
- func (r *DestinationWebhookService) ListAutoPaging(ctx context.Context, query DestinationWebhookListParams, ...) *pagination.SinglePageAutoPager[Webhooks]
- func (r *DestinationWebhookService) New(ctx context.Context, params DestinationWebhookNewParams, ...) (res *DestinationWebhookNewResponse, err error)
- func (r *DestinationWebhookService) Update(ctx context.Context, webhookID string, params DestinationWebhookUpdateParams, ...) (res *DestinationWebhookUpdateResponse, err error)
- type DestinationWebhookUpdateParams
- type DestinationWebhookUpdateResponse
- type DestinationWebhookUpdateResponseEnvelope
- type Error
- type ErrorData
- type History
- type HistoryListParams
- type HistoryMechanismType
- type HistoryService
- func (r *HistoryService) List(ctx context.Context, params HistoryListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[History], err error)
- func (r *HistoryService) ListAutoPaging(ctx context.Context, params HistoryListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[History]
- type Mechanism
- type MechanismItem
- type MechanismItemIDUnion
- type MechanismItemIDUnionParam
- type MechanismItemParam
- type MechanismParam
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Pagerduty
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type Policy
- type PolicyAlertType
- type PolicyDeleteParams
- type PolicyDeleteResponse
- type PolicyDeleteResponseResultInfo
- type PolicyDeleteResponseSuccess
- type PolicyFilter
- type PolicyFilterAlertTriggerPreferencesValue
- type PolicyFilterIncidentImpact
- type PolicyFilterParam
- type PolicyFilterTrafficExclusion
- type PolicyGetParams
- type PolicyGetResponseEnvelope
- type PolicyListParams
- type PolicyNewParams
- type PolicyNewParamsAlertType
- type PolicyNewResponse
- type PolicyNewResponseEnvelope
- type PolicyParam
- type PolicyService
- func (r *PolicyService) Delete(ctx context.Context, policyID string, body PolicyDeleteParams, ...) (res *PolicyDeleteResponse, err error)
- func (r *PolicyService) Get(ctx context.Context, policyID string, query PolicyGetParams, ...) (res *Policy, err error)
- func (r *PolicyService) List(ctx context.Context, query PolicyListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Policy], err error)
- func (r *PolicyService) ListAutoPaging(ctx context.Context, query PolicyListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Policy]
- func (r *PolicyService) New(ctx context.Context, params PolicyNewParams, opts ...option.RequestOption) (res *PolicyNewResponse, err error)
- func (r *PolicyService) Update(ctx context.Context, policyID string, params PolicyUpdateParams, ...) (res *PolicyUpdateResponse, err error)
- type PolicyUpdateParams
- type PolicyUpdateParamsAlertType
- type PolicyUpdateResponse
- type PolicyUpdateResponseEnvelope
- type ResponseInfo
- type Role
- type SortDirection
- type Webhooks
- type WebhooksType
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertingService ¶
type AlertingService struct { Options []option.RequestOption AvailableAlerts *AvailableAlertService Destinations *DestinationService History *HistoryService Policies *PolicyService }
AlertingService 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 NewAlertingService method instead.
func NewAlertingService ¶
func NewAlertingService(opts ...option.RequestOption) (r *AlertingService)
NewAlertingService 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 AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type AvailableAlertListResponse ¶ added in v2.3.0
type AvailableAlertListResponse map[string][]AvailableAlertListResponseItem
type AvailableAlertListResponseEnvelope ¶
type AvailableAlertListResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success AvailableAlertListResponseEnvelopeSuccess `json:"success,required"` Result AvailableAlertListResponse `json:"result"` ResultInfo AvailableAlertListResponseEnvelopeResultInfo `json:"result_info"` JSON availableAlertListResponseEnvelopeJSON `json:"-"` }
func (*AvailableAlertListResponseEnvelope) UnmarshalJSON ¶
func (r *AvailableAlertListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AvailableAlertListResponseEnvelopeResultInfo ¶
type AvailableAlertListResponseEnvelopeResultInfo 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 availableAlertListResponseEnvelopeResultInfoJSON `json:"-"` }
func (*AvailableAlertListResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *AvailableAlertListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type AvailableAlertListResponseEnvelopeSuccess ¶
type AvailableAlertListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AvailableAlertListResponseEnvelopeSuccessTrue AvailableAlertListResponseEnvelopeSuccess = true
)
func (AvailableAlertListResponseEnvelopeSuccess) IsKnown ¶
func (r AvailableAlertListResponseEnvelopeSuccess) IsKnown() bool
type AvailableAlertListResponseItem ¶ added in v2.3.0
type AvailableAlertListResponseItem struct { // Describes the alert type. Description string `json:"description"` // Alert type name. DisplayName string `json:"display_name"` // Format of additional configuration options (filters) for the alert type. Data // type of filters during policy creation: Array of strings. FilterOptions []interface{} `json:"filter_options"` // Use this value when creating and updating a notification policy. Type string `json:"type"` JSON availableAlertListResponseItemJSON `json:"-"` }
func (*AvailableAlertListResponseItem) UnmarshalJSON ¶ added in v2.3.0
func (r *AvailableAlertListResponseItem) UnmarshalJSON(data []byte) (err error)
type AvailableAlertService ¶
type AvailableAlertService struct {
Options []option.RequestOption
}
AvailableAlertService 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 NewAvailableAlertService method instead.
func NewAvailableAlertService ¶
func NewAvailableAlertService(opts ...option.RequestOption) (r *AvailableAlertService)
NewAvailableAlertService 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 (*AvailableAlertService) List ¶
func (r *AvailableAlertService) List(ctx context.Context, query AvailableAlertListParams, opts ...option.RequestOption) (res *AvailableAlertListResponse, err error)
Gets a list of all alert types for which an account is eligible.
type CertificateCA ¶ added in v2.2.0
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶ added in v2.2.0
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶ added in v2.3.0
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type DestinationEligibleGetResponse ¶ added in v2.3.0
type DestinationEligibleGetResponse map[string][]DestinationEligibleGetResponseItem
type DestinationEligibleGetResponseEnvelope ¶
type DestinationEligibleGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DestinationEligibleGetResponseEnvelopeSuccess `json:"success,required"` Result DestinationEligibleGetResponse `json:"result"` ResultInfo DestinationEligibleGetResponseEnvelopeResultInfo `json:"result_info"` JSON destinationEligibleGetResponseEnvelopeJSON `json:"-"` }
func (*DestinationEligibleGetResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationEligibleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationEligibleGetResponseEnvelopeResultInfo ¶
type DestinationEligibleGetResponseEnvelopeResultInfo 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 destinationEligibleGetResponseEnvelopeResultInfoJSON `json:"-"` }
func (*DestinationEligibleGetResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *DestinationEligibleGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type DestinationEligibleGetResponseEnvelopeSuccess ¶
type DestinationEligibleGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DestinationEligibleGetResponseEnvelopeSuccessTrue DestinationEligibleGetResponseEnvelopeSuccess = true
)
func (DestinationEligibleGetResponseEnvelopeSuccess) IsKnown ¶
func (r DestinationEligibleGetResponseEnvelopeSuccess) IsKnown() bool
type DestinationEligibleGetResponseItem ¶ added in v2.3.0
type DestinationEligibleGetResponseItem struct { // Determines whether or not the account is eligible for the delivery mechanism. Eligible bool `json:"eligible"` // Beta flag. Users can create a policy with a mechanism that is not ready, but we // cannot guarantee successful delivery of notifications. Ready bool `json:"ready"` // Determines type of delivery mechanism. Type DestinationEligibleGetResponseItemType `json:"type"` JSON destinationEligibleGetResponseItemJSON `json:"-"` }
func (*DestinationEligibleGetResponseItem) UnmarshalJSON ¶ added in v2.3.0
func (r *DestinationEligibleGetResponseItem) UnmarshalJSON(data []byte) (err error)
type DestinationEligibleGetResponseItemType ¶ added in v2.3.0
type DestinationEligibleGetResponseItemType string
Determines type of delivery mechanism.
const ( DestinationEligibleGetResponseItemTypeEmail DestinationEligibleGetResponseItemType = "email" DestinationEligibleGetResponseItemTypePagerduty DestinationEligibleGetResponseItemType = "pagerduty" DestinationEligibleGetResponseItemTypeWebhook DestinationEligibleGetResponseItemType = "webhook" )
func (DestinationEligibleGetResponseItemType) IsKnown ¶ added in v2.3.0
func (r DestinationEligibleGetResponseItemType) IsKnown() bool
type DestinationEligibleService ¶
type DestinationEligibleService struct {
Options []option.RequestOption
}
DestinationEligibleService 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 NewDestinationEligibleService method instead.
func NewDestinationEligibleService ¶
func NewDestinationEligibleService(opts ...option.RequestOption) (r *DestinationEligibleService)
NewDestinationEligibleService 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 (*DestinationEligibleService) Get ¶
func (r *DestinationEligibleService) Get(ctx context.Context, query DestinationEligibleGetParams, opts ...option.RequestOption) (res *DestinationEligibleGetResponse, err error)
Get a list of all delivery mechanism types for which an account is eligible.
type DestinationPagerdutyDeleteResponse ¶ added in v2.3.0
type DestinationPagerdutyDeleteResponse struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DestinationPagerdutyDeleteResponseSuccess `json:"success,required"` ResultInfo DestinationPagerdutyDeleteResponseResultInfo `json:"result_info"` JSON destinationPagerdutyDeleteResponseJSON `json:"-"` }
func (*DestinationPagerdutyDeleteResponse) UnmarshalJSON ¶ added in v2.3.0
func (r *DestinationPagerdutyDeleteResponse) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyDeleteResponseResultInfo ¶ added in v2.3.0
type DestinationPagerdutyDeleteResponseResultInfo 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 destinationPagerdutyDeleteResponseResultInfoJSON `json:"-"` }
func (*DestinationPagerdutyDeleteResponseResultInfo) UnmarshalJSON ¶ added in v2.3.0
func (r *DestinationPagerdutyDeleteResponseResultInfo) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyDeleteResponseSuccess ¶ added in v2.3.0
type DestinationPagerdutyDeleteResponseSuccess bool
Whether the API call was successful
const (
DestinationPagerdutyDeleteResponseSuccessTrue DestinationPagerdutyDeleteResponseSuccess = true
)
func (DestinationPagerdutyDeleteResponseSuccess) IsKnown ¶ added in v2.3.0
func (r DestinationPagerdutyDeleteResponseSuccess) IsKnown() bool
type DestinationPagerdutyGetResponseEnvelope ¶
type DestinationPagerdutyGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DestinationPagerdutyGetResponseEnvelopeSuccess `json:"success,required"` Result []Pagerduty `json:"result"` ResultInfo DestinationPagerdutyGetResponseEnvelopeResultInfo `json:"result_info"` JSON destinationPagerdutyGetResponseEnvelopeJSON `json:"-"` }
func (*DestinationPagerdutyGetResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationPagerdutyGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyGetResponseEnvelopeResultInfo ¶
type DestinationPagerdutyGetResponseEnvelopeResultInfo 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 destinationPagerdutyGetResponseEnvelopeResultInfoJSON `json:"-"` }
func (*DestinationPagerdutyGetResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *DestinationPagerdutyGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyGetResponseEnvelopeSuccess ¶
type DestinationPagerdutyGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DestinationPagerdutyGetResponseEnvelopeSuccessTrue DestinationPagerdutyGetResponseEnvelopeSuccess = true
)
func (DestinationPagerdutyGetResponseEnvelopeSuccess) IsKnown ¶
func (r DestinationPagerdutyGetResponseEnvelopeSuccess) IsKnown() bool
type DestinationPagerdutyLinkResponse ¶
type DestinationPagerdutyLinkResponse struct { // UUID ID string `json:"id"` JSON destinationPagerdutyLinkResponseJSON `json:"-"` }
func (*DestinationPagerdutyLinkResponse) UnmarshalJSON ¶
func (r *DestinationPagerdutyLinkResponse) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyLinkResponseEnvelope ¶
type DestinationPagerdutyLinkResponseEnvelope struct { Result DestinationPagerdutyLinkResponse `json:"result"` JSON destinationPagerdutyLinkResponseEnvelopeJSON `json:"-"` }
func (*DestinationPagerdutyLinkResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationPagerdutyLinkResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyNewResponse ¶
type DestinationPagerdutyNewResponse struct { // token in form of UUID ID string `json:"id"` JSON destinationPagerdutyNewResponseJSON `json:"-"` }
func (*DestinationPagerdutyNewResponse) UnmarshalJSON ¶
func (r *DestinationPagerdutyNewResponse) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyNewResponseEnvelope ¶
type DestinationPagerdutyNewResponseEnvelope struct { Result DestinationPagerdutyNewResponse `json:"result"` JSON destinationPagerdutyNewResponseEnvelopeJSON `json:"-"` }
func (*DestinationPagerdutyNewResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationPagerdutyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyService ¶
type DestinationPagerdutyService struct {
Options []option.RequestOption
}
DestinationPagerdutyService 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 NewDestinationPagerdutyService method instead.
func NewDestinationPagerdutyService ¶
func NewDestinationPagerdutyService(opts ...option.RequestOption) (r *DestinationPagerdutyService)
NewDestinationPagerdutyService 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 (*DestinationPagerdutyService) Delete ¶
func (r *DestinationPagerdutyService) Delete(ctx context.Context, body DestinationPagerdutyDeleteParams, opts ...option.RequestOption) (res *DestinationPagerdutyDeleteResponse, err error)
Deletes all the PagerDuty Services connected to the account.
func (*DestinationPagerdutyService) Get ¶
func (r *DestinationPagerdutyService) Get(ctx context.Context, query DestinationPagerdutyGetParams, opts ...option.RequestOption) (res *[]Pagerduty, err error)
Get a list of all configured PagerDuty services.
func (*DestinationPagerdutyService) Link ¶
func (r *DestinationPagerdutyService) Link(ctx context.Context, tokenID string, query DestinationPagerdutyLinkParams, opts ...option.RequestOption) (res *DestinationPagerdutyLinkResponse, err error)
Links PagerDuty with the account using the integration token.
func (*DestinationPagerdutyService) New ¶
func (r *DestinationPagerdutyService) New(ctx context.Context, body DestinationPagerdutyNewParams, opts ...option.RequestOption) (res *DestinationPagerdutyNewResponse, err error)
Creates a new token for integrating with PagerDuty.
type DestinationService ¶
type DestinationService struct { Options []option.RequestOption Eligible *DestinationEligibleService Pagerduty *DestinationPagerdutyService Webhooks *DestinationWebhookService }
DestinationService 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 NewDestinationService method instead.
func NewDestinationService ¶
func NewDestinationService(opts ...option.RequestOption) (r *DestinationService)
NewDestinationService 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 DestinationWebhookDeleteResponse ¶ added in v2.3.0
type DestinationWebhookDeleteResponse struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DestinationWebhookDeleteResponseSuccess `json:"success,required"` ResultInfo DestinationWebhookDeleteResponseResultInfo `json:"result_info"` JSON destinationWebhookDeleteResponseJSON `json:"-"` }
func (*DestinationWebhookDeleteResponse) UnmarshalJSON ¶ added in v2.3.0
func (r *DestinationWebhookDeleteResponse) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookDeleteResponseResultInfo ¶ added in v2.3.0
type DestinationWebhookDeleteResponseResultInfo 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 destinationWebhookDeleteResponseResultInfoJSON `json:"-"` }
func (*DestinationWebhookDeleteResponseResultInfo) UnmarshalJSON ¶ added in v2.3.0
func (r *DestinationWebhookDeleteResponseResultInfo) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookDeleteResponseSuccess ¶ added in v2.3.0
type DestinationWebhookDeleteResponseSuccess bool
Whether the API call was successful
const (
DestinationWebhookDeleteResponseSuccessTrue DestinationWebhookDeleteResponseSuccess = true
)
func (DestinationWebhookDeleteResponseSuccess) IsKnown ¶ added in v2.3.0
func (r DestinationWebhookDeleteResponseSuccess) IsKnown() bool
type DestinationWebhookGetResponseEnvelope ¶
type DestinationWebhookGetResponseEnvelope struct { Result Webhooks `json:"result"` JSON destinationWebhookGetResponseEnvelopeJSON `json:"-"` }
func (*DestinationWebhookGetResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationWebhookGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookNewParams ¶
type DestinationWebhookNewParams struct { // The account id AccountID param.Field[string] `path:"account_id,required"` // The name of the webhook destination. This will be included in the request body // when you receive a webhook notification. Name param.Field[string] `json:"name,required"` // The POST endpoint to call when dispatching a notification. URL param.Field[string] `json:"url,required"` // Optional secret that will be passed in the `cf-webhook-auth` header when // dispatching generic webhook notifications or formatted for supported // destinations. Secrets are not returned in any API response body. Secret param.Field[string] `json:"secret"` }
func (DestinationWebhookNewParams) MarshalJSON ¶
func (r DestinationWebhookNewParams) MarshalJSON() (data []byte, err error)
type DestinationWebhookNewResponse ¶
type DestinationWebhookNewResponse struct { // UUID ID string `json:"id"` JSON destinationWebhookNewResponseJSON `json:"-"` }
func (*DestinationWebhookNewResponse) UnmarshalJSON ¶
func (r *DestinationWebhookNewResponse) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookNewResponseEnvelope ¶
type DestinationWebhookNewResponseEnvelope struct { Result DestinationWebhookNewResponse `json:"result"` JSON destinationWebhookNewResponseEnvelopeJSON `json:"-"` }
func (*DestinationWebhookNewResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationWebhookNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookService ¶
type DestinationWebhookService struct {
Options []option.RequestOption
}
DestinationWebhookService 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 NewDestinationWebhookService method instead.
func NewDestinationWebhookService ¶
func NewDestinationWebhookService(opts ...option.RequestOption) (r *DestinationWebhookService)
NewDestinationWebhookService 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 (*DestinationWebhookService) Delete ¶
func (r *DestinationWebhookService) Delete(ctx context.Context, webhookID string, body DestinationWebhookDeleteParams, opts ...option.RequestOption) (res *DestinationWebhookDeleteResponse, err error)
Delete a configured webhook destination.
func (*DestinationWebhookService) Get ¶
func (r *DestinationWebhookService) Get(ctx context.Context, webhookID string, query DestinationWebhookGetParams, opts ...option.RequestOption) (res *Webhooks, err error)
Get details for a single webhooks destination.
func (*DestinationWebhookService) List ¶
func (r *DestinationWebhookService) List(ctx context.Context, query DestinationWebhookListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Webhooks], err error)
Gets a list of all configured webhook destinations.
func (*DestinationWebhookService) ListAutoPaging ¶
func (r *DestinationWebhookService) ListAutoPaging(ctx context.Context, query DestinationWebhookListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Webhooks]
Gets a list of all configured webhook destinations.
func (*DestinationWebhookService) New ¶
func (r *DestinationWebhookService) New(ctx context.Context, params DestinationWebhookNewParams, opts ...option.RequestOption) (res *DestinationWebhookNewResponse, err error)
Creates a new webhook destination.
func (*DestinationWebhookService) Update ¶
func (r *DestinationWebhookService) Update(ctx context.Context, webhookID string, params DestinationWebhookUpdateParams, opts ...option.RequestOption) (res *DestinationWebhookUpdateResponse, err error)
Update a webhook destination.
type DestinationWebhookUpdateParams ¶
type DestinationWebhookUpdateParams struct { // The account id AccountID param.Field[string] `path:"account_id,required"` // The name of the webhook destination. This will be included in the request body // when you receive a webhook notification. Name param.Field[string] `json:"name,required"` // The POST endpoint to call when dispatching a notification. URL param.Field[string] `json:"url,required"` // Optional secret that will be passed in the `cf-webhook-auth` header when // dispatching generic webhook notifications or formatted for supported // destinations. Secrets are not returned in any API response body. Secret param.Field[string] `json:"secret"` }
func (DestinationWebhookUpdateParams) MarshalJSON ¶
func (r DestinationWebhookUpdateParams) MarshalJSON() (data []byte, err error)
type DestinationWebhookUpdateResponse ¶
type DestinationWebhookUpdateResponse struct { // UUID ID string `json:"id"` JSON destinationWebhookUpdateResponseJSON `json:"-"` }
func (*DestinationWebhookUpdateResponse) UnmarshalJSON ¶
func (r *DestinationWebhookUpdateResponse) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookUpdateResponseEnvelope ¶
type DestinationWebhookUpdateResponseEnvelope struct { Result DestinationWebhookUpdateResponse `json:"result"` JSON destinationWebhookUpdateResponseEnvelopeJSON `json:"-"` }
func (*DestinationWebhookUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationWebhookUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type History ¶
type History struct { // UUID ID string `json:"id"` // Message body included in the notification sent. AlertBody string `json:"alert_body"` // Type of notification that has been dispatched. AlertType string `json:"alert_type"` // Description of the notification policy (if present). Description string `json:"description"` // The mechanism to which the notification has been dispatched. Mechanism string `json:"mechanism"` // The type of mechanism to which the notification has been dispatched. This can be // email/pagerduty/webhook based on the mechanism configured. MechanismType HistoryMechanismType `json:"mechanism_type"` // Name of the policy. Name string `json:"name"` // The unique identifier of a notification policy PolicyID string `json:"policy_id"` // Timestamp of when the notification was dispatched in ISO 8601 format. Sent time.Time `json:"sent" format:"date-time"` JSON historyJSON `json:"-"` }
func (*History) UnmarshalJSON ¶
type HistoryListParams ¶
type HistoryListParams struct { // The account id AccountID param.Field[string] `path:"account_id,required"` // Limit the returned results to history records older than the specified date. // This must be a timestamp that conforms to RFC3339. Before param.Field[time.Time] `query:"before" format:"date-time"` // Page number of paginated results. Page param.Field[float64] `query:"page"` // Number of items per page. PerPage param.Field[float64] `query:"per_page"` // Limit the returned results to history records newer than the specified date. // This must be a timestamp that conforms to RFC3339. Since param.Field[time.Time] `query:"since" format:"date-time"` }
func (HistoryListParams) URLQuery ¶
func (r HistoryListParams) URLQuery() (v url.Values)
URLQuery serializes HistoryListParams's query parameters as `url.Values`.
type HistoryMechanismType ¶
type HistoryMechanismType string
The type of mechanism to which the notification has been dispatched. This can be email/pagerduty/webhook based on the mechanism configured.
const ( HistoryMechanismTypeEmail HistoryMechanismType = "email" HistoryMechanismTypePagerduty HistoryMechanismType = "pagerduty" HistoryMechanismTypeWebhook HistoryMechanismType = "webhook" )
func (HistoryMechanismType) IsKnown ¶
func (r HistoryMechanismType) IsKnown() bool
type HistoryService ¶
type HistoryService struct {
Options []option.RequestOption
}
HistoryService 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 NewHistoryService method instead.
func NewHistoryService ¶
func NewHistoryService(opts ...option.RequestOption) (r *HistoryService)
NewHistoryService 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 (*HistoryService) List ¶
func (r *HistoryService) List(ctx context.Context, params HistoryListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[History], err error)
Gets a list of history records for notifications sent to an account. The records are displayed for last `x` number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).
func (*HistoryService) ListAutoPaging ¶
func (r *HistoryService) ListAutoPaging(ctx context.Context, params HistoryListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[History]
Gets a list of history records for notifications sent to an account. The records are displayed for last `x` number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).
type Mechanism ¶
type Mechanism map[string][]MechanismItem
type MechanismItem ¶ added in v2.2.0
type MechanismItem struct { // UUID ID MechanismItemIDUnion `json:"id"` JSON mechanismItemJSON `json:"-"` }
func (*MechanismItem) UnmarshalJSON ¶ added in v2.2.0
func (r *MechanismItem) UnmarshalJSON(data []byte) (err error)
type MechanismItemIDUnion ¶ added in v2.2.0
type MechanismItemIDUnion interface {
ImplementsAlertingMechanismItemIDUnion()
}
UUID
Union satisfied by shared.UnionString or shared.UnionString.
type MechanismItemIDUnionParam ¶ added in v2.2.0
type MechanismItemIDUnionParam interface {
ImplementsAlertingMechanismItemIDUnionParam()
}
UUID
Satisfied by shared.UnionString, shared.UnionString.
type MechanismItemParam ¶ added in v2.2.0
type MechanismItemParam struct { // UUID ID param.Field[MechanismItemIDUnionParam] `json:"id"` }
func (MechanismItemParam) MarshalJSON ¶ added in v2.2.0
func (r MechanismItemParam) MarshalJSON() (data []byte, err error)
type MechanismParam ¶
type MechanismParam map[string][]MechanismItemParam
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶ added in v2.3.0
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
This is an alias to an internal type.
type Pagerduty ¶
type Pagerduty struct { // UUID ID string `json:"id"` // The name of the pagerduty service. Name string `json:"name"` JSON pagerdutyJSON `json:"-"` }
func (*Pagerduty) UnmarshalJSON ¶
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
type Policy ¶
type Policy struct { // The unique identifier of a notification policy ID string `json:"id"` // Refers to which event will trigger a Notification dispatch. You can use the // endpoint to get available alert types which then will give you a list of // possible values. AlertType PolicyAlertType `json:"alert_type"` Created time.Time `json:"created" format:"date-time"` // Optional description for the Notification policy. Description string `json:"description"` // Whether or not the Notification policy is enabled. Enabled bool `json:"enabled"` // Optional filters that allow you to be alerted only on a subset of events for // that alert type based on some criteria. This is only available for select alert // types. See alert type documentation for more details. Filters PolicyFilter `json:"filters"` // List of IDs that will be used when dispatching a notification. IDs for email // type will be the email address. Mechanisms Mechanism `json:"mechanisms"` Modified time.Time `json:"modified" format:"date-time"` // Name of the policy. Name string `json:"name"` JSON policyJSON `json:"-"` }
func (*Policy) UnmarshalJSON ¶
type PolicyAlertType ¶
type PolicyAlertType string
Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.
const ( PolicyAlertTypeAccessCustomCertificateExpirationType PolicyAlertType = "access_custom_certificate_expiration_type" PolicyAlertTypeAdvancedDDoSAttackL4Alert PolicyAlertType = "advanced_ddos_attack_l4_alert" PolicyAlertTypeAdvancedDDoSAttackL7Alert PolicyAlertType = "advanced_ddos_attack_l7_alert" PolicyAlertTypeAdvancedHTTPAlertError PolicyAlertType = "advanced_http_alert_error" PolicyAlertTypeBGPHijackNotification PolicyAlertType = "bgp_hijack_notification" PolicyAlertTypeBillingUsageAlert PolicyAlertType = "billing_usage_alert" PolicyAlertTypeBlockNotificationBlockRemoved PolicyAlertType = "block_notification_block_removed" PolicyAlertTypeBlockNotificationNewBlock PolicyAlertType = "block_notification_new_block" PolicyAlertTypeBlockNotificationReviewRejected PolicyAlertType = "block_notification_review_rejected" PolicyAlertTypeBrandProtectionAlert PolicyAlertType = "brand_protection_alert" PolicyAlertTypeBrandProtectionDigest PolicyAlertType = "brand_protection_digest" PolicyAlertTypeClickhouseAlertFwAnomaly PolicyAlertType = "clickhouse_alert_fw_anomaly" PolicyAlertTypeClickhouseAlertFwEntAnomaly PolicyAlertType = "clickhouse_alert_fw_ent_anomaly" PolicyAlertTypeCustomSSLCertificateEventType PolicyAlertType = "custom_ssl_certificate_event_type" PolicyAlertTypeDedicatedSSLCertificateEventType PolicyAlertType = "dedicated_ssl_certificate_event_type" PolicyAlertTypeDosAttackL4 PolicyAlertType = "dos_attack_l4" PolicyAlertTypeDosAttackL7 PolicyAlertType = "dos_attack_l7" PolicyAlertTypeExpiringServiceTokenAlert PolicyAlertType = "expiring_service_token_alert" PolicyAlertTypeFailingLogpushJobDisabledAlert PolicyAlertType = "failing_logpush_job_disabled_alert" PolicyAlertTypeFbmAutoAdvertisement PolicyAlertType = "fbm_auto_advertisement" PolicyAlertTypeFbmDosdAttack PolicyAlertType = "fbm_dosd_attack" PolicyAlertTypeFbmVolumetricAttack PolicyAlertType = "fbm_volumetric_attack" PolicyAlertTypeHealthCheckStatusNotification PolicyAlertType = "health_check_status_notification" PolicyAlertTypeHostnameAopCustomCertificateExpirationType PolicyAlertType = "hostname_aop_custom_certificate_expiration_type" PolicyAlertTypeHTTPAlertEdgeError PolicyAlertType = "http_alert_edge_error" PolicyAlertTypeHTTPAlertOriginError PolicyAlertType = "http_alert_origin_error" PolicyAlertTypeIncidentAlert PolicyAlertType = "incident_alert" PolicyAlertTypeLoadBalancingHealthAlert PolicyAlertType = "load_balancing_health_alert" PolicyAlertTypeLoadBalancingPoolEnablementAlert PolicyAlertType = "load_balancing_pool_enablement_alert" PolicyAlertTypeLogoMatchAlert PolicyAlertType = "logo_match_alert" PolicyAlertTypeMagicTunnelHealthCheckEvent PolicyAlertType = "magic_tunnel_health_check_event" PolicyAlertTypeMaintenanceEventNotification PolicyAlertType = "maintenance_event_notification" PolicyAlertTypeMTLSCertificateStoreCertificateExpirationType PolicyAlertType = "mtls_certificate_store_certificate_expiration_type" PolicyAlertTypePagesEventAlert PolicyAlertType = "pages_event_alert" PolicyAlertTypeRadarNotification PolicyAlertType = "radar_notification" PolicyAlertTypeRealOriginMonitoring PolicyAlertType = "real_origin_monitoring" PolicyAlertTypeScriptmonitorAlertNewCodeChangeDetections PolicyAlertType = "scriptmonitor_alert_new_code_change_detections" PolicyAlertTypeScriptmonitorAlertNewHosts PolicyAlertType = "scriptmonitor_alert_new_hosts" PolicyAlertTypeScriptmonitorAlertNewMaliciousHosts PolicyAlertType = "scriptmonitor_alert_new_malicious_hosts" PolicyAlertTypeScriptmonitorAlertNewMaliciousScripts PolicyAlertType = "scriptmonitor_alert_new_malicious_scripts" PolicyAlertTypeScriptmonitorAlertNewMaliciousURL PolicyAlertType = "scriptmonitor_alert_new_malicious_url" PolicyAlertTypeScriptmonitorAlertNewMaxLengthResourceURL PolicyAlertType = "scriptmonitor_alert_new_max_length_resource_url" PolicyAlertTypeScriptmonitorAlertNewResources PolicyAlertType = "scriptmonitor_alert_new_resources" PolicyAlertTypeSecondaryDNSAllPrimariesFailing PolicyAlertType = "secondary_dns_all_primaries_failing" PolicyAlertTypeSecondaryDNSPrimariesFailing PolicyAlertType = "secondary_dns_primaries_failing" PolicyAlertTypeSecondaryDNSZoneSuccessfullyUpdated PolicyAlertType = "secondary_dns_zone_successfully_updated" PolicyAlertTypeSecondaryDNSZoneValidationWarning PolicyAlertType = "secondary_dns_zone_validation_warning" PolicyAlertTypeSentinelAlert PolicyAlertType = "sentinel_alert" PolicyAlertTypeStreamLiveNotifications PolicyAlertType = "stream_live_notifications" PolicyAlertTypeTrafficAnomaliesAlert PolicyAlertType = "traffic_anomalies_alert" PolicyAlertTypeTunnelHealthEvent PolicyAlertType = "tunnel_health_event" PolicyAlertTypeTunnelUpdateEvent PolicyAlertType = "tunnel_update_event" PolicyAlertTypeUniversalSSLEventType PolicyAlertType = "universal_ssl_event_type" PolicyAlertTypeWebAnalyticsMetricsUpdate PolicyAlertType = "web_analytics_metrics_update" PolicyAlertTypeZoneAopCustomCertificateExpirationType PolicyAlertType = "zone_aop_custom_certificate_expiration_type" )
func (PolicyAlertType) IsKnown ¶
func (r PolicyAlertType) IsKnown() bool
type PolicyDeleteParams ¶
type PolicyDeleteResponse ¶ added in v2.3.0
type PolicyDeleteResponse struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success PolicyDeleteResponseSuccess `json:"success,required"` ResultInfo PolicyDeleteResponseResultInfo `json:"result_info"` JSON policyDeleteResponseJSON `json:"-"` }
func (*PolicyDeleteResponse) UnmarshalJSON ¶ added in v2.3.0
func (r *PolicyDeleteResponse) UnmarshalJSON(data []byte) (err error)
type PolicyDeleteResponseResultInfo ¶ added in v2.3.0
type PolicyDeleteResponseResultInfo 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 policyDeleteResponseResultInfoJSON `json:"-"` }
func (*PolicyDeleteResponseResultInfo) UnmarshalJSON ¶ added in v2.3.0
func (r *PolicyDeleteResponseResultInfo) UnmarshalJSON(data []byte) (err error)
type PolicyDeleteResponseSuccess ¶ added in v2.3.0
type PolicyDeleteResponseSuccess bool
Whether the API call was successful
const (
PolicyDeleteResponseSuccessTrue PolicyDeleteResponseSuccess = true
)
func (PolicyDeleteResponseSuccess) IsKnown ¶ added in v2.3.0
func (r PolicyDeleteResponseSuccess) IsKnown() bool
type PolicyFilter ¶
type PolicyFilter struct { // Usage depends on specific alert type Actions []string `json:"actions"` // Used for configuring radar_notification AffectedASNs []string `json:"affected_asns"` // Used for configuring incident_alert. A list of identifiers for each component to // monitor. AffectedComponents []string `json:"affected_components"` // Used for configuring radar_notification AffectedLocations []string `json:"affected_locations"` // Used for configuring maintenance_event_notification AirportCode []string `json:"airport_code"` // Usage depends on specific alert type AlertTriggerPreferences []string `json:"alert_trigger_preferences"` // Used for configuring magic_tunnel_health_check_event AlertTriggerPreferencesValue []PolicyFilterAlertTriggerPreferencesValue `json:"alert_trigger_preferences_value"` // Used for configuring load_balancing_pool_enablement_alert Enabled []string `json:"enabled"` // Used for configuring pages_event_alert Environment []string `json:"environment"` // Used for configuring pages_event_alert Event []string `json:"event"` // Used for configuring load_balancing_health_alert EventSource []string `json:"event_source"` // Usage depends on specific alert type EventType []string `json:"event_type"` // Usage depends on specific alert type GroupBy []string `json:"group_by"` // Used for configuring health_check_status_notification HealthCheckID []string `json:"health_check_id"` // Used for configuring incident_alert IncidentImpact []PolicyFilterIncidentImpact `json:"incident_impact"` // Used for configuring stream_live_notifications InputID []string `json:"input_id"` // Used for configuring billing_usage_alert Limit []string `json:"limit"` // Used for configuring logo_match_alert LogoTag []string `json:"logo_tag"` // Used for configuring advanced_ddos_attack_l4_alert MegabitsPerSecond []string `json:"megabits_per_second"` // Used for configuring load_balancing_health_alert NewHealth []string `json:"new_health"` // Used for configuring tunnel_health_event NewStatus []string `json:"new_status"` // Used for configuring advanced_ddos_attack_l4_alert PacketsPerSecond []string `json:"packets_per_second"` // Usage depends on specific alert type PoolID []string `json:"pool_id"` // Used for configuring billing_usage_alert Product []string `json:"product"` // Used for configuring pages_event_alert ProjectID []string `json:"project_id"` // Used for configuring advanced_ddos_attack_l4_alert Protocol []string `json:"protocol"` // Usage depends on specific alert type QueryTag []string `json:"query_tag"` // Used for configuring advanced_ddos_attack_l7_alert RequestsPerSecond []string `json:"requests_per_second"` // Usage depends on specific alert type Selectors []string `json:"selectors"` // Used for configuring clickhouse_alert_fw_ent_anomaly Services []string `json:"services"` // Usage depends on specific alert type Slo []string `json:"slo"` // Used for configuring health_check_status_notification Status []string `json:"status"` // Used for configuring advanced_ddos_attack_l7_alert TargetHostname []string `json:"target_hostname"` // Used for configuring advanced_ddos_attack_l4_alert TargetIP []string `json:"target_ip"` // Used for configuring advanced_ddos_attack_l7_alert TargetZoneName []string `json:"target_zone_name"` // Used for configuring traffic_anomalies_alert TrafficExclusions []PolicyFilterTrafficExclusion `json:"traffic_exclusions"` // Used for configuring tunnel_health_event TunnelID []string `json:"tunnel_id"` // Used for configuring magic_tunnel_health_check_event TunnelName []string `json:"tunnel_name"` // Usage depends on specific alert type Where []string `json:"where"` // Usage depends on specific alert type Zones []string `json:"zones"` JSON policyFilterJSON `json:"-"` }
Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.
func (*PolicyFilter) UnmarshalJSON ¶
func (r *PolicyFilter) UnmarshalJSON(data []byte) (err error)
type PolicyFilterAlertTriggerPreferencesValue ¶
type PolicyFilterAlertTriggerPreferencesValue string
const ( PolicyFilterAlertTriggerPreferencesValue99_0 PolicyFilterAlertTriggerPreferencesValue = "99.0" PolicyFilterAlertTriggerPreferencesValue98_0 PolicyFilterAlertTriggerPreferencesValue = "98.0" PolicyFilterAlertTriggerPreferencesValue97_0 PolicyFilterAlertTriggerPreferencesValue = "97.0" )
func (PolicyFilterAlertTriggerPreferencesValue) IsKnown ¶
func (r PolicyFilterAlertTriggerPreferencesValue) IsKnown() bool
type PolicyFilterIncidentImpact ¶
type PolicyFilterIncidentImpact string
const ( PolicyFilterIncidentImpactIncidentImpactNone PolicyFilterIncidentImpact = "INCIDENT_IMPACT_NONE" PolicyFilterIncidentImpactIncidentImpactMinor PolicyFilterIncidentImpact = "INCIDENT_IMPACT_MINOR" PolicyFilterIncidentImpactIncidentImpactMajor PolicyFilterIncidentImpact = "INCIDENT_IMPACT_MAJOR" PolicyFilterIncidentImpactIncidentImpactCritical PolicyFilterIncidentImpact = "INCIDENT_IMPACT_CRITICAL" )
func (PolicyFilterIncidentImpact) IsKnown ¶
func (r PolicyFilterIncidentImpact) IsKnown() bool
type PolicyFilterParam ¶
type PolicyFilterParam struct { // Usage depends on specific alert type Actions param.Field[[]string] `json:"actions"` // Used for configuring radar_notification AffectedASNs param.Field[[]string] `json:"affected_asns"` // Used for configuring incident_alert. A list of identifiers for each component to // monitor. AffectedComponents param.Field[[]string] `json:"affected_components"` // Used for configuring radar_notification AffectedLocations param.Field[[]string] `json:"affected_locations"` // Used for configuring maintenance_event_notification AirportCode param.Field[[]string] `json:"airport_code"` // Usage depends on specific alert type AlertTriggerPreferences param.Field[[]string] `json:"alert_trigger_preferences"` // Used for configuring magic_tunnel_health_check_event AlertTriggerPreferencesValue param.Field[[]PolicyFilterAlertTriggerPreferencesValue] `json:"alert_trigger_preferences_value"` // Used for configuring load_balancing_pool_enablement_alert Enabled param.Field[[]string] `json:"enabled"` // Used for configuring pages_event_alert Environment param.Field[[]string] `json:"environment"` // Used for configuring pages_event_alert Event param.Field[[]string] `json:"event"` // Used for configuring load_balancing_health_alert EventSource param.Field[[]string] `json:"event_source"` // Usage depends on specific alert type EventType param.Field[[]string] `json:"event_type"` // Usage depends on specific alert type GroupBy param.Field[[]string] `json:"group_by"` // Used for configuring health_check_status_notification HealthCheckID param.Field[[]string] `json:"health_check_id"` // Used for configuring incident_alert IncidentImpact param.Field[[]PolicyFilterIncidentImpact] `json:"incident_impact"` // Used for configuring stream_live_notifications InputID param.Field[[]string] `json:"input_id"` // Used for configuring billing_usage_alert Limit param.Field[[]string] `json:"limit"` // Used for configuring logo_match_alert LogoTag param.Field[[]string] `json:"logo_tag"` // Used for configuring advanced_ddos_attack_l4_alert MegabitsPerSecond param.Field[[]string] `json:"megabits_per_second"` // Used for configuring load_balancing_health_alert NewHealth param.Field[[]string] `json:"new_health"` // Used for configuring tunnel_health_event NewStatus param.Field[[]string] `json:"new_status"` // Used for configuring advanced_ddos_attack_l4_alert PacketsPerSecond param.Field[[]string] `json:"packets_per_second"` // Usage depends on specific alert type PoolID param.Field[[]string] `json:"pool_id"` // Used for configuring billing_usage_alert Product param.Field[[]string] `json:"product"` // Used for configuring pages_event_alert ProjectID param.Field[[]string] `json:"project_id"` // Used for configuring advanced_ddos_attack_l4_alert Protocol param.Field[[]string] `json:"protocol"` // Usage depends on specific alert type QueryTag param.Field[[]string] `json:"query_tag"` // Used for configuring advanced_ddos_attack_l7_alert RequestsPerSecond param.Field[[]string] `json:"requests_per_second"` // Usage depends on specific alert type Selectors param.Field[[]string] `json:"selectors"` // Used for configuring clickhouse_alert_fw_ent_anomaly Services param.Field[[]string] `json:"services"` // Usage depends on specific alert type Slo param.Field[[]string] `json:"slo"` // Used for configuring health_check_status_notification Status param.Field[[]string] `json:"status"` // Used for configuring advanced_ddos_attack_l7_alert TargetHostname param.Field[[]string] `json:"target_hostname"` // Used for configuring advanced_ddos_attack_l4_alert TargetIP param.Field[[]string] `json:"target_ip"` // Used for configuring advanced_ddos_attack_l7_alert TargetZoneName param.Field[[]string] `json:"target_zone_name"` // Used for configuring traffic_anomalies_alert TrafficExclusions param.Field[[]PolicyFilterTrafficExclusion] `json:"traffic_exclusions"` // Used for configuring tunnel_health_event TunnelID param.Field[[]string] `json:"tunnel_id"` // Used for configuring magic_tunnel_health_check_event TunnelName param.Field[[]string] `json:"tunnel_name"` // Usage depends on specific alert type Where param.Field[[]string] `json:"where"` // Usage depends on specific alert type Zones param.Field[[]string] `json:"zones"` }
Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.
func (PolicyFilterParam) MarshalJSON ¶
func (r PolicyFilterParam) MarshalJSON() (data []byte, err error)
type PolicyFilterTrafficExclusion ¶
type PolicyFilterTrafficExclusion string
const (
PolicyFilterTrafficExclusionSecurityEvents PolicyFilterTrafficExclusion = "security_events"
)
func (PolicyFilterTrafficExclusion) IsKnown ¶
func (r PolicyFilterTrafficExclusion) IsKnown() bool
type PolicyGetParams ¶
type PolicyGetResponseEnvelope ¶
type PolicyGetResponseEnvelope struct { Result Policy `json:"result"` JSON policyGetResponseEnvelopeJSON `json:"-"` }
func (*PolicyGetResponseEnvelope) UnmarshalJSON ¶
func (r *PolicyGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PolicyListParams ¶
type PolicyNewParams ¶
type PolicyNewParams struct { // The account id AccountID param.Field[string] `path:"account_id,required"` // Refers to which event will trigger a Notification dispatch. You can use the // endpoint to get available alert types which then will give you a list of // possible values. AlertType param.Field[PolicyNewParamsAlertType] `json:"alert_type,required"` // Whether or not the Notification policy is enabled. Enabled param.Field[bool] `json:"enabled,required"` // List of IDs that will be used when dispatching a notification. IDs for email // type will be the email address. Mechanisms param.Field[MechanismParam] `json:"mechanisms,required"` // Name of the policy. Name param.Field[string] `json:"name,required"` // Optional description for the Notification policy. Description param.Field[string] `json:"description"` // Optional filters that allow you to be alerted only on a subset of events for // that alert type based on some criteria. This is only available for select alert // types. See alert type documentation for more details. Filters param.Field[PolicyFilterParam] `json:"filters"` }
func (PolicyNewParams) MarshalJSON ¶
func (r PolicyNewParams) MarshalJSON() (data []byte, err error)
type PolicyNewParamsAlertType ¶
type PolicyNewParamsAlertType string
Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.
const ( PolicyNewParamsAlertTypeAccessCustomCertificateExpirationType PolicyNewParamsAlertType = "access_custom_certificate_expiration_type" PolicyNewParamsAlertTypeAdvancedDDoSAttackL4Alert PolicyNewParamsAlertType = "advanced_ddos_attack_l4_alert" PolicyNewParamsAlertTypeAdvancedDDoSAttackL7Alert PolicyNewParamsAlertType = "advanced_ddos_attack_l7_alert" PolicyNewParamsAlertTypeAdvancedHTTPAlertError PolicyNewParamsAlertType = "advanced_http_alert_error" PolicyNewParamsAlertTypeBGPHijackNotification PolicyNewParamsAlertType = "bgp_hijack_notification" PolicyNewParamsAlertTypeBillingUsageAlert PolicyNewParamsAlertType = "billing_usage_alert" PolicyNewParamsAlertTypeBlockNotificationBlockRemoved PolicyNewParamsAlertType = "block_notification_block_removed" PolicyNewParamsAlertTypeBlockNotificationNewBlock PolicyNewParamsAlertType = "block_notification_new_block" PolicyNewParamsAlertTypeBlockNotificationReviewRejected PolicyNewParamsAlertType = "block_notification_review_rejected" PolicyNewParamsAlertTypeBrandProtectionAlert PolicyNewParamsAlertType = "brand_protection_alert" PolicyNewParamsAlertTypeBrandProtectionDigest PolicyNewParamsAlertType = "brand_protection_digest" PolicyNewParamsAlertTypeClickhouseAlertFwAnomaly PolicyNewParamsAlertType = "clickhouse_alert_fw_anomaly" PolicyNewParamsAlertTypeClickhouseAlertFwEntAnomaly PolicyNewParamsAlertType = "clickhouse_alert_fw_ent_anomaly" PolicyNewParamsAlertTypeCustomSSLCertificateEventType PolicyNewParamsAlertType = "custom_ssl_certificate_event_type" PolicyNewParamsAlertTypeDedicatedSSLCertificateEventType PolicyNewParamsAlertType = "dedicated_ssl_certificate_event_type" PolicyNewParamsAlertTypeDosAttackL4 PolicyNewParamsAlertType = "dos_attack_l4" PolicyNewParamsAlertTypeDosAttackL7 PolicyNewParamsAlertType = "dos_attack_l7" PolicyNewParamsAlertTypeExpiringServiceTokenAlert PolicyNewParamsAlertType = "expiring_service_token_alert" PolicyNewParamsAlertTypeFailingLogpushJobDisabledAlert PolicyNewParamsAlertType = "failing_logpush_job_disabled_alert" PolicyNewParamsAlertTypeFbmAutoAdvertisement PolicyNewParamsAlertType = "fbm_auto_advertisement" PolicyNewParamsAlertTypeFbmDosdAttack PolicyNewParamsAlertType = "fbm_dosd_attack" PolicyNewParamsAlertTypeFbmVolumetricAttack PolicyNewParamsAlertType = "fbm_volumetric_attack" PolicyNewParamsAlertTypeHealthCheckStatusNotification PolicyNewParamsAlertType = "health_check_status_notification" PolicyNewParamsAlertTypeHostnameAopCustomCertificateExpirationType PolicyNewParamsAlertType = "hostname_aop_custom_certificate_expiration_type" PolicyNewParamsAlertTypeHTTPAlertEdgeError PolicyNewParamsAlertType = "http_alert_edge_error" PolicyNewParamsAlertTypeHTTPAlertOriginError PolicyNewParamsAlertType = "http_alert_origin_error" PolicyNewParamsAlertTypeIncidentAlert PolicyNewParamsAlertType = "incident_alert" PolicyNewParamsAlertTypeLoadBalancingHealthAlert PolicyNewParamsAlertType = "load_balancing_health_alert" PolicyNewParamsAlertTypeLoadBalancingPoolEnablementAlert PolicyNewParamsAlertType = "load_balancing_pool_enablement_alert" PolicyNewParamsAlertTypeLogoMatchAlert PolicyNewParamsAlertType = "logo_match_alert" PolicyNewParamsAlertTypeMagicTunnelHealthCheckEvent PolicyNewParamsAlertType = "magic_tunnel_health_check_event" PolicyNewParamsAlertTypeMaintenanceEventNotification PolicyNewParamsAlertType = "maintenance_event_notification" PolicyNewParamsAlertTypeMTLSCertificateStoreCertificateExpirationType PolicyNewParamsAlertType = "mtls_certificate_store_certificate_expiration_type" PolicyNewParamsAlertTypePagesEventAlert PolicyNewParamsAlertType = "pages_event_alert" PolicyNewParamsAlertTypeRadarNotification PolicyNewParamsAlertType = "radar_notification" PolicyNewParamsAlertTypeRealOriginMonitoring PolicyNewParamsAlertType = "real_origin_monitoring" PolicyNewParamsAlertTypeScriptmonitorAlertNewCodeChangeDetections PolicyNewParamsAlertType = "scriptmonitor_alert_new_code_change_detections" PolicyNewParamsAlertTypeScriptmonitorAlertNewHosts PolicyNewParamsAlertType = "scriptmonitor_alert_new_hosts" PolicyNewParamsAlertTypeScriptmonitorAlertNewMaliciousHosts PolicyNewParamsAlertType = "scriptmonitor_alert_new_malicious_hosts" PolicyNewParamsAlertTypeScriptmonitorAlertNewMaliciousScripts PolicyNewParamsAlertType = "scriptmonitor_alert_new_malicious_scripts" PolicyNewParamsAlertTypeScriptmonitorAlertNewMaliciousURL PolicyNewParamsAlertType = "scriptmonitor_alert_new_malicious_url" PolicyNewParamsAlertTypeScriptmonitorAlertNewMaxLengthResourceURL PolicyNewParamsAlertType = "scriptmonitor_alert_new_max_length_resource_url" PolicyNewParamsAlertTypeScriptmonitorAlertNewResources PolicyNewParamsAlertType = "scriptmonitor_alert_new_resources" PolicyNewParamsAlertTypeSecondaryDNSAllPrimariesFailing PolicyNewParamsAlertType = "secondary_dns_all_primaries_failing" PolicyNewParamsAlertTypeSecondaryDNSPrimariesFailing PolicyNewParamsAlertType = "secondary_dns_primaries_failing" PolicyNewParamsAlertTypeSecondaryDNSZoneSuccessfullyUpdated PolicyNewParamsAlertType = "secondary_dns_zone_successfully_updated" PolicyNewParamsAlertTypeSecondaryDNSZoneValidationWarning PolicyNewParamsAlertType = "secondary_dns_zone_validation_warning" PolicyNewParamsAlertTypeSentinelAlert PolicyNewParamsAlertType = "sentinel_alert" PolicyNewParamsAlertTypeStreamLiveNotifications PolicyNewParamsAlertType = "stream_live_notifications" PolicyNewParamsAlertTypeTrafficAnomaliesAlert PolicyNewParamsAlertType = "traffic_anomalies_alert" PolicyNewParamsAlertTypeTunnelHealthEvent PolicyNewParamsAlertType = "tunnel_health_event" PolicyNewParamsAlertTypeTunnelUpdateEvent PolicyNewParamsAlertType = "tunnel_update_event" PolicyNewParamsAlertTypeUniversalSSLEventType PolicyNewParamsAlertType = "universal_ssl_event_type" PolicyNewParamsAlertTypeWebAnalyticsMetricsUpdate PolicyNewParamsAlertType = "web_analytics_metrics_update" PolicyNewParamsAlertTypeZoneAopCustomCertificateExpirationType PolicyNewParamsAlertType = "zone_aop_custom_certificate_expiration_type" )
func (PolicyNewParamsAlertType) IsKnown ¶
func (r PolicyNewParamsAlertType) IsKnown() bool
type PolicyNewResponse ¶
type PolicyNewResponse struct { // UUID ID string `json:"id"` JSON policyNewResponseJSON `json:"-"` }
func (*PolicyNewResponse) UnmarshalJSON ¶
func (r *PolicyNewResponse) UnmarshalJSON(data []byte) (err error)
type PolicyNewResponseEnvelope ¶
type PolicyNewResponseEnvelope struct { Result PolicyNewResponse `json:"result"` JSON policyNewResponseEnvelopeJSON `json:"-"` }
func (*PolicyNewResponseEnvelope) UnmarshalJSON ¶
func (r *PolicyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PolicyParam ¶
type PolicyParam struct { // Refers to which event will trigger a Notification dispatch. You can use the // endpoint to get available alert types which then will give you a list of // possible values. AlertType param.Field[PolicyAlertType] `json:"alert_type"` // Optional description for the Notification policy. Description param.Field[string] `json:"description"` // Whether or not the Notification policy is enabled. Enabled param.Field[bool] `json:"enabled"` // Optional filters that allow you to be alerted only on a subset of events for // that alert type based on some criteria. This is only available for select alert // types. See alert type documentation for more details. Filters param.Field[PolicyFilterParam] `json:"filters"` // List of IDs that will be used when dispatching a notification. IDs for email // type will be the email address. Mechanisms param.Field[MechanismParam] `json:"mechanisms"` // Name of the policy. Name param.Field[string] `json:"name"` }
func (PolicyParam) MarshalJSON ¶
func (r PolicyParam) MarshalJSON() (data []byte, err error)
type PolicyService ¶
type PolicyService struct {
Options []option.RequestOption
}
PolicyService 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 NewPolicyService method instead.
func NewPolicyService ¶
func NewPolicyService(opts ...option.RequestOption) (r *PolicyService)
NewPolicyService 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 (*PolicyService) Delete ¶
func (r *PolicyService) Delete(ctx context.Context, policyID string, body PolicyDeleteParams, opts ...option.RequestOption) (res *PolicyDeleteResponse, err error)
Delete a Notification policy.
func (*PolicyService) Get ¶
func (r *PolicyService) Get(ctx context.Context, policyID string, query PolicyGetParams, opts ...option.RequestOption) (res *Policy, err error)
Get details for a single policy.
func (*PolicyService) List ¶
func (r *PolicyService) List(ctx context.Context, query PolicyListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Policy], err error)
Get a list of all Notification policies.
func (*PolicyService) ListAutoPaging ¶
func (r *PolicyService) ListAutoPaging(ctx context.Context, query PolicyListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Policy]
Get a list of all Notification policies.
func (*PolicyService) New ¶
func (r *PolicyService) New(ctx context.Context, params PolicyNewParams, opts ...option.RequestOption) (res *PolicyNewResponse, err error)
Creates a new Notification policy.
func (*PolicyService) Update ¶
func (r *PolicyService) Update(ctx context.Context, policyID string, params PolicyUpdateParams, opts ...option.RequestOption) (res *PolicyUpdateResponse, err error)
Update a Notification policy.
type PolicyUpdateParams ¶
type PolicyUpdateParams struct { // The account id AccountID param.Field[string] `path:"account_id,required"` // Refers to which event will trigger a Notification dispatch. You can use the // endpoint to get available alert types which then will give you a list of // possible values. AlertType param.Field[PolicyUpdateParamsAlertType] `json:"alert_type"` // Optional description for the Notification policy. Description param.Field[string] `json:"description"` // Whether or not the Notification policy is enabled. Enabled param.Field[bool] `json:"enabled"` // Optional filters that allow you to be alerted only on a subset of events for // that alert type based on some criteria. This is only available for select alert // types. See alert type documentation for more details. Filters param.Field[PolicyFilterParam] `json:"filters"` // List of IDs that will be used when dispatching a notification. IDs for email // type will be the email address. Mechanisms param.Field[MechanismParam] `json:"mechanisms"` // Name of the policy. Name param.Field[string] `json:"name"` }
func (PolicyUpdateParams) MarshalJSON ¶
func (r PolicyUpdateParams) MarshalJSON() (data []byte, err error)
type PolicyUpdateParamsAlertType ¶
type PolicyUpdateParamsAlertType string
Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.
const ( PolicyUpdateParamsAlertTypeAccessCustomCertificateExpirationType PolicyUpdateParamsAlertType = "access_custom_certificate_expiration_type" PolicyUpdateParamsAlertTypeAdvancedDDoSAttackL4Alert PolicyUpdateParamsAlertType = "advanced_ddos_attack_l4_alert" PolicyUpdateParamsAlertTypeAdvancedDDoSAttackL7Alert PolicyUpdateParamsAlertType = "advanced_ddos_attack_l7_alert" PolicyUpdateParamsAlertTypeAdvancedHTTPAlertError PolicyUpdateParamsAlertType = "advanced_http_alert_error" PolicyUpdateParamsAlertTypeBGPHijackNotification PolicyUpdateParamsAlertType = "bgp_hijack_notification" PolicyUpdateParamsAlertTypeBillingUsageAlert PolicyUpdateParamsAlertType = "billing_usage_alert" PolicyUpdateParamsAlertTypeBlockNotificationBlockRemoved PolicyUpdateParamsAlertType = "block_notification_block_removed" PolicyUpdateParamsAlertTypeBlockNotificationNewBlock PolicyUpdateParamsAlertType = "block_notification_new_block" PolicyUpdateParamsAlertTypeBlockNotificationReviewRejected PolicyUpdateParamsAlertType = "block_notification_review_rejected" PolicyUpdateParamsAlertTypeBrandProtectionAlert PolicyUpdateParamsAlertType = "brand_protection_alert" PolicyUpdateParamsAlertTypeBrandProtectionDigest PolicyUpdateParamsAlertType = "brand_protection_digest" PolicyUpdateParamsAlertTypeClickhouseAlertFwAnomaly PolicyUpdateParamsAlertType = "clickhouse_alert_fw_anomaly" PolicyUpdateParamsAlertTypeClickhouseAlertFwEntAnomaly PolicyUpdateParamsAlertType = "clickhouse_alert_fw_ent_anomaly" PolicyUpdateParamsAlertTypeCustomSSLCertificateEventType PolicyUpdateParamsAlertType = "custom_ssl_certificate_event_type" PolicyUpdateParamsAlertTypeDedicatedSSLCertificateEventType PolicyUpdateParamsAlertType = "dedicated_ssl_certificate_event_type" PolicyUpdateParamsAlertTypeDosAttackL4 PolicyUpdateParamsAlertType = "dos_attack_l4" PolicyUpdateParamsAlertTypeDosAttackL7 PolicyUpdateParamsAlertType = "dos_attack_l7" PolicyUpdateParamsAlertTypeExpiringServiceTokenAlert PolicyUpdateParamsAlertType = "expiring_service_token_alert" PolicyUpdateParamsAlertTypeFailingLogpushJobDisabledAlert PolicyUpdateParamsAlertType = "failing_logpush_job_disabled_alert" PolicyUpdateParamsAlertTypeFbmAutoAdvertisement PolicyUpdateParamsAlertType = "fbm_auto_advertisement" PolicyUpdateParamsAlertTypeFbmDosdAttack PolicyUpdateParamsAlertType = "fbm_dosd_attack" PolicyUpdateParamsAlertTypeFbmVolumetricAttack PolicyUpdateParamsAlertType = "fbm_volumetric_attack" PolicyUpdateParamsAlertTypeHealthCheckStatusNotification PolicyUpdateParamsAlertType = "health_check_status_notification" PolicyUpdateParamsAlertTypeHostnameAopCustomCertificateExpirationType PolicyUpdateParamsAlertType = "hostname_aop_custom_certificate_expiration_type" PolicyUpdateParamsAlertTypeHTTPAlertEdgeError PolicyUpdateParamsAlertType = "http_alert_edge_error" PolicyUpdateParamsAlertTypeHTTPAlertOriginError PolicyUpdateParamsAlertType = "http_alert_origin_error" PolicyUpdateParamsAlertTypeIncidentAlert PolicyUpdateParamsAlertType = "incident_alert" PolicyUpdateParamsAlertTypeLoadBalancingHealthAlert PolicyUpdateParamsAlertType = "load_balancing_health_alert" PolicyUpdateParamsAlertTypeLoadBalancingPoolEnablementAlert PolicyUpdateParamsAlertType = "load_balancing_pool_enablement_alert" PolicyUpdateParamsAlertTypeLogoMatchAlert PolicyUpdateParamsAlertType = "logo_match_alert" PolicyUpdateParamsAlertTypeMagicTunnelHealthCheckEvent PolicyUpdateParamsAlertType = "magic_tunnel_health_check_event" PolicyUpdateParamsAlertTypeMaintenanceEventNotification PolicyUpdateParamsAlertType = "maintenance_event_notification" PolicyUpdateParamsAlertTypeMTLSCertificateStoreCertificateExpirationType PolicyUpdateParamsAlertType = "mtls_certificate_store_certificate_expiration_type" PolicyUpdateParamsAlertTypePagesEventAlert PolicyUpdateParamsAlertType = "pages_event_alert" PolicyUpdateParamsAlertTypeRadarNotification PolicyUpdateParamsAlertType = "radar_notification" PolicyUpdateParamsAlertTypeRealOriginMonitoring PolicyUpdateParamsAlertType = "real_origin_monitoring" PolicyUpdateParamsAlertTypeScriptmonitorAlertNewCodeChangeDetections PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_code_change_detections" PolicyUpdateParamsAlertTypeScriptmonitorAlertNewHosts PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_hosts" PolicyUpdateParamsAlertTypeScriptmonitorAlertNewMaliciousHosts PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_malicious_hosts" PolicyUpdateParamsAlertTypeScriptmonitorAlertNewMaliciousScripts PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_malicious_scripts" PolicyUpdateParamsAlertTypeScriptmonitorAlertNewMaliciousURL PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_malicious_url" PolicyUpdateParamsAlertTypeScriptmonitorAlertNewMaxLengthResourceURL PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_max_length_resource_url" PolicyUpdateParamsAlertTypeScriptmonitorAlertNewResources PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_resources" PolicyUpdateParamsAlertTypeSecondaryDNSAllPrimariesFailing PolicyUpdateParamsAlertType = "secondary_dns_all_primaries_failing" PolicyUpdateParamsAlertTypeSecondaryDNSPrimariesFailing PolicyUpdateParamsAlertType = "secondary_dns_primaries_failing" PolicyUpdateParamsAlertTypeSecondaryDNSZoneSuccessfullyUpdated PolicyUpdateParamsAlertType = "secondary_dns_zone_successfully_updated" PolicyUpdateParamsAlertTypeSecondaryDNSZoneValidationWarning PolicyUpdateParamsAlertType = "secondary_dns_zone_validation_warning" PolicyUpdateParamsAlertTypeSentinelAlert PolicyUpdateParamsAlertType = "sentinel_alert" PolicyUpdateParamsAlertTypeStreamLiveNotifications PolicyUpdateParamsAlertType = "stream_live_notifications" PolicyUpdateParamsAlertTypeTrafficAnomaliesAlert PolicyUpdateParamsAlertType = "traffic_anomalies_alert" PolicyUpdateParamsAlertTypeTunnelHealthEvent PolicyUpdateParamsAlertType = "tunnel_health_event" PolicyUpdateParamsAlertTypeTunnelUpdateEvent PolicyUpdateParamsAlertType = "tunnel_update_event" PolicyUpdateParamsAlertTypeUniversalSSLEventType PolicyUpdateParamsAlertType = "universal_ssl_event_type" PolicyUpdateParamsAlertTypeWebAnalyticsMetricsUpdate PolicyUpdateParamsAlertType = "web_analytics_metrics_update" PolicyUpdateParamsAlertTypeZoneAopCustomCertificateExpirationType PolicyUpdateParamsAlertType = "zone_aop_custom_certificate_expiration_type" )
func (PolicyUpdateParamsAlertType) IsKnown ¶
func (r PolicyUpdateParamsAlertType) IsKnown() bool
type PolicyUpdateResponse ¶
type PolicyUpdateResponse struct { // UUID ID string `json:"id"` JSON policyUpdateResponseJSON `json:"-"` }
func (*PolicyUpdateResponse) UnmarshalJSON ¶
func (r *PolicyUpdateResponse) UnmarshalJSON(data []byte) (err error)
type PolicyUpdateResponseEnvelope ¶
type PolicyUpdateResponseEnvelope struct { Result PolicyUpdateResponse `json:"result"` JSON policyUpdateResponseEnvelopeJSON `json:"-"` }
func (*PolicyUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *PolicyUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SortDirection ¶ added in v2.2.0
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type Webhooks ¶
type Webhooks struct { // The unique identifier of a webhook ID string `json:"id"` // Timestamp of when the webhook destination was created. CreatedAt time.Time `json:"created_at" format:"date-time"` // Timestamp of the last time an attempt to dispatch a notification to this webhook // failed. LastFailure time.Time `json:"last_failure" format:"date-time"` // Timestamp of the last time Cloudflare was able to successfully dispatch a // notification using this webhook. LastSuccess time.Time `json:"last_success" format:"date-time"` // The name of the webhook destination. This will be included in the request body // when you receive a webhook notification. Name string `json:"name"` // Optional secret that will be passed in the `cf-webhook-auth` header when // dispatching generic webhook notifications or formatted for supported // destinations. Secrets are not returned in any API response body. Secret string `json:"secret"` // Type of webhook endpoint. Type WebhooksType `json:"type"` // The POST endpoint to call when dispatching a notification. URL string `json:"url"` JSON webhooksJSON `json:"-"` }
func (*Webhooks) UnmarshalJSON ¶
type WebhooksType ¶
type WebhooksType string
Type of webhook endpoint.
const ( WebhooksTypeSlack WebhooksType = "slack" WebhooksTypeGeneric WebhooksType = "generic" WebhooksTypeGchat WebhooksType = "gchat" )
func (WebhooksType) IsKnown ¶
func (r WebhooksType) IsKnown() bool