alerting

package
v2.0.0-beta.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AaaHistory

type AaaHistory 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 AaaHistoryMechanismType `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 aaaHistoryJSON `json:"-"`
}

func (*AaaHistory) UnmarshalJSON

func (r *AaaHistory) UnmarshalJSON(data []byte) (err error)

type AaaHistoryMechanismType

type AaaHistoryMechanismType string

The type of mechanism to which the notification has been dispatched. This can be email/pagerduty/webhook based on the mechanism configured.

const (
	AaaHistoryMechanismTypeEmail     AaaHistoryMechanismType = "email"
	AaaHistoryMechanismTypePagerduty AaaHistoryMechanismType = "pagerduty"
	AaaHistoryMechanismTypeWebhook   AaaHistoryMechanismType = "webhook"
)

func (AaaHistoryMechanismType) IsKnown

func (r AaaHistoryMechanismType) IsKnown() bool

type AaaPagerduty

type AaaPagerduty struct {
	// UUID
	ID string `json:"id"`
	// The name of the pagerduty service.
	Name string           `json:"name"`
	JSON aaaPagerdutyJSON `json:"-"`
}

func (*AaaPagerduty) UnmarshalJSON

func (r *AaaPagerduty) UnmarshalJSON(data []byte) (err error)

type AaaPolicies

type AaaPolicies 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 AaaPoliciesAlertType `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 AaaPoliciesFilters `json:"filters"`
	// List of IDs that will be used when dispatching a notification. IDs for email
	// type will be the email address.
	Mechanisms map[string][]AaaPoliciesMechanisms `json:"mechanisms"`
	Modified   time.Time                          `json:"modified" format:"date-time"`
	// Name of the policy.
	Name string          `json:"name"`
	JSON aaaPoliciesJSON `json:"-"`
}

func (*AaaPolicies) UnmarshalJSON

func (r *AaaPolicies) UnmarshalJSON(data []byte) (err error)

type AaaPoliciesAlertType

type AaaPoliciesAlertType 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 (
	AaaPoliciesAlertTypeAccessCustomCertificateExpirationType         AaaPoliciesAlertType = "access_custom_certificate_expiration_type"
	AaaPoliciesAlertTypeAdvancedDDOSAttackL4Alert                     AaaPoliciesAlertType = "advanced_ddos_attack_l4_alert"
	AaaPoliciesAlertTypeAdvancedDDOSAttackL7Alert                     AaaPoliciesAlertType = "advanced_ddos_attack_l7_alert"
	AaaPoliciesAlertTypeAdvancedHTTPAlertError                        AaaPoliciesAlertType = "advanced_http_alert_error"
	AaaPoliciesAlertTypeBGPHijackNotification                         AaaPoliciesAlertType = "bgp_hijack_notification"
	AaaPoliciesAlertTypeBillingUsageAlert                             AaaPoliciesAlertType = "billing_usage_alert"
	AaaPoliciesAlertTypeBlockNotificationBlockRemoved                 AaaPoliciesAlertType = "block_notification_block_removed"
	AaaPoliciesAlertTypeBlockNotificationNewBlock                     AaaPoliciesAlertType = "block_notification_new_block"
	AaaPoliciesAlertTypeBlockNotificationReviewRejected               AaaPoliciesAlertType = "block_notification_review_rejected"
	AaaPoliciesAlertTypeBrandProtectionAlert                          AaaPoliciesAlertType = "brand_protection_alert"
	AaaPoliciesAlertTypeBrandProtectionDigest                         AaaPoliciesAlertType = "brand_protection_digest"
	AaaPoliciesAlertTypeClickhouseAlertFwAnomaly                      AaaPoliciesAlertType = "clickhouse_alert_fw_anomaly"
	AaaPoliciesAlertTypeClickhouseAlertFwEntAnomaly                   AaaPoliciesAlertType = "clickhouse_alert_fw_ent_anomaly"
	AaaPoliciesAlertTypeCustomSSLCertificateEventType                 AaaPoliciesAlertType = "custom_ssl_certificate_event_type"
	AaaPoliciesAlertTypeDedicatedSSLCertificateEventType              AaaPoliciesAlertType = "dedicated_ssl_certificate_event_type"
	AaaPoliciesAlertTypeDosAttackL4                                   AaaPoliciesAlertType = "dos_attack_l4"
	AaaPoliciesAlertTypeDosAttackL7                                   AaaPoliciesAlertType = "dos_attack_l7"
	AaaPoliciesAlertTypeExpiringServiceTokenAlert                     AaaPoliciesAlertType = "expiring_service_token_alert"
	AaaPoliciesAlertTypeFailingLogpushJobDisabledAlert                AaaPoliciesAlertType = "failing_logpush_job_disabled_alert"
	AaaPoliciesAlertTypeFbmAutoAdvertisement                          AaaPoliciesAlertType = "fbm_auto_advertisement"
	AaaPoliciesAlertTypeFbmDosdAttack                                 AaaPoliciesAlertType = "fbm_dosd_attack"
	AaaPoliciesAlertTypeFbmVolumetricAttack                           AaaPoliciesAlertType = "fbm_volumetric_attack"
	AaaPoliciesAlertTypeHealthCheckStatusNotification                 AaaPoliciesAlertType = "health_check_status_notification"
	AaaPoliciesAlertTypeHostnameAopCustomCertificateExpirationType    AaaPoliciesAlertType = "hostname_aop_custom_certificate_expiration_type"
	AaaPoliciesAlertTypeHTTPAlertEdgeError                            AaaPoliciesAlertType = "http_alert_edge_error"
	AaaPoliciesAlertTypeHTTPAlertOriginError                          AaaPoliciesAlertType = "http_alert_origin_error"
	AaaPoliciesAlertTypeIncidentAlert                                 AaaPoliciesAlertType = "incident_alert"
	AaaPoliciesAlertTypeLoadBalancingHealthAlert                      AaaPoliciesAlertType = "load_balancing_health_alert"
	AaaPoliciesAlertTypeLoadBalancingPoolEnablementAlert              AaaPoliciesAlertType = "load_balancing_pool_enablement_alert"
	AaaPoliciesAlertTypeLogoMatchAlert                                AaaPoliciesAlertType = "logo_match_alert"
	AaaPoliciesAlertTypeMagicTunnelHealthCheckEvent                   AaaPoliciesAlertType = "magic_tunnel_health_check_event"
	AaaPoliciesAlertTypeMaintenanceEventNotification                  AaaPoliciesAlertType = "maintenance_event_notification"
	AaaPoliciesAlertTypeMTLSCertificateStoreCertificateExpirationType AaaPoliciesAlertType = "mtls_certificate_store_certificate_expiration_type"
	AaaPoliciesAlertTypePagesEventAlert                               AaaPoliciesAlertType = "pages_event_alert"
	AaaPoliciesAlertTypeRadarNotification                             AaaPoliciesAlertType = "radar_notification"
	AaaPoliciesAlertTypeRealOriginMonitoring                          AaaPoliciesAlertType = "real_origin_monitoring"
	AaaPoliciesAlertTypeScriptmonitorAlertNewCodeChangeDetections     AaaPoliciesAlertType = "scriptmonitor_alert_new_code_change_detections"
	AaaPoliciesAlertTypeScriptmonitorAlertNewHosts                    AaaPoliciesAlertType = "scriptmonitor_alert_new_hosts"
	AaaPoliciesAlertTypeScriptmonitorAlertNewMaliciousHosts           AaaPoliciesAlertType = "scriptmonitor_alert_new_malicious_hosts"
	AaaPoliciesAlertTypeScriptmonitorAlertNewMaliciousScripts         AaaPoliciesAlertType = "scriptmonitor_alert_new_malicious_scripts"
	AaaPoliciesAlertTypeScriptmonitorAlertNewMaliciousURL             AaaPoliciesAlertType = "scriptmonitor_alert_new_malicious_url"
	AaaPoliciesAlertTypeScriptmonitorAlertNewMaxLengthResourceURL     AaaPoliciesAlertType = "scriptmonitor_alert_new_max_length_resource_url"
	AaaPoliciesAlertTypeScriptmonitorAlertNewResources                AaaPoliciesAlertType = "scriptmonitor_alert_new_resources"
	AaaPoliciesAlertTypeSecondaryDNSAllPrimariesFailing               AaaPoliciesAlertType = "secondary_dns_all_primaries_failing"
	AaaPoliciesAlertTypeSecondaryDNSPrimariesFailing                  AaaPoliciesAlertType = "secondary_dns_primaries_failing"
	AaaPoliciesAlertTypeSecondaryDNSZoneSuccessfullyUpdated           AaaPoliciesAlertType = "secondary_dns_zone_successfully_updated"
	AaaPoliciesAlertTypeSecondaryDNSZoneValidationWarning             AaaPoliciesAlertType = "secondary_dns_zone_validation_warning"
	AaaPoliciesAlertTypeSentinelAlert                                 AaaPoliciesAlertType = "sentinel_alert"
	AaaPoliciesAlertTypeStreamLiveNotifications                       AaaPoliciesAlertType = "stream_live_notifications"
	AaaPoliciesAlertTypeTrafficAnomaliesAlert                         AaaPoliciesAlertType = "traffic_anomalies_alert"
	AaaPoliciesAlertTypeTunnelHealthEvent                             AaaPoliciesAlertType = "tunnel_health_event"
	AaaPoliciesAlertTypeTunnelUpdateEvent                             AaaPoliciesAlertType = "tunnel_update_event"
	AaaPoliciesAlertTypeUniversalSSLEventType                         AaaPoliciesAlertType = "universal_ssl_event_type"
	AaaPoliciesAlertTypeWebAnalyticsMetricsUpdate                     AaaPoliciesAlertType = "web_analytics_metrics_update"
	AaaPoliciesAlertTypeZoneAopCustomCertificateExpirationType        AaaPoliciesAlertType = "zone_aop_custom_certificate_expiration_type"
)

func (AaaPoliciesAlertType) IsKnown

func (r AaaPoliciesAlertType) IsKnown() bool

type AaaPoliciesFilters

type AaaPoliciesFilters 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 []AaaPoliciesFiltersAlertTriggerPreferencesValue `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 []AaaPoliciesFiltersIncidentImpact `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 []AaaPoliciesFiltersTrafficExclusion `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  aaaPoliciesFiltersJSON `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 (*AaaPoliciesFilters) UnmarshalJSON

func (r *AaaPoliciesFilters) UnmarshalJSON(data []byte) (err error)

type AaaPoliciesFiltersAlertTriggerPreferencesValue

type AaaPoliciesFiltersAlertTriggerPreferencesValue string
const (
	AaaPoliciesFiltersAlertTriggerPreferencesValue99_0 AaaPoliciesFiltersAlertTriggerPreferencesValue = "99.0"
	AaaPoliciesFiltersAlertTriggerPreferencesValue98_0 AaaPoliciesFiltersAlertTriggerPreferencesValue = "98.0"
	AaaPoliciesFiltersAlertTriggerPreferencesValue97_0 AaaPoliciesFiltersAlertTriggerPreferencesValue = "97.0"
)

func (AaaPoliciesFiltersAlertTriggerPreferencesValue) IsKnown

type AaaPoliciesFiltersIncidentImpact

type AaaPoliciesFiltersIncidentImpact string
const (
	AaaPoliciesFiltersIncidentImpactIncidentImpactNone     AaaPoliciesFiltersIncidentImpact = "INCIDENT_IMPACT_NONE"
	AaaPoliciesFiltersIncidentImpactIncidentImpactMinor    AaaPoliciesFiltersIncidentImpact = "INCIDENT_IMPACT_MINOR"
	AaaPoliciesFiltersIncidentImpactIncidentImpactMajor    AaaPoliciesFiltersIncidentImpact = "INCIDENT_IMPACT_MAJOR"
	AaaPoliciesFiltersIncidentImpactIncidentImpactCritical AaaPoliciesFiltersIncidentImpact = "INCIDENT_IMPACT_CRITICAL"
)

func (AaaPoliciesFiltersIncidentImpact) IsKnown

type AaaPoliciesFiltersTrafficExclusion

type AaaPoliciesFiltersTrafficExclusion string
const (
	AaaPoliciesFiltersTrafficExclusionSecurityEvents AaaPoliciesFiltersTrafficExclusion = "security_events"
)

func (AaaPoliciesFiltersTrafficExclusion) IsKnown

type AaaPoliciesMechanisms

type AaaPoliciesMechanisms struct {
	// UUID
	ID   AaaPoliciesMechanismsID   `json:"id"`
	JSON aaaPoliciesMechanismsJSON `json:"-"`
}

func (*AaaPoliciesMechanisms) UnmarshalJSON

func (r *AaaPoliciesMechanisms) UnmarshalJSON(data []byte) (err error)

type AaaPoliciesMechanismsID

type AaaPoliciesMechanismsID interface {
	ImplementsAlertingAaaPoliciesMechanismsID()
}

UUID

Union satisfied by shared.UnionString or shared.UnionString.

type AaaWebhooks

type AaaWebhooks 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 AaaWebhooksType `json:"type"`
	// The POST endpoint to call when dispatching a notification.
	URL  string          `json:"url"`
	JSON aaaWebhooksJSON `json:"-"`
}

func (*AaaWebhooks) UnmarshalJSON

func (r *AaaWebhooks) UnmarshalJSON(data []byte) (err error)

type AaaWebhooksType

type AaaWebhooksType string

Type of webhook endpoint.

const (
	AaaWebhooksTypeSlack   AaaWebhooksType = "slack"
	AaaWebhooksTypeGeneric AaaWebhooksType = "generic"
	AaaWebhooksTypeGchat   AaaWebhooksType = "gchat"
)

func (AaaWebhooksType) IsKnown

func (r AaaWebhooksType) IsKnown() bool

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 AvailableAlertListParams

type AvailableAlertListParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type AvailableAlertListResponse added in v2.3.0

type AvailableAlertListResponse interface {
	ImplementsAlertingAvailableAlertListResponse()
}

Union satisfied by alerting.AvailableAlertListResponseUnknown, alerting.AvailableAlertListResponseArray or shared.UnionString.

type AvailableAlertListResponseArray

type AvailableAlertListResponseArray []interface{}

func (AvailableAlertListResponseArray) ImplementsAlertingAvailableAlertListResponse

func (r AvailableAlertListResponseArray) ImplementsAlertingAvailableAlertListResponse()

type AvailableAlertListResponseEnvelope

type AvailableAlertListResponseEnvelope struct {
	Errors   []AvailableAlertListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AvailableAlertListResponseEnvelopeMessages `json:"messages,required"`
	Result   AvailableAlertListResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    AvailableAlertListResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo AvailableAlertListResponseEnvelopeResultInfo `json:"result_info"`
	JSON       availableAlertListResponseEnvelopeJSON       `json:"-"`
}

func (*AvailableAlertListResponseEnvelope) UnmarshalJSON

func (r *AvailableAlertListResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type AvailableAlertListResponseEnvelopeErrors

type AvailableAlertListResponseEnvelopeErrors struct {
	Code    int64                                        `json:"code,required"`
	Message string                                       `json:"message,required"`
	JSON    availableAlertListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*AvailableAlertListResponseEnvelopeErrors) UnmarshalJSON

func (r *AvailableAlertListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type AvailableAlertListResponseEnvelopeMessages

type AvailableAlertListResponseEnvelopeMessages struct {
	Code    int64                                          `json:"code,required"`
	Message string                                         `json:"message,required"`
	JSON    availableAlertListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*AvailableAlertListResponseEnvelopeMessages) UnmarshalJSON

func (r *AvailableAlertListResponseEnvelopeMessages) 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

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

Gets a list of all alert types for which an account is eligible.

type DestinationEligibleGetParams

type DestinationEligibleGetParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type DestinationEligibleGetResponse added in v2.3.0

type DestinationEligibleGetResponse interface {
	ImplementsAlertingDestinationEligibleGetResponse()
}

Union satisfied by alerting.DestinationEligibleGetResponseUnknown, alerting.DestinationEligibleGetResponseArray or shared.UnionString.

type DestinationEligibleGetResponseArray

type DestinationEligibleGetResponseArray []interface{}

func (DestinationEligibleGetResponseArray) ImplementsAlertingDestinationEligibleGetResponse

func (r DestinationEligibleGetResponseArray) ImplementsAlertingDestinationEligibleGetResponse()

type DestinationEligibleGetResponseEnvelope

type DestinationEligibleGetResponseEnvelope struct {
	Errors   []DestinationEligibleGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationEligibleGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DestinationEligibleGetResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    DestinationEligibleGetResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo DestinationEligibleGetResponseEnvelopeResultInfo `json:"result_info"`
	JSON       destinationEligibleGetResponseEnvelopeJSON       `json:"-"`
}

func (*DestinationEligibleGetResponseEnvelope) UnmarshalJSON

func (r *DestinationEligibleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationEligibleGetResponseEnvelopeErrors

type DestinationEligibleGetResponseEnvelopeErrors struct {
	Code    int64                                            `json:"code,required"`
	Message string                                           `json:"message,required"`
	JSON    destinationEligibleGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationEligibleGetResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationEligibleGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationEligibleGetResponseEnvelopeMessages

type DestinationEligibleGetResponseEnvelopeMessages struct {
	Code    int64                                              `json:"code,required"`
	Message string                                             `json:"message,required"`
	JSON    destinationEligibleGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationEligibleGetResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationEligibleGetResponseEnvelopeMessages) 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

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

Get a list of all delivery mechanism types for which an account is eligible.

type DestinationPagerdutyDeleteParams

type DestinationPagerdutyDeleteParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type DestinationPagerdutyDeleteResponse added in v2.3.0

type DestinationPagerdutyDeleteResponse interface {
	ImplementsAlertingDestinationPagerdutyDeleteResponse()
}

Union satisfied by alerting.DestinationPagerdutyDeleteResponseUnknown, alerting.DestinationPagerdutyDeleteResponseArray or shared.UnionString.

type DestinationPagerdutyDeleteResponseArray

type DestinationPagerdutyDeleteResponseArray []interface{}

func (DestinationPagerdutyDeleteResponseArray) ImplementsAlertingDestinationPagerdutyDeleteResponse

func (r DestinationPagerdutyDeleteResponseArray) ImplementsAlertingDestinationPagerdutyDeleteResponse()

type DestinationPagerdutyDeleteResponseEnvelope

type DestinationPagerdutyDeleteResponseEnvelope struct {
	Errors   []DestinationPagerdutyDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationPagerdutyDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   DestinationPagerdutyDeleteResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    DestinationPagerdutyDeleteResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo DestinationPagerdutyDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       destinationPagerdutyDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*DestinationPagerdutyDeleteResponseEnvelope) UnmarshalJSON

func (r *DestinationPagerdutyDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyDeleteResponseEnvelopeErrors

type DestinationPagerdutyDeleteResponseEnvelopeErrors struct {
	Code    int64                                                `json:"code,required"`
	Message string                                               `json:"message,required"`
	JSON    destinationPagerdutyDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationPagerdutyDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationPagerdutyDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyDeleteResponseEnvelopeMessages

type DestinationPagerdutyDeleteResponseEnvelopeMessages struct {
	Code    int64                                                  `json:"code,required"`
	Message string                                                 `json:"message,required"`
	JSON    destinationPagerdutyDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationPagerdutyDeleteResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationPagerdutyDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyDeleteResponseEnvelopeResultInfo

type DestinationPagerdutyDeleteResponseEnvelopeResultInfo 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       destinationPagerdutyDeleteResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*DestinationPagerdutyDeleteResponseEnvelopeResultInfo) UnmarshalJSON

func (r *DestinationPagerdutyDeleteResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyDeleteResponseEnvelopeSuccess

type DestinationPagerdutyDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DestinationPagerdutyDeleteResponseEnvelopeSuccessTrue DestinationPagerdutyDeleteResponseEnvelopeSuccess = true
)

func (DestinationPagerdutyDeleteResponseEnvelopeSuccess) IsKnown

type DestinationPagerdutyGetParams

type DestinationPagerdutyGetParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type DestinationPagerdutyGetResponseEnvelope

type DestinationPagerdutyGetResponseEnvelope struct {
	Errors   []DestinationPagerdutyGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationPagerdutyGetResponseEnvelopeMessages `json:"messages,required"`
	Result   []AaaPagerduty                                    `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    DestinationPagerdutyGetResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo DestinationPagerdutyGetResponseEnvelopeResultInfo `json:"result_info"`
	JSON       destinationPagerdutyGetResponseEnvelopeJSON       `json:"-"`
}

func (*DestinationPagerdutyGetResponseEnvelope) UnmarshalJSON

func (r *DestinationPagerdutyGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyGetResponseEnvelopeErrors

type DestinationPagerdutyGetResponseEnvelopeErrors struct {
	Code    int64                                             `json:"code,required"`
	Message string                                            `json:"message,required"`
	JSON    destinationPagerdutyGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationPagerdutyGetResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationPagerdutyGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyGetResponseEnvelopeMessages

type DestinationPagerdutyGetResponseEnvelopeMessages struct {
	Code    int64                                               `json:"code,required"`
	Message string                                              `json:"message,required"`
	JSON    destinationPagerdutyGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationPagerdutyGetResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationPagerdutyGetResponseEnvelopeMessages) 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

type DestinationPagerdutyLinkParams

type DestinationPagerdutyLinkParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

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   []DestinationPagerdutyLinkResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationPagerdutyLinkResponseEnvelopeMessages `json:"messages,required"`
	Result   DestinationPagerdutyLinkResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DestinationPagerdutyLinkResponseEnvelopeSuccess `json:"success,required"`
	JSON    destinationPagerdutyLinkResponseEnvelopeJSON    `json:"-"`
}

func (*DestinationPagerdutyLinkResponseEnvelope) UnmarshalJSON

func (r *DestinationPagerdutyLinkResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyLinkResponseEnvelopeErrors

type DestinationPagerdutyLinkResponseEnvelopeErrors struct {
	Code    int64                                              `json:"code,required"`
	Message string                                             `json:"message,required"`
	JSON    destinationPagerdutyLinkResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationPagerdutyLinkResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationPagerdutyLinkResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyLinkResponseEnvelopeMessages

type DestinationPagerdutyLinkResponseEnvelopeMessages struct {
	Code    int64                                                `json:"code,required"`
	Message string                                               `json:"message,required"`
	JSON    destinationPagerdutyLinkResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationPagerdutyLinkResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationPagerdutyLinkResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyLinkResponseEnvelopeSuccess

type DestinationPagerdutyLinkResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DestinationPagerdutyLinkResponseEnvelopeSuccessTrue DestinationPagerdutyLinkResponseEnvelopeSuccess = true
)

func (DestinationPagerdutyLinkResponseEnvelopeSuccess) IsKnown

type DestinationPagerdutyNewParams

type DestinationPagerdutyNewParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

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   []DestinationPagerdutyNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationPagerdutyNewResponseEnvelopeMessages `json:"messages,required"`
	Result   DestinationPagerdutyNewResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DestinationPagerdutyNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    destinationPagerdutyNewResponseEnvelopeJSON    `json:"-"`
}

func (*DestinationPagerdutyNewResponseEnvelope) UnmarshalJSON

func (r *DestinationPagerdutyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyNewResponseEnvelopeErrors

type DestinationPagerdutyNewResponseEnvelopeErrors struct {
	Code    int64                                             `json:"code,required"`
	Message string                                            `json:"message,required"`
	JSON    destinationPagerdutyNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationPagerdutyNewResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationPagerdutyNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyNewResponseEnvelopeMessages

type DestinationPagerdutyNewResponseEnvelopeMessages struct {
	Code    int64                                               `json:"code,required"`
	Message string                                              `json:"message,required"`
	JSON    destinationPagerdutyNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationPagerdutyNewResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationPagerdutyNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DestinationPagerdutyNewResponseEnvelopeSuccess

type DestinationPagerdutyNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DestinationPagerdutyNewResponseEnvelopeSuccessTrue DestinationPagerdutyNewResponseEnvelopeSuccess = true
)

func (DestinationPagerdutyNewResponseEnvelopeSuccess) IsKnown

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

Deletes all the PagerDuty Services connected to the account.

func (*DestinationPagerdutyService) Get

Get a list of all configured PagerDuty services.

Links PagerDuty with the account using the integration token.

func (*DestinationPagerdutyService) New

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 DestinationWebhookDeleteParams

type DestinationWebhookDeleteParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type DestinationWebhookDeleteResponse added in v2.3.0

type DestinationWebhookDeleteResponse interface {
	ImplementsAlertingDestinationWebhookDeleteResponse()
}

Union satisfied by alerting.DestinationWebhookDeleteResponseUnknown, alerting.DestinationWebhookDeleteResponseArray or shared.UnionString.

type DestinationWebhookDeleteResponseArray

type DestinationWebhookDeleteResponseArray []interface{}

func (DestinationWebhookDeleteResponseArray) ImplementsAlertingDestinationWebhookDeleteResponse

func (r DestinationWebhookDeleteResponseArray) ImplementsAlertingDestinationWebhookDeleteResponse()

type DestinationWebhookDeleteResponseEnvelope

type DestinationWebhookDeleteResponseEnvelope struct {
	Errors   []DestinationWebhookDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationWebhookDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   DestinationWebhookDeleteResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    DestinationWebhookDeleteResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo DestinationWebhookDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       destinationWebhookDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*DestinationWebhookDeleteResponseEnvelope) UnmarshalJSON

func (r *DestinationWebhookDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookDeleteResponseEnvelopeErrors

type DestinationWebhookDeleteResponseEnvelopeErrors struct {
	Code    int64                                              `json:"code,required"`
	Message string                                             `json:"message,required"`
	JSON    destinationWebhookDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationWebhookDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationWebhookDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookDeleteResponseEnvelopeMessages

type DestinationWebhookDeleteResponseEnvelopeMessages struct {
	Code    int64                                                `json:"code,required"`
	Message string                                               `json:"message,required"`
	JSON    destinationWebhookDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationWebhookDeleteResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationWebhookDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookDeleteResponseEnvelopeResultInfo

type DestinationWebhookDeleteResponseEnvelopeResultInfo 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       destinationWebhookDeleteResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*DestinationWebhookDeleteResponseEnvelopeResultInfo) UnmarshalJSON

func (r *DestinationWebhookDeleteResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookDeleteResponseEnvelopeSuccess

type DestinationWebhookDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DestinationWebhookDeleteResponseEnvelopeSuccessTrue DestinationWebhookDeleteResponseEnvelopeSuccess = true
)

func (DestinationWebhookDeleteResponseEnvelopeSuccess) IsKnown

type DestinationWebhookGetParams

type DestinationWebhookGetParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type DestinationWebhookGetResponseEnvelope

type DestinationWebhookGetResponseEnvelope struct {
	Errors   []DestinationWebhookGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationWebhookGetResponseEnvelopeMessages `json:"messages,required"`
	Result   AaaWebhooks                                     `json:"result,required"`
	// Whether the API call was successful
	Success DestinationWebhookGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    destinationWebhookGetResponseEnvelopeJSON    `json:"-"`
}

func (*DestinationWebhookGetResponseEnvelope) UnmarshalJSON

func (r *DestinationWebhookGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookGetResponseEnvelopeErrors

type DestinationWebhookGetResponseEnvelopeErrors struct {
	Code    int64                                           `json:"code,required"`
	Message string                                          `json:"message,required"`
	JSON    destinationWebhookGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationWebhookGetResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationWebhookGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookGetResponseEnvelopeMessages

type DestinationWebhookGetResponseEnvelopeMessages struct {
	Code    int64                                             `json:"code,required"`
	Message string                                            `json:"message,required"`
	JSON    destinationWebhookGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationWebhookGetResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationWebhookGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookGetResponseEnvelopeSuccess

type DestinationWebhookGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DestinationWebhookGetResponseEnvelopeSuccessTrue DestinationWebhookGetResponseEnvelopeSuccess = true
)

func (DestinationWebhookGetResponseEnvelopeSuccess) IsKnown

type DestinationWebhookListParams

type DestinationWebhookListParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type DestinationWebhookListResponseEnvelope

type DestinationWebhookListResponseEnvelope struct {
	Errors   []DestinationWebhookListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationWebhookListResponseEnvelopeMessages `json:"messages,required"`
	Result   []AaaWebhooks                                    `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    DestinationWebhookListResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo DestinationWebhookListResponseEnvelopeResultInfo `json:"result_info"`
	JSON       destinationWebhookListResponseEnvelopeJSON       `json:"-"`
}

func (*DestinationWebhookListResponseEnvelope) UnmarshalJSON

func (r *DestinationWebhookListResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookListResponseEnvelopeErrors

type DestinationWebhookListResponseEnvelopeErrors struct {
	Code    int64                                            `json:"code,required"`
	Message string                                           `json:"message,required"`
	JSON    destinationWebhookListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationWebhookListResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationWebhookListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookListResponseEnvelopeMessages

type DestinationWebhookListResponseEnvelopeMessages struct {
	Code    int64                                              `json:"code,required"`
	Message string                                             `json:"message,required"`
	JSON    destinationWebhookListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationWebhookListResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationWebhookListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookListResponseEnvelopeResultInfo

type DestinationWebhookListResponseEnvelopeResultInfo 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       destinationWebhookListResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*DestinationWebhookListResponseEnvelopeResultInfo) UnmarshalJSON

func (r *DestinationWebhookListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookListResponseEnvelopeSuccess

type DestinationWebhookListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DestinationWebhookListResponseEnvelopeSuccessTrue DestinationWebhookListResponseEnvelopeSuccess = true
)

func (DestinationWebhookListResponseEnvelopeSuccess) IsKnown

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   []DestinationWebhookNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationWebhookNewResponseEnvelopeMessages `json:"messages,required"`
	Result   DestinationWebhookNewResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DestinationWebhookNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    destinationWebhookNewResponseEnvelopeJSON    `json:"-"`
}

func (*DestinationWebhookNewResponseEnvelope) UnmarshalJSON

func (r *DestinationWebhookNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookNewResponseEnvelopeErrors

type DestinationWebhookNewResponseEnvelopeErrors struct {
	Code    int64                                           `json:"code,required"`
	Message string                                          `json:"message,required"`
	JSON    destinationWebhookNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationWebhookNewResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationWebhookNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookNewResponseEnvelopeMessages

type DestinationWebhookNewResponseEnvelopeMessages struct {
	Code    int64                                             `json:"code,required"`
	Message string                                            `json:"message,required"`
	JSON    destinationWebhookNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationWebhookNewResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationWebhookNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookNewResponseEnvelopeSuccess

type DestinationWebhookNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DestinationWebhookNewResponseEnvelopeSuccessTrue DestinationWebhookNewResponseEnvelopeSuccess = true
)

func (DestinationWebhookNewResponseEnvelopeSuccess) IsKnown

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

Delete a configured webhook destination.

func (*DestinationWebhookService) Get

Get details for a single webhooks destination.

func (*DestinationWebhookService) List

Gets a list of all configured webhook destinations.

func (*DestinationWebhookService) New

Creates a new webhook destination.

func (*DestinationWebhookService) Update

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   []DestinationWebhookUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DestinationWebhookUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   DestinationWebhookUpdateResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DestinationWebhookUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    destinationWebhookUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*DestinationWebhookUpdateResponseEnvelope) UnmarshalJSON

func (r *DestinationWebhookUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookUpdateResponseEnvelopeErrors

type DestinationWebhookUpdateResponseEnvelopeErrors struct {
	Code    int64                                              `json:"code,required"`
	Message string                                             `json:"message,required"`
	JSON    destinationWebhookUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DestinationWebhookUpdateResponseEnvelopeErrors) UnmarshalJSON

func (r *DestinationWebhookUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookUpdateResponseEnvelopeMessages

type DestinationWebhookUpdateResponseEnvelopeMessages struct {
	Code    int64                                                `json:"code,required"`
	Message string                                               `json:"message,required"`
	JSON    destinationWebhookUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DestinationWebhookUpdateResponseEnvelopeMessages) UnmarshalJSON

func (r *DestinationWebhookUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DestinationWebhookUpdateResponseEnvelopeSuccess

type DestinationWebhookUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DestinationWebhookUpdateResponseEnvelopeSuccessTrue DestinationWebhookUpdateResponseEnvelopeSuccess = true
)

func (DestinationWebhookUpdateResponseEnvelopeSuccess) IsKnown

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

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 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

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

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 PolicyDeleteParams

type PolicyDeleteParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type PolicyDeleteResponse added in v2.3.0

type PolicyDeleteResponse interface {
	ImplementsAlertingPolicyDeleteResponse()
}

Union satisfied by alerting.PolicyDeleteResponseUnknown, alerting.PolicyDeleteResponseArray or shared.UnionString.

type PolicyDeleteResponseArray

type PolicyDeleteResponseArray []interface{}

func (PolicyDeleteResponseArray) ImplementsAlertingPolicyDeleteResponse

func (r PolicyDeleteResponseArray) ImplementsAlertingPolicyDeleteResponse()

type PolicyDeleteResponseEnvelope

type PolicyDeleteResponseEnvelope struct {
	Errors   []PolicyDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []PolicyDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   PolicyDeleteResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    PolicyDeleteResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo PolicyDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       policyDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*PolicyDeleteResponseEnvelope) UnmarshalJSON

func (r *PolicyDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type PolicyDeleteResponseEnvelopeErrors

type PolicyDeleteResponseEnvelopeErrors struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    policyDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*PolicyDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *PolicyDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type PolicyDeleteResponseEnvelopeMessages

type PolicyDeleteResponseEnvelopeMessages struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    policyDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*PolicyDeleteResponseEnvelopeMessages) UnmarshalJSON

func (r *PolicyDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type PolicyDeleteResponseEnvelopeResultInfo

type PolicyDeleteResponseEnvelopeResultInfo 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       policyDeleteResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*PolicyDeleteResponseEnvelopeResultInfo) UnmarshalJSON

func (r *PolicyDeleteResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type PolicyDeleteResponseEnvelopeSuccess

type PolicyDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PolicyDeleteResponseEnvelopeSuccessTrue PolicyDeleteResponseEnvelopeSuccess = true
)

func (PolicyDeleteResponseEnvelopeSuccess) IsKnown

type PolicyGetParams

type PolicyGetParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type PolicyGetResponseEnvelope

type PolicyGetResponseEnvelope struct {
	Errors   []PolicyGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []PolicyGetResponseEnvelopeMessages `json:"messages,required"`
	Result   AaaPolicies                         `json:"result,required"`
	// Whether the API call was successful
	Success PolicyGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    policyGetResponseEnvelopeJSON    `json:"-"`
}

func (*PolicyGetResponseEnvelope) UnmarshalJSON

func (r *PolicyGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type PolicyGetResponseEnvelopeErrors

type PolicyGetResponseEnvelopeErrors struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    policyGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*PolicyGetResponseEnvelopeErrors) UnmarshalJSON

func (r *PolicyGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type PolicyGetResponseEnvelopeMessages

type PolicyGetResponseEnvelopeMessages struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    policyGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*PolicyGetResponseEnvelopeMessages) UnmarshalJSON

func (r *PolicyGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type PolicyGetResponseEnvelopeSuccess

type PolicyGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PolicyGetResponseEnvelopeSuccessTrue PolicyGetResponseEnvelopeSuccess = true
)

func (PolicyGetResponseEnvelopeSuccess) IsKnown

type PolicyListParams

type PolicyListParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
}

type PolicyListResponseEnvelope

type PolicyListResponseEnvelope struct {
	Errors   []PolicyListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []PolicyListResponseEnvelopeMessages `json:"messages,required"`
	Result   []AaaPolicies                        `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    PolicyListResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo PolicyListResponseEnvelopeResultInfo `json:"result_info"`
	JSON       policyListResponseEnvelopeJSON       `json:"-"`
}

func (*PolicyListResponseEnvelope) UnmarshalJSON

func (r *PolicyListResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type PolicyListResponseEnvelopeErrors

type PolicyListResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    policyListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*PolicyListResponseEnvelopeErrors) UnmarshalJSON

func (r *PolicyListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type PolicyListResponseEnvelopeMessages

type PolicyListResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    policyListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*PolicyListResponseEnvelopeMessages) UnmarshalJSON

func (r *PolicyListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type PolicyListResponseEnvelopeResultInfo

type PolicyListResponseEnvelopeResultInfo 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       policyListResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*PolicyListResponseEnvelopeResultInfo) UnmarshalJSON

func (r *PolicyListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type PolicyListResponseEnvelopeSuccess

type PolicyListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PolicyListResponseEnvelopeSuccessTrue PolicyListResponseEnvelopeSuccess = true
)

func (PolicyListResponseEnvelopeSuccess) IsKnown

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[map[string][]PolicyNewParamsMechanisms] `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[PolicyNewParamsFilters] `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 PolicyNewParamsFilters

type PolicyNewParamsFilters 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[[]PolicyNewParamsFiltersAlertTriggerPreferencesValue] `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[[]PolicyNewParamsFiltersIncidentImpact] `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[[]PolicyNewParamsFiltersTrafficExclusion] `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 (PolicyNewParamsFilters) MarshalJSON

func (r PolicyNewParamsFilters) MarshalJSON() (data []byte, err error)

type PolicyNewParamsFiltersAlertTriggerPreferencesValue

type PolicyNewParamsFiltersAlertTriggerPreferencesValue string
const (
	PolicyNewParamsFiltersAlertTriggerPreferencesValue99_0 PolicyNewParamsFiltersAlertTriggerPreferencesValue = "99.0"
	PolicyNewParamsFiltersAlertTriggerPreferencesValue98_0 PolicyNewParamsFiltersAlertTriggerPreferencesValue = "98.0"
	PolicyNewParamsFiltersAlertTriggerPreferencesValue97_0 PolicyNewParamsFiltersAlertTriggerPreferencesValue = "97.0"
)

func (PolicyNewParamsFiltersAlertTriggerPreferencesValue) IsKnown

type PolicyNewParamsFiltersIncidentImpact

type PolicyNewParamsFiltersIncidentImpact string
const (
	PolicyNewParamsFiltersIncidentImpactIncidentImpactNone     PolicyNewParamsFiltersIncidentImpact = "INCIDENT_IMPACT_NONE"
	PolicyNewParamsFiltersIncidentImpactIncidentImpactMinor    PolicyNewParamsFiltersIncidentImpact = "INCIDENT_IMPACT_MINOR"
	PolicyNewParamsFiltersIncidentImpactIncidentImpactMajor    PolicyNewParamsFiltersIncidentImpact = "INCIDENT_IMPACT_MAJOR"
	PolicyNewParamsFiltersIncidentImpactIncidentImpactCritical PolicyNewParamsFiltersIncidentImpact = "INCIDENT_IMPACT_CRITICAL"
)

func (PolicyNewParamsFiltersIncidentImpact) IsKnown

type PolicyNewParamsFiltersTrafficExclusion

type PolicyNewParamsFiltersTrafficExclusion string
const (
	PolicyNewParamsFiltersTrafficExclusionSecurityEvents PolicyNewParamsFiltersTrafficExclusion = "security_events"
)

func (PolicyNewParamsFiltersTrafficExclusion) IsKnown

type PolicyNewParamsMechanisms

type PolicyNewParamsMechanisms struct {
	// UUID
	ID param.Field[PolicyNewParamsMechanismsID] `json:"id"`
}

func (PolicyNewParamsMechanisms) MarshalJSON

func (r PolicyNewParamsMechanisms) MarshalJSON() (data []byte, err error)

type PolicyNewParamsMechanismsID

type PolicyNewParamsMechanismsID interface {
	ImplementsAlertingPolicyNewParamsMechanismsID()
}

UUID

Satisfied by shared.UnionString, shared.UnionString.

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   []PolicyNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []PolicyNewResponseEnvelopeMessages `json:"messages,required"`
	Result   PolicyNewResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success PolicyNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    policyNewResponseEnvelopeJSON    `json:"-"`
}

func (*PolicyNewResponseEnvelope) UnmarshalJSON

func (r *PolicyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type PolicyNewResponseEnvelopeErrors

type PolicyNewResponseEnvelopeErrors struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    policyNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*PolicyNewResponseEnvelopeErrors) UnmarshalJSON

func (r *PolicyNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type PolicyNewResponseEnvelopeMessages

type PolicyNewResponseEnvelopeMessages struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    policyNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*PolicyNewResponseEnvelopeMessages) UnmarshalJSON

func (r *PolicyNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type PolicyNewResponseEnvelopeSuccess

type PolicyNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PolicyNewResponseEnvelopeSuccessTrue PolicyNewResponseEnvelopeSuccess = true
)

func (PolicyNewResponseEnvelopeSuccess) IsKnown

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 *AaaPolicies, err error)

Get details for a single policy.

func (*PolicyService) List

func (r *PolicyService) List(ctx context.Context, query PolicyListParams, opts ...option.RequestOption) (res *[]AaaPolicies, err error)

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[PolicyUpdateParamsFilters] `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[map[string][]PolicyUpdateParamsMechanisms] `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 PolicyUpdateParamsFilters

type PolicyUpdateParamsFilters 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[[]PolicyUpdateParamsFiltersAlertTriggerPreferencesValue] `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[[]PolicyUpdateParamsFiltersIncidentImpact] `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[[]PolicyUpdateParamsFiltersTrafficExclusion] `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 (PolicyUpdateParamsFilters) MarshalJSON

func (r PolicyUpdateParamsFilters) MarshalJSON() (data []byte, err error)

type PolicyUpdateParamsFiltersAlertTriggerPreferencesValue

type PolicyUpdateParamsFiltersAlertTriggerPreferencesValue string
const (
	PolicyUpdateParamsFiltersAlertTriggerPreferencesValue99_0 PolicyUpdateParamsFiltersAlertTriggerPreferencesValue = "99.0"
	PolicyUpdateParamsFiltersAlertTriggerPreferencesValue98_0 PolicyUpdateParamsFiltersAlertTriggerPreferencesValue = "98.0"
	PolicyUpdateParamsFiltersAlertTriggerPreferencesValue97_0 PolicyUpdateParamsFiltersAlertTriggerPreferencesValue = "97.0"
)

func (PolicyUpdateParamsFiltersAlertTriggerPreferencesValue) IsKnown

type PolicyUpdateParamsFiltersIncidentImpact

type PolicyUpdateParamsFiltersIncidentImpact string
const (
	PolicyUpdateParamsFiltersIncidentImpactIncidentImpactNone     PolicyUpdateParamsFiltersIncidentImpact = "INCIDENT_IMPACT_NONE"
	PolicyUpdateParamsFiltersIncidentImpactIncidentImpactMinor    PolicyUpdateParamsFiltersIncidentImpact = "INCIDENT_IMPACT_MINOR"
	PolicyUpdateParamsFiltersIncidentImpactIncidentImpactMajor    PolicyUpdateParamsFiltersIncidentImpact = "INCIDENT_IMPACT_MAJOR"
	PolicyUpdateParamsFiltersIncidentImpactIncidentImpactCritical PolicyUpdateParamsFiltersIncidentImpact = "INCIDENT_IMPACT_CRITICAL"
)

func (PolicyUpdateParamsFiltersIncidentImpact) IsKnown

type PolicyUpdateParamsFiltersTrafficExclusion

type PolicyUpdateParamsFiltersTrafficExclusion string
const (
	PolicyUpdateParamsFiltersTrafficExclusionSecurityEvents PolicyUpdateParamsFiltersTrafficExclusion = "security_events"
)

func (PolicyUpdateParamsFiltersTrafficExclusion) IsKnown

type PolicyUpdateParamsMechanisms

type PolicyUpdateParamsMechanisms struct {
	// UUID
	ID param.Field[PolicyUpdateParamsMechanismsID] `json:"id"`
}

func (PolicyUpdateParamsMechanisms) MarshalJSON

func (r PolicyUpdateParamsMechanisms) MarshalJSON() (data []byte, err error)

type PolicyUpdateParamsMechanismsID

type PolicyUpdateParamsMechanismsID interface {
	ImplementsAlertingPolicyUpdateParamsMechanismsID()
}

UUID

Satisfied by shared.UnionString, shared.UnionString.

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   []PolicyUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []PolicyUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   PolicyUpdateResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success PolicyUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    policyUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*PolicyUpdateResponseEnvelope) UnmarshalJSON

func (r *PolicyUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type PolicyUpdateResponseEnvelopeErrors

type PolicyUpdateResponseEnvelopeErrors struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    policyUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*PolicyUpdateResponseEnvelopeErrors) UnmarshalJSON

func (r *PolicyUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type PolicyUpdateResponseEnvelopeMessages

type PolicyUpdateResponseEnvelopeMessages struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    policyUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*PolicyUpdateResponseEnvelopeMessages) UnmarshalJSON

func (r *PolicyUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type PolicyUpdateResponseEnvelopeSuccess

type PolicyUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PolicyUpdateResponseEnvelopeSuccessTrue PolicyUpdateResponseEnvelopeSuccess = true
)

func (PolicyUpdateResponseEnvelopeSuccess) IsKnown

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL