alerting

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

type ASNParam = shared.ASNParam

This is an alias to an internal type.

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 AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type AvailableAlertListParams

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

type AvailableAlertListResponseArray

type AvailableAlertListResponseArray []interface{}

func (AvailableAlertListResponseArray) ImplementsAlertingAvailableAlertListResponseUnion

func (r AvailableAlertListResponseArray) ImplementsAlertingAvailableAlertListResponseUnion()

type AvailableAlertListResponseEnvelope

type AvailableAlertListResponseEnvelope struct {
	Errors   []shared.ResponseInfo           `json:"errors,required"`
	Messages []shared.ResponseInfo           `json:"messages,required"`
	Result   AvailableAlertListResponseUnion `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 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 AvailableAlertListResponseUnion

type AvailableAlertListResponseUnion interface {
	ImplementsAlertingAvailableAlertListResponseUnion()
}

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

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 CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type DestinationEligibleGetParams

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

type DestinationEligibleGetResponseArray

type DestinationEligibleGetResponseArray []interface{}

func (DestinationEligibleGetResponseArray) ImplementsAlertingDestinationEligibleGetResponseUnion

func (r DestinationEligibleGetResponseArray) ImplementsAlertingDestinationEligibleGetResponseUnion()

type DestinationEligibleGetResponseEnvelope

type DestinationEligibleGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo               `json:"errors,required"`
	Messages []shared.ResponseInfo               `json:"messages,required"`
	Result   DestinationEligibleGetResponseUnion `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 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 DestinationEligibleGetResponseUnion

type DestinationEligibleGetResponseUnion interface {
	ImplementsAlertingDestinationEligibleGetResponseUnion()
}

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

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 DestinationPagerdutyDeleteResponseArray

type DestinationPagerdutyDeleteResponseArray []interface{}

func (DestinationPagerdutyDeleteResponseArray) ImplementsAlertingDestinationPagerdutyDeleteResponseUnion

func (r DestinationPagerdutyDeleteResponseArray) ImplementsAlertingDestinationPagerdutyDeleteResponseUnion()

type DestinationPagerdutyDeleteResponseEnvelope

type DestinationPagerdutyDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo                   `json:"errors,required"`
	Messages []shared.ResponseInfo                   `json:"messages,required"`
	Result   DestinationPagerdutyDeleteResponseUnion `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 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 DestinationPagerdutyDeleteResponseUnion

type DestinationPagerdutyDeleteResponseUnion interface {
	ImplementsAlertingDestinationPagerdutyDeleteResponseUnion()
}

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

type DestinationPagerdutyGetParams

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

type DestinationPagerdutyGetResponseEnvelope

type DestinationPagerdutyGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   []Pagerduty           `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 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   []shared.ResponseInfo            `json:"errors,required"`
	Messages []shared.ResponseInfo            `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 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   []shared.ResponseInfo           `json:"errors,required"`
	Messages []shared.ResponseInfo           `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 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 DestinationWebhookDeleteResponseArray

type DestinationWebhookDeleteResponseArray []interface{}

func (DestinationWebhookDeleteResponseArray) ImplementsAlertingDestinationWebhookDeleteResponseUnion

func (r DestinationWebhookDeleteResponseArray) ImplementsAlertingDestinationWebhookDeleteResponseUnion()

type DestinationWebhookDeleteResponseEnvelope

type DestinationWebhookDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo                 `json:"errors,required"`
	Messages []shared.ResponseInfo                 `json:"messages,required"`
	Result   DestinationWebhookDeleteResponseUnion `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 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 DestinationWebhookDeleteResponseUnion

type DestinationWebhookDeleteResponseUnion interface {
	ImplementsAlertingDestinationWebhookDeleteResponseUnion()
}

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

type DestinationWebhookGetParams

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

type DestinationWebhookGetResponseEnvelope

type DestinationWebhookGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Webhooks              `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 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 DestinationWebhookNewParams

type DestinationWebhookNewParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
	// The name of the webhook destination. This will be included in the request body
	// when you receive a webhook notification.
	Name param.Field[string] `json:"name,required"`
	// The POST endpoint to call when dispatching a notification.
	URL param.Field[string] `json:"url,required"`
	// Optional secret that will be passed in the `cf-webhook-auth` header when
	// dispatching generic webhook notifications or formatted for supported
	// destinations. Secrets are not returned in any API response body.
	Secret param.Field[string] `json:"secret"`
}

func (DestinationWebhookNewParams) MarshalJSON

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

type DestinationWebhookNewResponse

type DestinationWebhookNewResponse struct {
	// UUID
	ID   string                            `json:"id"`
	JSON destinationWebhookNewResponseJSON `json:"-"`
}

func (*DestinationWebhookNewResponse) UnmarshalJSON

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

type DestinationWebhookNewResponseEnvelope

type DestinationWebhookNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo         `json:"errors,required"`
	Messages []shared.ResponseInfo         `json:"messages,required"`
	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 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) ListAutoPaging

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   []shared.ResponseInfo            `json:"errors,required"`
	Messages []shared.ResponseInfo            `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 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 History

type History struct {
	// UUID
	ID string `json:"id"`
	// Message body included in the notification sent.
	AlertBody string `json:"alert_body"`
	// Type of notification that has been dispatched.
	AlertType string `json:"alert_type"`
	// Description of the notification policy (if present).
	Description string `json:"description"`
	// The mechanism to which the notification has been dispatched.
	Mechanism string `json:"mechanism"`
	// The type of mechanism to which the notification has been dispatched. This can be
	// email/pagerduty/webhook based on the mechanism configured.
	MechanismType HistoryMechanismType `json:"mechanism_type"`
	// Name of the policy.
	Name string `json:"name"`
	// The unique identifier of a notification policy
	PolicyID string `json:"policy_id"`
	// Timestamp of when the notification was dispatched in ISO 8601 format.
	Sent time.Time   `json:"sent" format:"date-time"`
	JSON historyJSON `json:"-"`
}

func (*History) UnmarshalJSON

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

type HistoryListParams

type HistoryListParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
	// Limit the returned results to history records older than the specified date.
	// This must be a timestamp that conforms to RFC3339.
	Before param.Field[time.Time] `query:"before" format:"date-time"`
	// Page number of paginated results.
	Page param.Field[float64] `query:"page"`
	// Number of items per page.
	PerPage param.Field[float64] `query:"per_page"`
	// Limit the returned results to history records newer than the specified date.
	// This must be a timestamp that conforms to RFC3339.
	Since param.Field[time.Time] `query:"since" format:"date-time"`
}

func (HistoryListParams) URLQuery

func (r HistoryListParams) URLQuery() (v url.Values)

URLQuery serializes HistoryListParams's query parameters as `url.Values`.

type HistoryMechanismType

type HistoryMechanismType string

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

const (
	HistoryMechanismTypeEmail     HistoryMechanismType = "email"
	HistoryMechanismTypePagerduty HistoryMechanismType = "pagerduty"
	HistoryMechanismTypeWebhook   HistoryMechanismType = "webhook"
)

func (HistoryMechanismType) IsKnown

func (r HistoryMechanismType) IsKnown() bool

type HistoryService

type HistoryService struct {
	Options []option.RequestOption
}

HistoryService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewHistoryService method instead.

func NewHistoryService

func NewHistoryService(opts ...option.RequestOption) (r *HistoryService)

NewHistoryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*HistoryService) List

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 Mechanism

type Mechanism map[string][]Mechanism

type MechanismParam

type MechanismParam map[string][]MechanismParam

type Member added in v2.1.0

type Member = shared.Member

This is an alias to an internal type.

type MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRole added in v2.1.0

type MemberRole = shared.MemberRole

This is an alias to an internal type.

type MemberRoleParam added in v2.1.0

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissions added in v2.1.0

type MemberRolesPermissions = shared.MemberRolesPermissions

This is an alias to an internal type.

type MemberRolesPermissionsParam added in v2.1.0

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberUser added in v2.1.0

type MemberUser = shared.MemberUser

This is an alias to an internal type.

type MemberUserParam added in v2.1.0

type MemberUserParam = shared.MemberUserParam

This is an alias to an internal type.

type Pagerduty

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

func (*Pagerduty) UnmarshalJSON

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

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type Policy

type Policy struct {
	// The unique identifier of a notification policy
	ID string `json:"id"`
	// Refers to which event will trigger a Notification dispatch. You can use the
	// endpoint to get available alert types which then will give you a list of
	// possible values.
	AlertType PolicyAlertType `json:"alert_type"`
	Created   time.Time       `json:"created" format:"date-time"`
	// Optional description for the Notification policy.
	Description string `json:"description"`
	// Whether or not the Notification policy is enabled.
	Enabled bool `json:"enabled"`
	// Optional filters that allow you to be alerted only on a subset of events for
	// that alert type based on some criteria. This is only available for select alert
	// types. See alert type documentation for more details.
	Filters PolicyFilter `json:"filters"`
	// List of IDs that will be used when dispatching a notification. IDs for email
	// type will be the email address.
	Mechanisms Mechanism `json:"mechanisms"`
	Modified   time.Time `json:"modified" format:"date-time"`
	// Name of the policy.
	Name string     `json:"name"`
	JSON policyJSON `json:"-"`
}

func (*Policy) UnmarshalJSON

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

type PolicyAlertType

type PolicyAlertType string

Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.

const (
	PolicyAlertTypeAccessCustomCertificateExpirationType         PolicyAlertType = "access_custom_certificate_expiration_type"
	PolicyAlertTypeAdvancedDDoSAttackL4Alert                     PolicyAlertType = "advanced_ddos_attack_l4_alert"
	PolicyAlertTypeAdvancedDDoSAttackL7Alert                     PolicyAlertType = "advanced_ddos_attack_l7_alert"
	PolicyAlertTypeAdvancedHTTPAlertError                        PolicyAlertType = "advanced_http_alert_error"
	PolicyAlertTypeBGPHijackNotification                         PolicyAlertType = "bgp_hijack_notification"
	PolicyAlertTypeBillingUsageAlert                             PolicyAlertType = "billing_usage_alert"
	PolicyAlertTypeBlockNotificationBlockRemoved                 PolicyAlertType = "block_notification_block_removed"
	PolicyAlertTypeBlockNotificationNewBlock                     PolicyAlertType = "block_notification_new_block"
	PolicyAlertTypeBlockNotificationReviewRejected               PolicyAlertType = "block_notification_review_rejected"
	PolicyAlertTypeBrandProtectionAlert                          PolicyAlertType = "brand_protection_alert"
	PolicyAlertTypeBrandProtectionDigest                         PolicyAlertType = "brand_protection_digest"
	PolicyAlertTypeClickhouseAlertFwAnomaly                      PolicyAlertType = "clickhouse_alert_fw_anomaly"
	PolicyAlertTypeClickhouseAlertFwEntAnomaly                   PolicyAlertType = "clickhouse_alert_fw_ent_anomaly"
	PolicyAlertTypeCustomSSLCertificateEventType                 PolicyAlertType = "custom_ssl_certificate_event_type"
	PolicyAlertTypeDedicatedSSLCertificateEventType              PolicyAlertType = "dedicated_ssl_certificate_event_type"
	PolicyAlertTypeDosAttackL4                                   PolicyAlertType = "dos_attack_l4"
	PolicyAlertTypeDosAttackL7                                   PolicyAlertType = "dos_attack_l7"
	PolicyAlertTypeExpiringServiceTokenAlert                     PolicyAlertType = "expiring_service_token_alert"
	PolicyAlertTypeFailingLogpushJobDisabledAlert                PolicyAlertType = "failing_logpush_job_disabled_alert"
	PolicyAlertTypeFbmAutoAdvertisement                          PolicyAlertType = "fbm_auto_advertisement"
	PolicyAlertTypeFbmDosdAttack                                 PolicyAlertType = "fbm_dosd_attack"
	PolicyAlertTypeFbmVolumetricAttack                           PolicyAlertType = "fbm_volumetric_attack"
	PolicyAlertTypeHealthCheckStatusNotification                 PolicyAlertType = "health_check_status_notification"
	PolicyAlertTypeHostnameAopCustomCertificateExpirationType    PolicyAlertType = "hostname_aop_custom_certificate_expiration_type"
	PolicyAlertTypeHTTPAlertEdgeError                            PolicyAlertType = "http_alert_edge_error"
	PolicyAlertTypeHTTPAlertOriginError                          PolicyAlertType = "http_alert_origin_error"
	PolicyAlertTypeIncidentAlert                                 PolicyAlertType = "incident_alert"
	PolicyAlertTypeLoadBalancingHealthAlert                      PolicyAlertType = "load_balancing_health_alert"
	PolicyAlertTypeLoadBalancingPoolEnablementAlert              PolicyAlertType = "load_balancing_pool_enablement_alert"
	PolicyAlertTypeLogoMatchAlert                                PolicyAlertType = "logo_match_alert"
	PolicyAlertTypeMagicTunnelHealthCheckEvent                   PolicyAlertType = "magic_tunnel_health_check_event"
	PolicyAlertTypeMaintenanceEventNotification                  PolicyAlertType = "maintenance_event_notification"
	PolicyAlertTypeMTLSCertificateStoreCertificateExpirationType PolicyAlertType = "mtls_certificate_store_certificate_expiration_type"
	PolicyAlertTypePagesEventAlert                               PolicyAlertType = "pages_event_alert"
	PolicyAlertTypeRadarNotification                             PolicyAlertType = "radar_notification"
	PolicyAlertTypeRealOriginMonitoring                          PolicyAlertType = "real_origin_monitoring"
	PolicyAlertTypeScriptmonitorAlertNewCodeChangeDetections     PolicyAlertType = "scriptmonitor_alert_new_code_change_detections"
	PolicyAlertTypeScriptmonitorAlertNewHosts                    PolicyAlertType = "scriptmonitor_alert_new_hosts"
	PolicyAlertTypeScriptmonitorAlertNewMaliciousHosts           PolicyAlertType = "scriptmonitor_alert_new_malicious_hosts"
	PolicyAlertTypeScriptmonitorAlertNewMaliciousScripts         PolicyAlertType = "scriptmonitor_alert_new_malicious_scripts"
	PolicyAlertTypeScriptmonitorAlertNewMaliciousURL             PolicyAlertType = "scriptmonitor_alert_new_malicious_url"
	PolicyAlertTypeScriptmonitorAlertNewMaxLengthResourceURL     PolicyAlertType = "scriptmonitor_alert_new_max_length_resource_url"
	PolicyAlertTypeScriptmonitorAlertNewResources                PolicyAlertType = "scriptmonitor_alert_new_resources"
	PolicyAlertTypeSecondaryDNSAllPrimariesFailing               PolicyAlertType = "secondary_dns_all_primaries_failing"
	PolicyAlertTypeSecondaryDNSPrimariesFailing                  PolicyAlertType = "secondary_dns_primaries_failing"
	PolicyAlertTypeSecondaryDNSZoneSuccessfullyUpdated           PolicyAlertType = "secondary_dns_zone_successfully_updated"
	PolicyAlertTypeSecondaryDNSZoneValidationWarning             PolicyAlertType = "secondary_dns_zone_validation_warning"
	PolicyAlertTypeSentinelAlert                                 PolicyAlertType = "sentinel_alert"
	PolicyAlertTypeStreamLiveNotifications                       PolicyAlertType = "stream_live_notifications"
	PolicyAlertTypeTrafficAnomaliesAlert                         PolicyAlertType = "traffic_anomalies_alert"
	PolicyAlertTypeTunnelHealthEvent                             PolicyAlertType = "tunnel_health_event"
	PolicyAlertTypeTunnelUpdateEvent                             PolicyAlertType = "tunnel_update_event"
	PolicyAlertTypeUniversalSSLEventType                         PolicyAlertType = "universal_ssl_event_type"
	PolicyAlertTypeWebAnalyticsMetricsUpdate                     PolicyAlertType = "web_analytics_metrics_update"
	PolicyAlertTypeZoneAopCustomCertificateExpirationType        PolicyAlertType = "zone_aop_custom_certificate_expiration_type"
)

func (PolicyAlertType) IsKnown

func (r PolicyAlertType) IsKnown() bool

type PolicyDeleteParams

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

type PolicyDeleteResponseArray

type PolicyDeleteResponseArray []interface{}

func (PolicyDeleteResponseArray) ImplementsAlertingPolicyDeleteResponseUnion

func (r PolicyDeleteResponseArray) ImplementsAlertingPolicyDeleteResponseUnion()

type PolicyDeleteResponseEnvelope

type PolicyDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo     `json:"errors,required"`
	Messages []shared.ResponseInfo     `json:"messages,required"`
	Result   PolicyDeleteResponseUnion `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 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 PolicyDeleteResponseUnion

type PolicyDeleteResponseUnion interface {
	ImplementsAlertingPolicyDeleteResponseUnion()
}

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

type PolicyFilter

type PolicyFilter struct {
	// Usage depends on specific alert type
	Actions []string `json:"actions"`
	// Used for configuring radar_notification
	AffectedASNs []string `json:"affected_asns"`
	// Used for configuring incident_alert. A list of identifiers for each component to
	// monitor.
	AffectedComponents []string `json:"affected_components"`
	// Used for configuring radar_notification
	AffectedLocations []string `json:"affected_locations"`
	// Used for configuring maintenance_event_notification
	AirportCode []string `json:"airport_code"`
	// Usage depends on specific alert type
	AlertTriggerPreferences []string `json:"alert_trigger_preferences"`
	// Used for configuring magic_tunnel_health_check_event
	AlertTriggerPreferencesValue []PolicyFilterAlertTriggerPreferencesValue `json:"alert_trigger_preferences_value"`
	// Used for configuring load_balancing_pool_enablement_alert
	Enabled []string `json:"enabled"`
	// Used for configuring pages_event_alert
	Environment []string `json:"environment"`
	// Used for configuring pages_event_alert
	Event []string `json:"event"`
	// Used for configuring load_balancing_health_alert
	EventSource []string `json:"event_source"`
	// Usage depends on specific alert type
	EventType []string `json:"event_type"`
	// Usage depends on specific alert type
	GroupBy []string `json:"group_by"`
	// Used for configuring health_check_status_notification
	HealthCheckID []string `json:"health_check_id"`
	// Used for configuring incident_alert
	IncidentImpact []PolicyFilterIncidentImpact `json:"incident_impact"`
	// Used for configuring stream_live_notifications
	InputID []string `json:"input_id"`
	// Used for configuring billing_usage_alert
	Limit []string `json:"limit"`
	// Used for configuring logo_match_alert
	LogoTag []string `json:"logo_tag"`
	// Used for configuring advanced_ddos_attack_l4_alert
	MegabitsPerSecond []string `json:"megabits_per_second"`
	// Used for configuring load_balancing_health_alert
	NewHealth []string `json:"new_health"`
	// Used for configuring tunnel_health_event
	NewStatus []string `json:"new_status"`
	// Used for configuring advanced_ddos_attack_l4_alert
	PacketsPerSecond []string `json:"packets_per_second"`
	// Usage depends on specific alert type
	PoolID []string `json:"pool_id"`
	// Used for configuring billing_usage_alert
	Product []string `json:"product"`
	// Used for configuring pages_event_alert
	ProjectID []string `json:"project_id"`
	// Used for configuring advanced_ddos_attack_l4_alert
	Protocol []string `json:"protocol"`
	// Usage depends on specific alert type
	QueryTag []string `json:"query_tag"`
	// Used for configuring advanced_ddos_attack_l7_alert
	RequestsPerSecond []string `json:"requests_per_second"`
	// Usage depends on specific alert type
	Selectors []string `json:"selectors"`
	// Used for configuring clickhouse_alert_fw_ent_anomaly
	Services []string `json:"services"`
	// Usage depends on specific alert type
	Slo []string `json:"slo"`
	// Used for configuring health_check_status_notification
	Status []string `json:"status"`
	// Used for configuring advanced_ddos_attack_l7_alert
	TargetHostname []string `json:"target_hostname"`
	// Used for configuring advanced_ddos_attack_l4_alert
	TargetIP []string `json:"target_ip"`
	// Used for configuring advanced_ddos_attack_l7_alert
	TargetZoneName []string `json:"target_zone_name"`
	// Used for configuring traffic_anomalies_alert
	TrafficExclusions []PolicyFilterTrafficExclusion `json:"traffic_exclusions"`
	// Used for configuring tunnel_health_event
	TunnelID []string `json:"tunnel_id"`
	// Used for configuring magic_tunnel_health_check_event
	TunnelName []string `json:"tunnel_name"`
	// Usage depends on specific alert type
	Where []string `json:"where"`
	// Usage depends on specific alert type
	Zones []string         `json:"zones"`
	JSON  policyFilterJSON `json:"-"`
}

Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.

func (*PolicyFilter) UnmarshalJSON

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

type PolicyFilterAlertTriggerPreferencesValue

type PolicyFilterAlertTriggerPreferencesValue string
const (
	PolicyFilterAlertTriggerPreferencesValue99_0 PolicyFilterAlertTriggerPreferencesValue = "99.0"
	PolicyFilterAlertTriggerPreferencesValue98_0 PolicyFilterAlertTriggerPreferencesValue = "98.0"
	PolicyFilterAlertTriggerPreferencesValue97_0 PolicyFilterAlertTriggerPreferencesValue = "97.0"
)

func (PolicyFilterAlertTriggerPreferencesValue) IsKnown

type PolicyFilterIncidentImpact

type PolicyFilterIncidentImpact string
const (
	PolicyFilterIncidentImpactIncidentImpactNone     PolicyFilterIncidentImpact = "INCIDENT_IMPACT_NONE"
	PolicyFilterIncidentImpactIncidentImpactMinor    PolicyFilterIncidentImpact = "INCIDENT_IMPACT_MINOR"
	PolicyFilterIncidentImpactIncidentImpactMajor    PolicyFilterIncidentImpact = "INCIDENT_IMPACT_MAJOR"
	PolicyFilterIncidentImpactIncidentImpactCritical PolicyFilterIncidentImpact = "INCIDENT_IMPACT_CRITICAL"
)

func (PolicyFilterIncidentImpact) IsKnown

func (r PolicyFilterIncidentImpact) IsKnown() bool

type PolicyFilterParam

type PolicyFilterParam struct {
	// Usage depends on specific alert type
	Actions param.Field[[]string] `json:"actions"`
	// Used for configuring radar_notification
	AffectedASNs param.Field[[]string] `json:"affected_asns"`
	// Used for configuring incident_alert. A list of identifiers for each component to
	// monitor.
	AffectedComponents param.Field[[]string] `json:"affected_components"`
	// Used for configuring radar_notification
	AffectedLocations param.Field[[]string] `json:"affected_locations"`
	// Used for configuring maintenance_event_notification
	AirportCode param.Field[[]string] `json:"airport_code"`
	// Usage depends on specific alert type
	AlertTriggerPreferences param.Field[[]string] `json:"alert_trigger_preferences"`
	// Used for configuring magic_tunnel_health_check_event
	AlertTriggerPreferencesValue param.Field[[]PolicyFilterAlertTriggerPreferencesValue] `json:"alert_trigger_preferences_value"`
	// Used for configuring load_balancing_pool_enablement_alert
	Enabled param.Field[[]string] `json:"enabled"`
	// Used for configuring pages_event_alert
	Environment param.Field[[]string] `json:"environment"`
	// Used for configuring pages_event_alert
	Event param.Field[[]string] `json:"event"`
	// Used for configuring load_balancing_health_alert
	EventSource param.Field[[]string] `json:"event_source"`
	// Usage depends on specific alert type
	EventType param.Field[[]string] `json:"event_type"`
	// Usage depends on specific alert type
	GroupBy param.Field[[]string] `json:"group_by"`
	// Used for configuring health_check_status_notification
	HealthCheckID param.Field[[]string] `json:"health_check_id"`
	// Used for configuring incident_alert
	IncidentImpact param.Field[[]PolicyFilterIncidentImpact] `json:"incident_impact"`
	// Used for configuring stream_live_notifications
	InputID param.Field[[]string] `json:"input_id"`
	// Used for configuring billing_usage_alert
	Limit param.Field[[]string] `json:"limit"`
	// Used for configuring logo_match_alert
	LogoTag param.Field[[]string] `json:"logo_tag"`
	// Used for configuring advanced_ddos_attack_l4_alert
	MegabitsPerSecond param.Field[[]string] `json:"megabits_per_second"`
	// Used for configuring load_balancing_health_alert
	NewHealth param.Field[[]string] `json:"new_health"`
	// Used for configuring tunnel_health_event
	NewStatus param.Field[[]string] `json:"new_status"`
	// Used for configuring advanced_ddos_attack_l4_alert
	PacketsPerSecond param.Field[[]string] `json:"packets_per_second"`
	// Usage depends on specific alert type
	PoolID param.Field[[]string] `json:"pool_id"`
	// Used for configuring billing_usage_alert
	Product param.Field[[]string] `json:"product"`
	// Used for configuring pages_event_alert
	ProjectID param.Field[[]string] `json:"project_id"`
	// Used for configuring advanced_ddos_attack_l4_alert
	Protocol param.Field[[]string] `json:"protocol"`
	// Usage depends on specific alert type
	QueryTag param.Field[[]string] `json:"query_tag"`
	// Used for configuring advanced_ddos_attack_l7_alert
	RequestsPerSecond param.Field[[]string] `json:"requests_per_second"`
	// Usage depends on specific alert type
	Selectors param.Field[[]string] `json:"selectors"`
	// Used for configuring clickhouse_alert_fw_ent_anomaly
	Services param.Field[[]string] `json:"services"`
	// Usage depends on specific alert type
	Slo param.Field[[]string] `json:"slo"`
	// Used for configuring health_check_status_notification
	Status param.Field[[]string] `json:"status"`
	// Used for configuring advanced_ddos_attack_l7_alert
	TargetHostname param.Field[[]string] `json:"target_hostname"`
	// Used for configuring advanced_ddos_attack_l4_alert
	TargetIP param.Field[[]string] `json:"target_ip"`
	// Used for configuring advanced_ddos_attack_l7_alert
	TargetZoneName param.Field[[]string] `json:"target_zone_name"`
	// Used for configuring traffic_anomalies_alert
	TrafficExclusions param.Field[[]PolicyFilterTrafficExclusion] `json:"traffic_exclusions"`
	// Used for configuring tunnel_health_event
	TunnelID param.Field[[]string] `json:"tunnel_id"`
	// Used for configuring magic_tunnel_health_check_event
	TunnelName param.Field[[]string] `json:"tunnel_name"`
	// Usage depends on specific alert type
	Where param.Field[[]string] `json:"where"`
	// Usage depends on specific alert type
	Zones param.Field[[]string] `json:"zones"`
}

Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.

func (PolicyFilterParam) MarshalJSON

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

type PolicyFilterTrafficExclusion

type PolicyFilterTrafficExclusion string
const (
	PolicyFilterTrafficExclusionSecurityEvents PolicyFilterTrafficExclusion = "security_events"
)

func (PolicyFilterTrafficExclusion) IsKnown

func (r PolicyFilterTrafficExclusion) IsKnown() bool

type PolicyGetParams

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

type PolicyGetResponseEnvelope

type PolicyGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Policy                `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 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 PolicyNewParams

type PolicyNewParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
	// Refers to which event will trigger a Notification dispatch. You can use the
	// endpoint to get available alert types which then will give you a list of
	// possible values.
	AlertType param.Field[PolicyNewParamsAlertType] `json:"alert_type,required"`
	// Whether or not the Notification policy is enabled.
	Enabled param.Field[bool] `json:"enabled,required"`
	// List of IDs that will be used when dispatching a notification. IDs for email
	// type will be the email address.
	Mechanisms param.Field[MechanismParam] `json:"mechanisms,required"`
	// Name of the policy.
	Name param.Field[string] `json:"name,required"`
	// Optional description for the Notification policy.
	Description param.Field[string] `json:"description"`
	// Optional filters that allow you to be alerted only on a subset of events for
	// that alert type based on some criteria. This is only available for select alert
	// types. See alert type documentation for more details.
	Filters param.Field[PolicyFilterParam] `json:"filters"`
}

func (PolicyNewParams) MarshalJSON

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

type PolicyNewParamsAlertType

type PolicyNewParamsAlertType string

Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.

const (
	PolicyNewParamsAlertTypeAccessCustomCertificateExpirationType         PolicyNewParamsAlertType = "access_custom_certificate_expiration_type"
	PolicyNewParamsAlertTypeAdvancedDDoSAttackL4Alert                     PolicyNewParamsAlertType = "advanced_ddos_attack_l4_alert"
	PolicyNewParamsAlertTypeAdvancedDDoSAttackL7Alert                     PolicyNewParamsAlertType = "advanced_ddos_attack_l7_alert"
	PolicyNewParamsAlertTypeAdvancedHTTPAlertError                        PolicyNewParamsAlertType = "advanced_http_alert_error"
	PolicyNewParamsAlertTypeBGPHijackNotification                         PolicyNewParamsAlertType = "bgp_hijack_notification"
	PolicyNewParamsAlertTypeBillingUsageAlert                             PolicyNewParamsAlertType = "billing_usage_alert"
	PolicyNewParamsAlertTypeBlockNotificationBlockRemoved                 PolicyNewParamsAlertType = "block_notification_block_removed"
	PolicyNewParamsAlertTypeBlockNotificationNewBlock                     PolicyNewParamsAlertType = "block_notification_new_block"
	PolicyNewParamsAlertTypeBlockNotificationReviewRejected               PolicyNewParamsAlertType = "block_notification_review_rejected"
	PolicyNewParamsAlertTypeBrandProtectionAlert                          PolicyNewParamsAlertType = "brand_protection_alert"
	PolicyNewParamsAlertTypeBrandProtectionDigest                         PolicyNewParamsAlertType = "brand_protection_digest"
	PolicyNewParamsAlertTypeClickhouseAlertFwAnomaly                      PolicyNewParamsAlertType = "clickhouse_alert_fw_anomaly"
	PolicyNewParamsAlertTypeClickhouseAlertFwEntAnomaly                   PolicyNewParamsAlertType = "clickhouse_alert_fw_ent_anomaly"
	PolicyNewParamsAlertTypeCustomSSLCertificateEventType                 PolicyNewParamsAlertType = "custom_ssl_certificate_event_type"
	PolicyNewParamsAlertTypeDedicatedSSLCertificateEventType              PolicyNewParamsAlertType = "dedicated_ssl_certificate_event_type"
	PolicyNewParamsAlertTypeDosAttackL4                                   PolicyNewParamsAlertType = "dos_attack_l4"
	PolicyNewParamsAlertTypeDosAttackL7                                   PolicyNewParamsAlertType = "dos_attack_l7"
	PolicyNewParamsAlertTypeExpiringServiceTokenAlert                     PolicyNewParamsAlertType = "expiring_service_token_alert"
	PolicyNewParamsAlertTypeFailingLogpushJobDisabledAlert                PolicyNewParamsAlertType = "failing_logpush_job_disabled_alert"
	PolicyNewParamsAlertTypeFbmAutoAdvertisement                          PolicyNewParamsAlertType = "fbm_auto_advertisement"
	PolicyNewParamsAlertTypeFbmDosdAttack                                 PolicyNewParamsAlertType = "fbm_dosd_attack"
	PolicyNewParamsAlertTypeFbmVolumetricAttack                           PolicyNewParamsAlertType = "fbm_volumetric_attack"
	PolicyNewParamsAlertTypeHealthCheckStatusNotification                 PolicyNewParamsAlertType = "health_check_status_notification"
	PolicyNewParamsAlertTypeHostnameAopCustomCertificateExpirationType    PolicyNewParamsAlertType = "hostname_aop_custom_certificate_expiration_type"
	PolicyNewParamsAlertTypeHTTPAlertEdgeError                            PolicyNewParamsAlertType = "http_alert_edge_error"
	PolicyNewParamsAlertTypeHTTPAlertOriginError                          PolicyNewParamsAlertType = "http_alert_origin_error"
	PolicyNewParamsAlertTypeIncidentAlert                                 PolicyNewParamsAlertType = "incident_alert"
	PolicyNewParamsAlertTypeLoadBalancingHealthAlert                      PolicyNewParamsAlertType = "load_balancing_health_alert"
	PolicyNewParamsAlertTypeLoadBalancingPoolEnablementAlert              PolicyNewParamsAlertType = "load_balancing_pool_enablement_alert"
	PolicyNewParamsAlertTypeLogoMatchAlert                                PolicyNewParamsAlertType = "logo_match_alert"
	PolicyNewParamsAlertTypeMagicTunnelHealthCheckEvent                   PolicyNewParamsAlertType = "magic_tunnel_health_check_event"
	PolicyNewParamsAlertTypeMaintenanceEventNotification                  PolicyNewParamsAlertType = "maintenance_event_notification"
	PolicyNewParamsAlertTypeMTLSCertificateStoreCertificateExpirationType PolicyNewParamsAlertType = "mtls_certificate_store_certificate_expiration_type"
	PolicyNewParamsAlertTypePagesEventAlert                               PolicyNewParamsAlertType = "pages_event_alert"
	PolicyNewParamsAlertTypeRadarNotification                             PolicyNewParamsAlertType = "radar_notification"
	PolicyNewParamsAlertTypeRealOriginMonitoring                          PolicyNewParamsAlertType = "real_origin_monitoring"
	PolicyNewParamsAlertTypeScriptmonitorAlertNewCodeChangeDetections     PolicyNewParamsAlertType = "scriptmonitor_alert_new_code_change_detections"
	PolicyNewParamsAlertTypeScriptmonitorAlertNewHosts                    PolicyNewParamsAlertType = "scriptmonitor_alert_new_hosts"
	PolicyNewParamsAlertTypeScriptmonitorAlertNewMaliciousHosts           PolicyNewParamsAlertType = "scriptmonitor_alert_new_malicious_hosts"
	PolicyNewParamsAlertTypeScriptmonitorAlertNewMaliciousScripts         PolicyNewParamsAlertType = "scriptmonitor_alert_new_malicious_scripts"
	PolicyNewParamsAlertTypeScriptmonitorAlertNewMaliciousURL             PolicyNewParamsAlertType = "scriptmonitor_alert_new_malicious_url"
	PolicyNewParamsAlertTypeScriptmonitorAlertNewMaxLengthResourceURL     PolicyNewParamsAlertType = "scriptmonitor_alert_new_max_length_resource_url"
	PolicyNewParamsAlertTypeScriptmonitorAlertNewResources                PolicyNewParamsAlertType = "scriptmonitor_alert_new_resources"
	PolicyNewParamsAlertTypeSecondaryDNSAllPrimariesFailing               PolicyNewParamsAlertType = "secondary_dns_all_primaries_failing"
	PolicyNewParamsAlertTypeSecondaryDNSPrimariesFailing                  PolicyNewParamsAlertType = "secondary_dns_primaries_failing"
	PolicyNewParamsAlertTypeSecondaryDNSZoneSuccessfullyUpdated           PolicyNewParamsAlertType = "secondary_dns_zone_successfully_updated"
	PolicyNewParamsAlertTypeSecondaryDNSZoneValidationWarning             PolicyNewParamsAlertType = "secondary_dns_zone_validation_warning"
	PolicyNewParamsAlertTypeSentinelAlert                                 PolicyNewParamsAlertType = "sentinel_alert"
	PolicyNewParamsAlertTypeStreamLiveNotifications                       PolicyNewParamsAlertType = "stream_live_notifications"
	PolicyNewParamsAlertTypeTrafficAnomaliesAlert                         PolicyNewParamsAlertType = "traffic_anomalies_alert"
	PolicyNewParamsAlertTypeTunnelHealthEvent                             PolicyNewParamsAlertType = "tunnel_health_event"
	PolicyNewParamsAlertTypeTunnelUpdateEvent                             PolicyNewParamsAlertType = "tunnel_update_event"
	PolicyNewParamsAlertTypeUniversalSSLEventType                         PolicyNewParamsAlertType = "universal_ssl_event_type"
	PolicyNewParamsAlertTypeWebAnalyticsMetricsUpdate                     PolicyNewParamsAlertType = "web_analytics_metrics_update"
	PolicyNewParamsAlertTypeZoneAopCustomCertificateExpirationType        PolicyNewParamsAlertType = "zone_aop_custom_certificate_expiration_type"
)

func (PolicyNewParamsAlertType) IsKnown

func (r PolicyNewParamsAlertType) IsKnown() bool

type PolicyNewResponse

type PolicyNewResponse struct {
	// UUID
	ID   string                `json:"id"`
	JSON policyNewResponseJSON `json:"-"`
}

func (*PolicyNewResponse) UnmarshalJSON

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

type PolicyNewResponseEnvelope

type PolicyNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `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 PolicyNewResponseEnvelopeSuccess

type PolicyNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PolicyNewResponseEnvelopeSuccessTrue PolicyNewResponseEnvelopeSuccess = true
)

func (PolicyNewResponseEnvelopeSuccess) IsKnown

type PolicyParam

type PolicyParam struct {
	// Refers to which event will trigger a Notification dispatch. You can use the
	// endpoint to get available alert types which then will give you a list of
	// possible values.
	AlertType param.Field[PolicyAlertType] `json:"alert_type"`
	// Optional description for the Notification policy.
	Description param.Field[string] `json:"description"`
	// Whether or not the Notification policy is enabled.
	Enabled param.Field[bool] `json:"enabled"`
	// Optional filters that allow you to be alerted only on a subset of events for
	// that alert type based on some criteria. This is only available for select alert
	// types. See alert type documentation for more details.
	Filters param.Field[PolicyFilterParam] `json:"filters"`
	// List of IDs that will be used when dispatching a notification. IDs for email
	// type will be the email address.
	Mechanisms param.Field[MechanismParam] `json:"mechanisms"`
	// Name of the policy.
	Name param.Field[string] `json:"name"`
}

func (PolicyParam) MarshalJSON

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

type PolicyService

type PolicyService struct {
	Options []option.RequestOption
}

PolicyService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPolicyService method instead.

func NewPolicyService

func NewPolicyService(opts ...option.RequestOption) (r *PolicyService)

NewPolicyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PolicyService) Delete

func (r *PolicyService) Delete(ctx context.Context, policyID string, body PolicyDeleteParams, opts ...option.RequestOption) (res *PolicyDeleteResponseUnion, err error)

Delete a Notification policy.

func (*PolicyService) Get

func (r *PolicyService) Get(ctx context.Context, policyID string, query PolicyGetParams, opts ...option.RequestOption) (res *Policy, err error)

Get details for a single policy.

func (*PolicyService) List

Get a list of all Notification policies.

func (*PolicyService) ListAutoPaging

Get a list of all Notification policies.

func (*PolicyService) New

func (r *PolicyService) New(ctx context.Context, params PolicyNewParams, opts ...option.RequestOption) (res *PolicyNewResponse, err error)

Creates a new Notification policy.

func (*PolicyService) Update

func (r *PolicyService) Update(ctx context.Context, policyID string, params PolicyUpdateParams, opts ...option.RequestOption) (res *PolicyUpdateResponse, err error)

Update a Notification policy.

type PolicyUpdateParams

type PolicyUpdateParams struct {
	// The account id
	AccountID param.Field[string] `path:"account_id,required"`
	// Refers to which event will trigger a Notification dispatch. You can use the
	// endpoint to get available alert types which then will give you a list of
	// possible values.
	AlertType param.Field[PolicyUpdateParamsAlertType] `json:"alert_type"`
	// Optional description for the Notification policy.
	Description param.Field[string] `json:"description"`
	// Whether or not the Notification policy is enabled.
	Enabled param.Field[bool] `json:"enabled"`
	// Optional filters that allow you to be alerted only on a subset of events for
	// that alert type based on some criteria. This is only available for select alert
	// types. See alert type documentation for more details.
	Filters param.Field[PolicyFilterParam] `json:"filters"`
	// List of IDs that will be used when dispatching a notification. IDs for email
	// type will be the email address.
	Mechanisms param.Field[MechanismParam] `json:"mechanisms"`
	// Name of the policy.
	Name param.Field[string] `json:"name"`
}

func (PolicyUpdateParams) MarshalJSON

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

type PolicyUpdateParamsAlertType

type PolicyUpdateParamsAlertType string

Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.

const (
	PolicyUpdateParamsAlertTypeAccessCustomCertificateExpirationType         PolicyUpdateParamsAlertType = "access_custom_certificate_expiration_type"
	PolicyUpdateParamsAlertTypeAdvancedDDoSAttackL4Alert                     PolicyUpdateParamsAlertType = "advanced_ddos_attack_l4_alert"
	PolicyUpdateParamsAlertTypeAdvancedDDoSAttackL7Alert                     PolicyUpdateParamsAlertType = "advanced_ddos_attack_l7_alert"
	PolicyUpdateParamsAlertTypeAdvancedHTTPAlertError                        PolicyUpdateParamsAlertType = "advanced_http_alert_error"
	PolicyUpdateParamsAlertTypeBGPHijackNotification                         PolicyUpdateParamsAlertType = "bgp_hijack_notification"
	PolicyUpdateParamsAlertTypeBillingUsageAlert                             PolicyUpdateParamsAlertType = "billing_usage_alert"
	PolicyUpdateParamsAlertTypeBlockNotificationBlockRemoved                 PolicyUpdateParamsAlertType = "block_notification_block_removed"
	PolicyUpdateParamsAlertTypeBlockNotificationNewBlock                     PolicyUpdateParamsAlertType = "block_notification_new_block"
	PolicyUpdateParamsAlertTypeBlockNotificationReviewRejected               PolicyUpdateParamsAlertType = "block_notification_review_rejected"
	PolicyUpdateParamsAlertTypeBrandProtectionAlert                          PolicyUpdateParamsAlertType = "brand_protection_alert"
	PolicyUpdateParamsAlertTypeBrandProtectionDigest                         PolicyUpdateParamsAlertType = "brand_protection_digest"
	PolicyUpdateParamsAlertTypeClickhouseAlertFwAnomaly                      PolicyUpdateParamsAlertType = "clickhouse_alert_fw_anomaly"
	PolicyUpdateParamsAlertTypeClickhouseAlertFwEntAnomaly                   PolicyUpdateParamsAlertType = "clickhouse_alert_fw_ent_anomaly"
	PolicyUpdateParamsAlertTypeCustomSSLCertificateEventType                 PolicyUpdateParamsAlertType = "custom_ssl_certificate_event_type"
	PolicyUpdateParamsAlertTypeDedicatedSSLCertificateEventType              PolicyUpdateParamsAlertType = "dedicated_ssl_certificate_event_type"
	PolicyUpdateParamsAlertTypeDosAttackL4                                   PolicyUpdateParamsAlertType = "dos_attack_l4"
	PolicyUpdateParamsAlertTypeDosAttackL7                                   PolicyUpdateParamsAlertType = "dos_attack_l7"
	PolicyUpdateParamsAlertTypeExpiringServiceTokenAlert                     PolicyUpdateParamsAlertType = "expiring_service_token_alert"
	PolicyUpdateParamsAlertTypeFailingLogpushJobDisabledAlert                PolicyUpdateParamsAlertType = "failing_logpush_job_disabled_alert"
	PolicyUpdateParamsAlertTypeFbmAutoAdvertisement                          PolicyUpdateParamsAlertType = "fbm_auto_advertisement"
	PolicyUpdateParamsAlertTypeFbmDosdAttack                                 PolicyUpdateParamsAlertType = "fbm_dosd_attack"
	PolicyUpdateParamsAlertTypeFbmVolumetricAttack                           PolicyUpdateParamsAlertType = "fbm_volumetric_attack"
	PolicyUpdateParamsAlertTypeHealthCheckStatusNotification                 PolicyUpdateParamsAlertType = "health_check_status_notification"
	PolicyUpdateParamsAlertTypeHostnameAopCustomCertificateExpirationType    PolicyUpdateParamsAlertType = "hostname_aop_custom_certificate_expiration_type"
	PolicyUpdateParamsAlertTypeHTTPAlertEdgeError                            PolicyUpdateParamsAlertType = "http_alert_edge_error"
	PolicyUpdateParamsAlertTypeHTTPAlertOriginError                          PolicyUpdateParamsAlertType = "http_alert_origin_error"
	PolicyUpdateParamsAlertTypeIncidentAlert                                 PolicyUpdateParamsAlertType = "incident_alert"
	PolicyUpdateParamsAlertTypeLoadBalancingHealthAlert                      PolicyUpdateParamsAlertType = "load_balancing_health_alert"
	PolicyUpdateParamsAlertTypeLoadBalancingPoolEnablementAlert              PolicyUpdateParamsAlertType = "load_balancing_pool_enablement_alert"
	PolicyUpdateParamsAlertTypeLogoMatchAlert                                PolicyUpdateParamsAlertType = "logo_match_alert"
	PolicyUpdateParamsAlertTypeMagicTunnelHealthCheckEvent                   PolicyUpdateParamsAlertType = "magic_tunnel_health_check_event"
	PolicyUpdateParamsAlertTypeMaintenanceEventNotification                  PolicyUpdateParamsAlertType = "maintenance_event_notification"
	PolicyUpdateParamsAlertTypeMTLSCertificateStoreCertificateExpirationType PolicyUpdateParamsAlertType = "mtls_certificate_store_certificate_expiration_type"
	PolicyUpdateParamsAlertTypePagesEventAlert                               PolicyUpdateParamsAlertType = "pages_event_alert"
	PolicyUpdateParamsAlertTypeRadarNotification                             PolicyUpdateParamsAlertType = "radar_notification"
	PolicyUpdateParamsAlertTypeRealOriginMonitoring                          PolicyUpdateParamsAlertType = "real_origin_monitoring"
	PolicyUpdateParamsAlertTypeScriptmonitorAlertNewCodeChangeDetections     PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_code_change_detections"
	PolicyUpdateParamsAlertTypeScriptmonitorAlertNewHosts                    PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_hosts"
	PolicyUpdateParamsAlertTypeScriptmonitorAlertNewMaliciousHosts           PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_malicious_hosts"
	PolicyUpdateParamsAlertTypeScriptmonitorAlertNewMaliciousScripts         PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_malicious_scripts"
	PolicyUpdateParamsAlertTypeScriptmonitorAlertNewMaliciousURL             PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_malicious_url"
	PolicyUpdateParamsAlertTypeScriptmonitorAlertNewMaxLengthResourceURL     PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_max_length_resource_url"
	PolicyUpdateParamsAlertTypeScriptmonitorAlertNewResources                PolicyUpdateParamsAlertType = "scriptmonitor_alert_new_resources"
	PolicyUpdateParamsAlertTypeSecondaryDNSAllPrimariesFailing               PolicyUpdateParamsAlertType = "secondary_dns_all_primaries_failing"
	PolicyUpdateParamsAlertTypeSecondaryDNSPrimariesFailing                  PolicyUpdateParamsAlertType = "secondary_dns_primaries_failing"
	PolicyUpdateParamsAlertTypeSecondaryDNSZoneSuccessfullyUpdated           PolicyUpdateParamsAlertType = "secondary_dns_zone_successfully_updated"
	PolicyUpdateParamsAlertTypeSecondaryDNSZoneValidationWarning             PolicyUpdateParamsAlertType = "secondary_dns_zone_validation_warning"
	PolicyUpdateParamsAlertTypeSentinelAlert                                 PolicyUpdateParamsAlertType = "sentinel_alert"
	PolicyUpdateParamsAlertTypeStreamLiveNotifications                       PolicyUpdateParamsAlertType = "stream_live_notifications"
	PolicyUpdateParamsAlertTypeTrafficAnomaliesAlert                         PolicyUpdateParamsAlertType = "traffic_anomalies_alert"
	PolicyUpdateParamsAlertTypeTunnelHealthEvent                             PolicyUpdateParamsAlertType = "tunnel_health_event"
	PolicyUpdateParamsAlertTypeTunnelUpdateEvent                             PolicyUpdateParamsAlertType = "tunnel_update_event"
	PolicyUpdateParamsAlertTypeUniversalSSLEventType                         PolicyUpdateParamsAlertType = "universal_ssl_event_type"
	PolicyUpdateParamsAlertTypeWebAnalyticsMetricsUpdate                     PolicyUpdateParamsAlertType = "web_analytics_metrics_update"
	PolicyUpdateParamsAlertTypeZoneAopCustomCertificateExpirationType        PolicyUpdateParamsAlertType = "zone_aop_custom_certificate_expiration_type"
)

func (PolicyUpdateParamsAlertType) IsKnown

func (r PolicyUpdateParamsAlertType) IsKnown() bool

type PolicyUpdateResponse

type PolicyUpdateResponse struct {
	// UUID
	ID   string                   `json:"id"`
	JSON policyUpdateResponseJSON `json:"-"`
}

func (*PolicyUpdateResponse) UnmarshalJSON

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

type PolicyUpdateResponseEnvelope

type PolicyUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `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 PolicyUpdateResponseEnvelopeSuccess

type PolicyUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PolicyUpdateResponseEnvelopeSuccessTrue PolicyUpdateResponseEnvelopeSuccess = true
)

func (PolicyUpdateResponseEnvelopeSuccess) IsKnown

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type Webhooks

type Webhooks struct {
	// The unique identifier of a webhook
	ID string `json:"id"`
	// Timestamp of when the webhook destination was created.
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Timestamp of the last time an attempt to dispatch a notification to this webhook
	// failed.
	LastFailure time.Time `json:"last_failure" format:"date-time"`
	// Timestamp of the last time Cloudflare was able to successfully dispatch a
	// notification using this webhook.
	LastSuccess time.Time `json:"last_success" format:"date-time"`
	// The name of the webhook destination. This will be included in the request body
	// when you receive a webhook notification.
	Name string `json:"name"`
	// Optional secret that will be passed in the `cf-webhook-auth` header when
	// dispatching generic webhook notifications or formatted for supported
	// destinations. Secrets are not returned in any API response body.
	Secret string `json:"secret"`
	// Type of webhook endpoint.
	Type WebhooksType `json:"type"`
	// The POST endpoint to call when dispatching a notification.
	URL  string       `json:"url"`
	JSON webhooksJSON `json:"-"`
}

func (*Webhooks) UnmarshalJSON

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

type WebhooksType

type WebhooksType string

Type of webhook endpoint.

const (
	WebhooksTypeSlack   WebhooksType = "slack"
	WebhooksTypeGeneric WebhooksType = "generic"
	WebhooksTypeGchat   WebhooksType = "gchat"
)

func (WebhooksType) IsKnown

func (r WebhooksType) IsKnown() bool

Jump to

Keyboard shortcuts

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