magic_network_monitoring

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 11 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 CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

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.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

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 Advertisement struct {
	// Toggle on if you would like Cloudflare to automatically advertise the IP
	// Prefixes within the rule via Magic Transit when the rule is triggered. Only
	// available for users of Magic Transit.
	AutomaticAdvertisement bool              `json:"automatic_advertisement,required,nullable"`
	JSON                   advertisementJSON `json:"-"`
}

func (*Advertisement) UnmarshalJSON

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

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 CertificateCA added in v2.2.0

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType added in v2.2.0

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

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

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus added in v2.3.0

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type ConfigDeleteParams

type ConfigDeleteParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
}

type ConfigDeleteResponseEnvelope

type ConfigDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Configuration         `json:"result,required"`
	// Whether the API call was successful
	Success ConfigDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    configDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigDeleteResponseEnvelope) UnmarshalJSON

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

type ConfigDeleteResponseEnvelopeSuccess

type ConfigDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigDeleteResponseEnvelopeSuccessTrue ConfigDeleteResponseEnvelopeSuccess = true
)

func (ConfigDeleteResponseEnvelopeSuccess) IsKnown

type ConfigEditParams

type ConfigEditParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (ConfigEditParams) MarshalJSON

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

type ConfigEditResponseEnvelope

type ConfigEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Configuration         `json:"result,required"`
	// Whether the API call was successful
	Success ConfigEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    configEditResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigEditResponseEnvelope) UnmarshalJSON

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

type ConfigEditResponseEnvelopeSuccess

type ConfigEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigEditResponseEnvelopeSuccessTrue ConfigEditResponseEnvelopeSuccess = true
)

func (ConfigEditResponseEnvelopeSuccess) IsKnown

type ConfigFullGetParams

type ConfigFullGetParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
}

type ConfigFullGetResponseEnvelope

type ConfigFullGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Configuration         `json:"result,required"`
	// Whether the API call was successful
	Success ConfigFullGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    configFullGetResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigFullGetResponseEnvelope) UnmarshalJSON

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

type ConfigFullGetResponseEnvelopeSuccess

type ConfigFullGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigFullGetResponseEnvelopeSuccessTrue ConfigFullGetResponseEnvelopeSuccess = true
)

func (ConfigFullGetResponseEnvelopeSuccess) IsKnown

type ConfigFullService

type ConfigFullService struct {
	Options []option.RequestOption
}

ConfigFullService 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 NewConfigFullService method instead.

func NewConfigFullService

func NewConfigFullService(opts ...option.RequestOption) (r *ConfigFullService)

NewConfigFullService 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 (*ConfigFullService) Get

Lists default sampling, router IPs, and rules for account.

type ConfigGetParams

type ConfigGetParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
}

type ConfigGetResponseEnvelope

type ConfigGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Configuration         `json:"result,required"`
	// Whether the API call was successful
	Success ConfigGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    configGetResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigGetResponseEnvelope) UnmarshalJSON

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

type ConfigGetResponseEnvelopeSuccess

type ConfigGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigGetResponseEnvelopeSuccessTrue ConfigGetResponseEnvelopeSuccess = true
)

func (ConfigGetResponseEnvelopeSuccess) IsKnown

type ConfigNewParams

type ConfigNewParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (ConfigNewParams) MarshalJSON

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

type ConfigNewResponseEnvelope

type ConfigNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Configuration         `json:"result,required"`
	// Whether the API call was successful
	Success ConfigNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    configNewResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigNewResponseEnvelope) UnmarshalJSON

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

type ConfigNewResponseEnvelopeSuccess

type ConfigNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigNewResponseEnvelopeSuccessTrue ConfigNewResponseEnvelopeSuccess = true
)

func (ConfigNewResponseEnvelopeSuccess) IsKnown

type ConfigService

type ConfigService struct {
	Options []option.RequestOption
	Full    *ConfigFullService
}

ConfigService 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 NewConfigService method instead.

func NewConfigService

func NewConfigService(opts ...option.RequestOption) (r *ConfigService)

NewConfigService 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 (*ConfigService) Delete

func (r *ConfigService) Delete(ctx context.Context, body ConfigDeleteParams, opts ...option.RequestOption) (res *Configuration, err error)

Delete an existing network monitoring configuration.

func (*ConfigService) Edit

func (r *ConfigService) Edit(ctx context.Context, params ConfigEditParams, opts ...option.RequestOption) (res *Configuration, err error)

Update fields in an existing network monitoring configuration.

func (*ConfigService) Get

func (r *ConfigService) Get(ctx context.Context, query ConfigGetParams, opts ...option.RequestOption) (res *Configuration, err error)

Lists default sampling and router IPs for account.

func (*ConfigService) New

func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *Configuration, err error)

Create a new network monitoring configuration.

func (*ConfigService) Update

func (r *ConfigService) Update(ctx context.Context, params ConfigUpdateParams, opts ...option.RequestOption) (res *Configuration, err error)

Update an existing network monitoring configuration, requires the entire configuration to be updated at once.

type ConfigUpdateParams

type ConfigUpdateParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (ConfigUpdateParams) MarshalJSON

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

type ConfigUpdateResponseEnvelope

type ConfigUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Configuration         `json:"result,required"`
	// Whether the API call was successful
	Success ConfigUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    configUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigUpdateResponseEnvelope) UnmarshalJSON

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

type ConfigUpdateResponseEnvelopeSuccess

type ConfigUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigUpdateResponseEnvelopeSuccessTrue ConfigUpdateResponseEnvelopeSuccess = true
)

func (ConfigUpdateResponseEnvelopeSuccess) IsKnown

type Configuration

type Configuration struct {
	// Fallback sampling rate of flow messages being sent in packets per second. This
	// should match the packet sampling rate configured on the router.
	DefaultSampling float64 `json:"default_sampling,required"`
	// The account name.
	Name      string            `json:"name,required"`
	RouterIPs []string          `json:"router_ips,required"`
	JSON      configurationJSON `json:"-"`
}

func (*Configuration) UnmarshalJSON

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

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type MagicNetworkMonitoringRule

type MagicNetworkMonitoringRule struct {
	// Toggle on if you would like Cloudflare to automatically advertise the IP
	// Prefixes within the rule via Magic Transit when the rule is triggered. Only
	// available for users of Magic Transit.
	AutomaticAdvertisement bool `json:"automatic_advertisement,required,nullable"`
	// The amount of time that the rule threshold must be exceeded to send an alert
	// notification. The final value must be equivalent to one of the following 8
	// values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
	// AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
	// least one unit must be provided.
	Duration string `json:"duration,required"`
	// The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
	// underscore (\_), dash (-), period (.), and tilde (~). You can’t have a space in
	// the rule name. Max 256 characters.
	Name     string   `json:"name,required"`
	Prefixes []string `json:"prefixes,required"`
	// The id of the rule. Must be unique.
	ID string `json:"id"`
	// The number of bits per second for the rule. When this value is exceeded for the
	// set duration, an alert notification is sent. Minimum of 1 and no maximum.
	BandwidthThreshold float64 `json:"bandwidth_threshold"`
	// The number of packets per second for the rule. When this value is exceeded for
	// the set duration, an alert notification is sent. Minimum of 1 and no maximum.
	PacketThreshold float64                        `json:"packet_threshold"`
	JSON            magicNetworkMonitoringRuleJSON `json:"-"`
}

func (*MagicNetworkMonitoringRule) UnmarshalJSON

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

type MagicNetworkMonitoringService

type MagicNetworkMonitoringService struct {
	Options []option.RequestOption
	Configs *ConfigService
	Rules   *RuleService
}

MagicNetworkMonitoringService 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 NewMagicNetworkMonitoringService method instead.

func NewMagicNetworkMonitoringService

func NewMagicNetworkMonitoringService(opts ...option.RequestOption) (r *MagicNetworkMonitoringService)

NewMagicNetworkMonitoringService 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 MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRoleParam added in v2.1.0

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissionsParam added in v2.1.0

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberStatus added in v2.3.0

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUserParam added in v2.1.0

type MemberUserParam = shared.MemberUserParam

Details of the user associated to the membership.

This is an alias to an internal type.

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

type RuleAdvertisementEditParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (RuleAdvertisementEditParams) MarshalJSON

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

type RuleAdvertisementEditResponseEnvelope

type RuleAdvertisementEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Advertisement         `json:"result,required,nullable"`
	// Whether the API call was successful
	Success RuleAdvertisementEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleAdvertisementEditResponseEnvelopeJSON    `json:"-"`
}

func (*RuleAdvertisementEditResponseEnvelope) UnmarshalJSON

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

type RuleAdvertisementEditResponseEnvelopeSuccess

type RuleAdvertisementEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleAdvertisementEditResponseEnvelopeSuccessTrue RuleAdvertisementEditResponseEnvelopeSuccess = true
)

func (RuleAdvertisementEditResponseEnvelopeSuccess) IsKnown

type RuleAdvertisementService

type RuleAdvertisementService struct {
	Options []option.RequestOption
}

RuleAdvertisementService 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 NewRuleAdvertisementService method instead.

func NewRuleAdvertisementService

func NewRuleAdvertisementService(opts ...option.RequestOption) (r *RuleAdvertisementService)

NewRuleAdvertisementService 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 (*RuleAdvertisementService) Edit

Update advertisement for rule.

type RuleDeleteParams

type RuleDeleteParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
}

type RuleDeleteResponseEnvelope

type RuleDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors,required"`
	Messages []shared.ResponseInfo      `json:"messages,required"`
	Result   MagicNetworkMonitoringRule `json:"result,required,nullable"`
	// Whether the API call was successful
	Success RuleDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*RuleDeleteResponseEnvelope) UnmarshalJSON

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

type RuleDeleteResponseEnvelopeSuccess

type RuleDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleDeleteResponseEnvelopeSuccessTrue RuleDeleteResponseEnvelopeSuccess = true
)

func (RuleDeleteResponseEnvelopeSuccess) IsKnown

type RuleEditParams

type RuleEditParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (RuleEditParams) MarshalJSON

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

type RuleEditResponseEnvelope

type RuleEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors,required"`
	Messages []shared.ResponseInfo      `json:"messages,required"`
	Result   MagicNetworkMonitoringRule `json:"result,required,nullable"`
	// Whether the API call was successful
	Success RuleEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleEditResponseEnvelopeJSON    `json:"-"`
}

func (*RuleEditResponseEnvelope) UnmarshalJSON

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

type RuleEditResponseEnvelopeSuccess

type RuleEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleEditResponseEnvelopeSuccessTrue RuleEditResponseEnvelopeSuccess = true
)

func (RuleEditResponseEnvelopeSuccess) IsKnown

type RuleGetParams

type RuleGetParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
}

type RuleGetResponseEnvelope

type RuleGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors,required"`
	Messages []shared.ResponseInfo      `json:"messages,required"`
	Result   MagicNetworkMonitoringRule `json:"result,required,nullable"`
	// Whether the API call was successful
	Success RuleGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleGetResponseEnvelopeJSON    `json:"-"`
}

func (*RuleGetResponseEnvelope) UnmarshalJSON

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

type RuleGetResponseEnvelopeSuccess

type RuleGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleGetResponseEnvelopeSuccessTrue RuleGetResponseEnvelopeSuccess = true
)

func (RuleGetResponseEnvelopeSuccess) IsKnown

type RuleListParams

type RuleListParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
}

type RuleNewParams

type RuleNewParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (RuleNewParams) MarshalJSON

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

type RuleNewResponseEnvelope

type RuleNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors,required"`
	Messages []shared.ResponseInfo      `json:"messages,required"`
	Result   MagicNetworkMonitoringRule `json:"result,required,nullable"`
	// Whether the API call was successful
	Success RuleNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleNewResponseEnvelopeJSON    `json:"-"`
}

func (*RuleNewResponseEnvelope) UnmarshalJSON

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

type RuleNewResponseEnvelopeSuccess

type RuleNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleNewResponseEnvelopeSuccessTrue RuleNewResponseEnvelopeSuccess = true
)

func (RuleNewResponseEnvelopeSuccess) IsKnown

type RuleService

type RuleService struct {
	Options        []option.RequestOption
	Advertisements *RuleAdvertisementService
}

RuleService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRuleService method instead.

func NewRuleService

func NewRuleService(opts ...option.RequestOption) (r *RuleService)

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

func (*RuleService) Delete

func (r *RuleService) Delete(ctx context.Context, ruleID string, body RuleDeleteParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)

Delete a network monitoring rule for account.

func (*RuleService) Edit

func (r *RuleService) Edit(ctx context.Context, ruleID string, params RuleEditParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)

Update a network monitoring rule for account.

func (*RuleService) Get

func (r *RuleService) Get(ctx context.Context, ruleID string, query RuleGetParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)

List a single network monitoring rule for account.

func (*RuleService) List

Lists network monitoring rules for account.

func (*RuleService) ListAutoPaging

Lists network monitoring rules for account.

func (*RuleService) New

Create network monitoring rules for account. Currently only supports creating a single rule per API request.

func (*RuleService) Update

Update network monitoring rules for account.

type RuleUpdateParams

type RuleUpdateParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (RuleUpdateParams) MarshalJSON

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

type RuleUpdateResponseEnvelope

type RuleUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors,required"`
	Messages []shared.ResponseInfo      `json:"messages,required"`
	Result   MagicNetworkMonitoringRule `json:"result,required,nullable"`
	// Whether the API call was successful
	Success RuleUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*RuleUpdateResponseEnvelope) UnmarshalJSON

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

type RuleUpdateResponseEnvelopeSuccess

type RuleUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleUpdateResponseEnvelopeSuccessTrue RuleUpdateResponseEnvelopeSuccess = true
)

func (RuleUpdateResponseEnvelopeSuccess) IsKnown

type SortDirection added in v2.2.0

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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