dns_firewall

package
v0.0.0-...-c5310a0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 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 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 CertificateCASSLCom = shared.CertificateCASSLCom

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 MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

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.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AnalyticsReportBytimeGetParams

type AnalyticsReportBytimeGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// A comma-separated list of dimensions to group results by.
	Dimensions param.Field[string] `query:"dimensions"`
	// Segmentation filter in 'attribute operator value' format.
	Filters param.Field[string] `query:"filters"`
	// Limit number of returned metrics.
	Limit param.Field[int64] `query:"limit"`
	// A comma-separated list of metrics to query.
	Metrics param.Field[string] `query:"metrics"`
	// Start date and time of requesting data period in ISO 8601 format.
	Since param.Field[time.Time] `query:"since" format:"date-time"`
	// A comma-separated list of dimensions to sort by, where each dimension may be
	// prefixed by - (descending) or + (ascending).
	Sort param.Field[string] `query:"sort"`
	// Unit of time to group data by.
	TimeDelta param.Field[AnalyticsReportBytimeGetParamsTimeDelta] `query:"time_delta"`
	// End date and time of requesting data period in ISO 8601 format.
	Until param.Field[time.Time] `query:"until" format:"date-time"`
}

func (AnalyticsReportBytimeGetParams) URLQuery

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

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

type AnalyticsReportBytimeGetParamsTimeDelta

type AnalyticsReportBytimeGetParamsTimeDelta string

Unit of time to group data by.

const (
	AnalyticsReportBytimeGetParamsTimeDeltaAll        AnalyticsReportBytimeGetParamsTimeDelta = "all"
	AnalyticsReportBytimeGetParamsTimeDeltaAuto       AnalyticsReportBytimeGetParamsTimeDelta = "auto"
	AnalyticsReportBytimeGetParamsTimeDeltaYear       AnalyticsReportBytimeGetParamsTimeDelta = "year"
	AnalyticsReportBytimeGetParamsTimeDeltaQuarter    AnalyticsReportBytimeGetParamsTimeDelta = "quarter"
	AnalyticsReportBytimeGetParamsTimeDeltaMonth      AnalyticsReportBytimeGetParamsTimeDelta = "month"
	AnalyticsReportBytimeGetParamsTimeDeltaWeek       AnalyticsReportBytimeGetParamsTimeDelta = "week"
	AnalyticsReportBytimeGetParamsTimeDeltaDay        AnalyticsReportBytimeGetParamsTimeDelta = "day"
	AnalyticsReportBytimeGetParamsTimeDeltaHour       AnalyticsReportBytimeGetParamsTimeDelta = "hour"
	AnalyticsReportBytimeGetParamsTimeDeltaDekaminute AnalyticsReportBytimeGetParamsTimeDelta = "dekaminute"
	AnalyticsReportBytimeGetParamsTimeDeltaMinute     AnalyticsReportBytimeGetParamsTimeDelta = "minute"
)

func (AnalyticsReportBytimeGetParamsTimeDelta) IsKnown

type AnalyticsReportBytimeGetResponseEnvelope

type AnalyticsReportBytimeGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success AnalyticsReportBytimeGetResponseEnvelopeSuccess `json:"success,required"`
	Result  dns.ByTime                                      `json:"result"`
	JSON    analyticsReportBytimeGetResponseEnvelopeJSON    `json:"-"`
}

func (*AnalyticsReportBytimeGetResponseEnvelope) UnmarshalJSON

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

type AnalyticsReportBytimeGetResponseEnvelopeSuccess

type AnalyticsReportBytimeGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AnalyticsReportBytimeGetResponseEnvelopeSuccessTrue AnalyticsReportBytimeGetResponseEnvelopeSuccess = true
)

func (AnalyticsReportBytimeGetResponseEnvelopeSuccess) IsKnown

type AnalyticsReportBytimeService

type AnalyticsReportBytimeService struct {
	Options []option.RequestOption
}

AnalyticsReportBytimeService 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 NewAnalyticsReportBytimeService method instead.

func NewAnalyticsReportBytimeService

func NewAnalyticsReportBytimeService(opts ...option.RequestOption) (r *AnalyticsReportBytimeService)

NewAnalyticsReportBytimeService 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 (*AnalyticsReportBytimeService) Get

func (r *AnalyticsReportBytimeService) Get(ctx context.Context, dnsFirewallID string, params AnalyticsReportBytimeGetParams, opts ...option.RequestOption) (res *dns.ByTime, err error)

Retrieves a list of aggregate metrics grouped by time interval.

See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters.

type AnalyticsReportGetParams

type AnalyticsReportGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// A comma-separated list of dimensions to group results by.
	Dimensions param.Field[string] `query:"dimensions"`
	// Segmentation filter in 'attribute operator value' format.
	Filters param.Field[string] `query:"filters"`
	// Limit number of returned metrics.
	Limit param.Field[int64] `query:"limit"`
	// A comma-separated list of metrics to query.
	Metrics param.Field[string] `query:"metrics"`
	// Start date and time of requesting data period in ISO 8601 format.
	Since param.Field[time.Time] `query:"since" format:"date-time"`
	// A comma-separated list of dimensions to sort by, where each dimension may be
	// prefixed by - (descending) or + (ascending).
	Sort param.Field[string] `query:"sort"`
	// End date and time of requesting data period in ISO 8601 format.
	Until param.Field[time.Time] `query:"until" format:"date-time"`
}

func (AnalyticsReportGetParams) URLQuery

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

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

type AnalyticsReportGetResponseEnvelope

type AnalyticsReportGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success AnalyticsReportGetResponseEnvelopeSuccess `json:"success,required"`
	Result  dns.Report                                `json:"result"`
	JSON    analyticsReportGetResponseEnvelopeJSON    `json:"-"`
}

func (*AnalyticsReportGetResponseEnvelope) UnmarshalJSON

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

type AnalyticsReportGetResponseEnvelopeSuccess

type AnalyticsReportGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AnalyticsReportGetResponseEnvelopeSuccessTrue AnalyticsReportGetResponseEnvelopeSuccess = true
)

func (AnalyticsReportGetResponseEnvelopeSuccess) IsKnown

type AnalyticsReportService

type AnalyticsReportService struct {
	Options []option.RequestOption
	Bytimes *AnalyticsReportBytimeService
}

AnalyticsReportService 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 NewAnalyticsReportService method instead.

func NewAnalyticsReportService

func NewAnalyticsReportService(opts ...option.RequestOption) (r *AnalyticsReportService)

NewAnalyticsReportService 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 (*AnalyticsReportService) Get

func (r *AnalyticsReportService) Get(ctx context.Context, dnsFirewallID string, params AnalyticsReportGetParams, opts ...option.RequestOption) (res *dns.Report, err error)

Retrieves a list of summarised aggregate metrics over a given time period.

See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters.

type AnalyticsService

type AnalyticsService struct {
	Options []option.RequestOption
	Reports *AnalyticsReportService
}

AnalyticsService 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 NewAnalyticsService method instead.

func NewAnalyticsService

func NewAnalyticsService(opts ...option.RequestOption) (r *AnalyticsService)

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

type AttackMitigation struct {
	// When enabled, automatically mitigate random-prefix attacks to protect upstream
	// DNS servers
	Enabled bool `json:"enabled"`
	// Only mitigate attacks when upstream servers seem unhealthy
	OnlyWhenUpstreamUnhealthy bool                 `json:"only_when_upstream_unhealthy"`
	JSON                      attackMitigationJSON `json:"-"`
}

Attack mitigation settings

func (*AttackMitigation) UnmarshalJSON

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

type AttackMitigationParam

type AttackMitigationParam struct {
	// When enabled, automatically mitigate random-prefix attacks to protect upstream
	// DNS servers
	Enabled param.Field[bool] `json:"enabled"`
	// Only mitigate attacks when upstream servers seem unhealthy
	OnlyWhenUpstreamUnhealthy param.Field[bool] `json:"only_when_upstream_unhealthy"`
}

Attack mitigation settings

func (AttackMitigationParam) MarshalJSON

func (r AttackMitigationParam) MarshalJSON() (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

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 DNSFirewallDeleteParams

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

type DNSFirewallDeleteResponse

type DNSFirewallDeleteResponse struct {
	// Identifier
	ID   string                        `json:"id"`
	JSON dnsFirewallDeleteResponseJSON `json:"-"`
}

func (*DNSFirewallDeleteResponse) UnmarshalJSON

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

type DNSFirewallDeleteResponseEnvelope

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

func (*DNSFirewallDeleteResponseEnvelope) UnmarshalJSON

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

type DNSFirewallDeleteResponseEnvelopeSuccess

type DNSFirewallDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DNSFirewallDeleteResponseEnvelopeSuccessTrue DNSFirewallDeleteResponseEnvelopeSuccess = true
)

func (DNSFirewallDeleteResponseEnvelopeSuccess) IsKnown

type DNSFirewallEditParams

type DNSFirewallEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Attack mitigation settings
	AttackMitigation param.Field[AttackMitigationParam] `json:"attack_mitigation"`
	// Whether to refuse to answer queries for the ANY type
	DeprecateAnyRequests param.Field[bool] `json:"deprecate_any_requests"`
	// Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
	ECSFallback param.Field[bool] `json:"ecs_fallback"`
	// Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Higher TTLs will be
	// decreased to the maximum defined here for caching purposes.
	MaximumCacheTTL param.Field[float64] `json:"maximum_cache_ttl"`
	// Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Lower TTLs will be
	// increased to the minimum defined here for caching purposes.
	MinimumCacheTTL param.Field[float64] `json:"minimum_cache_ttl"`
	// DNS Firewall cluster name
	Name param.Field[string] `json:"name"`
	// Negative DNS cache TTL This setting controls how long DNS Firewall should cache
	// negative responses (e.g., NXDOMAIN) from the upstream servers.
	NegativeCacheTTL param.Field[float64] `json:"negative_cache_ttl"`
	// Ratelimit in queries per second per datacenter (applies to DNS queries sent to
	// the upstream nameservers configured on the cluster)
	Ratelimit param.Field[float64] `json:"ratelimit"`
	// Number of retries for fetching DNS responses from upstream nameservers (not
	// counting the initial attempt)
	Retries     param.Field[float64]            `json:"retries"`
	UpstreamIPs param.Field[[]UpstreamIPsParam] `json:"upstream_ips" format:"ipv4"`
}

func (DNSFirewallEditParams) MarshalJSON

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

type DNSFirewallEditResponse

type DNSFirewallEditResponse struct {
	// Identifier
	ID string `json:"id,required"`
	// Whether to refuse to answer queries for the ANY type
	DeprecateAnyRequests bool          `json:"deprecate_any_requests,required"`
	DNSFirewallIPs       []FirewallIPs `json:"dns_firewall_ips,required" format:"ipv4"`
	// Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
	ECSFallback bool `json:"ecs_fallback,required"`
	// Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Higher TTLs will be
	// decreased to the maximum defined here for caching purposes.
	MaximumCacheTTL float64 `json:"maximum_cache_ttl,required"`
	// Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Lower TTLs will be
	// increased to the minimum defined here for caching purposes.
	MinimumCacheTTL float64 `json:"minimum_cache_ttl,required"`
	// Last modification of DNS Firewall cluster
	ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
	// DNS Firewall cluster name
	Name string `json:"name,required"`
	// Negative DNS cache TTL This setting controls how long DNS Firewall should cache
	// negative responses (e.g., NXDOMAIN) from the upstream servers.
	NegativeCacheTTL float64 `json:"negative_cache_ttl,required,nullable"`
	// Ratelimit in queries per second per datacenter (applies to DNS queries sent to
	// the upstream nameservers configured on the cluster)
	Ratelimit float64 `json:"ratelimit,required,nullable"`
	// Number of retries for fetching DNS responses from upstream nameservers (not
	// counting the initial attempt)
	Retries     float64       `json:"retries,required"`
	UpstreamIPs []UpstreamIPs `json:"upstream_ips,required" format:"ipv4"`
	// Attack mitigation settings
	AttackMitigation AttackMitigation            `json:"attack_mitigation,nullable"`
	JSON             dnsFirewallEditResponseJSON `json:"-"`
}

func (*DNSFirewallEditResponse) UnmarshalJSON

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

type DNSFirewallEditResponseEnvelope

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

func (*DNSFirewallEditResponseEnvelope) UnmarshalJSON

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

type DNSFirewallEditResponseEnvelopeSuccess

type DNSFirewallEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DNSFirewallEditResponseEnvelopeSuccessTrue DNSFirewallEditResponseEnvelopeSuccess = true
)

func (DNSFirewallEditResponseEnvelopeSuccess) IsKnown

type DNSFirewallGetParams

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

type DNSFirewallGetResponse

type DNSFirewallGetResponse struct {
	// Identifier
	ID string `json:"id,required"`
	// Whether to refuse to answer queries for the ANY type
	DeprecateAnyRequests bool          `json:"deprecate_any_requests,required"`
	DNSFirewallIPs       []FirewallIPs `json:"dns_firewall_ips,required" format:"ipv4"`
	// Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
	ECSFallback bool `json:"ecs_fallback,required"`
	// Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Higher TTLs will be
	// decreased to the maximum defined here for caching purposes.
	MaximumCacheTTL float64 `json:"maximum_cache_ttl,required"`
	// Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Lower TTLs will be
	// increased to the minimum defined here for caching purposes.
	MinimumCacheTTL float64 `json:"minimum_cache_ttl,required"`
	// Last modification of DNS Firewall cluster
	ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
	// DNS Firewall cluster name
	Name string `json:"name,required"`
	// Negative DNS cache TTL This setting controls how long DNS Firewall should cache
	// negative responses (e.g., NXDOMAIN) from the upstream servers.
	NegativeCacheTTL float64 `json:"negative_cache_ttl,required,nullable"`
	// Ratelimit in queries per second per datacenter (applies to DNS queries sent to
	// the upstream nameservers configured on the cluster)
	Ratelimit float64 `json:"ratelimit,required,nullable"`
	// Number of retries for fetching DNS responses from upstream nameservers (not
	// counting the initial attempt)
	Retries     float64       `json:"retries,required"`
	UpstreamIPs []UpstreamIPs `json:"upstream_ips,required" format:"ipv4"`
	// Attack mitigation settings
	AttackMitigation AttackMitigation           `json:"attack_mitigation,nullable"`
	JSON             dnsFirewallGetResponseJSON `json:"-"`
}

func (*DNSFirewallGetResponse) UnmarshalJSON

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

type DNSFirewallGetResponseEnvelope

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

func (*DNSFirewallGetResponseEnvelope) UnmarshalJSON

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

type DNSFirewallGetResponseEnvelopeSuccess

type DNSFirewallGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DNSFirewallGetResponseEnvelopeSuccessTrue DNSFirewallGetResponseEnvelopeSuccess = true
)

func (DNSFirewallGetResponseEnvelopeSuccess) IsKnown

type DNSFirewallListParams

type DNSFirewallListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Page number of paginated results
	Page param.Field[float64] `query:"page"`
	// Number of clusters per page
	PerPage param.Field[float64] `query:"per_page"`
}

func (DNSFirewallListParams) URLQuery

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

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

type DNSFirewallListResponse

type DNSFirewallListResponse struct {
	// Identifier
	ID string `json:"id,required"`
	// Whether to refuse to answer queries for the ANY type
	DeprecateAnyRequests bool          `json:"deprecate_any_requests,required"`
	DNSFirewallIPs       []FirewallIPs `json:"dns_firewall_ips,required" format:"ipv4"`
	// Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
	ECSFallback bool `json:"ecs_fallback,required"`
	// Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Higher TTLs will be
	// decreased to the maximum defined here for caching purposes.
	MaximumCacheTTL float64 `json:"maximum_cache_ttl,required"`
	// Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Lower TTLs will be
	// increased to the minimum defined here for caching purposes.
	MinimumCacheTTL float64 `json:"minimum_cache_ttl,required"`
	// Last modification of DNS Firewall cluster
	ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
	// DNS Firewall cluster name
	Name string `json:"name,required"`
	// Negative DNS cache TTL This setting controls how long DNS Firewall should cache
	// negative responses (e.g., NXDOMAIN) from the upstream servers.
	NegativeCacheTTL float64 `json:"negative_cache_ttl,required,nullable"`
	// Ratelimit in queries per second per datacenter (applies to DNS queries sent to
	// the upstream nameservers configured on the cluster)
	Ratelimit float64 `json:"ratelimit,required,nullable"`
	// Number of retries for fetching DNS responses from upstream nameservers (not
	// counting the initial attempt)
	Retries     float64       `json:"retries,required"`
	UpstreamIPs []UpstreamIPs `json:"upstream_ips,required" format:"ipv4"`
	// Attack mitigation settings
	AttackMitigation AttackMitigation            `json:"attack_mitigation,nullable"`
	JSON             dnsFirewallListResponseJSON `json:"-"`
}

func (*DNSFirewallListResponse) UnmarshalJSON

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

type DNSFirewallNewParams

type DNSFirewallNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// DNS Firewall cluster name
	Name        param.Field[string]             `json:"name,required"`
	UpstreamIPs param.Field[[]UpstreamIPsParam] `json:"upstream_ips,required" format:"ipv4"`
	// Attack mitigation settings
	AttackMitigation param.Field[AttackMitigationParam] `json:"attack_mitigation"`
	// Whether to refuse to answer queries for the ANY type
	DeprecateAnyRequests param.Field[bool] `json:"deprecate_any_requests"`
	// Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
	ECSFallback param.Field[bool] `json:"ecs_fallback"`
	// Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Higher TTLs will be
	// decreased to the maximum defined here for caching purposes.
	MaximumCacheTTL param.Field[float64] `json:"maximum_cache_ttl"`
	// Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Lower TTLs will be
	// increased to the minimum defined here for caching purposes.
	MinimumCacheTTL param.Field[float64] `json:"minimum_cache_ttl"`
	// Negative DNS cache TTL This setting controls how long DNS Firewall should cache
	// negative responses (e.g., NXDOMAIN) from the upstream servers.
	NegativeCacheTTL param.Field[float64] `json:"negative_cache_ttl"`
	// Ratelimit in queries per second per datacenter (applies to DNS queries sent to
	// the upstream nameservers configured on the cluster)
	Ratelimit param.Field[float64] `json:"ratelimit"`
	// Number of retries for fetching DNS responses from upstream nameservers (not
	// counting the initial attempt)
	Retries param.Field[float64] `json:"retries"`
}

func (DNSFirewallNewParams) MarshalJSON

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

type DNSFirewallNewResponse

type DNSFirewallNewResponse struct {
	// Identifier
	ID string `json:"id,required"`
	// Whether to refuse to answer queries for the ANY type
	DeprecateAnyRequests bool          `json:"deprecate_any_requests,required"`
	DNSFirewallIPs       []FirewallIPs `json:"dns_firewall_ips,required" format:"ipv4"`
	// Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent
	ECSFallback bool `json:"ecs_fallback,required"`
	// Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Higher TTLs will be
	// decreased to the maximum defined here for caching purposes.
	MaximumCacheTTL float64 `json:"maximum_cache_ttl,required"`
	// Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes
	// of caching between DNS Firewall and the upstream servers. Lower TTLs will be
	// increased to the minimum defined here for caching purposes.
	MinimumCacheTTL float64 `json:"minimum_cache_ttl,required"`
	// Last modification of DNS Firewall cluster
	ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
	// DNS Firewall cluster name
	Name string `json:"name,required"`
	// Negative DNS cache TTL This setting controls how long DNS Firewall should cache
	// negative responses (e.g., NXDOMAIN) from the upstream servers.
	NegativeCacheTTL float64 `json:"negative_cache_ttl,required,nullable"`
	// Ratelimit in queries per second per datacenter (applies to DNS queries sent to
	// the upstream nameservers configured on the cluster)
	Ratelimit float64 `json:"ratelimit,required,nullable"`
	// Number of retries for fetching DNS responses from upstream nameservers (not
	// counting the initial attempt)
	Retries     float64       `json:"retries,required"`
	UpstreamIPs []UpstreamIPs `json:"upstream_ips,required" format:"ipv4"`
	// Attack mitigation settings
	AttackMitigation AttackMitigation           `json:"attack_mitigation,nullable"`
	JSON             dnsFirewallNewResponseJSON `json:"-"`
}

func (*DNSFirewallNewResponse) UnmarshalJSON

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

type DNSFirewallNewResponseEnvelope

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

func (*DNSFirewallNewResponseEnvelope) UnmarshalJSON

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

type DNSFirewallNewResponseEnvelopeSuccess

type DNSFirewallNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DNSFirewallNewResponseEnvelopeSuccessTrue DNSFirewallNewResponseEnvelopeSuccess = true
)

func (DNSFirewallNewResponseEnvelopeSuccess) IsKnown

type DNSFirewallService

type DNSFirewallService struct {
	Options    []option.RequestOption
	Analytics  *AnalyticsService
	ReverseDNS *ReverseDNSService
}

DNSFirewallService 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 NewDNSFirewallService method instead.

func NewDNSFirewallService

func NewDNSFirewallService(opts ...option.RequestOption) (r *DNSFirewallService)

NewDNSFirewallService 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 (*DNSFirewallService) Delete

func (r *DNSFirewallService) Delete(ctx context.Context, dnsFirewallID string, body DNSFirewallDeleteParams, opts ...option.RequestOption) (res *DNSFirewallDeleteResponse, err error)

Delete a DNS Firewall cluster

func (*DNSFirewallService) Edit

func (r *DNSFirewallService) Edit(ctx context.Context, dnsFirewallID string, params DNSFirewallEditParams, opts ...option.RequestOption) (res *DNSFirewallEditResponse, err error)

Modify the configuration of a DNS Firewall cluster

func (*DNSFirewallService) Get

func (r *DNSFirewallService) Get(ctx context.Context, dnsFirewallID string, query DNSFirewallGetParams, opts ...option.RequestOption) (res *DNSFirewallGetResponse, err error)

Show a single DNS Firewall cluster for an account

func (*DNSFirewallService) List

List DNS Firewall clusters for an account

func (*DNSFirewallService) ListAutoPaging

List DNS Firewall clusters for an account

func (*DNSFirewallService) New

Create a DNS Firewall cluster

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type FirewallIPs

type FirewallIPs = string

type Member

type Member = shared.Member

This is an alias to an internal type.

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 MemberPolicy

type MemberPolicy = shared.MemberPolicy

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

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

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 ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ReverseDNSEditParams

type ReverseDNSEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Map of cluster IP addresses to PTR record contents
	PTR param.Field[map[string]string] `json:"ptr"`
}

func (ReverseDNSEditParams) MarshalJSON

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

type ReverseDNSEditResponse

type ReverseDNSEditResponse struct {
	// Map of cluster IP addresses to PTR record contents
	PTR  map[string]string          `json:"ptr,required"`
	JSON reverseDNSEditResponseJSON `json:"-"`
}

func (*ReverseDNSEditResponse) UnmarshalJSON

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

type ReverseDNSEditResponseEnvelope

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

func (*ReverseDNSEditResponseEnvelope) UnmarshalJSON

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

type ReverseDNSEditResponseEnvelopeSuccess

type ReverseDNSEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ReverseDNSEditResponseEnvelopeSuccessTrue ReverseDNSEditResponseEnvelopeSuccess = true
)

func (ReverseDNSEditResponseEnvelopeSuccess) IsKnown

type ReverseDNSGetParams

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

type ReverseDNSGetResponse

type ReverseDNSGetResponse struct {
	// Map of cluster IP addresses to PTR record contents
	PTR  map[string]string         `json:"ptr,required"`
	JSON reverseDNSGetResponseJSON `json:"-"`
}

func (*ReverseDNSGetResponse) UnmarshalJSON

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

type ReverseDNSGetResponseEnvelope

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

func (*ReverseDNSGetResponseEnvelope) UnmarshalJSON

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

type ReverseDNSGetResponseEnvelopeSuccess

type ReverseDNSGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ReverseDNSGetResponseEnvelopeSuccessTrue ReverseDNSGetResponseEnvelopeSuccess = true
)

func (ReverseDNSGetResponseEnvelopeSuccess) IsKnown

type ReverseDNSService

type ReverseDNSService struct {
	Options []option.RequestOption
}

ReverseDNSService 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 NewReverseDNSService method instead.

func NewReverseDNSService

func NewReverseDNSService(opts ...option.RequestOption) (r *ReverseDNSService)

NewReverseDNSService 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 (*ReverseDNSService) Edit

func (r *ReverseDNSService) Edit(ctx context.Context, dnsFirewallID string, params ReverseDNSEditParams, opts ...option.RequestOption) (res *ReverseDNSEditResponse, err error)

Update reverse DNS configuration (PTR records) for a DNS Firewall cluster

func (*ReverseDNSService) Get

func (r *ReverseDNSService) Get(ctx context.Context, dnsFirewallID string, query ReverseDNSGetParams, opts ...option.RequestOption) (res *ReverseDNSGetResponse, err error)

Show reverse DNS configuration (PTR records) for a DNS Firewall cluster

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

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 SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subscription

type Subscription = shared.Subscription

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 Token

type Token = shared.Token

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 TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

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.

type UpstreamIPs

type UpstreamIPs = string

type UpstreamIPsParam

type UpstreamIPsParam = string

Jump to

Keyboard shortcuts

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