Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type Advertisement
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type ConfigDeleteParams
- type ConfigDeleteResponseEnvelope
- type ConfigDeleteResponseEnvelopeSuccess
- type ConfigEditParams
- type ConfigEditParamsWARPDevice
- type ConfigEditResponseEnvelope
- type ConfigEditResponseEnvelopeSuccess
- type ConfigFullGetParams
- type ConfigFullGetResponseEnvelope
- type ConfigFullGetResponseEnvelopeSuccess
- type ConfigFullService
- type ConfigGetParams
- type ConfigGetResponseEnvelope
- type ConfigGetResponseEnvelopeSuccess
- type ConfigNewParams
- type ConfigNewParamsWARPDevice
- type ConfigNewResponseEnvelope
- type ConfigNewResponseEnvelopeSuccess
- type ConfigService
- func (r *ConfigService) Delete(ctx context.Context, body ConfigDeleteParams, opts ...option.RequestOption) (res *Configuration, err error)
- func (r *ConfigService) Edit(ctx context.Context, params ConfigEditParams, opts ...option.RequestOption) (res *Configuration, err error)
- func (r *ConfigService) Get(ctx context.Context, query ConfigGetParams, opts ...option.RequestOption) (res *Configuration, err error)
- func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *Configuration, err error)
- func (r *ConfigService) Update(ctx context.Context, params ConfigUpdateParams, opts ...option.RequestOption) (res *Configuration, err error)
- type ConfigUpdateParams
- type ConfigUpdateParamsWARPDevice
- type ConfigUpdateResponseEnvelope
- type ConfigUpdateResponseEnvelopeSuccess
- type Configuration
- type ConfigurationWARPDevice
- type Error
- type ErrorData
- type MagicNetworkMonitoringRule
- type MagicNetworkMonitoringService
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanParam
- type ResponseInfo
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type RuleAdvertisementEditParams
- type RuleAdvertisementEditResponseEnvelope
- type RuleAdvertisementEditResponseEnvelopeSuccess
- type RuleAdvertisementService
- type RuleDeleteParams
- type RuleDeleteResponseEnvelope
- type RuleDeleteResponseEnvelopeSuccess
- type RuleEditParams
- type RuleEditResponseEnvelope
- type RuleEditResponseEnvelopeSuccess
- type RuleGetParams
- type RuleGetResponseEnvelope
- type RuleGetResponseEnvelopeSuccess
- type RuleListParams
- type RuleNewParams
- type RuleNewResponseEnvelope
- type RuleNewResponseEnvelopeSuccess
- type RuleService
- func (r *RuleService) Delete(ctx context.Context, ruleID string, body RuleDeleteParams, ...) (res *MagicNetworkMonitoringRule, err error)
- func (r *RuleService) Edit(ctx context.Context, ruleID string, params RuleEditParams, ...) (res *MagicNetworkMonitoringRule, err error)
- func (r *RuleService) Get(ctx context.Context, ruleID string, query RuleGetParams, ...) (res *MagicNetworkMonitoringRule, err error)
- func (r *RuleService) List(ctx context.Context, query RuleListParams, opts ...option.RequestOption) (res *pagination.SinglePage[MagicNetworkMonitoringRule], err error)
- func (r *RuleService) ListAutoPaging(ctx context.Context, query RuleListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[MagicNetworkMonitoringRule]
- func (r *RuleService) New(ctx context.Context, params RuleNewParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
- func (r *RuleService) Update(ctx context.Context, params RuleUpdateParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
- type RuleUpdateParams
- type RuleUpdateResponseEnvelope
- type RuleUpdateResponseEnvelopeSuccess
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenStatus
- type TokenValue
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advertisement ¶
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 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 ¶
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type ConfigDeleteParams ¶
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 ¶
func (r ConfigDeleteResponseEnvelopeSuccess) IsKnown() bool
type ConfigEditParams ¶
type ConfigEditParams struct { AccountID param.Field[string] `path:"account_id,required"` // Fallback sampling rate of flow messages being sent in packets per second. This // should match the packet sampling rate configured on the router. DefaultSampling param.Field[float64] `json:"default_sampling"` // The account name. Name param.Field[string] `json:"name"` RouterIPs param.Field[[]string] `json:"router_ips"` WARPDevices param.Field[[]ConfigEditParamsWARPDevice] `json:"warp_devices"` }
func (ConfigEditParams) MarshalJSON ¶
func (r ConfigEditParams) MarshalJSON() (data []byte, err error)
type ConfigEditParamsWARPDevice ¶
type ConfigEditParamsWARPDevice struct { // Unique identifier for the warp device. ID param.Field[string] `json:"id,required"` // Name of the warp device. Name param.Field[string] `json:"name,required"` // IPv4 CIDR of the router sourcing flow data associated with this warp device. // Only /32 addresses are currently supported. RouterIP param.Field[string] `json:"router_ip,required"` }
Object representing a warp device with an ID and name.
func (ConfigEditParamsWARPDevice) MarshalJSON ¶
func (r ConfigEditParamsWARPDevice) 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 ¶
func (r ConfigEditResponseEnvelopeSuccess) IsKnown() bool
type ConfigFullGetParams ¶
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 ¶
func (r ConfigFullGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *ConfigFullService) Get(ctx context.Context, query ConfigFullGetParams, opts ...option.RequestOption) (res *Configuration, err error)
Lists default sampling, router IPs, warp devices, and rules for account.
type ConfigGetParams ¶
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 ¶
func (r ConfigGetResponseEnvelopeSuccess) IsKnown() bool
type ConfigNewParams ¶
type ConfigNewParams struct { AccountID param.Field[string] `path:"account_id,required"` // Fallback sampling rate of flow messages being sent in packets per second. This // should match the packet sampling rate configured on the router. DefaultSampling param.Field[float64] `json:"default_sampling,required"` // The account name. Name param.Field[string] `json:"name,required"` RouterIPs param.Field[[]string] `json:"router_ips"` WARPDevices param.Field[[]ConfigNewParamsWARPDevice] `json:"warp_devices"` }
func (ConfigNewParams) MarshalJSON ¶
func (r ConfigNewParams) MarshalJSON() (data []byte, err error)
type ConfigNewParamsWARPDevice ¶
type ConfigNewParamsWARPDevice struct { // Unique identifier for the warp device. ID param.Field[string] `json:"id,required"` // Name of the warp device. Name param.Field[string] `json:"name,required"` // IPv4 CIDR of the router sourcing flow data associated with this warp device. // Only /32 addresses are currently supported. RouterIP param.Field[string] `json:"router_ip,required"` }
Object representing a warp device with an ID and name.
func (ConfigNewParamsWARPDevice) MarshalJSON ¶
func (r ConfigNewParamsWARPDevice) 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 ¶
func (r ConfigNewResponseEnvelopeSuccess) IsKnown() bool
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, router IPs and warp devices 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"` // Fallback sampling rate of flow messages being sent in packets per second. This // should match the packet sampling rate configured on the router. DefaultSampling param.Field[float64] `json:"default_sampling,required"` // The account name. Name param.Field[string] `json:"name,required"` RouterIPs param.Field[[]string] `json:"router_ips"` WARPDevices param.Field[[]ConfigUpdateParamsWARPDevice] `json:"warp_devices"` }
func (ConfigUpdateParams) MarshalJSON ¶
func (r ConfigUpdateParams) MarshalJSON() (data []byte, err error)
type ConfigUpdateParamsWARPDevice ¶
type ConfigUpdateParamsWARPDevice struct { // Unique identifier for the warp device. ID param.Field[string] `json:"id,required"` // Name of the warp device. Name param.Field[string] `json:"name,required"` // IPv4 CIDR of the router sourcing flow data associated with this warp device. // Only /32 addresses are currently supported. RouterIP param.Field[string] `json:"router_ip,required"` }
Object representing a warp device with an ID and name.
func (ConfigUpdateParamsWARPDevice) MarshalJSON ¶
func (r ConfigUpdateParamsWARPDevice) 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 ¶
func (r ConfigUpdateResponseEnvelopeSuccess) IsKnown() bool
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"` WARPDevices []ConfigurationWARPDevice `json:"warp_devices,required"` JSON configurationJSON `json:"-"` }
func (*Configuration) UnmarshalJSON ¶
func (r *Configuration) UnmarshalJSON(data []byte) (err error)
type ConfigurationWARPDevice ¶
type ConfigurationWARPDevice struct { // Unique identifier for the warp device. ID string `json:"id,required"` // Name of the warp device. Name string `json:"name,required"` // IPv4 CIDR of the router sourcing flow data associated with this warp device. // Only /32 addresses are currently supported. RouterIP string `json:"router_ip,required"` JSON configurationWARPDeviceJSON `json:"-"` }
Object representing a warp device with an ID and name.
func (*ConfigurationWARPDevice) UnmarshalJSON ¶
func (r *ConfigurationWARPDevice) UnmarshalJSON(data []byte) (err error)
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 MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
A scope is a combination of scope objects which provides additional context.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScopeObject ¶
type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject
A scope object represents any resource that can have actions applied against invite.
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUser ¶
type MemberUser = shared.MemberUser
Details of the user associated to the membership.
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 RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
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 ¶
func (r RuleAdvertisementEditResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *RuleAdvertisementService) Edit(ctx context.Context, ruleID string, params RuleAdvertisementEditParams, opts ...option.RequestOption) (res *Advertisement, err error)
Update advertisement for rule.
type RuleDeleteParams ¶
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 ¶
func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type RuleEditParams ¶
type RuleEditParams struct { AccountID param.Field[string] `path:"account_id,required"` // 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 param.Field[bool] `json:"automatic_advertisement"` // 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. Bandwidth param.Field[float64] `json:"bandwidth"` // 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 param.Field[string] `json:"duration"` // 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 param.Field[string] `json:"name"` // 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 param.Field[float64] `json:"packet_threshold"` Prefixes param.Field[[]string] `json:"prefixes"` }
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 ¶
func (r RuleEditResponseEnvelopeSuccess) IsKnown() bool
type RuleGetParams ¶
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 ¶
func (r RuleGetResponseEnvelopeSuccess) IsKnown() bool
type RuleListParams ¶
type RuleNewParams ¶
type RuleNewParams struct { AccountID param.Field[string] `path:"account_id,required"` // 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 param.Field[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 param.Field[string] `json:"name,required"` // 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 param.Field[bool] `json:"automatic_advertisement"` // 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. Bandwidth param.Field[float64] `json:"bandwidth"` // 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 param.Field[float64] `json:"packet_threshold"` Prefixes param.Field[[]string] `json:"prefixes"` }
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 ¶
func (r RuleNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *RuleService) List(ctx context.Context, query RuleListParams, opts ...option.RequestOption) (res *pagination.SinglePage[MagicNetworkMonitoringRule], err error)
Lists network monitoring rules for account.
func (*RuleService) ListAutoPaging ¶
func (r *RuleService) ListAutoPaging(ctx context.Context, query RuleListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[MagicNetworkMonitoringRule]
Lists network monitoring rules for account.
func (*RuleService) New ¶
func (r *RuleService) New(ctx context.Context, params RuleNewParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
Create network monitoring rules for account. Currently only supports creating a single rule per API request.
func (*RuleService) Update ¶
func (r *RuleService) Update(ctx context.Context, params RuleUpdateParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
Update network monitoring rules for account.
type RuleUpdateParams ¶
type RuleUpdateParams struct { AccountID param.Field[string] `path:"account_id,required"` // 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 param.Field[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 param.Field[string] `json:"name,required"` // The id of the rule. Must be unique. ID param.Field[string] `json:"id"` // 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 param.Field[bool] `json:"automatic_advertisement"` // 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. Bandwidth param.Field[float64] `json:"bandwidth"` // 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 param.Field[float64] `json:"packet_threshold"` Prefixes param.Field[[]string] `json:"prefixes"` }
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 ¶
func (r RuleUpdateResponseEnvelopeSuccess) IsKnown() bool
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.