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 DestinationPagerdutyLinkResponseEnvelopeSuccess
- type DestinationPagerdutyNewParams
- type DestinationPagerdutyNewResponse
- type DestinationPagerdutyNewResponseEnvelope
- type DestinationPagerdutyNewResponseEnvelopeSuccess
- 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 DestinationWebhookGetResponseEnvelopeSuccess
- type DestinationWebhookListParams
- type DestinationWebhookNewParams
- type DestinationWebhookNewResponse
- type DestinationWebhookNewResponseEnvelope
- type DestinationWebhookNewResponseEnvelopeSuccess
- 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 DestinationWebhookUpdateResponseEnvelopeSuccess
- 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 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 PolicyFilterIncidentImpact
- type PolicyFilterParam
- type PolicyFilterTrafficExclusion
- type PolicyGetParams
- type PolicyGetResponseEnvelope
- type PolicyGetResponseEnvelopeSuccess
- type PolicyListParams
- type PolicyNewParams
- type PolicyNewParamsAlertType
- type PolicyNewResponse
- type PolicyNewResponseEnvelope
- type PolicyNewResponseEnvelopeSuccess
- 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 PolicyUpdateResponseEnvelopeSuccess
- type RatePlan
- type RatePlanParam
- type ResponseInfo
- type Role
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- 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 CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const 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.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
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 ¶
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 ¶
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 ¶
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 ¶
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type DestinationEligibleGetResponse ¶
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 ¶
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 ¶
func (r *DestinationEligibleGetResponseItem) UnmarshalJSON(data []byte) (err error)
type DestinationEligibleGetResponseItemType ¶
type DestinationEligibleGetResponseItemType string
Determines type of delivery mechanism.
const ( DestinationEligibleGetResponseItemTypeEmail DestinationEligibleGetResponseItemType = "email" DestinationEligibleGetResponseItemTypePagerduty DestinationEligibleGetResponseItemType = "pagerduty" DestinationEligibleGetResponseItemTypeWebhook DestinationEligibleGetResponseItemType = "webhook" )
func (DestinationEligibleGetResponseItemType) IsKnown ¶
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 ¶
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 ¶
func (r *DestinationPagerdutyDeleteResponse) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyDeleteResponseResultInfo ¶
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 ¶
func (r *DestinationPagerdutyDeleteResponseResultInfo) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyDeleteResponseSuccess ¶
type DestinationPagerdutyDeleteResponseSuccess bool
Whether the API call was successful
const (
DestinationPagerdutyDeleteResponseSuccessTrue DestinationPagerdutyDeleteResponseSuccess = true
)
func (DestinationPagerdutyDeleteResponseSuccess) IsKnown ¶
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 {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success DestinationPagerdutyLinkResponseEnvelopeSuccess `json:"success,required"`
Result DestinationPagerdutyLinkResponse `json:"result"`
JSON destinationPagerdutyLinkResponseEnvelopeJSON `json:"-"`
}
func (*DestinationPagerdutyLinkResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationPagerdutyLinkResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyLinkResponseEnvelopeSuccess ¶
type DestinationPagerdutyLinkResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DestinationPagerdutyLinkResponseEnvelopeSuccessTrue DestinationPagerdutyLinkResponseEnvelopeSuccess = true
)
func (DestinationPagerdutyLinkResponseEnvelopeSuccess) IsKnown ¶
func (r DestinationPagerdutyLinkResponseEnvelopeSuccess) IsKnown() bool
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 {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success DestinationPagerdutyNewResponseEnvelopeSuccess `json:"success,required"`
Result DestinationPagerdutyNewResponse `json:"result"`
JSON destinationPagerdutyNewResponseEnvelopeJSON `json:"-"`
}
func (*DestinationPagerdutyNewResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationPagerdutyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationPagerdutyNewResponseEnvelopeSuccess ¶
type DestinationPagerdutyNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DestinationPagerdutyNewResponseEnvelopeSuccessTrue DestinationPagerdutyNewResponseEnvelopeSuccess = true
)
func (DestinationPagerdutyNewResponseEnvelopeSuccess) IsKnown ¶
func (r DestinationPagerdutyNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
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 ¶
func (r *DestinationWebhookDeleteResponse) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookDeleteResponseResultInfo ¶
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 ¶
func (r *DestinationWebhookDeleteResponseResultInfo) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookDeleteResponseSuccess ¶
type DestinationWebhookDeleteResponseSuccess bool
Whether the API call was successful
const (
DestinationWebhookDeleteResponseSuccessTrue DestinationWebhookDeleteResponseSuccess = true
)
func (DestinationWebhookDeleteResponseSuccess) IsKnown ¶
func (r DestinationWebhookDeleteResponseSuccess) IsKnown() bool
type DestinationWebhookGetResponseEnvelope ¶
type DestinationWebhookGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success DestinationWebhookGetResponseEnvelopeSuccess `json:"success,required"`
Result Webhooks `json:"result"`
JSON destinationWebhookGetResponseEnvelopeJSON `json:"-"`
}
func (*DestinationWebhookGetResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationWebhookGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookGetResponseEnvelopeSuccess ¶
type DestinationWebhookGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DestinationWebhookGetResponseEnvelopeSuccessTrue DestinationWebhookGetResponseEnvelopeSuccess = true
)
func (DestinationWebhookGetResponseEnvelopeSuccess) IsKnown ¶
func (r DestinationWebhookGetResponseEnvelopeSuccess) IsKnown() bool
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 {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success DestinationWebhookNewResponseEnvelopeSuccess `json:"success,required"`
Result DestinationWebhookNewResponse `json:"result"`
JSON destinationWebhookNewResponseEnvelopeJSON `json:"-"`
}
func (*DestinationWebhookNewResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationWebhookNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookNewResponseEnvelopeSuccess ¶
type DestinationWebhookNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DestinationWebhookNewResponseEnvelopeSuccessTrue DestinationWebhookNewResponseEnvelopeSuccess = true
)
func (DestinationWebhookNewResponseEnvelopeSuccess) IsKnown ¶
func (r DestinationWebhookNewResponseEnvelopeSuccess) IsKnown() bool
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 {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success DestinationWebhookUpdateResponseEnvelopeSuccess `json:"success,required"`
Result DestinationWebhookUpdateResponse `json:"result"`
JSON destinationWebhookUpdateResponseEnvelopeJSON `json:"-"`
}
func (*DestinationWebhookUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *DestinationWebhookUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DestinationWebhookUpdateResponseEnvelopeSuccess ¶
type DestinationWebhookUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DestinationWebhookUpdateResponseEnvelopeSuccessTrue DestinationWebhookUpdateResponseEnvelopeSuccess = true
)
func (DestinationWebhookUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r DestinationWebhookUpdateResponseEnvelopeSuccess) IsKnown() bool
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 ¶
type MechanismItem struct {
// UUID
ID string `json:"id"`
JSON mechanismItemJSON `json:"-"`
}
func (*MechanismItem) UnmarshalJSON ¶
func (r *MechanismItem) UnmarshalJSON(data []byte) (err error)
type MechanismItemParam ¶
func (MechanismItemParam) MarshalJSON ¶
func (r MechanismItemParam) MarshalJSON() (data []byte, err error)
type MechanismParam ¶
type MechanismParam map[string][]MechanismItemParam
type MemberRoleParam ¶
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶
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"`
// Optional specification of how often to re-alert from the same incident, not
// support on all alert types.
AlertInterval string `json:"alert_interval"`
// 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" PolicyAlertTypeCloudforceOneRequestNotification PolicyAlertType = "cloudforce_one_request_notification" PolicyAlertTypeCustomAnalytics PolicyAlertType = "custom_analytics" PolicyAlertTypeCustomSSLCertificateEventType PolicyAlertType = "custom_ssl_certificate_event_type" PolicyAlertTypeDedicatedSSLCertificateEventType PolicyAlertType = "dedicated_ssl_certificate_event_type" PolicyAlertTypeDeviceConnectivityAnomalyAlert PolicyAlertType = "device_connectivity_anomaly_alert" 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" PolicyAlertTypeImageNotification PolicyAlertType = "image_notification" 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" PolicyAlertTypeMagicWANTunnelHealth PolicyAlertType = "magic_wan_tunnel_health" 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" PolicyAlertTypeSecondaryDNSWarning PolicyAlertType = "secondary_dns_warning" PolicyAlertTypeSecondaryDNSZoneSuccessfullyUpdated PolicyAlertType = "secondary_dns_zone_successfully_updated" PolicyAlertTypeSecondaryDNSZoneValidationWarning PolicyAlertType = "secondary_dns_zone_validation_warning" PolicyAlertTypeSentinelAlert PolicyAlertType = "sentinel_alert" PolicyAlertTypeStreamLiveNotifications PolicyAlertType = "stream_live_notifications" PolicyAlertTypeSyntheticTestLatencyAlert PolicyAlertType = "synthetic_test_latency_alert" PolicyAlertTypeSyntheticTestLowAvailabilityAlert PolicyAlertType = "synthetic_test_low_availability_alert" 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 ¶
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 ¶
func (r *PolicyDeleteResponse) UnmarshalJSON(data []byte) (err error)
type PolicyDeleteResponseResultInfo ¶
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 ¶
func (r *PolicyDeleteResponseResultInfo) UnmarshalJSON(data []byte) (err error)
type PolicyDeleteResponseSuccess ¶
type PolicyDeleteResponseSuccess bool
Whether the API call was successful
const (
PolicyDeleteResponseSuccessTrue PolicyDeleteResponseSuccess = true
)
func (PolicyDeleteResponseSuccess) IsKnown ¶
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
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"`
// Usage depends on specific alert type
AlertTriggerPreferencesValue []string `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"`
// Usage depends on specific alert type
PopName []string `json:"pop_name"`
// 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"`
// Usage depends on specific alert type
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 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
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"`
// Usage depends on specific alert type
AlertTriggerPreferencesValue param.Field[[]string] `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"`
// Usage depends on specific alert type
PopName param.Field[[]string] `json:"pop_name"`
// 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"`
// Usage depends on specific alert type
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 {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success PolicyGetResponseEnvelopeSuccess `json:"success,required"`
Result Policy `json:"result"`
JSON policyGetResponseEnvelopeJSON `json:"-"`
}
func (*PolicyGetResponseEnvelope) UnmarshalJSON ¶
func (r *PolicyGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PolicyGetResponseEnvelopeSuccess ¶
type PolicyGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
PolicyGetResponseEnvelopeSuccessTrue PolicyGetResponseEnvelopeSuccess = true
)
func (PolicyGetResponseEnvelopeSuccess) IsKnown ¶
func (r PolicyGetResponseEnvelopeSuccess) IsKnown() bool
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 specification of how often to re-alert from the same incident, not
// support on all alert types.
AlertInterval param.Field[string] `json:"alert_interval"`
// 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" PolicyNewParamsAlertTypeCloudforceOneRequestNotification PolicyNewParamsAlertType = "cloudforce_one_request_notification" PolicyNewParamsAlertTypeCustomAnalytics PolicyNewParamsAlertType = "custom_analytics" PolicyNewParamsAlertTypeCustomSSLCertificateEventType PolicyNewParamsAlertType = "custom_ssl_certificate_event_type" PolicyNewParamsAlertTypeDedicatedSSLCertificateEventType PolicyNewParamsAlertType = "dedicated_ssl_certificate_event_type" PolicyNewParamsAlertTypeDeviceConnectivityAnomalyAlert PolicyNewParamsAlertType = "device_connectivity_anomaly_alert" 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" PolicyNewParamsAlertTypeImageNotification PolicyNewParamsAlertType = "image_notification" 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" PolicyNewParamsAlertTypeMagicWANTunnelHealth PolicyNewParamsAlertType = "magic_wan_tunnel_health" 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" PolicyNewParamsAlertTypeSecondaryDNSWarning PolicyNewParamsAlertType = "secondary_dns_warning" PolicyNewParamsAlertTypeSecondaryDNSZoneSuccessfullyUpdated PolicyNewParamsAlertType = "secondary_dns_zone_successfully_updated" PolicyNewParamsAlertTypeSecondaryDNSZoneValidationWarning PolicyNewParamsAlertType = "secondary_dns_zone_validation_warning" PolicyNewParamsAlertTypeSentinelAlert PolicyNewParamsAlertType = "sentinel_alert" PolicyNewParamsAlertTypeStreamLiveNotifications PolicyNewParamsAlertType = "stream_live_notifications" PolicyNewParamsAlertTypeSyntheticTestLatencyAlert PolicyNewParamsAlertType = "synthetic_test_latency_alert" PolicyNewParamsAlertTypeSyntheticTestLowAvailabilityAlert PolicyNewParamsAlertType = "synthetic_test_low_availability_alert" 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 {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success PolicyNewResponseEnvelopeSuccess `json:"success,required"`
Result PolicyNewResponse `json:"result"`
JSON policyNewResponseEnvelopeJSON `json:"-"`
}
func (*PolicyNewResponseEnvelope) UnmarshalJSON ¶
func (r *PolicyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PolicyNewResponseEnvelopeSuccess ¶
type PolicyNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
PolicyNewResponseEnvelopeSuccessTrue PolicyNewResponseEnvelopeSuccess = true
)
func (PolicyNewResponseEnvelopeSuccess) IsKnown ¶
func (r PolicyNewResponseEnvelopeSuccess) IsKnown() bool
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"`
// Optional specification of how often to re-alert from the same incident, not
// support on all alert types.
AlertInterval param.Field[string] `json:"alert_interval"`
// 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" PolicyUpdateParamsAlertTypeCloudforceOneRequestNotification PolicyUpdateParamsAlertType = "cloudforce_one_request_notification" PolicyUpdateParamsAlertTypeCustomAnalytics PolicyUpdateParamsAlertType = "custom_analytics" PolicyUpdateParamsAlertTypeCustomSSLCertificateEventType PolicyUpdateParamsAlertType = "custom_ssl_certificate_event_type" PolicyUpdateParamsAlertTypeDedicatedSSLCertificateEventType PolicyUpdateParamsAlertType = "dedicated_ssl_certificate_event_type" PolicyUpdateParamsAlertTypeDeviceConnectivityAnomalyAlert PolicyUpdateParamsAlertType = "device_connectivity_anomaly_alert" 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" PolicyUpdateParamsAlertTypeImageNotification PolicyUpdateParamsAlertType = "image_notification" 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" PolicyUpdateParamsAlertTypeMagicWANTunnelHealth PolicyUpdateParamsAlertType = "magic_wan_tunnel_health" 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" PolicyUpdateParamsAlertTypeSecondaryDNSWarning PolicyUpdateParamsAlertType = "secondary_dns_warning" PolicyUpdateParamsAlertTypeSecondaryDNSZoneSuccessfullyUpdated PolicyUpdateParamsAlertType = "secondary_dns_zone_successfully_updated" PolicyUpdateParamsAlertTypeSecondaryDNSZoneValidationWarning PolicyUpdateParamsAlertType = "secondary_dns_zone_validation_warning" PolicyUpdateParamsAlertTypeSentinelAlert PolicyUpdateParamsAlertType = "sentinel_alert" PolicyUpdateParamsAlertTypeStreamLiveNotifications PolicyUpdateParamsAlertType = "stream_live_notifications" PolicyUpdateParamsAlertTypeSyntheticTestLatencyAlert PolicyUpdateParamsAlertType = "synthetic_test_latency_alert" PolicyUpdateParamsAlertTypeSyntheticTestLowAvailabilityAlert PolicyUpdateParamsAlertType = "synthetic_test_low_availability_alert" 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 {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success PolicyUpdateResponseEnvelopeSuccess `json:"success,required"`
Result PolicyUpdateResponse `json:"result"`
JSON policyUpdateResponseEnvelopeJSON `json:"-"`
}
func (*PolicyUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *PolicyUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PolicyUpdateResponseEnvelopeSuccess ¶
type PolicyUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
PolicyUpdateResponseEnvelopeSuccessTrue PolicyUpdateResponseEnvelopeSuccess = true
)
func (PolicyUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r PolicyUpdateResponseEnvelopeSuccess) IsKnown() bool
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type 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