Movatterモバイル変換


[0]ホーム

URL:


Notice  The highest tagged major version isv4.

cloudflare

packagemodule
v0.115.0Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License:BSD-3-ClauseImports:29Imported by:1,211

Details

Repository

github.com/cloudflare/cloudflare-go

Links

README

cloudflare-go

Go ReferenceTestGo Report Card

Note: This library is under active development as we expand it to coverour (expanding!) API. Consider the public API of this package a littleunstable as we work towards a v1.0.

A Go library for interacting withCloudflare's API v4. This library allows you to:

  • Manage and automate changes to your DNS records within Cloudflare
  • Manage and automate changes to your zones (domains) on Cloudflare, includingadding new zones to your account
  • List and modify the status of WAF (Web Application Firewall) rules for yourzones
  • Fetch Cloudflare's IP ranges for automating your firewall whitelisting

A command-line client,flarectl, is also available as part ofthis project.

Installation

You need a working Go environment. We officially support only currently supported Go versions according toGo project's release policy.

go get github.com/cloudflare/cloudflare-go

Getting Started

package mainimport ("context""fmt""log""os""github.com/cloudflare/cloudflare-go")func main() {// Construct a new API object using a global API keyapi, err := cloudflare.New(os.Getenv("CLOUDFLARE_API_KEY"), os.Getenv("CLOUDFLARE_API_EMAIL"))// alternatively, you can use a scoped API token// api, err := cloudflare.NewWithAPIToken(os.Getenv("CLOUDFLARE_API_TOKEN"))if err != nil {log.Fatal(err)}// Most API calls require a Contextctx := context.Background()// Fetch user details on the accountu, err := api.UserDetails(ctx)if err != nil {log.Fatal(err)}// Print user detailsfmt.Println(u)}

Also refer to theAPI documentation forhow to use this package in-depth.

Contributing

Pull Requests are welcome, but please open an issue (or comment in an existingissue) to discuss any non-trivial changes before submitting code.

License

BSD licensed. See theLICENSE file for details.

Documentation

Overview

Package cloudflare implements the Cloudflare v4 API.

File contains helper methods for accepting variants (pointers, values,slices, etc) of a particular type and returning them in another. A common useis pointer to values and back.

_Most_ follow the convention of (where <type> is a Golang type such as Bool):

<type>Ptr: Accepts a value and returns a pointer.<type>: Accepts a pointer and returns a value.<type>PtrSlice: Accepts a slice of values and returns a slice of pointers.<type>Slice: Accepts a slice of pointers and returns a slice of values.<type>PtrMap: Accepts a string map of values into a string map of pointers.<type>Map: Accepts a string map of pointers into a string map of values.

Not all Golang types are covered here, only those that are commonly used.

Example
package mainimport ("context""fmt"cloudflare "github.com/cloudflare/cloudflare-go")const (user   = "cloudflare@example.org"domain = "example.com"apiKey = "deadbeef")func main() {api, err := cloudflare.New("deadbeef", "cloudflare@example.org")if err != nil {fmt.Println(err)return}// Fetch the zone ID for zone example.orgzoneID, err := api.ZoneIDByName("example.org")if err != nil {fmt.Println(err)return}// Fetch all DNS records for example.orgrecords, _, err := api.ListDNSRecords(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListDNSRecordsParams{})if err != nil {fmt.Println(err)return}for _, r := range records {fmt.Printf("%s: %s\n", r.Name, r.Content)}}

Index

Examples

Constants

View Source
const (// AuthKeyEmail specifies that we should authenticate with API key and email address.AuthKeyEmail = 1 <<iota// AuthUserService specifies that we should authenticate with a User-Service key.AuthUserService// AuthToken specifies that we should authenticate with an API Token.AuthToken)
View Source
const (IPAccessRulesConfigurationTargetListIPAccessRulesOrderOption = "configuration.target"IPAccessRulesConfigurationValueListIPAccessRulesOrderOption = "configuration.value"IPAccessRulesMatchOptionAllListIPAccessRulesMatchOption = "all"IPAccessRulesMatchOptionAnyListIPAccessRulesMatchOption = "any"IPAccessRulesModeBlockIPAccessRulesModeOption      = "block"IPAccessRulesModeChallengeIPAccessRulesModeOption      = "challenge"IPAccessRulesModeJsChallengeIPAccessRulesModeOption      = "js_challenge"IPAccessRulesModeManagedChallengeIPAccessRulesModeOption      = "managed_challenge"IPAccessRulesModeWhitelistIPAccessRulesModeOption      = "whitelist")
View Source
const (// ListTypeIP specifies a list containing IP addresses.ListTypeIP = "ip"// ListTypeRedirect specifies a list containing redirects.ListTypeRedirect = "redirect"// ListTypeHostname specifies a list containing hostnames.ListTypeHostname = "hostname"// ListTypeHostname specifies a list containing autonomous system numbers (ASNs).ListTypeASN = "asn")
View Source
const (// MagicFirewallRulesetKindRoot specifies a root Ruleset.MagicFirewallRulesetKindRoot = "root"// MagicFirewallRulesetPhaseMagicTransit specifies the Magic Transit Ruleset phase.MagicFirewallRulesetPhaseMagicTransit = "magic_transit"// MagicFirewallRulesetRuleActionSkip specifies a skip (allow) action.MagicFirewallRulesetRuleActionSkipMagicFirewallRulesetRuleAction = "skip"// MagicFirewallRulesetRuleActionBlock specifies a block action.MagicFirewallRulesetRuleActionBlockMagicFirewallRulesetRuleAction = "block")
View Source
const (AccountRouteLevelRouteLevel = accountsZoneRouteLevelRouteLevel = zonesUserRouteLevelRouteLevel = userAccountTypeResourceType = accountZoneTypeResourceType = zoneUserTypeResourceType = user)
View Source
const (RulesetKindCustomRulesetKind = "custom"RulesetKindManagedRulesetKind = "managed"RulesetKindRootRulesetKind = "root"RulesetKindZoneRulesetKind = "zone"RulesetPhaseDDoSL4RulesetPhase = "ddos_l4"RulesetPhaseDDoSL7RulesetPhase = "ddos_l7"RulesetPhaseHTTPConfigSettingsRulesetPhase = "http_config_settings"RulesetPhaseHTTPCustomErrorsRulesetPhase = "http_custom_errors"RulesetPhaseHTTPLogCustomFieldsRulesetPhase = "http_log_custom_fields"RulesetPhaseHTTPRatelimitRulesetPhase = "http_ratelimit"RulesetPhaseHTTPRequestCacheSettingsRulesetPhase = "http_request_cache_settings"RulesetPhaseHTTPRequestDynamicRedirectRulesetPhase = "http_request_dynamic_redirect"//nolint:gosecRulesetPhaseHTTPRequestFirewallCustomRulesetPhase = "http_request_firewall_custom"RulesetPhaseHTTPRequestFirewallManagedRulesetPhase = "http_request_firewall_managed"RulesetPhaseHTTPRequestLateTransformRulesetPhase = "http_request_late_transform"RulesetPhaseHTTPRequestOriginRulesetPhase = "http_request_origin"RulesetPhaseHTTPRequestRedirectRulesetPhase = "http_request_redirect"RulesetPhaseHTTPRequestSanitizeRulesetPhase = "http_request_sanitize"RulesetPhaseHTTPRequestTransformRulesetPhase = "http_request_transform"RulesetPhaseHTTPResponseCompressionRulesetPhase = "http_response_compression"RulesetPhaseHTTPResponseFirewallManagedRulesetPhase = "http_response_firewall_managed"RulesetPhaseHTTPResponseHeadersTransformRulesetPhase = "http_response_headers_transform"RulesetPhaseMagicTransitRulesetPhase = "magic_transit"RulesetRuleActionBlockRulesetRuleAction = "block"RulesetRuleActionChallengeRulesetRuleAction = "challenge"RulesetRuleActionCompressResponseRulesetRuleAction = "compress_response"RulesetRuleActionDDoSDynamicRulesetRuleAction = "ddos_dynamic"RulesetRuleActionDDoSMitigationRulesetRuleAction = "ddos_mitigation"RulesetRuleActionExecuteRulesetRuleAction = "execute"RulesetRuleActionForceConnectionCloseRulesetRuleAction = "force_connection_close"RulesetRuleActionJSChallengeRulesetRuleAction = "js_challenge"RulesetRuleActionLogRulesetRuleAction = "log"RulesetRuleActionLogCustomFieldRulesetRuleAction = "log_custom_field"RulesetRuleActionManagedChallengeRulesetRuleAction = "managed_challenge"RulesetRuleActionRedirectRulesetRuleAction = "redirect"RulesetRuleActionRewriteRulesetRuleAction = "rewrite"RulesetRuleActionRouteRulesetRuleAction = "route"RulesetRuleActionScoreRulesetRuleAction = "score"RulesetRuleActionServeErrorRulesetRuleAction = "serve_error"RulesetRuleActionSetCacheSettingsRulesetRuleAction = "set_cache_settings"RulesetRuleActionSetConfigRulesetRuleAction = "set_config"RulesetRuleActionSkipRulesetRuleAction = "skip"RulesetActionParameterProductBICRulesetActionParameterProduct = "bic"RulesetActionParameterProductHOTRulesetActionParameterProduct = "hot"RulesetActionParameterProductRateLimitRulesetActionParameterProduct = "ratelimit"RulesetActionParameterProductSecurityLevelRulesetActionParameterProduct = "securityLevel"RulesetActionParameterProductUABlockRulesetActionParameterProduct = "uablock"RulesetActionParameterProductWAFRulesetActionParameterProduct = "waf"RulesetActionParameterProductZoneLockdownRulesetActionParameterProduct = "zonelockdown"RulesetRuleActionParametersHTTPHeaderOperationRemoveRulesetRuleActionParametersHTTPHeaderOperation = "remove"RulesetRuleActionParametersHTTPHeaderOperationSetRulesetRuleActionParametersHTTPHeaderOperation = "set"RulesetRuleActionParametersHTTPHeaderOperationAddRulesetRuleActionParametersHTTPHeaderOperation = "add")
View Source
const DEFAULT_VALIDITY_PERIOD_DAYS = 1826
View Source
const (// IPListTypeIP specifies a list containing IP addresses.IPListTypeIP = "ip")

Variables

View Source
var (ErrAPIKeysAndTokensAreMutuallyExclusive   =errors.New(errAPIKeysAndTokensAreMutuallyExclusive)ErrMissingCredentials                     =errors.New(errMissingCredentials)ErrMissingAccountID                       =errors.New(errMissingAccountID)ErrMissingZoneID                          =errors.New(errMissingZoneID)ErrAccountIDOrZoneIDAreRequired           =errors.New(errMissingAccountOrZoneID)ErrAccountIDAndZoneIDAreMutuallyExclusive =errors.New(errAccountIDAndZoneIDAreMutuallyExclusive)ErrMissingResourceIdentifier              =errors.New(errMissingResourceIdentifier)ErrRequiredAccountLevelResourceContainer =errors.New(errRequiredAccountLevelResourceContainer)ErrRequiredZoneLevelResourceContainer    =errors.New(errRequiredZoneLevelResourceContainer)ErrMissingDetectionID                    =errors.New(errMissingDetectionID))
View Source
var (ErrMissingHyperdriveConfigID             =errors.New("required hyperdrive config id is missing")ErrMissingHyperdriveConfigName           =errors.New("required hyperdrive config name is missing")ErrMissingHyperdriveConfigOriginDatabase =errors.New("required hyperdrive config origin database is missing")ErrMissingHyperdriveConfigOriginPassword =errors.New("required hyperdrive config origin password is missing")ErrMissingHyperdriveConfigOriginHost     =errors.New("required hyperdrive config origin host is missing")ErrMissingHyperdriveConfigOriginScheme   =errors.New("required hyperdrive config origin scheme is missing")ErrMissingHyperdriveConfigOriginUser     =errors.New("required hyperdrive config origin user is missing"))
View Source
var (ErrInvalidImagesAPIVersion =errors.New("invalid images API version")ErrMissingImageID          =errors.New("required image ID missing"))
View Source
var (ErrMissingPoolID         =errors.New("missing required pool ID")ErrMissingMonitorID      =errors.New("missing required monitor ID")ErrMissingLoadBalancerID =errors.New("missing required load balancer ID"))
View Source
var (// ErrMissingIP is for when ipv4 or ipv6 indicator was given but ip is missing.ErrMissingIP =errors.New("ip is required when using 'ipv4' or 'ipv6' indicator type and is missing")// ErrMissingURL is for when url or domain indicator was given but url is missing.ErrMissingURL =errors.New("url is required when using 'domain' or 'url' indicator type and is missing"))
View Source
var (ErrMissingObservatoryUrl    =errors.New("missing required page url")ErrMissingObservatoryTestID =errors.New("missing required test id"))
View Source
var (ErrMissingProjectName  =errors.New("required missing project name")ErrMissingDeploymentID =errors.New("required missing deployment ID"))
View Source
var (ErrMissingQueueName         =errors.New("required queue name is missing")ErrMissingQueueConsumerName =errors.New("required queue consumer name is missing"))
View Source
var (// ErrMissingUploadURL is for when a URL is required but missing.ErrMissingUploadURL =errors.New("required url missing")// ErrMissingMaxDuration is for when MaxDuration is required but missing.ErrMissingMaxDuration =errors.New("required max duration missing")// ErrMissingVideoID is for when VideoID is required but missing.ErrMissingVideoID =errors.New("required video id missing")// ErrMissingFilePath is for when FilePath is required but missing.ErrMissingFilePath =errors.New("required file path missing")// ErrMissingTusResumable is for when TusResumable is required but missing.ErrMissingTusResumable =errors.New("required tus resumable missing")// ErrInvalidTusResumable is for when TusResumable is invalid.ErrInvalidTusResumable =errors.New("invalid tus resumable")// ErrMarshallingTUSMetadata is for when TUS metadata cannot be marshalled.ErrMarshallingTUSMetadata =errors.New("error marshalling TUS metadata")// ErrMissingUploadLength is for when UploadLength is required but missing.ErrMissingUploadLength =errors.New("required upload length missing")// ErrInvalidStatusCode is for when the status code is invalid.ErrInvalidStatusCode =errors.New("invalid status code"))
View Source
var (ErrMissingNetwork      =errors.New("missing required network parameter")ErrInvalidNetworkValue =errors.New("invalid IP parameter. Cannot use CIDR ranges for this endpoint."))
View Source
var (ErrMissingWaitingRoomID     =errors.New("missing required waiting room ID")ErrMissingWaitingRoomRuleID =errors.New("missing required waiting room rule ID"))
View Source
var (// ErrMissingIdentifier is for when identifier is required but missing.ErrMissingIdentifier =errors.New("identifier required but missing")// ErrMissingName is for when name is required but missing.ErrMissingName =errors.New("name required but missing")// ErrMissingTarget is for when target is required but missing.ErrMissingTarget =errors.New("target required but missing"))
View Source
var (ErrMissingWebAnalyticsSiteTag     =errors.New("missing required web analytics site ID")ErrMissingWebAnalyticsRulesetID   =errors.New("missing required web analytics ruleset ID")ErrMissingWebAnalyticsRuleID      =errors.New("missing required web analytics rule ID")ErrMissingWebAnalyticsSiteHost    =errors.New("missing required web analytics host or zone_tag")ErrConflictingWebAnalyticSiteHost =errors.New("conflicting web analytics host and zone_tag, only one must be specified"))
View Source
var (ErrMissingHostname    =errors.New("required hostname missing")ErrMissingService     =errors.New("required service missing")ErrMissingEnvironment =errors.New("required environment missing"))
View Source
var (ErrMissingScriptName =errors.New("required script name missing")ErrMissingTailID     =errors.New("required tail id missing"))
View Source
var ErrMissingASN =errors.New("required asn missing")

ErrMissingASN is for when ASN is required but not set.

View Source
var ErrMissingBINDContents =errors.New("required BIND config contents missing")

ErrMissingBINDContents is for when the BIND file contents is required but not set.

View Source
var (ErrMissingBucketName =errors.New("require bucket name missing"))
View Source
var (ErrMissingCertificateID =errors.New("missing required certificate ID"))
View Source
var ErrMissingClusterID =errors.New("missing required cluster ID")
View Source
var ErrMissingDNSRecordID =errors.New("required DNS record ID missing")

ErrMissingDNSRecordID is for when DNS record ID is needed but not given.

View Source
var (ErrMissingDatabaseID =fmt.Errorf("required missing database ID"))
View Source
var (ErrMissingDatasetID =errors.New("missing required dataset ID"))
View Source
var ErrMissingDomain =errors.New("required domain missing")

ErrMissingDomain is for when domain is needed but not given.

View Source
var (ErrMissingHostnameTLSSettingName =errors.New("tls setting name required but missing"))
View Source
var ErrMissingListID =errors.New("required missing list ID")
View Source
var ErrMissingMemberRolesOrPolicies =errors.New(errMissingMemberRolesOrPolicies)
View Source
var ErrMissingPermissionGroupID =errors.New(errMissingPermissionGroupID)
View Source
var (ErrMissingProfileID =errors.New("missing required profile ID"))
View Source
var (ErrMissingRiskScoreIntegrationID =errors.New("missing required Risk Score Integration UUID"))
View Source
var ErrMissingRuleID =errors.New("required rule id missing")
View Source
var (ErrMissingRulesetPhase =errors.New("missing required phase"))
View Source
var (ErrMissingServiceTokenUUID =errors.New("missing required service token UUID"))
View Source
var (// ErrMissingSettingName is for when setting name is required but missing.ErrMissingSettingName =errors.New("zone setting name required but missing"))
View Source
var ErrMissingSiteKey =errors.New("required site key missing")
View Source
var ErrMissingTargetId =errors.New("required target id missing")
View Source
var ErrMissingTunnelID =errors.New("required missing tunnel ID")

ErrMissingTunnelID is for when a required tunnel ID is missing from theparameters.

View Source
var ErrMissingUID =errors.New("required UID missing")
View Source
var ErrMissingVnetName =errors.New("required missing virtual network name")
View Source
var ErrMissingWorkerRouteID =errors.New("missing required route ID")
View Source
var ErrNotEnoughFilterIDsProvided =errors.New("at least one filter ID must be provided.")
View Source
var ErrOriginPortInvalid =errors.New("invalid origin port")

ErrOriginPortInvalid is a common error for failing to parse a single port or port range.

View Source
var PageRuleActions = map[string]string{"always_online":               "Always Online","always_use_https":            "Always Use HTTPS","automatic_https_rewrites":    "Automatic HTTPS Rewrites","browser_cache_ttl":           "Browser Cache TTL","browser_check":               "Browser Integrity Check","bypass_cache_on_cookie":      "Bypass Cache on Cookie","cache_by_device_type":        "Cache By Device Type","cache_deception_armor":       "Cache Deception Armor","cache_level":                 "Cache Level","cache_key_fields":            "Custom Cache Key","cache_on_cookie":             "Cache On Cookie","disable_apps":                "Disable Apps","disable_performance":         "Disable Performance","disable_railgun":             "Disable Railgun","disable_security":            "Disable Security","edge_cache_ttl":              "Edge Cache TTL","email_obfuscation":           "Email Obfuscation","explicit_cache_control":      "Origin Cache Control","forwarding_url":              "Forwarding URL","host_header_override":        "Host Header Override","ip_geolocation":              "IP Geolocation Header","minify":                      "Minify","mirage":                      "Mirage","opportunistic_encryption":    "Opportunistic Encryption","origin_error_page_pass_thru": "Origin Error Page Pass-thru","polish":                      "Polish","resolve_override":            "Resolve Override","respect_strong_etag":         "Respect Strong ETags","response_buffering":          "Response Buffering","rocket_loader":               "Rocker Loader","security_level":              "Security Level","server_side_exclude":         "Server Side Excludes","sort_query_string_for_cache": "Query String Sort","ssl":                         "SSL","true_client_ip_header":       "True Client IP Header","waf":                         "Web Application Firewall",}

PageRuleActions maps API action IDs to human-readable strings.

View Source
var (Versionstring = "v4")

Functions

funcAnyPtradded inv0.35.0

func AnyPtr[Tany](v T) *T

AnyPtr is a helper routine that allocates a new interface valueto store v and returns a pointer to it.

Usage: var _ *Type = AnyPtr(Type(value) | value).(*Type)

var _ *bool = AnyPtr(true).(*bool)var _ *byte = AnyPtr(byte(1)).(*byte)var _ *complex64 = AnyPtr(complex64(1.1)).(*complex64)var _ *complex128 = AnyPtr(complex128(1.1)).(*complex128)var _ *float32 = AnyPtr(float32(1.1)).(*float32)var _ *float64 = AnyPtr(float64(1.1)).(*float64)var _ *int = AnyPtr(int(1)).(*int)var _ *int8 = AnyPtr(int8(8)).(*int8)var _ *int16 = AnyPtr(int16(16)).(*int16)var _ *int32 = AnyPtr(int32(32)).(*int32)var _ *int64 = AnyPtr(int64(64)).(*int64)var _ *rune = AnyPtr(rune(1)).(*rune)var _ *string = AnyPtr("ptr").(*string)var _ *uint = AnyPtr(uint(1)).(*uint)var _ *uint8 = AnyPtr(uint8(8)).(*uint8)var _ *uint16 = AnyPtr(uint16(16)).(*uint16)var _ *uint32 = AnyPtr(uint32(32)).(*uint32)var _ *uint64 = AnyPtr(uint64(64)).(*uint64)

funcBool

func Bool(v *bool)bool

Bool is a helper routine that accepts a bool pointer and returns a valueto it.

funcBoolMapadded inv0.36.0

func BoolMap(src map[string]*bool) map[string]bool

BoolMap converts a string map of bool pointers into a string map of boolvalues.

funcBoolPtradded inv0.35.0

func BoolPtr(vbool) *bool

BoolPtr is a helper routine that allocates a new bool value to store v andreturns a pointer to it.

funcBoolPtrMapadded inv0.35.0

func BoolPtrMap(src map[string]bool) map[string]*bool

BoolPtrMap converts a string map of bool values into a string map of boolpointers.

funcBoolPtrSliceadded inv0.35.0

func BoolPtrSlice(src []bool) []*bool

BoolPtrSlice converts a slice of bool values into a slice of bool pointers.

funcBoolSliceadded inv0.36.0

func BoolSlice(src []*bool) []bool

BoolSlice converts a slice of bool pointers into a slice of bool values.

funcByteadded inv0.36.0

func Byte(v *byte)byte

Byte is a helper routine that accepts a byte pointer and returns avalue to it.

funcBytePtradded inv0.35.0

func BytePtr(vbyte) *byte

BytePtr is a helper routine that allocates a new byte value to store v andreturns a pointer to it.

funcComplex128added inv0.36.0

func Complex128(v *complex128)complex128

Complex128 is a helper routine that accepts a complex128 pointer andreturns a value to it.

funcComplex128Ptradded inv0.35.0

func Complex128Ptr(vcomplex128) *complex128

Complex128Ptr is a helper routine that allocates a new complex128 valueto store v and returns a pointer to it.

funcComplex64added inv0.36.0

func Complex64(v *complex64)complex64

Complex64 is a helper routine that accepts a complex64 pointer andreturns a value to it.

funcComplex64Ptradded inv0.35.0

func Complex64Ptr(vcomplex64) *complex64

Complex64Ptr is a helper routine that allocates a new complex64 value tostore v and returns a pointer to it.

funcDurationPtradded inv0.35.0

func DurationPtr(vtime.Duration) *time.Duration

DurationPtr is a helper routine that allocates a new time.Duration valueto store v and returns a pointer to it.

funcFloat32added inv0.36.0

func Float32(v *float32)float32

Float32 is a helper routine that accepts a float32 pointer and returns avalue to it.

funcFloat32Mapadded inv0.36.0

func Float32Map(src map[string]*float32) map[string]float32

Float32Map converts a string map of float32 pointers into a stringmap of float32 values.

funcFloat32Ptradded inv0.35.0

func Float32Ptr(vfloat32) *float32

Float32Ptr is a helper routine that allocates a new float32 value to store vand returns a pointer to it.

funcFloat32PtrMapadded inv0.35.0

func Float32PtrMap(src map[string]float32) map[string]*float32

Float32PtrMap converts a string map of float32 values into a string map offloat32 pointers.

funcFloat32PtrSliceadded inv0.35.0

func Float32PtrSlice(src []float32) []*float32

Float32PtrSlice converts a slice of float32 values into a slice of float32pointers.

funcFloat32Sliceadded inv0.36.0

func Float32Slice(src []*float32) []float32

Float32Slice converts a slice of float32 pointers into a slice offloat32 values.

funcFloat64added inv0.36.0

func Float64(v *float64)float64

Float64 is a helper routine that accepts a float64 pointer and returns avalue to it.

funcFloat64Mapadded inv0.36.0

func Float64Map(src map[string]*float64) map[string]float64

Float64Map converts a string map of float64 pointers into a stringmap of float64 values.

funcFloat64Ptradded inv0.35.0

func Float64Ptr(vfloat64) *float64

Float64Ptr is a helper routine that allocates a new float64 value to store vand returns a pointer to it.

funcFloat64PtrMapadded inv0.35.0

func Float64PtrMap(src map[string]float64) map[string]*float64

Float64PtrMap converts a string map of float64 values into a string map offloat64 pointers.

funcFloat64PtrSliceadded inv0.35.0

func Float64PtrSlice(src []float64) []*float64

Float64PtrSlice converts a slice of float64 values into a slice of float64pointers.

funcFloat64Sliceadded inv0.36.0

func Float64Slice(src []*float64) []float64

Float64Slice converts a slice of float64 pointers into a slice offloat64 values.

funcGetOriginCARootCertificateadded inv0.58.0

func GetOriginCARootCertificate(algorithmstring) ([]byte,error)

Gets the Cloudflare Origin CA Root Certificate for a given algorithm in PEM format.Algorithm must be one of ['ecc', 'rsa'].

funcInt

func Int(v *int)int

Int is a helper routine that accepts a int pointer and returns a valueto it.

funcInt16added inv0.36.0

func Int16(v *int16)int16

Int16 is a helper routine that accepts a int16 pointer and returns avalue to it.

funcInt16Mapadded inv0.36.0

func Int16Map(src map[string]*int16) map[string]int16

Int16Map converts a string map of int16 pointers into a string map ofint16 values.

funcInt16Ptradded inv0.35.0

func Int16Ptr(vint16) *int16

Int16Ptr is a helper routine that allocates a new int16 value to store vand returns a pointer to it.

funcInt16PtrMapadded inv0.35.0

func Int16PtrMap(src map[string]int16) map[string]*int16

Int16PtrMap converts a string map of int16 values into a string map of int16pointers.

funcInt16PtrSliceadded inv0.35.0

func Int16PtrSlice(src []int16) []*int16

Int16PtrSlice converts a slice of int16 values into a slice of int16pointers.

funcInt16Sliceadded inv0.36.0

func Int16Slice(src []*int16) []int16

Int16Slice converts a slice of int16 pointers into a slice of int16values.

funcInt32added inv0.36.0

func Int32(v *int32)int32

Int32 is a helper routine that accepts a int32 pointer and returns avalue to it.

funcInt32Mapadded inv0.36.0

func Int32Map(src map[string]*int32) map[string]int32

Int32Map converts a string map of int32 pointers into a string map ofint32 values.

funcInt32Ptradded inv0.35.0

func Int32Ptr(vint32) *int32

Int32Ptr is a helper routine that allocates a new int32 value to store vand returns a pointer to it.

funcInt32PtrMapadded inv0.35.0

func Int32PtrMap(src map[string]int32) map[string]*int32

Int32PtrMap converts a string map of int32 values into a string map of int32pointers.

funcInt32PtrSliceadded inv0.35.0

func Int32PtrSlice(src []int32) []*int32

Int32PtrSlice converts a slice of int32 values into a slice of int32pointers.

funcInt32Sliceadded inv0.36.0

func Int32Slice(src []*int32) []int32

Int32Slice converts a slice of int32 pointers into a slice of int32values.

funcInt64added inv0.36.0

func Int64(v *int64)int64

Int64 is a helper routine that accepts a int64 pointer and returns avalue to it.

funcInt64Mapadded inv0.36.0

func Int64Map(src map[string]*int64) map[string]int64

Int64Map converts a string map of int64 pointers into a string map ofint64 values.

funcInt64Ptradded inv0.35.0

func Int64Ptr(vint64) *int64

Int64Ptr is a helper routine that allocates a new int64 value to store vand returns a pointer to it.

funcInt64PtrMapadded inv0.35.0

func Int64PtrMap(src map[string]int64) map[string]*int64

Int64PtrMap converts a string map of int64 values into a string map of int64pointers.

funcInt64PtrSliceadded inv0.35.0

func Int64PtrSlice(src []int64) []*int64

Int64PtrSlice converts a slice of int64 values into a slice of int64pointers.

funcInt64Sliceadded inv0.36.0

func Int64Slice(src []*int64) []int64

Int64Slice converts a slice of int64 pointers into a slice of int64values.

funcInt8added inv0.36.0

func Int8(v *int8)int8

Int8 is a helper routine that accepts a int8 pointer and returns a valueto it.

funcInt8Mapadded inv0.36.0

func Int8Map(src map[string]*int8) map[string]int8

Int8Map converts a string map of int8 pointers into a string map of int8values.

funcInt8Ptradded inv0.35.0

func Int8Ptr(vint8) *int8

Int8Ptr is a helper routine that allocates a new int8 value to store v andreturns a pointer to it.

funcInt8PtrMapadded inv0.35.0

func Int8PtrMap(src map[string]int8) map[string]*int8

Int8PtrMap converts a string map of int8 values into a string map of int8pointers.

funcInt8PtrSliceadded inv0.35.0

func Int8PtrSlice(src []int8) []*int8

Int8PtrSlice converts a slice of int8 values into a slice of int8 pointers.

funcInt8Sliceadded inv0.36.0

func Int8Slice(src []*int8) []int8

Int8Slice converts a slice of int8 pointers into a slice of int8 values.

funcIntMapadded inv0.36.0

func IntMap(src map[string]*int) map[string]int

IntMap converts a string map of int pointers into a string map of intvalues.

funcIntPtradded inv0.35.0

func IntPtr(vint) *int

IntPtr is a helper routine that allocates a new int value to store v andreturns a pointer to it.

funcIntPtrMapadded inv0.35.0

func IntPtrMap(src map[string]int) map[string]*int

IntPtrMap converts a string map of int values into a string map of intpointers.

funcIntPtrSliceadded inv0.35.0

func IntPtrSlice(src []int) []*int

IntPtrSlice converts a slice of int values into a slice of int pointers.

funcIntSliceadded inv0.36.0

func IntSlice(src []*int) []int

IntSlice converts a slice of int pointers into a slice of int values.

funcRulesetActionParameterProductValuesadded inv0.19.0

func RulesetActionParameterProductValues() []string

RulesetActionParameterProductValues exposes all the available`RulesetActionParameterProduct` values as a slice of strings.

funcRulesetKindValuesadded inv0.19.0

func RulesetKindValues() []string

RulesetKindValues exposes all the available `RulesetKind` values as a sliceof strings.

funcRulesetPhaseValuesadded inv0.19.0

func RulesetPhaseValues() []string

RulesetPhaseValues exposes all the available `RulesetPhase` values as a sliceof strings.

funcRulesetRuleActionParametersHTTPHeaderOperationValuesadded inv0.19.0

func RulesetRuleActionParametersHTTPHeaderOperationValues() []string

funcRulesetRuleActionValuesadded inv0.19.0

func RulesetRuleActionValues() []string

RulesetRuleActionValues exposes all the available `RulesetRuleAction` valuesas a slice of strings.

funcRuneadded inv0.36.0

func Rune(v *rune)rune

Rune is a helper routine that accepts a rune pointer and returns a valueto it.

funcRunePtradded inv0.35.0

func RunePtr(vrune) *rune

RunePtr is a helper routine that allocates a new rune value to store vand returns a pointer to it.

funcString

func String(v *string)string

String is a helper routine that accepts a string pointer and returns avalue to it.

funcStringMapadded inv0.36.0

func StringMap(src map[string]*string) map[string]string

StringMap converts a string map of string pointers into a string map ofstring values.

funcStringPtradded inv0.35.0

func StringPtr(vstring) *string

StringPtr is a helper routine that allocates a new string value to store vand returns a pointer to it.

funcStringPtrMapadded inv0.35.0

func StringPtrMap(src map[string]string) map[string]*string

StringPtrMap converts a string map of string values into a string map ofstring pointers.

funcStringPtrSliceadded inv0.35.0

func StringPtrSlice(src []string) []*string

StringPtrSlice converts a slice of string values into a slice of stringpointers.

funcStringSliceadded inv0.36.0

func StringSlice(src []*string) []string

StringSlice converts a slice of string pointers into a slice of stringvalues.

funcTeamsRulesActionValuesadded inv0.22.0

func TeamsRulesActionValues() []string

funcTeamsRulesUntrustedCertActionValuesadded inv0.62.0

func TeamsRulesUntrustedCertActionValues() []string

funcTimeadded inv0.36.0

func Time(v *time.Time)time.Time

Time is a helper routine that accepts a time pointer value and returns avalue to it.

funcTimePtradded inv0.35.0

func TimePtr(vtime.Time) *time.Time

TimePtr is a helper routine that allocates a new time.Time valueto store v and returns a pointer to it.

funcUintadded inv0.36.0

func Uint(v *uint)uint

Uint is a helper routine that accepts a uint pointer and returns a valueto it.

funcUint16added inv0.36.0

func Uint16(v *uint16)uint16

Uint16 is a helper routine that accepts a uint16 pointer and returns avalue to it.

funcUint16Mapadded inv0.36.0

func Uint16Map(src map[string]*uint16) map[string]uint16

Uint16Map converts a string map of uint16 pointers into a string map ofuint16 values.

funcUint16Ptradded inv0.35.0

func Uint16Ptr(vuint16) *uint16

Uint16Ptr is a helper routine that allocates a new uint16 value to store vand returns a pointer to it.

funcUint16PtrMapadded inv0.35.0

func Uint16PtrMap(src map[string]uint16) map[string]*uint16

Uint16PtrMap converts a string map of uint16 values into a string map ofuint16 pointers.

funcUint16PtrSliceadded inv0.35.0

func Uint16PtrSlice(src []uint16) []*uint16

Uint16PtrSlice converts a slice of uint16 values into a slice of uint16pointers.

funcUint16Sliceadded inv0.36.0

func Uint16Slice(src []*uint16) []uint16

Uint16Slice converts a slice of uint16 pointers into a slice of uint16values.

funcUint32added inv0.36.0

func Uint32(v *uint32)uint32

Uint32 is a helper routine that accepts a uint32 pointer and returns avalue to it.

funcUint32Mapadded inv0.36.0

func Uint32Map(src map[string]*uint32) map[string]uint32

Uint32Map converts a string map of uint32 pointers into a stringmap of uint32 values.

funcUint32Ptradded inv0.35.0

func Uint32Ptr(vuint32) *uint32

Uint32Ptr is a helper routine that allocates a new uint32 value to store vand returns a pointer to it.

funcUint32PtrMapadded inv0.35.0

func Uint32PtrMap(src map[string]uint32) map[string]*uint32

Uint32PtrMap converts a string map of uint32 values into a string map ofuint32 pointers.

funcUint32PtrSliceadded inv0.35.0

func Uint32PtrSlice(src []uint32) []*uint32

Uint32PtrSlice converts a slice of uint32 values into a slice of uint32pointers.

funcUint32Sliceadded inv0.36.0

func Uint32Slice(src []*uint32) []uint32

Uint32Slice converts a slice of uint32 pointers into a slice of uint32values.

funcUint64added inv0.36.0

func Uint64(v *uint64)uint64

Uint64 is a helper routine that accepts a uint64 pointer and returns avalue to it.

funcUint64Mapadded inv0.36.0

func Uint64Map(src map[string]*uint64) map[string]uint64

Uint64Map converts a string map of uint64 pointers into a string map ofuint64 values.

funcUint64Ptradded inv0.35.0

func Uint64Ptr(vuint64) *uint64

Uint64Ptr is a helper routine that allocates a new uint64 value to store vand returns a pointer to it.

funcUint64PtrMapadded inv0.35.0

func Uint64PtrMap(src map[string]uint64) map[string]*uint64

Uint64PtrMap converts a string map of uint64 values into a string map ofuint64 pointers.

funcUint64PtrSliceadded inv0.35.0

func Uint64PtrSlice(src []uint64) []*uint64

Uint64PtrSlice converts a slice of uint64 values into a slice of uint64pointers.

funcUint64Sliceadded inv0.36.0

func Uint64Slice(src []*uint64) []uint64

Uint64Slice converts a slice of uint64 pointers into a slice of uint64values.

funcUint8added inv0.36.0

func Uint8(v *uint8)uint8

Uint8 is a helper routine that accepts a uint8 pointer and returns avalue to it.

funcUint8Mapadded inv0.36.0

func Uint8Map(src map[string]*uint8) map[string]uint8

Uint8Map converts a string map of uint8 pointers into a stringmap of uint8 values.

funcUint8Ptradded inv0.35.0

func Uint8Ptr(vuint8) *uint8

Uint8Ptr is a helper routine that allocates a new uint8 value to store vand returns a pointer to it.

funcUint8PtrMapadded inv0.35.0

func Uint8PtrMap(src map[string]uint8) map[string]*uint8

Uint8PtrMap converts a string map of uint8 values into a string map of uint8pointers.

funcUint8PtrSliceadded inv0.35.0

func Uint8PtrSlice(src []uint8) []*uint8

Uint8PtrSlice converts a slice of uint8 values into a slice of uint8pointers.

funcUint8Sliceadded inv0.36.0

func Uint8Slice(src []*uint8) []uint8

Uint8Slice converts a slice of uint8 pointers into a slice of uint8values.

funcUintMapadded inv0.36.0

func UintMap(src map[string]*uint) map[string]uint

UintMap converts a string map of uint pointers uinto a string map ofuint values.

funcUintPtradded inv0.35.0

func UintPtr(vuint) *uint

UintPtr is a helper routine that allocates a new uint value to store vand returns a pointer to it.

funcUintPtrMapadded inv0.35.0

func UintPtrMap(src map[string]uint) map[string]*uint

UintPtrMap converts a string map of uint values uinto a string map of uintpointers.

funcUintPtrSliceadded inv0.35.0

func UintPtrSlice(src []uint) []*uint

UintPtrSlice converts a slice of uint values uinto a slice of uint pointers.

funcUintSliceadded inv0.36.0

func UintSlice(src []*uint) []uint

UintSlice converts a slice of uint pointers uinto a slice of uintvalues.

Types

typeAPIadded inv0.7.2

type API struct {APIKeystringAPIEmailstringAPIUserServiceKeystringAPITokenstringBaseURLstringUserAgentstringDebugbool// contains filtered or unexported fields}

API holds the configuration for the current API client. A client should notbe modified concurrently.

funcNewadded inv0.7.2

func New(key, emailstring, opts ...Option) (*API,error)

New creates a new Cloudflare v4 API client.

funcNewWithAPITokenadded inv0.9.3

func NewWithAPIToken(tokenstring, opts ...Option) (*API,error)

NewWithAPIToken creates a new Cloudflare v4 API client using API Tokens.

funcNewWithUserServiceKeyadded inv0.9.0

func NewWithUserServiceKey(keystring, opts ...Option) (*API,error)

NewWithUserServiceKey creates a new Cloudflare v4 API client using service key authentication.

func (*API)APITokensadded inv0.13.5

func (api *API) APITokens(ctxcontext.Context) ([]APIToken,error)

APITokens returns all available API tokens.

API reference:https://api.cloudflare.com/#user-api-tokens-list-tokens

func (*API)AccessAuditLogsadded inv0.12.1

func (api *API) AccessAuditLogs(ctxcontext.Context, accountIDstring, optsAccessAuditLogFilterOptions) ([]AccessAuditLogRecord,error)

AccessAuditLogs retrieves all audit logs for the Access service.

API reference:https://api.cloudflare.com/#access-requests-access-requests-audit

Example
api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}filterOpts := cloudflare.AccessAuditLogFilterOptions{}results, _ := api.AccessAuditLogs(context.Background(), "someaccountid", filterOpts)for _, record := range results {b, _ := json.Marshal(record)fmt.Println(string(b))}

func (*API)AccessBookmarkadded inv0.36.0

func (api *API) AccessBookmark(ctxcontext.Context, accountID, bookmarkIDstring) (AccessBookmark,error)

AccessBookmark returns a single bookmark based on thebookmark ID.

API reference:https://api.cloudflare.com/#access-bookmarks-access-bookmarks-details

func (*API)AccessBookmarksadded inv0.36.0

func (api *API) AccessBookmarks(ctxcontext.Context, accountIDstring, pageOptsPaginationOptions) ([]AccessBookmark,ResultInfo,error)

AccessBookmarks returns all bookmarks within an account.

API reference:https://api.cloudflare.com/#access-bookmarks-list-access-bookmarks

func (*API)AccessKeysConfigadded inv0.23.0

func (api *API) AccessKeysConfig(ctxcontext.Context, accountIDstring) (AccessKeysConfig,error)

AccessKeysConfig returns the Access Keys Configuration for an account.

API reference:https://api.cloudflare.com/#access-keys-configuration-get-access-keys-configuration

func (*API)Accountadded inv0.9.0

func (api *API) Account(ctxcontext.Context, accountIDstring) (Account,ResultInfo,error)

Account returns a single account based on the ID.

API reference:https://api.cloudflare.com/#accounts-account-details

func (*API)AccountAccessRuleadded inv0.10.0

func (api *API) AccountAccessRule(ctxcontext.Context, accountIDstring, accessRuleIDstring) (*AccessRuleResponse,error)

AccountAccessRule returns the details of an account's access rule.

API reference:https://api.cloudflare.com/#account-level-firewall-access-rule-access-rule-details

func (*API)AccountMemberadded inv0.9.0

func (api *API) AccountMember(ctxcontext.Context, accountIDstring, memberIDstring) (AccountMember,error)

AccountMember returns details of a single account member.

API reference:https://api.cloudflare.com/#account-members-member-details

func (*API)AccountMembersadded inv0.9.0

func (api *API) AccountMembers(ctxcontext.Context, accountIDstring, pageOptsPaginationOptions) ([]AccountMember,ResultInfo,error)

AccountMembers returns all members of an account.

API reference:https://api.cloudflare.com/#accounts-list-accounts

func (*API)Accountsadded inv0.9.0

func (api *API) Accounts(ctxcontext.Context, paramsAccountsListParams) ([]Account,ResultInfo,error)

Accounts returns all accounts the logged in user has access to.

API reference:https://api.cloudflare.com/#accounts-list-accounts

func (*API)ArgoSmartRoutingadded inv0.9.0

func (api *API) ArgoSmartRouting(ctxcontext.Context, zoneIDstring) (ArgoFeatureSetting,error)

ArgoSmartRouting returns the current settings for smart routing.

API reference:https://api.cloudflare.com/#argo-smart-routing-get-argo-smart-routing-setting

Example
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}smartRoutingSettings, err := api.ArgoSmartRouting(context.Background(), "01a7362d577a6c3019a474fd6f485823")if err != nil {log.Fatal(err)}fmt.Printf("smart routing is %s", smartRoutingSettings.Value)}

func (*API)ArgoTieredCachingadded inv0.9.0

func (api *API) ArgoTieredCaching(ctxcontext.Context, zoneIDstring) (ArgoFeatureSetting,error)

ArgoTieredCaching returns the current settings for tiered caching.

API reference: TBA.

Example
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}tieredCachingSettings, err := api.ArgoTieredCaching(context.Background(), "01a7362d577a6c3019a474fd6f485823")if err != nil {log.Fatal(err)}fmt.Printf("tiered caching is %s", tieredCachingSettings.Value)}

func (*API)ArgoTunneldeprecatedadded inv0.13.7

func (api *API) ArgoTunnel(ctxcontext.Context, accountID, tunnelUUIDstring) (ArgoTunnel,error)

ArgoTunnel returns a single Argo tunnel.

API reference:https://api.cloudflare.com/#argo-tunnel-get-argo-tunnel

Deprecated: Use `Tunnel` instead.

func (*API)ArgoTunnelsdeprecatedadded inv0.13.7

func (api *API) ArgoTunnels(ctxcontext.Context, accountIDstring) ([]ArgoTunnel,error)

ArgoTunnels lists all tunnels.

API reference:https://api.cloudflare.com/#argo-tunnel-list-argo-tunnels

Deprecated: Use `Tunnels` instead.

func (*API)AttachWorkersDomainadded inv0.55.0

func (api *API) AttachWorkersDomain(ctxcontext.Context, rc *ResourceContainer, domainAttachWorkersDomainParams) (WorkersDomain,error)

AttachWorkersDomain attaches a worker to a zone and hostname.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/domains/methods/update/

func (*API)AvailableZonePlansadded inv0.7.2

func (api *API) AvailableZonePlans(ctxcontext.Context, zoneIDstring) ([]ZonePlan,error)

AvailableZonePlans returns information about all plans available to the specified zone.

API reference:https://api.cloudflare.com/#zone-rate-plan-list-available-plans

func (*API)AvailableZoneRatePlansadded inv0.7.4

func (api *API) AvailableZoneRatePlans(ctxcontext.Context, zoneIDstring) ([]ZoneRatePlan,error)

AvailableZoneRatePlans returns information about all plans available to the specified zone.

API reference:https://api.cloudflare.com/#zone-plan-available-plans

func (*API)Behaviorsadded inv0.95.0

func (api *API) Behaviors(ctxcontext.Context, accountIDstring) (Behaviors,error)

Behaviors returns all zero trust risk scoring behaviors for the provided account

API reference:https://developers.cloudflare.com/api/operations/dlp-zt-risk-score-get-behaviors

func (*API)CancelRegistrarDomainTransferadded inv0.9.0

func (api *API) CancelRegistrarDomainTransfer(ctxcontext.Context, accountID, domainNamestring) ([]RegistrarDomain,error)

CancelRegistrarDomainTransfer cancels a pending domain transfer.

API reference:https://api.cloudflare.com/#registrar-domains-cancel-transfer

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}domains, err := api.CancelRegistrarDomainTransfer(context.Background(), "01a7362d577a6c3019a474fd6f485823", "cloudflare.com")if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", domains)

func (*API)CertificatePackadded inv0.13.0

func (api *API) CertificatePack(ctxcontext.Context, zoneID, certificatePackIDstring) (CertificatePack,error)

CertificatePack returns a single TLS certificate pack on a zone.

API Reference:https://api.cloudflare.com/#certificate-packs-get-certificate-pack

func (*API)ChangePageRuleadded inv0.7.2

func (api *API) ChangePageRule(ctxcontext.Context, zoneID, ruleIDstring, rulePageRule)error

ChangePageRule lets you change individual settings for a Page Rule. This isin contrast to UpdatePageRule which replaces the entire Page Rule.

API reference:https://api.cloudflare.com/#page-rules-for-a-zone-change-a-page-rule

func (*API)ChangeWaitingRoomadded inv0.17.0

func (api *API) ChangeWaitingRoom(ctxcontext.Context, zoneID, waitingRoomIDstring, waitingRoomWaitingRoom) (WaitingRoom,error)

ChangeWaitingRoom lets you change individual settings for a Waiting room. This isin contrast to UpdateWaitingRoom which replaces the entire Waiting room.

API reference:https://api.cloudflare.com/#waiting-room-update-waiting-room

func (*API)ChangeWaitingRoomEventadded inv0.33.0

func (api *API) ChangeWaitingRoomEvent(ctxcontext.Context, zoneID, waitingRoomIDstring, waitingRoomEventWaitingRoomEvent) (WaitingRoomEvent,error)

ChangeWaitingRoomEvent lets you change individual settings for a Waiting Room Event. This isin contrast to UpdateWaitingRoomEvent which replaces the entire Waiting Room Event.

API reference:https://api.cloudflare.com/#waiting-room-patch-event

func (*API)CheckLogpushDestinationExistsadded inv0.9.0

func (api *API) CheckLogpushDestinationExists(ctxcontext.Context, rc *ResourceContainer, destinationConfstring) (bool,error)

CheckLogpushDestinationExists returns zone-level destination exists check result.

API reference:https://api.cloudflare.com/#logpush-jobs-check-destination-exists

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}exists, err := api.CheckLogpushDestinationExists(context.Background(), cloudflare.ZoneIdentifier(zoneID), "destination_conf")if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", exists)

func (*API)CleanupArgoTunnelConnectionsdeprecatedadded inv0.13.7

func (api *API) CleanupArgoTunnelConnections(ctxcontext.Context, accountID, tunnelUUIDstring)error

CleanupArgoTunnelConnections deletes any inactive connections on a tunnel.

API reference:https://api.cloudflare.com/#argo-tunnel-clean-up-argo-tunnel-connections

Deprecated: Use `CleanupTunnelConnections` instead.

func (*API)CleanupTunnelConnectionsadded inv0.39.0

func (api *API) CleanupTunnelConnections(ctxcontext.Context, rc *ResourceContainer, tunnelIDstring)error

CleanupTunnelConnections deletes any inactive connections on a tunnel.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-clean-up-cloudflare-tunnel-connections

func (*API)ContentScanningAddCustomExpressionsadded inv0.112.0

func (api *API) ContentScanningAddCustomExpressions(ctxcontext.Context, rc *ResourceContainer, paramsContentScanningAddCustomExpressionsParams) ([]ContentScanningCustomExpression,error)

ContentScanningAddCustomExpressions add new custom scan expressions for Content Scanning

API reference:https://developers.cloudflare.com/api/resources/content_scanning/subresources/payloads/methods/list/

func (*API)ContentScanningDeleteCustomExpressionadded inv0.112.0

func (api *API) ContentScanningDeleteCustomExpression(ctxcontext.Context, rc *ResourceContainer, paramsContentScanningDeleteCustomExpressionsParams) ([]ContentScanningCustomExpression,error)

ContentScanningDeleteCustomExpressions delete custom scan expressions for Content Scanning

API reference:https://developers.cloudflare.com/api/resources/content_scanning/subresources/payloads/methods/delete/

func (*API)ContentScanningDisableadded inv0.112.0

ContentScanningDisable disables Content Scanning.

API reference:https://developers.cloudflare.com/api/resources/content_scanning/methods/disable/

func (*API)ContentScanningEnableadded inv0.112.0

ContentScanningEnable enables Content Scanning.

API reference:https://developers.cloudflare.com/api/resources/content_scanning/methods/enable/

func (*API)ContentScanningListCustomExpressionsadded inv0.112.0

func (api *API) ContentScanningListCustomExpressions(ctxcontext.Context, rc *ResourceContainer, paramsContentScanningListCustomExpressionsParams) ([]ContentScanningCustomExpression,error)

ContentScanningListCustomExpressions retrieves the list of existing custom scan expressions for Content Scanning

API reference:https://developers.cloudflare.com/api/resources/content_scanning/subresources/payloads/methods/list/

func (*API)ContentScanningStatusadded inv0.112.0

ContentScanningStatus reads the status of Content Scanning.

API reference:https://developers.cloudflare.com/api/resources/content_scanning/subresources/settings/methods/get/

func (*API)CreateAPIShieldOperationsadded inv0.78.0

func (api *API) CreateAPIShieldOperations(ctxcontext.Context, rc *ResourceContainer, paramsCreateAPIShieldOperationsParams) ([]APIShieldOperation,error)

CreateAPIShieldOperations add one or more operations to a zone.

API documentationhttps://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/methods/create/

func (*API)CreateAPIShieldSchemaadded inv0.79.0

CreateAPIShieldSchema uploads a schema to a zone

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/create/

func (*API)CreateAPITokenadded inv0.13.5

func (api *API) CreateAPIToken(ctxcontext.Context, tokenAPIToken) (APIToken,error)

CreateAPIToken creates a new token. Returns the API token that has beengenerated.

The token value itself is only shown once (post create) and will present as`Value` from this method. If you fail to capture it at this point, you willneed to roll the token in order to get a new value.

API reference:https://api.cloudflare.com/#user-api-tokens-create-token

func (*API)CreateAccessBookmarkadded inv0.36.0

func (api *API) CreateAccessBookmark(ctxcontext.Context, accountIDstring, accessBookmarkAccessBookmark) (AccessBookmark,error)

CreateAccessBookmark creates a new access bookmark.

API reference:https://api.cloudflare.com/#access-bookmarks-create-access-bookmark

func (*API)CreateAccessCustomPageadded inv0.74.0

func (api *API) CreateAccessCustomPage(ctxcontext.Context, rc *ResourceContainer, paramsCreateAccessCustomPageParams) (AccessCustomPage,error)

func (*API)CreateAccessOrganizationadded inv0.10.1

func (api *API) CreateAccessOrganization(ctxcontext.Context, rc *ResourceContainer, paramsCreateAccessOrganizationParams) (AccessOrganization,error)

func (*API)CreateAccessServiceTokenadded inv0.10.1

func (*API)CreateAccessTagadded inv0.78.0

func (api *API) CreateAccessTag(ctxcontext.Context, rc *ResourceContainer, paramsCreateAccessTagParams) (AccessTag,error)

func (*API)CreateAccountadded inv0.13.8

func (api *API) CreateAccount(ctxcontext.Context, accountAccount) (Account,error)

CreateAccount creates a new account. Note: This requires the Tenantentitlement.

API reference:https://developers.cloudflare.com/tenant/tutorial/provisioning-resources#creating-an-account

func (*API)CreateAccountAccessRuleadded inv0.10.0

func (api *API) CreateAccountAccessRule(ctxcontext.Context, accountIDstring, accessRuleAccessRule) (*AccessRuleResponse,error)

CreateAccountAccessRule creates a firewall access rule for the givenaccount identifier.

API reference:https://api.cloudflare.com/#account-level-firewall-access-rule-create-access-rule

func (*API)CreateAccountMemberadded inv0.9.0

func (api *API) CreateAccountMember(ctxcontext.Context, rc *ResourceContainer, paramsCreateAccountMemberParams) (AccountMember,error)

CreateAccountMember invites a new member to join an account with roles.The member will be placed into "pending" status and receive an email confirmation.NOTE: If you are currently enrolled in Domain Scoped Roles, your roles willbe converted to policies upon member invitation.

API reference:https://api.cloudflare.com/#account-members-add-member

func (*API)CreateAccountMemberWithStatusdeprecatedadded inv0.25.0

func (api *API) CreateAccountMemberWithStatus(ctxcontext.Context, accountIDstring, emailAddressstring, roles []string, statusstring) (AccountMember,error)

CreateAccountMemberWithStatus invites a new member to join an account, allowing setting the status.

Refer to the API reference for valid statuses.

Deprecated: Use `CreateAccountMember` with a `Status` field instead.

API reference:https://api.cloudflare.com/#account-members-add-member

func (*API)CreateAddressMapadded inv0.63.0

func (api *API) CreateAddressMap(ctxcontext.Context, rc *ResourceContainer, paramsCreateAddressMapParams) (AddressMap,error)

CreateAddressMap creates a new address map under the account.

API reference:https://developers.cloudflare.com/api/resources/addressing/subresources/address_maps/methods/create/

func (*API)CreateArgoTunneldeprecatedadded inv0.13.7

func (api *API) CreateArgoTunnel(ctxcontext.Context, accountID, name, secretstring) (ArgoTunnel,error)

CreateArgoTunnel creates a new tunnel for the account.

API reference:https://api.cloudflare.com/#argo-tunnel-create-argo-tunnel

Deprecated: Use `CreateTunnel` instead.

func (*API)CreateCertificatePackadded inv0.13.0

func (api *API) CreateCertificatePack(ctxcontext.Context, zoneIDstring, certCertificatePackRequest) (CertificatePack,error)

CreateCertificatePack creates a new certificate pack associated with a zone.

API Reference:https://api.cloudflare.com/#certificate-packs-order-advanced-certificate-manager-certificate-pack

func (*API)CreateCustomHostnameadded inv0.7.4

func (api *API) CreateCustomHostname(ctxcontext.Context, zoneIDstring, chCustomHostname) (*CustomHostnameResponse,error)

CreateCustomHostname creates a new custom hostname and requests that an SSL certificate be issued for it.

API reference:https://api.cloudflare.com/#custom-hostname-for-a-zone-create-custom-hostname

func (*API)CreateCustomNameserversadded inv0.70.0

func (api *API) CreateCustomNameservers(ctxcontext.Context, rc *ResourceContainer, paramsCreateCustomNameserversParams) (CustomNameserverResult,error)

CreateCustomNameservers adds a custom nameserver.

API documentation:https://developers.cloudflare.com/api/resources/custom_nameservers/methods/create/

func (*API)CreateD1Databaseadded inv0.79.0

func (api *API) CreateD1Database(ctxcontext.Context, rc *ResourceContainer, paramsCreateD1DatabaseParams) (D1Database,error)

CreateD1Database creates a new database for an account.

API reference:https://developers.cloudflare.com/api/resources/d1/subresources/database/methods/create/

func (*API)CreateDLPDatasetUploadadded inv0.87.0

CreateDLPDatasetUpload creates a new upload version for the specified DLP dataset.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/dlp/subresources/datasets/methods/create/-version

func (*API)CreateDLPProfilesadded inv0.53.0

func (api *API) CreateDLPProfiles(ctxcontext.Context, rc *ResourceContainer, paramsCreateDLPProfilesParams) ([]DLPProfile,error)

CreateDLPProfiles creates a set of DLP Profile.

API reference:https://api.cloudflare.com/#dlp-profiles-create-custom-profiles

func (*API)CreateDNSFirewallClusteradded inv0.29.0

func (api *API) CreateDNSFirewallCluster(ctxcontext.Context, rc *ResourceContainer, paramsCreateDNSFirewallClusterParams) (*DNSFirewallCluster,error)

CreateDNSFirewallCluster creates a new DNS Firewall cluster.

API reference:https://api.cloudflare.com/#dns-firewall-create-dns-firewall-cluster

func (*API)CreateDNSRecordadded inv0.7.2

func (api *API) CreateDNSRecord(ctxcontext.Context, rc *ResourceContainer, paramsCreateDNSRecordParams) (DNSRecord,error)

CreateDNSRecord creates a DNS record for the zone identifier.

API reference:https://api.cloudflare.com/#dns-records-for-a-zone-create-dns-record

func (*API)CreateDataLocalizationRegionalHostnameadded inv0.66.0

func (api *API) CreateDataLocalizationRegionalHostname(ctxcontext.Context, rc *ResourceContainer, paramsCreateDataLocalizationRegionalHostnameParams) (RegionalHostname,error)

CreateDataLocalizationRegionalHostname lists all regional hostnames for a zone.

API reference:https://developers.cloudflare.com/data-localization/regional-services/get-started/#configure-regional-services-via-api

func (*API)CreateDeviceDexTestadded inv0.62.0

func (api *API) CreateDeviceDexTest(ctxcontext.Context, rc *ResourceContainer, paramsCreateDeviceDexTestParams) (DeviceDexTest,error)

CreateDeviceDexTest created a new Device Dex Test

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/devices/subresources/dex_tests/methods/create/

func (*API)CreateDeviceManagedNetworkadded inv0.57.0

func (api *API) CreateDeviceManagedNetwork(ctxcontext.Context, rc *ResourceContainer, paramsCreateDeviceManagedNetworkParams) (DeviceManagedNetwork,error)

CreateDeviceManagedNetwork creates a new Device Managed Network.

API reference:https://api.cloudflare.com/#device-managed-networks-create-device-managed-network

func (*API)CreateDevicePostureIntegrationadded inv0.29.0

func (api *API) CreateDevicePostureIntegration(ctxcontext.Context, accountIDstring, integrationDevicePostureIntegration) (DevicePostureIntegration,error)

CreateDevicePostureIntegration creates a device posture integration within an account.

API reference:https://api.cloudflare.com/#device-posture-integrations-create-device-posture-integration

func (*API)CreateDevicePostureRuleadded inv0.17.0

func (api *API) CreateDevicePostureRule(ctxcontext.Context, accountIDstring, ruleDevicePostureRule) (DevicePostureRule,error)

CreateDevicePostureRule creates a new device posture rule.

API reference:https://api.cloudflare.com/#device-posture-rules-create-device-posture-rule

func (*API)CreateDeviceSettingsPolicyadded inv0.52.0

func (api *API) CreateDeviceSettingsPolicy(ctxcontext.Context, rc *ResourceContainer, paramsCreateDeviceSettingsPolicyParams) (DeviceSettingsPolicy,error)

CreateDeviceSettingsPolicy creates a settings policy against devices thatmatch the policy.

API reference:https://api.cloudflare.com/#devices-create-device-settings-policy

func (*API)CreateEmailRoutingDestinationAddressadded inv0.47.0

func (api *API) CreateEmailRoutingDestinationAddress(ctxcontext.Context, rc *ResourceContainer, paramsCreateEmailRoutingAddressParameters) (EmailRoutingDestinationAddress,error)

CreateEmailRoutingDestinationAddress Create a destination address to forward your emails to.Destination addresses need to be verified before they become active.

API reference:https://api.cloudflare.com/#email-routing-destination-addresses-create-a-destination-address

func (*API)CreateEmailRoutingRuleadded inv0.47.0

func (api *API) CreateEmailRoutingRule(ctxcontext.Context, rc *ResourceContainer, paramsCreateEmailRoutingRuleParameters) (EmailRoutingRule,error)

CreateEmailRoutingRule Rules consist of a set of criteria for matching emails (such as an email being sent to a specific custom email address) plus a set of actions to take on the email (like forwarding it to a specific destination address).

API reference:https://api.cloudflare.com/#email-routing-routing-rules-create-routing-rule

func (*API)CreateFiltersadded inv0.9.0

func (api *API) CreateFilters(ctxcontext.Context, rc *ResourceContainer, params []FilterCreateParams) ([]Filter,error)

CreateFilters creates new filters.

API reference:https://developers.cloudflare.com/firewall/api/cf-filters/post/

func (*API)CreateFirewallRulesadded inv0.9.0

func (api *API) CreateFirewallRules(ctxcontext.Context, rc *ResourceContainer, params []FirewallRuleCreateParams) ([]FirewallRule,error)

CreateFirewallRules creates new firewall rules.

API reference:https://developers.cloudflare.com/firewall/api/cf-firewall-rules/post/

func (*API)CreateHealthcheckadded inv0.11.1

func (api *API) CreateHealthcheck(ctxcontext.Context, zoneIDstring, healthcheckHealthcheck) (Healthcheck,error)

CreateHealthcheck creates a new healthcheck in a zone.

API reference:https://api.cloudflare.com/#health-checks-create-health-check

func (*API)CreateHealthcheckPreviewadded inv0.11.5

func (api *API) CreateHealthcheckPreview(ctxcontext.Context, zoneIDstring, healthcheckHealthcheck) (Healthcheck,error)

CreateHealthcheckPreview creates a new preview of a healthcheck in a zone.

API reference:https://api.cloudflare.com/#health-checks-create-preview-health-check

func (*API)CreateHyperdriveConfigadded inv0.88.0

func (api *API) CreateHyperdriveConfig(ctxcontext.Context, rc *ResourceContainer, paramsCreateHyperdriveConfigParams) (HyperdriveConfig,error)

CreateHyperdriveConfig creates a new Hyperdrive config.

API reference:https://developers.cloudflare.com/api/resources/hyperdrive/subresources/configs/methods/create/

func (*API)CreateIPAddressToAddressMapadded inv0.63.0

func (api *API) CreateIPAddressToAddressMap(ctxcontext.Context, rc *ResourceContainer, paramsCreateIPAddressToAddressMapParams)error

CreateIPAddressToAddressMap adds an IP address from a prefix owned by the account to a particular address map.

API reference:https://developers.cloudflare.com/api/resources/addressing/subresources/address_maps/subresources/ips/methods/update/

func (*API)CreateIPListdeprecatedadded inv0.13.0

func (api *API) CreateIPList(ctxcontext.Context, accountID, name, description, kindstring) (IPList,error)

CreateIPList creates a new IP List.

API reference:https://api.cloudflare.com/#rules-lists-create-list

Deprecated: Use `CreateList` instead.

func (*API)CreateIPListItemdeprecatedadded inv0.13.0

func (api *API) CreateIPListItem(ctxcontext.Context, accountID, ID, ip, commentstring) ([]IPListItem,error)

CreateIPListItem creates a new IP List Item synchronously and returns thecurrent set of IP List Items.

Deprecated: Use `CreateListItem` instead.

func (*API)CreateIPListItemAsyncdeprecatedadded inv0.13.0

func (api *API) CreateIPListItemAsync(ctxcontext.Context, accountID, ID, ip, commentstring) (IPListItemCreateResponse,error)

CreateIPListItemAsync creates a new IP List Item asynchronously. Users haveto poll the operation status by using the operation_id returned by thisfunction.

API reference:https://api.cloudflare.com/#rules-lists-create-list-items

Deprecated: Use `CreateListItemAsync` instead.

func (*API)CreateIPListItemsdeprecatedadded inv0.13.0

func (api *API) CreateIPListItems(ctxcontext.Context, accountID, IDstring, items []IPListItemCreateRequest) ([]IPListItem,error)

CreateIPListItems bulk creates many IP List Items synchronously and returnsthe current set of IP List Items.

Deprecated: Use `CreateListItems` instead.

func (*API)CreateIPListItemsAsyncdeprecatedadded inv0.13.0

func (api *API) CreateIPListItemsAsync(ctxcontext.Context, accountID, IDstring, items []IPListItemCreateRequest) (IPListItemCreateResponse,error)

CreateIPListItemsAsync bulk creates many IP List Items asynchronously. Usershave to poll the operation status by using the operation_id returned by thisfunction.

API reference:https://api.cloudflare.com/#rules-lists-create-list-items

Deprecated: Use `CreateListItemsAsync` instead.

func (*API)CreateImageDirectUploadURLadded inv0.30.0

func (api *API) CreateImageDirectUploadURL(ctxcontext.Context, rc *ResourceContainer, paramsCreateImageDirectUploadURLParams) (ImageDirectUploadURL,error)

CreateImageDirectUploadURL creates an authenticated direct upload url.

API Reference:https://api.cloudflare.com/#cloudflare-images-create-authenticated-direct-upload-url

func (*API)CreateImagesVariantadded inv0.88.0

func (api *API) CreateImagesVariant(ctxcontext.Context, rc *ResourceContainer, paramsCreateImagesVariantParams) (ImagesVariant,error)

Specify variants that allow you to resize images for different use cases.

API Reference:https://developers.cloudflare.com/api/resources/images/subresources/v1/subresources/variants/methods/create/

func (*API)CreateInfrastructureAccessTargetadded inv0.105.0

func (api *API) CreateInfrastructureAccessTarget(ctxcontext.Context, rc *ResourceContainer, paramsCreateInfrastructureAccessTargetParams) (InfrastructureAccessTarget,error)

CreateInfrastructureAccessTarget creates a new infrastructure access target.

Account API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/infrastructure/subresources/targets/methods/create/

func (*API)CreateKeylessSSLadded inv0.17.0

func (api *API) CreateKeylessSSL(ctxcontext.Context, zoneIDstring, keylessSSLKeylessSSLCreateRequest) (KeylessSSL,error)

CreateKeylessSSL creates a new Keyless SSL configuration for the zone.

API reference:https://api.cloudflare.com/#keyless-ssl-for-a-zone-create-keyless-ssl-configuration

func (*API)CreateListadded inv0.41.0

func (api *API) CreateList(ctxcontext.Context, rc *ResourceContainer, paramsListCreateParams) (List,error)

CreateList creates a new List.

API reference:https://api.cloudflare.com/#rules-lists-create-list

func (*API)CreateListItemadded inv0.41.0

func (api *API) CreateListItem(ctxcontext.Context, rc *ResourceContainer, paramsListCreateItemParams) ([]ListItem,error)

CreateListItem creates a new List Item synchronously and returns the current set of List Items.

func (*API)CreateListItemAsyncadded inv0.41.0

func (api *API) CreateListItemAsync(ctxcontext.Context, rc *ResourceContainer, paramsListCreateItemParams) (ListItemCreateResponse,error)

CreateListItemAsync creates a new List Item asynchronously. Users have to poll the operation status byusing the operation_id returned by this function.

API reference:https://api.cloudflare.com/#rules-lists-create-list-items

func (*API)CreateListItemsadded inv0.41.0

func (api *API) CreateListItems(ctxcontext.Context, rc *ResourceContainer, paramsListCreateItemsParams) ([]ListItem,error)

CreateListItems bulk creates multiple List Items synchronously and returnsthe current set of List Items.

func (*API)CreateListItemsAsyncadded inv0.41.0

func (api *API) CreateListItemsAsync(ctxcontext.Context, rc *ResourceContainer, paramsListCreateItemsParams) (ListItemCreateResponse,error)

CreateListItemsAsync bulk creates multiple List Items asynchronously. Usershave to poll the operation status by using the operation_id returned by thisfunction.

API reference:https://api.cloudflare.com/#rules-lists-create-list-items

func (*API)CreateLoadBalanceradded inv0.8.0

func (api *API) CreateLoadBalancer(ctxcontext.Context, rc *ResourceContainer, paramsCreateLoadBalancerParams) (LoadBalancer,error)

CreateLoadBalancer creates a new load balancer.

API reference:https://api.cloudflare.com/#load-balancers-create-load-balancer

func (*API)CreateLoadBalancerMonitoradded inv0.8.0

func (api *API) CreateLoadBalancerMonitor(ctxcontext.Context, rc *ResourceContainer, paramsCreateLoadBalancerMonitorParams) (LoadBalancerMonitor,error)

CreateLoadBalancerMonitor creates a new load balancer monitor.

API reference:https://api.cloudflare.com/#load-balancer-monitors-create-monitor

func (*API)CreateLoadBalancerPooladded inv0.8.0

func (api *API) CreateLoadBalancerPool(ctxcontext.Context, rc *ResourceContainer, paramsCreateLoadBalancerPoolParams) (LoadBalancerPool,error)

CreateLoadBalancerPool creates a new load balancer pool.

API reference:https://api.cloudflare.com/#load-balancer-pools-create-pool

func (*API)CreateLogpushJobadded inv0.9.0

func (api *API) CreateLogpushJob(ctxcontext.Context, rc *ResourceContainer, paramsCreateLogpushJobParams) (*LogpushJob,error)

CreateLogpushJob creates a new zone-level Logpush Job.

API reference:https://api.cloudflare.com/#logpush-jobs-create-logpush-job

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}job, err := api.CreateLogpushJob(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.CreateLogpushJobParams{Enabled:         false,Name:            "example.com",LogpullOptions:  "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339",DestinationConf: "s3://mybucket/logs?region=us-west-2",})if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", job)

func (*API)CreateMTLSCertificateadded inv0.58.0

func (api *API) CreateMTLSCertificate(ctxcontext.Context, rc *ResourceContainer, paramsCreateMTLSCertificateParams) (MTLSCertificate,error)

CreateMTLSCertificate will create the provided certificate for use with mTLSenabled Cloudflare services.

API reference:https://api.cloudflare.com/#mtls-certificate-management-upload-mtls-certificate

func (*API)CreateMagicFirewallRulesetdeprecatedadded inv0.13.7

func (api *API) CreateMagicFirewallRuleset(ctxcontext.Context, accountID, name, descriptionstring, rules []MagicFirewallRulesetRule) (MagicFirewallRuleset,error)

CreateMagicFirewallRuleset creates a Magic Firewall ruleset

API reference:https://api.cloudflare.com/#rulesets-list-rulesets

Deprecated: Use `CreateZoneRuleset` or `CreateAccountRuleset` instead.

func (*API)CreateMagicTransitGRETunnelsadded inv0.32.0

func (api *API) CreateMagicTransitGRETunnels(ctxcontext.Context, accountIDstring, tunnels []MagicTransitGRETunnel) ([]MagicTransitGRETunnel,error)

CreateMagicTransitGRETunnels creates one or more GRE tunnels.

API reference:https://api.cloudflare.com/#magic-gre-tunnels-create-gre-tunnels

func (*API)CreateMagicTransitIPsecTunnelsadded inv0.31.0

func (api *API) CreateMagicTransitIPsecTunnels(ctxcontext.Context, accountIDstring, tunnels []MagicTransitIPsecTunnel) ([]MagicTransitIPsecTunnel,error)

CreateMagicTransitIPsecTunnels creates one or more IPsec tunnels

API reference:https://api.cloudflare.com/#magic-ipsec-tunnels-create-ipsec-tunnels

func (*API)CreateMagicTransitStaticRouteadded inv0.18.0

func (api *API) CreateMagicTransitStaticRoute(ctxcontext.Context, accountIDstring, routeMagicTransitStaticRoute) ([]MagicTransitStaticRoute,error)

CreateMagicTransitStaticRoute creates a new static route

API reference:https://api.cloudflare.com/#magic-transit-static-routes-create-routes

func (*API)CreateMiscategorizationadded inv0.45.0

func (api *API) CreateMiscategorization(ctxcontext.Context, paramsMisCategorizationParameters)error

CreateMiscategorization creates a miscatergorization.

API Reference:https://api.cloudflare.com/#miscategorization-create-miscategorization

func (*API)CreateNotificationPolicyadded inv0.19.0

func (api *API) CreateNotificationPolicy(ctxcontext.Context, accountIDstring, policyNotificationPolicy) (SaveResponse,error)

CreateNotificationPolicy creates a notification policy for an account.

API Reference:https://api.cloudflare.com/#notification-policies-create-notification-policy

func (*API)CreateNotificationWebhooksadded inv0.19.0

func (api *API) CreateNotificationWebhooks(ctxcontext.Context, accountIDstring, webhooks *NotificationUpsertWebhooks) (SaveResponse,error)

CreateNotificationWebhooks will help connect a webhooks destination.A test message will be sent to the webhooks endpoint during creation.If added successfully, the webhooks can be setup as a destination mechanismwhile creating policies.

Notifications will be posted to this URL.

API Reference:https://api.cloudflare.com/#notification-webhooks-create-webhook

func (*API)CreateObservatoryPageTestadded inv0.78.0

func (api *API) CreateObservatoryPageTest(ctxcontext.Context, rc *ResourceContainer, paramsCreateObservatoryPageTestParams) (*ObservatoryPageTest,error)

CreateObservatoryPageTest starts a test for a page in a specific region.

API reference:https://api.cloudflare.com/#speed-create-test

func (*API)CreateObservatoryScheduledPageTestadded inv0.78.0

func (api *API) CreateObservatoryScheduledPageTest(ctxcontext.Context, rc *ResourceContainer, paramsCreateObservatoryScheduledPageTestParams) (*ObservatoryScheduledPageTest,error)

CreateObservatoryScheduledPageTest creates a scheduled test for a page in a specific region.

API reference:https://api.cloudflare.com/#speed-create-scheduled-test

func (*API)CreateOriginCACertificateadded inv0.58.0

func (api *API) CreateOriginCACertificate(ctxcontext.Context, paramsCreateOriginCertificateParams) (*OriginCACertificate,error)

CreateOriginCACertificate creates a Cloudflare-signed certificate.

API reference:https://api.cloudflare.com/#cloudflare-ca-create-certificate

func (*API)CreatePageRuleadded inv0.7.2

func (api *API) CreatePageRule(ctxcontext.Context, zoneIDstring, rulePageRule) (*PageRule,error)

CreatePageRule creates a new Page Rule for a zone.

API reference:https://api.cloudflare.com/#page-rules-for-a-zone-create-a-page-rule

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}pageRule, err := api.CreatePageRule(context.Background(), zoneID, exampleNewPageRule)if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", pageRule)

func (*API)CreatePageShieldPolicyadded inv0.84.0

func (api *API) CreatePageShieldPolicy(ctxcontext.Context, rc *ResourceContainer, paramsCreatePageShieldPolicyParams) (*PageShieldPolicy,error)

CreatePageShieldPolicy creates a page shield policy for a zone.

API documentation:https://developers.cloudflare.com/api/operations/page-shield-create-page-shield-policy

func (*API)CreatePagesDeploymentadded inv0.40.0

CreatePagesDeployment creates a Pages production deployment.

API reference:https://api.cloudflare.com/#pages-deployment-create-deployment

func (*API)CreatePagesProjectadded inv0.26.0

func (api *API) CreatePagesProject(ctxcontext.Context, rc *ResourceContainer, paramsCreatePagesProjectParams) (PagesProject,error)

CreatePagesProject creates a new Pages project in an account.

API reference:https://api.cloudflare.com/#pages-project-create-project

func (*API)CreateQueueadded inv0.55.0

func (api *API) CreateQueue(ctxcontext.Context, rc *ResourceContainer, queueCreateQueueParams) (Queue,error)

CreateQueue creates a new queue.

API reference:https://api.cloudflare.com/#queue-create-queue

func (*API)CreateQueueConsumeradded inv0.55.0

func (api *API) CreateQueueConsumer(ctxcontext.Context, rc *ResourceContainer, paramsCreateQueueConsumerParams) (QueueConsumer,error)

CreateQueueConsumer creates a new consumer for a queue.

API reference:https://api.cloudflare.com/#queue-create-queue-consumer

func (*API)CreateR2Bucketadded inv0.47.0

func (api *API) CreateR2Bucket(ctxcontext.Context, rc *ResourceContainer, paramsCreateR2BucketParameters) (R2Bucket,error)

CreateR2Bucket Creates a new R2 bucket.

API reference:https://api.cloudflare.com/#r2-bucket-create-bucket

func (*API)CreateRateLimitadded inv0.8.5

func (api *API) CreateRateLimit(ctxcontext.Context, zoneIDstring, limitRateLimit) (RateLimit,error)

CreateRateLimit creates a new rate limit for a zone.

API reference:https://api.cloudflare.com/#rate-limits-for-a-zone-create-a-ratelimit

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}rateLimit, err := api.CreateRateLimit(context.Background(), zoneID, exampleNewRateLimit)if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", rateLimit)

func (*API)CreateRiskScoreIntegrationadded inv0.101.0

func (api *API) CreateRiskScoreIntegration(ctxcontext.Context, rc *ResourceContainer, paramsRiskScoreIntegrationCreateRequest) (RiskScoreIntegration,error)

CreateRiskScoreIntegration creates a new Risk Score Integration.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/risk_scoring/subresources/integrations/methods/create/

func (*API)CreateSSLadded inv0.7.2

func (api *API) CreateSSL(ctxcontext.Context, zoneIDstring, optionsZoneCustomSSLOptions) (ZoneCustomSSL,error)

CreateSSL allows you to add a custom SSL certificate to the given zone.

API reference:https://api.cloudflare.com/#custom-ssl-for-a-zone-create-ssl-configuration

func (*API)CreateSecondaryDNSPrimaryadded inv0.15.0

func (api *API) CreateSecondaryDNSPrimary(ctxcontext.Context, accountIDstring, primarySecondaryDNSPrimary) (SecondaryDNSPrimary,error)

CreateSecondaryDNSPrimary creates a secondary DNS primary.

API reference:https://api.cloudflare.com/#secondary-dns-primary--create-primary

func (*API)CreateSecondaryDNSTSIGadded inv0.15.0

func (api *API) CreateSecondaryDNSTSIG(ctxcontext.Context, accountIDstring, tsigSecondaryDNSTSIG) (SecondaryDNSTSIG,error)

CreateSecondaryDNSTSIG creates a secondary DNS TSIG at the account level.

API reference:https://api.cloudflare.com/#secondary-dns-tsig--create-tsig

func (*API)CreateSecondaryDNSZoneadded inv0.15.0

func (api *API) CreateSecondaryDNSZone(ctxcontext.Context, zoneIDstring, zoneSecondaryDNSZone) (SecondaryDNSZone,error)

CreateSecondaryDNSZone creates a secondary DNS zone.

API reference:https://api.cloudflare.com/#secondary-dns-create-secondary-zone-configuration

func (*API)CreateSpectrumApplicationadded inv0.9.0

func (api *API) CreateSpectrumApplication(ctxcontext.Context, zoneIDstring, appDetailsSpectrumApplication) (SpectrumApplication,error)

CreateSpectrumApplication creates a new Spectrum application.

API reference:https://developers.cloudflare.com/spectrum/api-reference/#create-a-spectrum-application

func (*API)CreateTeamsListadded inv0.17.0

func (api *API) CreateTeamsList(ctxcontext.Context, rc *ResourceContainer, paramsCreateTeamsListParams) (TeamsList,error)

CreateTeamsList creates a new teams list.

API reference:https://api.cloudflare.com/#teams-lists-create-teams-list

func (*API)CreateTeamsLocationadded inv0.21.0

func (api *API) CreateTeamsLocation(ctxcontext.Context, accountIDstring, teamsLocationTeamsLocation) (TeamsLocation,error)

CreateTeamsLocation creates a new teams location.

API reference:https://api.cloudflare.com/#teams-locations-create-teams-location

func (*API)CreateTeamsProxyEndpointadded inv0.35.0

func (api *API) CreateTeamsProxyEndpoint(ctxcontext.Context, accountIDstring, proxyEndpointTeamsProxyEndpoint) (TeamsProxyEndpoint,error)

CreateTeamsProxyEndpoint creates a new proxy endpoint.

API reference:https://api.cloudflare.com/#zero-trust-gateway-proxy-endpoints-create-proxy-endpoint

func (*API)CreateTunneladded inv0.39.0

func (api *API) CreateTunnel(ctxcontext.Context, rc *ResourceContainer, paramsTunnelCreateParams) (Tunnel,error)

CreateTunnel creates a new tunnel for the account.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-create-cloudflare-tunnel

func (*API)CreateTunnelRouteadded inv0.36.0

func (api *API) CreateTunnelRoute(ctxcontext.Context, rc *ResourceContainer, paramsTunnelRoutesCreateParams) (TunnelRoute,error)

CreateTunnelRoute add a new route to the account routing table for the giventunnel.

See:https://api.cloudflare.com/#tunnel-route-create-route

func (*API)CreateTunnelVirtualNetworkadded inv0.41.0

func (api *API) CreateTunnelVirtualNetwork(ctxcontext.Context, rc *ResourceContainer, paramsTunnelVirtualNetworkCreateParams) (TunnelVirtualNetwork,error)

CreateTunnelVirtualNetwork adds a new virtual network to the account.

API reference:https://api.cloudflare.com/#tunnel-virtual-network-create-virtual-network

func (*API)CreateTurnstileWidgetadded inv0.66.0

func (api *API) CreateTurnstileWidget(ctxcontext.Context, rc *ResourceContainer, paramsCreateTurnstileWidgetParams) (TurnstileWidget,error)

CreateTurnstileWidget creates a new challenge widgets.

API reference:https://api.cloudflare.com/#challenge-widgets-properties

func (*API)CreateUserAccessRuleadded inv0.8.1

func (api *API) CreateUserAccessRule(ctxcontext.Context, accessRuleAccessRule) (*AccessRuleResponse,error)

CreateUserAccessRule creates a firewall access rule for the logged-in user.

API reference:https://api.cloudflare.com/#user-level-firewall-access-rule-create-access-rule

func (*API)CreateUserAgentRuleadded inv0.8.0

func (api *API) CreateUserAgentRule(ctxcontext.Context, zoneIDstring, ldUserAgentRule) (*UserAgentRuleResponse,error)

CreateUserAgentRule creates a User-Agent Block rule for the given zone ID.

API reference:https://api.cloudflare.com/#user-agent-blocking-rules-create-a-useragent-rule

func (*API)CreateWAFOverrideadded inv0.11.1

func (api *API) CreateWAFOverride(ctxcontext.Context, zoneIDstring, overrideWAFOverride) (WAFOverride,error)

CreateWAFOverride creates a new WAF override.

API reference:https://api.cloudflare.com/#waf-overrides-create-a-uri-controlled-waf-configuration

func (*API)CreateWaitingRoomadded inv0.17.0

func (api *API) CreateWaitingRoom(ctxcontext.Context, zoneIDstring, waitingRoomWaitingRoom) (*WaitingRoom,error)

CreateWaitingRoom creates a new Waiting Room for a zone.

API reference:https://api.cloudflare.com/#waiting-room-create-waiting-room

func (*API)CreateWaitingRoomEventadded inv0.33.0

func (api *API) CreateWaitingRoomEvent(ctxcontext.Context, zoneIDstring, waitingRoomIDstring, waitingRoomEventWaitingRoomEvent) (*WaitingRoomEvent,error)

CreateWaitingRoomEvent creates a new event for a Waiting Room.

API reference:https://api.cloudflare.com/#waiting-room-create-event

func (*API)CreateWaitingRoomRuleadded inv0.53.0

func (api *API) CreateWaitingRoomRule(ctxcontext.Context, rc *ResourceContainer, paramsCreateWaitingRoomRuleParams) ([]WaitingRoomRule,error)

CreateWaitingRoomRule creates a new rule for a Waiting Room.

API reference:https://api.cloudflare.com/#waiting-room-create-waiting-room-rule

func (*API)CreateWeb3Hostnameadded inv0.45.0

func (api *API) CreateWeb3Hostname(ctxcontext.Context, paramsWeb3HostnameCreateParameters) (Web3Hostname,error)

CreateWeb3Hostname creates a web3 hostname.

API Reference:https://api.cloudflare.com/#web3-hostname-create-web3-hostname

func (*API)CreateWebAnalyticsRuleadded inv0.75.0

func (api *API) CreateWebAnalyticsRule(ctxcontext.Context, rc *ResourceContainer, paramsCreateWebAnalyticsRuleParams) (*WebAnalyticsRule,error)

CreateWebAnalyticsRule creates a new Web Analytics Rule in a Web Analytics ruleset.

API reference:https://api.cloudflare.com/#web-analytics-create-rule

func (*API)CreateWebAnalyticsSiteadded inv0.75.0

func (api *API) CreateWebAnalyticsSite(ctxcontext.Context, rc *ResourceContainer, paramsCreateWebAnalyticsSiteParams) (*WebAnalyticsSite,error)

CreateWebAnalyticsSite creates a new Web Analytics Site for an Account.

API reference:https://api.cloudflare.com/#web-analytics-create-site

func (*API)CreateWorkerRouteadded inv0.9.0

func (api *API) CreateWorkerRoute(ctxcontext.Context, rc *ResourceContainer, paramsCreateWorkerRouteParams) (WorkerRouteResponse,error)

CreateWorkerRoute creates worker route for a script.

API reference:https://developers.cloudflare.com/api/operations/worker-routes-create-route

func (*API)CreateWorkersAccountSettingsadded inv0.47.0

CreateWorkersAccountSettings sets the account settings for Workers.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/account_settings/methods/update/

func (*API)CreateWorkersKVNamespaceadded inv0.9.0

CreateWorkersKVNamespace creates a namespace under the given title.A 400 is returned if the account already owns a namespace with this title.A namespace must be explicitly deleted to be replaced.

API reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/methods/create/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}req := cloudflare.CreateWorkersKVNamespaceParams{Title: "test_namespace2"}response, err := api.CreateWorkersKVNamespace(context.Background(), cloudflare.AccountIdentifier(accountID), req)if err != nil {log.Fatal(err)}fmt.Println(response)

func (*API)CreateZoneadded inv0.7.2

func (api *API) CreateZone(ctxcontext.Context, namestring, jumpstartbool, accountAccount, zoneTypestring) (Zone,error)

CreateZone creates a zone on an account.

Setting jumpstart to true will attempt to automatically scan for existingDNS records. Setting this to false will create the zone with no DNS records.

If account is non-empty, it must have at least the ID field populated.This will add the new zone to the specified multi-user account.

API reference:https://api.cloudflare.com/#zone-create-a-zone

func (*API)CreateZoneAccessRuleadded inv0.8.1

func (api *API) CreateZoneAccessRule(ctxcontext.Context, zoneIDstring, accessRuleAccessRule) (*AccessRuleResponse,error)

CreateZoneAccessRule creates a firewall access rule for the given zoneidentifier.

API reference:https://api.cloudflare.com/#firewall-access-rule-for-a-zone-create-access-rule

func (*API)CreateZoneHoldadded inv0.75.0

func (api *API) CreateZoneHold(ctxcontext.Context, rc *ResourceContainer, paramsCreateZoneHoldParams) (ZoneHold,error)

CreateZoneHold enforces a zone hold on the zone, blocking the creation andactivation of zone.

API reference:https://developers.cloudflare.com/api/resources/zones/subresources/holds/methods/create/

func (*API)CreateZoneLevelAccessBookmarkadded inv0.36.0

func (api *API) CreateZoneLevelAccessBookmark(ctxcontext.Context, zoneIDstring, accessBookmarkAccessBookmark) (AccessBookmark,error)

CreateZoneLevelAccessBookmark creates a new zone level access bookmark.

API reference:https://api.cloudflare.com/#zone-level-access-bookmarks-create-access-bookmark

func (*API)CreateZoneLockdownadded inv0.8.0

func (api *API) CreateZoneLockdown(ctxcontext.Context, rc *ResourceContainer, paramsZoneLockdownCreateParams) (ZoneLockdown,error)

CreateZoneLockdown creates a Zone ZoneLockdown rule for the given zone ID.

API reference:https://api.cloudflare.com/#zone-ZoneLockdown-create-a-ZoneLockdown-rule

Example
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.org")if err != nil {log.Fatal(err)}newZoneLockdown := cloudflare.ZoneLockdownCreateParams{Description: "Test Zone Lockdown Rule",URLs: []string{"*.example.org/test",},Configurations: []cloudflare.ZoneLockdownConfig{{Target: "ip",Value:  "198.51.100.1",},},Paused: false,}response, err := api.CreateZoneLockdown(context.Background(), cloudflare.ZoneIdentifier(zoneID), newZoneLockdown)if err != nil {log.Fatal(err)}fmt.Println("Response: ", response)}

func (*API)CustomHostnameadded inv0.7.4

func (api *API) CustomHostname(ctxcontext.Context, zoneIDstring, customHostnameIDstring) (CustomHostname,error)

CustomHostname inspects the given custom hostname in the given zone.

API reference:https://api.cloudflare.com/#custom-hostname-for-a-zone-custom-hostname-configuration-details

func (*API)CustomHostnameFallbackOriginadded inv0.12.0

func (api *API) CustomHostnameFallbackOrigin(ctxcontext.Context, zoneIDstring) (CustomHostnameFallbackOrigin,error)

CustomHostnameFallbackOrigin inspects the Custom Hostname Fallback origin in the given zone.

API reference:https://api.cloudflare.com/#custom-hostname-fallback-origin-for-a-zone-properties

func (*API)CustomHostnameIDByNameadded inv0.7.4

func (api *API) CustomHostnameIDByName(ctxcontext.Context, zoneIDstring, hostnamestring) (string,error)

CustomHostnameIDByName retrieves the ID for the given hostname in the given zone.

func (*API)CustomHostnamesadded inv0.7.4

func (api *API) CustomHostnames(ctxcontext.Context, zoneIDstring, pageint, filterCustomHostname) ([]CustomHostname,ResultInfo,error)

CustomHostnames fetches custom hostnames for the given zone,by applying filter.Hostname if not empty and scoping the result to page'th 50 items.

The returned ResultInfo can be used to implement pagination.

API reference:https://api.cloudflare.com/#custom-hostname-for-a-zone-list-custom-hostnames

func (*API)CustomPageadded inv0.9.0

func (api *API) CustomPage(ctxcontext.Context, options *CustomPageOptions, customPageIDstring) (CustomPage,error)

CustomPage lists a single custom page based on the ID.

Zone API reference:https://api.cloudflare.com/#custom-pages-for-a-zone-custom-page-detailsAccount API reference:https://api.cloudflare.com/#custom-pages-account--custom-page-details

func (*API)CustomPagesadded inv0.9.0

func (api *API) CustomPages(ctxcontext.Context, options *CustomPageOptions) ([]CustomPage,error)

CustomPages lists custom pages for a zone or account.

Zone API reference:https://api.cloudflare.com/#custom-pages-for-a-zone-list-available-custom-pagesAccount API reference:https://api.cloudflare.com/#custom-pages-account--list-custom-pages

func (*API)DeleteAPIShieldOperationadded inv0.78.0

func (api *API) DeleteAPIShieldOperation(ctxcontext.Context, rc *ResourceContainer, paramsDeleteAPIShieldOperationParams)error

DeleteAPIShieldOperation deletes a single operation

API documentationhttps://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/methods/delete/

func (*API)DeleteAPIShieldSchemaadded inv0.79.0

func (api *API) DeleteAPIShieldSchema(ctxcontext.Context, rc *ResourceContainer, paramsDeleteAPIShieldSchemaParams)error

DeleteAPIShieldSchema deletes a single schema

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/delete/

func (*API)DeleteAPITokenadded inv0.13.5

func (api *API) DeleteAPIToken(ctxcontext.Context, tokenIDstring)error

DeleteAPIToken deletes a single API token.

API reference:https://api.cloudflare.com/#user-api-tokens-delete-token

func (*API)DeleteAccessBookmarkadded inv0.36.0

func (api *API) DeleteAccessBookmark(ctxcontext.Context, accountID, bookmarkIDstring)error

DeleteAccessBookmark deletes an access bookmark.

API reference:https://api.cloudflare.com/#access-bookmarks-delete-access-bookmark

func (*API)DeleteAccessCACertificateadded inv0.12.1

func (api *API) DeleteAccessCACertificate(ctxcontext.Context, rc *ResourceContainer, applicationIDstring)error

DeleteAccessCACertificate deletes an Access CA certificate on a definedAccessApplication.

Account API reference:https://developers.cloudflare.com/api/operations/access-short-lived-certificate-c-as-delete-a-short-lived-certificate-caZone API reference:https://developers.cloudflare.com/api/operations/zone-level-access-short-lived-certificate-c-as-delete-a-short-lived-certificate-ca

func (*API)DeleteAccessCustomPageadded inv0.74.0

func (api *API) DeleteAccessCustomPage(ctxcontext.Context, rc *ResourceContainer, idstring)error

func (*API)DeleteAccessMutualTLSCertificateadded inv0.13.8

func (api *API) DeleteAccessMutualTLSCertificate(ctxcontext.Context, rc *ResourceContainer, certificateIDstring)error

DeleteAccessMutualTLSCertificate destroys an Access MutualTLS certificate.

Account API Reference:https://developers.cloudflare.com/api/operations/access-mtls-authentication-delete-an-mtls-certificateZone API Reference:https://developers.cloudflare.com/api/operations/zone-level-access-mtls-authentication-delete-an-mtls-certificate

func (*API)DeleteAccessServiceTokenadded inv0.10.1

func (api *API) DeleteAccessServiceToken(ctxcontext.Context, rc *ResourceContainer, uuidstring) (AccessServiceTokenUpdateResponse,error)

func (*API)DeleteAccessTagadded inv0.78.0

func (api *API) DeleteAccessTag(ctxcontext.Context, rc *ResourceContainer, tagNamestring)error

func (*API)DeleteAccountadded inv0.13.8

func (api *API) DeleteAccount(ctxcontext.Context, accountIDstring)error

DeleteAccount removes an account. Note: This requires the Tenantentitlement.

API reference:https://developers.cloudflare.com/tenant/tutorial/provisioning-resources#optional-deleting-accounts

func (*API)DeleteAccountAccessRuleadded inv0.10.0

func (api *API) DeleteAccountAccessRule(ctxcontext.Context, accountID, accessRuleIDstring) (*AccessRuleResponse,error)

DeleteAccountAccessRule deletes a single access rule for the givenaccount and access rule identifiers.

API reference:https://api.cloudflare.com/#account-level-firewall-access-rule-delete-access-rule

func (*API)DeleteAccountMemberadded inv0.9.0

func (api *API) DeleteAccountMember(ctxcontext.Context, accountIDstring, userIDstring)error

DeleteAccountMember removes a member from an account.

API reference:https://api.cloudflare.com/#account-members-remove-member

func (*API)DeleteAddressMapadded inv0.63.0

func (api *API) DeleteAddressMap(ctxcontext.Context, rc *ResourceContainer, idstring)error

DeleteAddressMap deletes a particular address map owned by the account.

API reference:https://developers.cloudflare.com/api/resources/addressing/subresources/address_maps/methods/delete/

func (*API)DeleteArgoTunneldeprecatedadded inv0.13.7

func (api *API) DeleteArgoTunnel(ctxcontext.Context, accountID, tunnelUUIDstring)error

DeleteArgoTunnel removes a single Argo tunnel.

API reference:https://api.cloudflare.com/#argo-tunnel-delete-argo-tunnel

Deprecated: Use `DeleteTunnel` instead.

func (*API)DeleteCertificatePackadded inv0.13.0

func (api *API) DeleteCertificatePack(ctxcontext.Context, zoneID, certificateIDstring)error

DeleteCertificatePack removes a certificate pack associated with a zone.

API Reference:https://api.cloudflare.com/#certificate-packs-delete-advanced-certificate-manager-certificate-pack

func (*API)DeleteCustomHostnameadded inv0.7.4

func (api *API) DeleteCustomHostname(ctxcontext.Context, zoneIDstring, customHostnameIDstring)error

DeleteCustomHostname deletes a custom hostname (and any issued SSLcertificates).

API reference:https://api.cloudflare.com/#custom-hostname-for-a-zone-delete-a-custom-hostname-and-any-issued-ssl-certificates-

func (*API)DeleteCustomHostnameFallbackOriginadded inv0.13.0

func (api *API) DeleteCustomHostnameFallbackOrigin(ctxcontext.Context, zoneIDstring)error

DeleteCustomHostnameFallbackOrigin deletes the Custom Hostname Fallback origin in the given zone.

API reference:https://api.cloudflare.com/#custom-hostname-fallback-origin-for-a-zone-delete-fallback-origin-for-custom-hostnames

func (*API)DeleteCustomNameserversadded inv0.70.0

func (api *API) DeleteCustomNameservers(ctxcontext.Context, rc *ResourceContainer, paramsDeleteCustomNameserversParams)error

DeleteCustomNameservers removes a custom nameserver.

API documentation:https://developers.cloudflare.com/api/resources/custom_nameservers/methods/delete/

func (*API)DeleteD1Databaseadded inv0.79.0

func (api *API) DeleteD1Database(ctxcontext.Context, rc *ResourceContainer, databaseIDstring)error

DeleteD1Database deletes a database for an account.

API reference:https://developers.cloudflare.com/api/resources/d1/subresources/database/methods/delete/

func (*API)DeleteDLPDatasetadded inv0.87.0

func (api *API) DeleteDLPDataset(ctxcontext.Context, rc *ResourceContainer, datasetIDstring)error

DeleteDLPDataset deletes a DLP dataset.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/dlp/subresources/datasets/methods/delete/

func (*API)DeleteDLPProfileadded inv0.53.0

func (api *API) DeleteDLPProfile(ctxcontext.Context, rc *ResourceContainer, profileIDstring)error

DeleteDLPProfile deletes a DLP profile. Only custom profiles can be deleted.

API reference:https://api.cloudflare.com/#dlp-profiles-delete-custom-profile

func (*API)DeleteDNSFirewallClusteradded inv0.29.0

func (api *API) DeleteDNSFirewallCluster(ctxcontext.Context, rc *ResourceContainer, clusterIDstring)error

DeleteDNSFirewallCluster deletes a DNS Firewall cluster. Note that this cannot beundone, and will stop all traffic to that cluster.

API reference:https://api.cloudflare.com/#dns-firewall-delete-dns-firewall-cluster

func (*API)DeleteDNSRecordadded inv0.7.2

func (api *API) DeleteDNSRecord(ctxcontext.Context, rc *ResourceContainer, recordIDstring)error

DeleteDNSRecord deletes a single DNS record for the given zone & recordidentifiers.

API reference:https://api.cloudflare.com/#dns-records-for-a-zone-delete-dns-record

func (*API)DeleteDataLocalizationRegionalHostnameadded inv0.66.0

func (api *API) DeleteDataLocalizationRegionalHostname(ctxcontext.Context, rc *ResourceContainer, hostnamestring)error

DeleteDataLocalizationRegionalHostname deletes a regional hostname.

API reference:https://developers.cloudflare.com/data-localization/regional-services/get-started/#configure-regional-services-via-api

func (*API)DeleteDevicePostureIntegrationadded inv0.29.0

func (api *API) DeleteDevicePostureIntegration(ctxcontext.Context, accountID, ruleIDstring)error

DeleteDevicePostureIntegration deletes a device posture integration.

API reference:https://api.cloudflare.com/#device-posture-integrations-delete-device-posture-integration

func (*API)DeleteDevicePostureRuleadded inv0.17.0

func (api *API) DeleteDevicePostureRule(ctxcontext.Context, accountID, ruleIDstring)error

DeleteDevicePostureRule deletes a device posture rule.

API reference:https://api.cloudflare.com/#device-posture-rules-delete-device-posture-rule

func (*API)DeleteDeviceSettingsPolicyadded inv0.52.0

func (api *API) DeleteDeviceSettingsPolicy(ctxcontext.Context, rc *ResourceContainer, policyIDstring) ([]DeviceSettingsPolicy,error)

DeleteDeviceSettingsPolicy deletes a settings policy and returns a listof all of the other policies in the account.

API reference:https://api.cloudflare.com/#devices-delete-device-settings-policy

func (*API)DeleteDexTestadded inv0.62.0

func (api *API) DeleteDexTest(ctxcontext.Context, rc *ResourceContainer, testIDstring) (DeviceDexTests,error)

DeleteDexTest deletes a Device Dex Test.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/devices/subresources/dex_tests/methods/delete/

func (*API)DeleteEmailRoutingDestinationAddressadded inv0.47.0

func (api *API) DeleteEmailRoutingDestinationAddress(ctxcontext.Context, rc *ResourceContainer, addressIDstring) (EmailRoutingDestinationAddress,error)

DeleteEmailRoutingDestinationAddress Deletes a specific destination address.

API reference:https://api.cloudflare.com/#email-routing-destination-addresses-delete-destination-address

func (*API)DeleteEmailRoutingRuleadded inv0.47.0

func (api *API) DeleteEmailRoutingRule(ctxcontext.Context, rc *ResourceContainer, ruleIDstring) (EmailRoutingRule,error)

DeleteEmailRoutingRule Delete a specific routing rule.

API reference:https://api.cloudflare.com/#email-routing-routing-rules-delete-routing-rule

func (*API)DeleteFilteradded inv0.9.0

func (api *API) DeleteFilter(ctxcontext.Context, rc *ResourceContainer, filterIDstring)error

DeleteFilter deletes a single filter.

API reference:https://developers.cloudflare.com/firewall/api/cf-filters/delete/#delete-a-single-filter

func (*API)DeleteFiltersadded inv0.9.0

func (api *API) DeleteFilters(ctxcontext.Context, rc *ResourceContainer, filterIDs []string)error

DeleteFilters deletes multiple filters.

API reference:https://developers.cloudflare.com/firewall/api/cf-filters/delete/#delete-multiple-filters

func (*API)DeleteFirewallRuleadded inv0.9.0

func (api *API) DeleteFirewallRule(ctxcontext.Context, rc *ResourceContainer, firewallRuleIDstring)error

DeleteFirewallRule deletes a single firewall rule.

API reference:https://developers.cloudflare.com/firewall/api/cf-firewall-rules/delete/#delete-a-single-rule

func (*API)DeleteFirewallRulesadded inv0.9.0

func (api *API) DeleteFirewallRules(ctxcontext.Context, rc *ResourceContainer, firewallRuleIDs []string)error

DeleteFirewallRules deletes multiple firewall rules at once.

API reference:https://developers.cloudflare.com/firewall/api/cf-firewall-rules/delete/#delete-multiple-rules

func (*API)DeleteHealthcheckadded inv0.11.1

func (api *API) DeleteHealthcheck(ctxcontext.Context, zoneIDstring, healthcheckIDstring)error

DeleteHealthcheck deletes a healthcheck in a zone.

API reference:https://api.cloudflare.com/#health-checks-delete-health-check

func (*API)DeleteHealthcheckPreviewadded inv0.11.5

func (api *API) DeleteHealthcheckPreview(ctxcontext.Context, zoneIDstring, idstring)error

DeleteHealthcheckPreview deletes a healthcheck preview in a zone if it exists.

API reference:https://api.cloudflare.com/#health-checks-delete-preview-health-check

func (*API)DeleteHostnameTLSSettingadded inv0.75.0

func (api *API) DeleteHostnameTLSSetting(ctxcontext.Context, rc *ResourceContainer, paramsDeleteHostnameTLSSettingParams) (HostnameTLSSetting,error)

DeleteHostnameTLSSetting will delete the specified per-hostname tls setting.

API reference:https://developers.cloudflare.com/api/resources/hostnames/subresources/settings/subresources/tls/methods/delete/

func (*API)DeleteHostnameTLSSettingCiphersadded inv0.75.0

func (api *API) DeleteHostnameTLSSettingCiphers(ctxcontext.Context, rc *ResourceContainer, paramsDeleteHostnameTLSSettingCiphersParams) (HostnameTLSSettingCiphers,error)

DeleteHostnameTLSSettingCiphers will delete the specified per-hostname ciphers tls setting value.Ciphers functions are separate due to the API returning a list of strings as the value, rather than a string (as is the case for the other tls settings).

API reference:https://developers.cloudflare.com/api/resources/hostnames/subresources/settings/subresources/tls/methods/delete/

func (*API)DeleteHyperdriveConfigadded inv0.88.0

func (api *API) DeleteHyperdriveConfig(ctxcontext.Context, rc *ResourceContainer, hyperdriveIDstring)error

DeleteHyperdriveConfig deletes a Hyperdrive config.

API reference:https://developers.cloudflare.com/api/resources/hyperdrive/subresources/configs/methods/delete/

func (*API)DeleteIPAddressFromAddressMapadded inv0.63.0

func (api *API) DeleteIPAddressFromAddressMap(ctxcontext.Context, rc *ResourceContainer, paramsDeleteIPAddressFromAddressMapParams)error

DeleteIPAddressFromAddressMap removes an IP address from a particular address map.

API reference:https://developers.cloudflare.com/api/resources/addressing/subresources/address_maps/subresources/ips/methods/delete/

func (*API)DeleteIPListdeprecatedadded inv0.13.0

func (api *API) DeleteIPList(ctxcontext.Context, accountID, IDstring) (IPListDeleteResponse,error)

DeleteIPList deletes an IP List.

API reference:https://api.cloudflare.com/#rules-lists-delete-list

Deprecated: Use `DeleteList` instead.

func (*API)DeleteIPListItemsdeprecatedadded inv0.13.0

func (api *API) DeleteIPListItems(ctxcontext.Context, accountID, IDstring, itemsIPListItemDeleteRequest) ([]IPListItem,error)

DeleteIPListItems removes specific Items of an IP List by their IDsynchronously and returns the current set of IP List Items.

Deprecated: Use `DeleteListItems` instead.

func (*API)DeleteIPListItemsAsyncdeprecatedadded inv0.13.0

func (api *API) DeleteIPListItemsAsync(ctxcontext.Context, accountID, IDstring, itemsIPListItemDeleteRequest) (IPListItemDeleteResponse,error)

DeleteIPListItemsAsync removes specific Items of an IP List by their IDasynchronously. Users have to poll the operation status by using theoperation_id returned by this function.

API reference:https://api.cloudflare.com/#rules-lists-delete-list-items

Deprecated: Use `DeleteListItemsAsync` instead.

func (*API)DeleteImageadded inv0.30.0

func (api *API) DeleteImage(ctxcontext.Context, rc *ResourceContainer, idstring)error

DeleteImage deletes an image.

API Reference:https://api.cloudflare.com/#cloudflare-images-delete-image

func (*API)DeleteImagesVariantadded inv0.88.0

func (api *API) DeleteImagesVariant(ctxcontext.Context, rc *ResourceContainer, variantIDstring)error

Deleting a variant purges the cache for all images associated with the variant.

API Reference:https://developers.cloudflare.com/api/resources/images/subresources/v1/subresources/variants/methods/get/

func (*API)DeleteInfrastructureAccessTargetadded inv0.105.0

func (api *API) DeleteInfrastructureAccessTarget(ctxcontext.Context, rc *ResourceContainer, targetIDstring)error

DeleteInfrastructureAccessTarget deletes an infrastructure access target.

Account API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/infrastructure/subresources/targets/methods/delete/

func (*API)DeleteKeylessSSLadded inv0.17.0

func (api *API) DeleteKeylessSSL(ctxcontext.Context, zoneID, keylessSSLIDstring)error

DeleteKeylessSSL deletes an existing Keyless SSL configuration.

API reference:https://api.cloudflare.com/#keyless-ssl-for-a-zone-delete-keyless-ssl-configuration

func (*API)DeleteListadded inv0.41.0

func (api *API) DeleteList(ctxcontext.Context, rc *ResourceContainer, listIDstring) (ListDeleteResponse,error)

DeleteList deletes a List.

API reference:https://api.cloudflare.com/#rules-lists-delete-list

func (*API)DeleteListItemsadded inv0.41.0

func (api *API) DeleteListItems(ctxcontext.Context, rc *ResourceContainer, paramsListDeleteItemsParams) ([]ListItem,error)

DeleteListItems removes specific Items of a List by their ID synchronouslyand returns the current set of List Items.

func (*API)DeleteListItemsAsyncadded inv0.41.0

func (api *API) DeleteListItemsAsync(ctxcontext.Context, rc *ResourceContainer, paramsListDeleteItemsParams) (ListItemDeleteResponse,error)

DeleteListItemsAsync removes specific Items of a List by their IDasynchronously. Users have to poll the operation status by using theoperation_id returned by this function.

API reference:https://api.cloudflare.com/#rules-lists-delete-list-items

func (*API)DeleteLoadBalanceradded inv0.8.0

func (api *API) DeleteLoadBalancer(ctxcontext.Context, rc *ResourceContainer, loadbalancerIDstring)error

DeleteLoadBalancer disables and deletes a load balancer.

API reference:https://api.cloudflare.com/#load-balancers-delete-load-balancer

func (*API)DeleteLoadBalancerMonitoradded inv0.8.0

func (api *API) DeleteLoadBalancerMonitor(ctxcontext.Context, rc *ResourceContainer, monitorIDstring)error

DeleteLoadBalancerMonitor disables and deletes a load balancer monitor.

API reference:https://api.cloudflare.com/#load-balancer-monitors-delete-monitor

func (*API)DeleteLoadBalancerPooladded inv0.8.0

func (api *API) DeleteLoadBalancerPool(ctxcontext.Context, rc *ResourceContainer, poolIDstring)error

DeleteLoadBalancerPool disables and deletes a load balancer pool.

API reference:https://api.cloudflare.com/#load-balancer-pools-delete-pool

func (*API)DeleteLogpushJobadded inv0.9.0

func (api *API) DeleteLogpushJob(ctxcontext.Context, rc *ResourceContainer, jobIDint)error

DeleteLogpushJob deletes a Logpush Job for a zone.

API reference:https://api.cloudflare.com/#logpush-jobs-delete-logpush-job

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}err = api.DeleteLogpushJob(context.Background(), cloudflare.ZoneIdentifier(zoneID), 1)if err != nil {log.Fatal(err)}

func (*API)DeleteMTLSCertificateadded inv0.58.0

func (api *API) DeleteMTLSCertificate(ctxcontext.Context, rc *ResourceContainer, certificateIDstring) (MTLSCertificate,error)

DeleteMTLSCertificate will delete the specified mTLS certificate.

API reference:https://api.cloudflare.com/#mtls-certificate-management-delete-mtls-certificate

func (*API)DeleteMagicFirewallRulesetdeprecatedadded inv0.13.7

func (api *API) DeleteMagicFirewallRuleset(ctxcontext.Context, accountID, IDstring)error

DeleteMagicFirewallRuleset deletes a Magic Firewall ruleset

API reference:https://api.cloudflare.com/#rulesets-delete-ruleset

Deprecated: Use `DeleteZoneRuleset` or `DeleteAccountRuleset` instead.

func (*API)DeleteMagicTransitGRETunneladded inv0.32.0

func (api *API) DeleteMagicTransitGRETunnel(ctxcontext.Context, accountIDstring, idstring) (MagicTransitGRETunnel,error)

DeleteMagicTransitGRETunnel deletes a GRE tunnel.

API reference:https://api.cloudflare.com/#magic-gre-tunnels-delete-gre-tunnel

func (*API)DeleteMagicTransitIPsecTunneladded inv0.31.0

func (api *API) DeleteMagicTransitIPsecTunnel(ctxcontext.Context, accountIDstring, idstring) (MagicTransitIPsecTunnel,error)

DeleteMagicTransitIPsecTunnel deletes an IPsec Tunnel

API reference:https://api.cloudflare.com/#magic-ipsec-tunnels-delete-ipsec-tunnel

func (*API)DeleteMagicTransitStaticRouteadded inv0.18.0

func (api *API) DeleteMagicTransitStaticRoute(ctxcontext.Context, accountID, IDstring) (MagicTransitStaticRoute,error)

DeleteMagicTransitStaticRoute deletes a static route

API reference:https://api.cloudflare.com/#magic-transit-static-routes-delete-route

func (*API)DeleteManagedNetworksadded inv0.57.0

func (api *API) DeleteManagedNetworks(ctxcontext.Context, rc *ResourceContainer, networkIDstring) ([]DeviceManagedNetwork,error)

DeleteManagedNetworks deletes a Device Managed Network.

API reference:https://api.cloudflare.com/#device-managed-networks-delete-device-managed-network

func (*API)DeleteNotificationPolicyadded inv0.19.0

func (api *API) DeleteNotificationPolicy(ctxcontext.Context, accountID, policyIDstring) (SaveResponse,error)

DeleteNotificationPolicy deletes a notification policy for an account.

API Reference:https://api.cloudflare.com/#notification-policies-delete-notification-policy

func (*API)DeleteNotificationWebhooksadded inv0.19.0

func (api *API) DeleteNotificationWebhooks(ctxcontext.Context, accountID, webhookIDstring) (SaveResponse,error)

DeleteNotificationWebhooks will delete a webhook, given the account andwebhooks ids. Deleting the webhooks will remove it from any connectednotification policies.

API Reference:https://api.cloudflare.com/#notification-webhooks-delete-webhook

func (*API)DeleteObservatoryPageTestsadded inv0.78.0

func (api *API) DeleteObservatoryPageTests(ctxcontext.Context, rc *ResourceContainer, paramsDeleteObservatoryPageTestsParams) (*int,error)

DeleteObservatoryPageTests deletes all tests for a page in a specific region.

API reference:https://api.cloudflare.com/#speed-delete-tests

func (*API)DeleteObservatoryScheduledPageTestadded inv0.78.0

func (api *API) DeleteObservatoryScheduledPageTest(ctxcontext.Context, rc *ResourceContainer, paramsDeleteObservatoryScheduledPageTestParams) (*int,error)

DeleteObservatoryScheduledPageTest deletes the test schedule for a page in a specific region.

API reference:https://api.cloudflare.com/#speed-delete-scheduled-test

func (*API)DeletePageRuleadded inv0.7.2

func (api *API) DeletePageRule(ctxcontext.Context, zoneID, ruleIDstring)error

DeletePageRule deletes a Page Rule for a zone.

API reference:https://api.cloudflare.com/#page-rules-for-a-zone-delete-a-page-rule

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}err = api.DeletePageRule(context.Background(), zoneID, "my_page_rule_id")if err != nil {log.Fatal(err)}

func (*API)DeletePageShieldPolicyadded inv0.84.0

func (api *API) DeletePageShieldPolicy(ctxcontext.Context, rc *ResourceContainer, policyIDstring)error

DeletePageShieldPolicy deletes a page shield policy for a zone.

API documentation:https://developers.cloudflare.com/api/operations/page-shield-delete-page-shield-policy

func (*API)DeletePagesDeploymentadded inv0.40.0

func (api *API) DeletePagesDeployment(ctxcontext.Context, rc *ResourceContainer, paramsDeletePagesDeploymentParams)error

DeletePagesDeployment deletes a Pages deployment.

API reference:https://api.cloudflare.com/#pages-deployment-delete-deployment

func (*API)DeletePagesProjectadded inv0.26.0

func (api *API) DeletePagesProject(ctxcontext.Context, rc *ResourceContainer, projectNamestring)error

DeletePagesProject deletes a Pages project by name.

API reference:https://api.cloudflare.com/#pages-project-delete-project

func (*API)DeletePerHostnameAuthenticatedOriginPullsCertificateadded inv0.12.2

func (api *API) DeletePerHostnameAuthenticatedOriginPullsCertificate(ctxcontext.Context, zoneID, certificateIDstring) (PerHostnameAuthenticatedOriginPullsCertificateDetails,error)

DeletePerHostnameAuthenticatedOriginPullsCertificate will remove the requested Per Hostname certificate from the edge.

API reference:https://api.cloudflare.com/#per-hostname-authenticated-origin-pull-delete-hostname-client-certificate

func (*API)DeletePerZoneAuthenticatedOriginPullsCertificateadded inv0.12.2

func (api *API) DeletePerZoneAuthenticatedOriginPullsCertificate(ctxcontext.Context, zoneID, certificateIDstring) (PerZoneAuthenticatedOriginPullsCertificateDetails,error)

DeletePerZoneAuthenticatedOriginPullsCertificate removes the specified client certificate from the edge.

API reference:https://api.cloudflare.com/#zone-level-authenticated-origin-pulls-delete-certificate

func (*API)DeleteQueueadded inv0.55.0

func (api *API) DeleteQueue(ctxcontext.Context, rc *ResourceContainer, queueNamestring)error

DeleteQueue deletes a queue.

API reference:https://api.cloudflare.com/#queue-delete-queue

func (*API)DeleteQueueConsumeradded inv0.55.0

func (api *API) DeleteQueueConsumer(ctxcontext.Context, rc *ResourceContainer, paramsDeleteQueueConsumerParams)error

DeleteQueueConsumer deletes the consumer for a queue..

API reference:https://api.cloudflare.com/#queue-delete-queue-consumer

func (*API)DeleteR2Bucketadded inv0.47.0

func (api *API) DeleteR2Bucket(ctxcontext.Context, rc *ResourceContainer, bucketNamestring)error

DeleteR2Bucket Deletes an existing R2 bucket.

API reference:https://api.cloudflare.com/#r2-bucket-delete-bucket

func (*API)DeleteRateLimitadded inv0.8.5

func (api *API) DeleteRateLimit(ctxcontext.Context, zoneID, limitIDstring)error

DeleteRateLimit deletes a Rate Limit for a zone.

API reference:https://api.cloudflare.com/#rate-limits-for-a-zone-delete-rate-limit

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}err = api.DeleteRateLimit(context.Background(), zoneID, "my_rate_limit_id")if err != nil {log.Fatal(err)}

func (*API)DeleteRiskScoreIntegrationadded inv0.101.0

func (api *API) DeleteRiskScoreIntegration(ctxcontext.Context, rc *ResourceContainer, integrationIDstring)error

DeleteRiskScoreIntegration deletes a Risk Score Integration.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/risk_scoring/subresources/integrations/methods/delete/

func (*API)DeleteRulesetadded inv0.73.0

func (api *API) DeleteRuleset(ctxcontext.Context, rc *ResourceContainer, rulesetIDstring)error

DeleteRuleset removes a ruleset based on the ruleset ID.

API reference:https://developers.cloudflare.com/api/operations/deleteAccountRulesetAPI reference:https://developers.cloudflare.com/api/resources/rulesets/methods/delete/

func (*API)DeleteRulesetRuleadded inv0.102.0

func (api *API) DeleteRulesetRule(ctxcontext.Context, rc *ResourceContainer, paramsDeleteRulesetRuleParams)error

DeleteRulesetRule removes a ruleset rule based on the ruleset ID +ruleset rule ID.

API reference:https://developers.cloudflare.com/api/resources/rulesets/methods/delete/

func (*API)DeleteSSLadded inv0.7.2

func (api *API) DeleteSSL(ctxcontext.Context, zoneID, certificateIDstring)error

DeleteSSL deletes a custom SSL certificate from the given zone.

API reference:https://api.cloudflare.com/#custom-ssl-for-a-zone-delete-an-ssl-certificate

func (*API)DeleteSecondaryDNSPrimaryadded inv0.15.0

func (api *API) DeleteSecondaryDNSPrimary(ctxcontext.Context, accountID, primaryIDstring)error

DeleteSecondaryDNSPrimary deletes a secondary DNS primary.

API reference:https://api.cloudflare.com/#secondary-dns-primary--delete-primary

func (*API)DeleteSecondaryDNSTSIGadded inv0.15.0

func (api *API) DeleteSecondaryDNSTSIG(ctxcontext.Context, accountID, tsigIDstring)error

DeleteSecondaryDNSTSIG deletes a secondary DNS TSIG.

API reference:https://api.cloudflare.com/#secondary-dns-tsig--delete-tsig

func (*API)DeleteSecondaryDNSZoneadded inv0.15.0

func (api *API) DeleteSecondaryDNSZone(ctxcontext.Context, zoneIDstring)error

DeleteSecondaryDNSZone deletes a secondary DNS zone.

API reference:https://api.cloudflare.com/#secondary-dns-delete-secondary-zone-configuration

func (*API)DeleteSpectrumApplicationadded inv0.9.0

func (api *API) DeleteSpectrumApplication(ctxcontext.Context, zoneIDstring, applicationIDstring)error

DeleteSpectrumApplication removes a Spectrum application based on the ID.

API reference:https://developers.cloudflare.com/spectrum/api-reference/#delete-a-spectrum-application

func (*API)DeleteTeamsListadded inv0.17.0

func (api *API) DeleteTeamsList(ctxcontext.Context, rc *ResourceContainer, teamsListIDstring)error

DeleteTeamsList deletes a teams list.

API reference:https://api.cloudflare.com/#teams-lists-delete-teams-list

func (*API)DeleteTeamsLocationadded inv0.21.0

func (api *API) DeleteTeamsLocation(ctxcontext.Context, accountID, teamsLocationIDstring)error

DeleteTeamsLocation deletes a teams location.

API reference:https://api.cloudflare.com/#teams-locations-delete-teams-location

func (*API)DeleteTeamsProxyEndpointadded inv0.35.0

func (api *API) DeleteTeamsProxyEndpoint(ctxcontext.Context, accountID, proxyEndpointIDstring)error

DeleteTeamsProxyEndpoint deletes a teams Proxy Endpoint.

API reference:https://api.cloudflare.com/#zero-trust-gateway-proxy-endpoints-delete-proxy-endpoint

func (*API)DeleteTieredCacheadded inv0.57.1

func (api *API) DeleteTieredCache(ctxcontext.Context, rc *ResourceContainer) (TieredCache,error)

DeleteTieredCache allows you to delete the tiered cache settings for a zone.This is equivalent to using SetTieredCache with the value of TieredCacheOff.

API Reference:https://api.cloudflare.com/#smart-tiered-cache-delete-smart-tiered-cache-settingAPI Reference:https://api.cloudflare.com/#tiered-cache-patch-tiered-cache-setting

func (*API)DeleteTunneladded inv0.39.0

func (api *API) DeleteTunnel(ctxcontext.Context, rc *ResourceContainer, tunnelIDstring)error

DeleteTunnel removes a single Argo tunnel.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-delete-cloudflare-tunnel

func (*API)DeleteTunnelRouteadded inv0.36.0

func (api *API) DeleteTunnelRoute(ctxcontext.Context, rc *ResourceContainer, paramsTunnelRoutesDeleteParams)error

DeleteTunnelRoute delete an existing route from the account routing table.

See:https://api.cloudflare.com/#tunnel-route-delete-route

func (*API)DeleteTunnelVirtualNetworkadded inv0.41.0

func (api *API) DeleteTunnelVirtualNetwork(ctxcontext.Context, rc *ResourceContainer, vnetIDstring)error

DeleteTunnelVirtualNetwork deletes an existing virtual network from theaccount.

API reference:https://api.cloudflare.com/#tunnel-virtual-network-delete-virtual-network

func (*API)DeleteTurnstileWidgetadded inv0.66.0

func (api *API) DeleteTurnstileWidget(ctxcontext.Context, rc *ResourceContainer, siteKeystring)error

DeleteTurnstileWidget delete a challenge widget.

API reference:https://api.cloudflare.com/#challenge-widgets-delete-a-challenge-widget

func (*API)DeleteUserAccessRuleadded inv0.8.1

func (api *API) DeleteUserAccessRule(ctxcontext.Context, accessRuleIDstring) (*AccessRuleResponse,error)

DeleteUserAccessRule deletes a single access rule for the logged-in user andaccess rule identifiers.

API reference:https://api.cloudflare.com/#user-level-firewall-access-rule-update-access-rule

func (*API)DeleteUserAgentRuleadded inv0.8.0

func (api *API) DeleteUserAgentRule(ctxcontext.Context, zoneIDstring, idstring) (*UserAgentRuleResponse,error)

DeleteUserAgentRule deletes a User-Agent Block rule (based on the ID) for the given zone ID.

API reference:https://api.cloudflare.com/#user-agent-blocking-rules-delete-useragent-rule

func (*API)DeleteWAFOverrideadded inv0.11.1

func (api *API) DeleteWAFOverride(ctxcontext.Context, zoneID, overrideIDstring)error

DeleteWAFOverride deletes a WAF override for a zone.

API reference:https://api.cloudflare.com/#waf-overrides-delete-lockdown-rule

func (*API)DeleteWaitingRoomadded inv0.17.0

func (api *API) DeleteWaitingRoom(ctxcontext.Context, zoneID, waitingRoomIDstring)error

DeleteWaitingRoom deletes a Waiting Room for a zone.

API reference:https://api.cloudflare.com/#waiting-room-delete-waiting-room

func (*API)DeleteWaitingRoomEventadded inv0.33.0

func (api *API) DeleteWaitingRoomEvent(ctxcontext.Context, zoneIDstring, waitingRoomIDstring, eventIDstring)error

DeleteWaitingRoomEvent deletes an event for a Waiting Room.

API reference:https://api.cloudflare.com/#waiting-room-delete-event

func (*API)DeleteWaitingRoomRuleadded inv0.53.0

func (api *API) DeleteWaitingRoomRule(ctxcontext.Context, rc *ResourceContainer, paramsDeleteWaitingRoomRuleParams) ([]WaitingRoomRule,error)

DeleteWaitingRoomRule deletes a rule for a Waiting Room.

API reference:https://api.cloudflare.com/#waiting-room-delete-waiting-room-rule

func (*API)DeleteWeb3Hostnameadded inv0.45.0

DeleteWeb3Hostname deletes a web3 hostname.

API Reference:https://api.cloudflare.com/#web3-hostname-delete-web3-hostname

func (*API)DeleteWebAnalyticsRuleadded inv0.75.0

func (api *API) DeleteWebAnalyticsRule(ctxcontext.Context, rc *ResourceContainer, paramsDeleteWebAnalyticsRuleParams) (*string,error)

DeleteWebAnalyticsRule deletes an existing Web Analytics Rule from a Web Analytics ruleset.

API reference:https://api.cloudflare.com/#web-analytics-delete-rule

func (*API)DeleteWebAnalyticsSiteadded inv0.75.0

func (api *API) DeleteWebAnalyticsSite(ctxcontext.Context, rc *ResourceContainer, paramsDeleteWebAnalyticsSiteParams) (*string,error)

DeleteWebAnalyticsSite deletes an existing Web Analytics Site for an Account.

API reference:https://api.cloudflare.com/#web-analytics-delete-site

func (*API)DeleteWorkeradded inv0.9.0

func (api *API) DeleteWorker(ctxcontext.Context, rc *ResourceContainer, paramsDeleteWorkerParams)error

DeleteWorker deletes a single Worker.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/delete/

func (*API)DeleteWorkerRouteadded inv0.9.0

func (api *API) DeleteWorkerRoute(ctxcontext.Context, rc *ResourceContainer, routeIDstring) (WorkerRouteResponse,error)

DeleteWorkerRoute deletes worker route for a script.

API reference:https://developers.cloudflare.com/api/operations/worker-routes-delete-route

func (*API)DeleteWorkersForPlatformsDispatchNamespaceadded inv0.90.0

func (api *API) DeleteWorkersForPlatformsDispatchNamespace(ctxcontext.Context, rc *ResourceContainer, namestring)error

DeleteWorkersForPlatformsDispatchNamespace deletes a dispatch namespace.

API reference:https://developers.cloudflare.com/api/resources/workers_for_platforms/subresources/dispatch/subresources/namespaces/methods/delete/

func (*API)DeleteWorkersKVEntriesadded inv0.55.0

func (api *API) DeleteWorkersKVEntries(ctxcontext.Context, rc *ResourceContainer, paramsDeleteWorkersKVEntriesParams) (Response,error)

DeleteWorkersKVEntries deletes multiple KVs at once.

API reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/methods/bulk_delete/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}keys := []string{"key1", "key2", "key3"}resp, err := api.DeleteWorkersKVEntries(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.DeleteWorkersKVEntriesParams{NamespaceID: namespace,Keys:        keys,})if err != nil {log.Fatal(err)}fmt.Println(resp)

func (API)DeleteWorkersKVEntryadded inv0.55.0

func (apiAPI) DeleteWorkersKVEntry(ctxcontext.Context, rc *ResourceContainer, paramsDeleteWorkersKVEntryParams) (Response,error)

DeleteWorkersKVEntry deletes a key and value for a provided storage namespace.

API reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/subresources/values/methods/delete/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}key := "test_key"resp, err := api.DeleteWorkersKVEntry(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.DeleteWorkersKVEntryParams{NamespaceID: namespace,Key:         key,})if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", resp)

func (*API)DeleteWorkersKVNamespaceadded inv0.9.0

func (api *API) DeleteWorkersKVNamespace(ctxcontext.Context, rc *ResourceContainer, namespaceIDstring) (Response,error)

DeleteWorkersKVNamespace deletes the namespace corresponding to the given ID.

API reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/methods/delete/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}response, err := api.DeleteWorkersKVNamespace(context.Background(), cloudflare.AccountIdentifier(accountID), namespace)if err != nil {log.Fatal(err)}fmt.Println(response)

func (*API)DeleteWorkersSecretadded inv0.13.1

func (api *API) DeleteWorkersSecret(ctxcontext.Context, rc *ResourceContainer, paramsDeleteWorkersSecretParams) (Response,error)

DeleteWorkersSecret deletes a secret.

API reference:https://api.cloudflare.com/

func (*API)DeleteWorkersTailadded inv0.47.0

func (api *API) DeleteWorkersTail(ctxcontext.Context, rc *ResourceContainer, scriptName, tailIDstring)error

DeleteWorkersTail Deletes a tail from a Worker.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/tail/methods/delete/

func (*API)DeleteZoneadded inv0.7.2

func (api *API) DeleteZone(ctxcontext.Context, zoneIDstring) (ZoneID,error)

DeleteZone deletes the given zone.

API reference:https://api.cloudflare.com/#zone-delete-a-zone

func (*API)DeleteZoneAccessRuleadded inv0.8.1

func (api *API) DeleteZoneAccessRule(ctxcontext.Context, zoneID, accessRuleIDstring) (*AccessRuleResponse,error)

DeleteZoneAccessRule deletes a single access rule for the given zone andaccess rule identifiers.

API reference:https://api.cloudflare.com/#firewall-access-rule-for-a-zone-delete-access-rule

func (*API)DeleteZoneCacheVariantsadded inv0.32.0

func (api *API) DeleteZoneCacheVariants(ctxcontext.Context, zoneIDstring)error

DeleteZoneCacheVariants deletes cache variants for a given zone.

API reference:https://api.cloudflare.com/#zone-cache-settings-delete-variants-setting

func (*API)DeleteZoneDNSSECadded inv0.13.5

func (api *API) DeleteZoneDNSSEC(ctxcontext.Context, zoneIDstring) (string,error)

DeleteZoneDNSSEC deletes DNSSEC for zone

API reference:https://api.cloudflare.com/#dnssec-delete-dnssec-records

func (*API)DeleteZoneHoldadded inv0.75.0

func (api *API) DeleteZoneHold(ctxcontext.Context, rc *ResourceContainer, paramsDeleteZoneHoldParams) (ZoneHold,error)

DeleteZoneHold removes enforcement of a zone hold on the zone, permanently ortemporarily, allowing the creation and activation of zones with this hostname.

API reference:https://developers.cloudflare.com/api/resources/zones/subresources/holds/methods/delete/

func (*API)DeleteZoneLevelAccessBookmarkadded inv0.36.0

func (api *API) DeleteZoneLevelAccessBookmark(ctxcontext.Context, zoneID, bookmarkIDstring)error

DeleteZoneLevelAccessBookmark deletes a zone level access bookmark.

API reference:https://api.cloudflare.com/#zone-level-access-bookmarks-delete-access-bookmark

func (*API)DeleteZoneLockdownadded inv0.8.0

func (api *API) DeleteZoneLockdown(ctxcontext.Context, rc *ResourceContainer, idstring) (ZoneLockdown,error)

DeleteZoneLockdown deletes a Zone ZoneLockdown rule (based on the ID) for the given zone ID.

API reference:https://api.cloudflare.com/#zone-ZoneLockdown-delete-ZoneLockdown-rule

func (*API)DeleteZoneSnippetadded inv0.109.0

func (api *API) DeleteZoneSnippet(ctxcontext.Context, rc *ResourceContainer, snippetNamestring)error

func (*API)DetachWorkersDomainadded inv0.55.0

func (api *API) DetachWorkersDomain(ctxcontext.Context, rc *ResourceContainer, domainIDstring)error

DetachWorkersDomain detaches a worker from a zone and hostname.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/domains/methods/delete/

func (*API)DevicePostureIntegrationadded inv0.29.0

func (api *API) DevicePostureIntegration(ctxcontext.Context, accountID, integrationIDstring) (DevicePostureIntegration,error)

DevicePostureIntegration returns a specific device posture integrations within an account.

API reference:https://api.cloudflare.com/#device-posture-integrations-device-posture-integration-details

func (*API)DevicePostureIntegrationsadded inv0.29.0

func (api *API) DevicePostureIntegrations(ctxcontext.Context, accountIDstring) ([]DevicePostureIntegration,ResultInfo,error)

DevicePostureIntegrations returns all device posture integrations within an account.

API reference:https://api.cloudflare.com/#device-posture-integrations-list-device-posture-integrations

func (*API)DevicePostureRuleadded inv0.17.0

func (api *API) DevicePostureRule(ctxcontext.Context, accountID, ruleIDstring) (DevicePostureRule,error)

DevicePostureRule returns a single device posture rule based on the rule ID.

API reference:https://api.cloudflare.com/#device-posture-rules-device-posture-rules-details

func (*API)DevicePostureRulesadded inv0.17.0

func (api *API) DevicePostureRules(ctxcontext.Context, accountIDstring) ([]DevicePostureRule,ResultInfo,error)

DevicePostureRules returns all device posture rules within an account.

API reference:https://api.cloudflare.com/#device-posture-rules-list-device-posture-rules

func (*API)DisableEmailRoutingadded inv0.47.0

func (api *API) DisableEmailRouting(ctxcontext.Context, rc *ResourceContainer) (EmailRoutingSettings,error)

DisableEmailRouting Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work.

API reference:https://api.cloudflare.com/#email-routing-settings-disable-email-routing

func (*API)EditPerHostnameAuthenticatedOriginPullsConfigadded inv0.12.2

func (api *API) EditPerHostnameAuthenticatedOriginPullsConfig(ctxcontext.Context, zoneIDstring, config []PerHostnameAuthenticatedOriginPullsConfig) ([]PerHostnameAuthenticatedOriginPullsDetails,error)

EditPerHostnameAuthenticatedOriginPullsConfig applies the supplied Per Hostname AuthenticatedOriginPulls config onto a hostname(s) in the edge.

API reference:https://api.cloudflare.com/#per-hostname-authenticated-origin-pull-enable-or-disable-a-hostname-for-client-authentication

func (*API)EditUniversalSSLSettingadded inv0.9.0

func (api *API) EditUniversalSSLSetting(ctxcontext.Context, zoneIDstring, settingUniversalSSLSetting) (UniversalSSLSetting,error)

EditUniversalSSLSetting edits the universal ssl setting for a zone

API reference:https://api.cloudflare.com/#universal-ssl-settings-for-a-zone-edit-universal-ssl-settings

func (*API)EditZoneadded inv0.7.2

func (api *API) EditZone(ctxcontext.Context, zoneIDstring, zoneOptsZoneOptions) (Zone,error)

EditZone edits the given zone.

This is usually called by ZoneSetPaused, ZoneSetType, or ZoneSetVanityNS.

API reference:https://api.cloudflare.com/#zone-edit-zone-properties

func (*API)EnableEmailRoutingadded inv0.47.0

func (api *API) EnableEmailRouting(ctxcontext.Context, rc *ResourceContainer) (EmailRoutingSettings,error)

EnableEmailRouting Enable you Email Routing zone. Add and lock the necessary MX and SPF records.

API reference:https://api.cloudflare.com/#email-routing-settings-enable-email-routing

func (*API)ExportDNSRecordsadded inv0.66.0

func (api *API) ExportDNSRecords(ctxcontext.Context, rc *ResourceContainer, paramsExportDNSRecordsParams) (string,error)

ExportDNSRecords returns all DNS records for a zone in the BIND format.

API reference:https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/export/

func (*API)ExportZarazConfigadded inv0.86.0

func (api *API) ExportZarazConfig(ctxcontext.Context, rc *ResourceContainer)error

func (*API)FallbackOriginadded inv0.10.1

func (api *API) FallbackOrigin(ctxcontext.Context, zoneIDstring) (FallbackOrigin,error)

FallbackOrigin returns information about the fallback origin for the specified zone.

API reference:https://developers.cloudflare.com/ssl/ssl-for-saas/api-calls/#fallback-origin-configuration

func (*API)Filteradded inv0.9.0

func (api *API) Filter(ctxcontext.Context, rc *ResourceContainer, filterIDstring) (Filter,error)

Filter returns a single filter in a zone based on the filter ID.

API reference:https://developers.cloudflare.com/firewall/api/cf-filters/get/#get-by-filter-id

func (*API)Filtersadded inv0.9.0

func (api *API) Filters(ctxcontext.Context, rc *ResourceContainer, paramsFilterListParams) ([]Filter, *ResultInfo,error)

Filters returns filters for a zone.

Automatically paginates all results unless `params.PerPage` and `params.Page`is set.

API reference:https://developers.cloudflare.com/firewall/api/cf-filters/get/#get-all-filters

func (*API)FirewallRuleadded inv0.9.0

func (api *API) FirewallRule(ctxcontext.Context, rc *ResourceContainer, firewallRuleIDstring) (FirewallRule,error)

FirewallRule returns a single firewall rule based on the ID.

API reference:https://developers.cloudflare.com/firewall/api/cf-firewall-rules/get/#get-by-rule-id

func (*API)FirewallRulesadded inv0.9.0

FirewallRules returns all firewall rules.

Automatically paginates all results unless `params.PerPage` and `params.Page`is set.

API reference:https://developers.cloudflare.com/firewall/api/cf-firewall-rules/get/#get-all-rules

func (*API)ForceSecondaryDNSZoneAXFRadded inv0.15.0

func (api *API) ForceSecondaryDNSZoneAXFR(ctxcontext.Context, zoneIDstring)error

ForceSecondaryDNSZoneAXFR requests an immediate AXFR request.

API reference:https://api.cloudflare.com/#secondary-dns-update-secondary-zone-configuration

func (*API)GenerateMagicTransitIPsecTunnelPSKadded inv0.41.0

func (api *API) GenerateMagicTransitIPsecTunnelPSK(ctxcontext.Context, accountIDstring, idstring) (string, *MagicTransitIPsecTunnelPskMetadata,error)

GenerateMagicTransitIPsecTunnelPSK generates a pre shared key (psk) for an IPsec tunnel

API reference:https://api.cloudflare.com/#magic-ipsec-tunnels-generate-pre-shared-key-psk-for-ipsec-tunnels

func (*API)GetAPIShieldConfigurationadded inv0.49.0

func (api *API) GetAPIShieldConfiguration(ctxcontext.Context, rc *ResourceContainer) (APIShield,ResultInfo,error)

GetAPIShieldConfiguration gets a zone API shield configuration.

API documentation:https://api.cloudflare.com/#api-shield-settings-retrieve-information-about-specific-configuration-properties

func (*API)GetAPIShieldOperationadded inv0.78.0

func (api *API) GetAPIShieldOperation(ctxcontext.Context, rc *ResourceContainer, paramsGetAPIShieldOperationParams) (*APIShieldOperation,error)

GetAPIShieldOperation returns information about an operation

API documentationhttps://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/methods/get/

func (*API)GetAPIShieldOperationSchemaValidationSettingsadded inv0.80.0

GetAPIShieldOperationSchemaValidationSettings retrieves operation level schema validation settings

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/subresources/schema_validation/methods/get/

func (*API)GetAPIShieldSchemaadded inv0.79.0

func (api *API) GetAPIShieldSchema(ctxcontext.Context, rc *ResourceContainer, paramsGetAPIShieldSchemaParams) (*APIShieldSchema,error)

GetAPIShieldSchema retrieves information about a specific schema on a zone

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/get/

func (*API)GetAPIShieldSchemaValidationSettingsadded inv0.80.0

func (api *API) GetAPIShieldSchemaValidationSettings(ctxcontext.Context, rc *ResourceContainer) (*APIShieldSchemaValidationSettings,error)

GetAPIShieldSchemaValidationSettings retrieves zone level schema validation settings

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/settings/subresources/schema_validation/methods/get/

func (*API)GetAPITokenadded inv0.13.5

func (api *API) GetAPIToken(ctxcontext.Context, tokenIDstring) (APIToken,error)

GetAPIToken returns a single API token based on the ID.

API reference:https://api.cloudflare.com/#user-api-tokens-token-details

func (*API)GetAccessApplicationadded inv0.71.0

func (api *API) GetAccessApplication(ctxcontext.Context, rc *ResourceContainer, applicationIDstring) (AccessApplication,error)

GetAccessApplication returns a single application based on the applicationID for either account or zone.

Account API reference:https://developers.cloudflare.com/api/operations/access-applications-get-an-access-applicationZone API reference:https://developers.cloudflare.com/api/operations/zone-level-access-applications-get-an-access-application

func (*API)GetAccessCustomPageadded inv0.74.0

func (api *API) GetAccessCustomPage(ctxcontext.Context, rc *ResourceContainer, idstring) (AccessCustomPage,error)

func (*API)GetAccessGroupadded inv0.71.0

func (api *API) GetAccessGroup(ctxcontext.Context, rc *ResourceContainer, groupIDstring) (AccessGroup,error)

GetAccessGroup returns a single group based on the group ID.

Account API Reference:https://developers.cloudflare.com/api/operations/access-groups-get-an-access-groupZone API Reference:https://developers.cloudflare.com/api/operations/zone-level-access-groups-get-an-access-group

func (*API)GetAccessIdentityProvideradded inv0.71.0

func (api *API) GetAccessIdentityProvider(ctxcontext.Context, rc *ResourceContainer, identityProviderIDstring) (AccessIdentityProvider,error)

GetAccessIdentityProvider returns a single Access IdentityProvider for an account or zone.

Account API Reference:https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-providerZone API Reference:https://developers.cloudflare.com/api/operations/zone-level-access-identity-providers-get-an-access-identity-provider

func (*API)GetAccessMutualTLSCertificateadded inv0.71.0

func (api *API) GetAccessMutualTLSCertificate(ctxcontext.Context, rc *ResourceContainer, certificateIDstring) (AccessMutualTLSCertificate,error)

GetAccessMutualTLSCertificate returns a single Access Mutual TLScertificate.

Account API Reference:https://developers.cloudflare.com/api/operations/access-mtls-authentication-get-an-mtls-certificateZone API Reference:https://developers.cloudflare.com/api/operations/zone-level-access-mtls-authentication-get-an-mtls-certificate

func (*API)GetAccessOrganizationadded inv0.71.0

func (*API)GetAccessPolicyadded inv0.71.0

func (api *API) GetAccessPolicy(ctxcontext.Context, rc *ResourceContainer, paramsGetAccessPolicyParams) (AccessPolicy,error)

GetAccessPolicy returns a single policy based on the policy ID.

Account API reference:https://developers.cloudflare.com/api/operations/access-policies-get-an-access-policyZone API reference:https://developers.cloudflare.com/api/operations/zone-level-access-policies-get-an-access-policy

func (*API)GetAccessTagadded inv0.78.0

func (api *API) GetAccessTag(ctxcontext.Context, rc *ResourceContainer, tagNamestring) (AccessTag,error)

func (*API)GetAccessUserActiveSessionsadded inv0.81.0

func (api *API) GetAccessUserActiveSessions(ctxcontext.Context, rc *ResourceContainer, userIDstring) ([]AccessUserActiveSessionResult,error)

GetAccessUserActiveSessions returns a list of active sessions for an user.

API documentation:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/users/subresources/active_sessions/methods/list/

func (*API)GetAccessUserFailedLoginsadded inv0.81.0

func (api *API) GetAccessUserFailedLogins(ctxcontext.Context, rc *ResourceContainer, userIDstring) ([]AccessUserFailedLoginResult,error)

GetAccessUserFailedLogins returns a list of failed logins for a user.

API documentation:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/users/subresources/failed_logins/methods/list/

func (*API)GetAccessUserLastSeenIdentityadded inv0.81.0

func (api *API) GetAccessUserLastSeenIdentity(ctxcontext.Context, rc *ResourceContainer, userIDstring) (GetAccessUserLastSeenIdentityResult,error)

GetAccessUserLastSeenIdentity returns the last seen identity for a user.

API documentation:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/users/subresources/last_seen_identity/methods/get/

func (*API)GetAccessUserSingleActiveSessionadded inv0.81.0

func (api *API) GetAccessUserSingleActiveSession(ctxcontext.Context, rc *ResourceContainer, userIDstring, sessionIDstring) (GetAccessUserSingleActiveSessionResult,error)

GetAccessUserSingleActiveSession returns a single active session for a user.

API documentation:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/users/subresources/active_sessions/methods/get/

func (*API)GetAccountRoleadded inv0.78.0

func (api *API) GetAccountRole(ctxcontext.Context, rc *ResourceContainer, roleIDstring) (AccountRole,error)

GetAccountRole returns the details of a single account role.

API reference:https://developers.cloudflare.com/api/resources/accounts/subresources/roles/methods/get/

func (*API)GetAddressMapadded inv0.63.0

func (api *API) GetAddressMap(ctxcontext.Context, rc *ResourceContainer, idstring) (AddressMap,error)

GetAddressMap returns a specific address map.

API reference:https://developers.cloudflare.com/api/resources/addressing/subresources/address_maps/methods/get/

func (*API)GetAdvertisementStatusadded inv0.11.7

func (api *API) GetAdvertisementStatus(ctxcontext.Context, accountID, IDstring) (AdvertisementStatus,error)

GetAdvertisementStatus returns the BGP status of the IP prefix

API reference:https://api.cloudflare.com/#ip-address-management-prefixes-update-prefix-description

func (*API)GetAuditSSHSettingsadded inv0.79.0

GetAuditSSHSettings returns the accounts zt audit ssh settings.

API reference:https://api.cloudflare.com/#zero-trust-get-audit-ssh-settings

func (*API)GetAuthenticatedOriginPullsStatusadded inv0.12.2

func (api *API) GetAuthenticatedOriginPullsStatus(ctxcontext.Context, zoneIDstring) (AuthenticatedOriginPulls,error)

GetAuthenticatedOriginPullsStatus returns the configuration details for global AuthenticatedOriginPulls (tls_client_auth).

API reference:https://api.cloudflare.com/#zone-settings-get-tls-client-auth-setting

func (*API)GetAvailableNotificationTypesadded inv0.19.0

func (api *API) GetAvailableNotificationTypes(ctxcontext.Context, accountIDstring) (NotificationAvailableAlertsResponse,error)

GetAvailableNotificationTypes will return the alert types available fora given account.

API Reference:https://api.cloudflare.com/#notification-mechanism-eligibility-properties

func (*API)GetBaseImageadded inv0.71.0

func (api *API) GetBaseImage(ctxcontext.Context, rc *ResourceContainer, idstring) ([]byte,error)

GetBaseImage gets the base image used to derive variants.

API Reference:https://api.cloudflare.com/#cloudflare-images-base-image

func (*API)GetBotManagementadded inv0.75.0

func (api *API) GetBotManagement(ctxcontext.Context, rc *ResourceContainer) (BotManagement,error)

GetBotManagement gets a zone API shield configuration.

API documentation:https://developers.cloudflare.com/api/resources/bot_management/methods/get/

func (*API)GetCacheReserveadded inv0.68.0

func (api *API) GetCacheReserve(ctxcontext.Context, rc *ResourceContainer, paramsGetCacheReserveParams) (CacheReserve,error)

GetCacheReserve returns information about the current cache reserve settings.

API reference:https://developers.cloudflare.com/api/resources/cache/subresources/cache_reserve/methods/get/

func (*API)GetCustomNameserverZoneMetadataadded inv0.70.0

GetCustomNameserverZoneMetadata get metadata for custom nameservers on a zone.

API documentation:https://developers.cloudflare.com/api/resources/zones/subresources/custom_nameservers/methods/get/

func (*API)GetCustomNameserversadded inv0.70.0

func (api *API) GetCustomNameservers(ctxcontext.Context, rc *ResourceContainer, paramsGetCustomNameserversParams) ([]CustomNameserverResult,error)

GetCustomNameservers lists custom nameservers.

API documentation:https://developers.cloudflare.com/api/resources/custom_nameservers/methods/get/

func (*API)GetD1Databaseadded inv0.79.0

func (api *API) GetD1Database(ctxcontext.Context, rc *ResourceContainer, databaseIDstring) (D1Database,error)

GetD1Database returns a database for an account.

API reference:https://developers.cloudflare.com/api/resources/d1/subresources/database/methods/get/

func (*API)GetDCVDelegationadded inv0.77.0

GetDCVDelegation gets a zone DCV Delegation UUID.

API documentation:https://developers.cloudflare.com/api/resources/dcv_delegation/methods/get/

func (*API)GetDLPDatasetadded inv0.87.0

func (api *API) GetDLPDataset(ctxcontext.Context, rc *ResourceContainer, datasetIDstring) (DLPDataset,error)

GetDLPDataset returns a DLP dataset based on the dataset ID.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/dlp/subresources/datasets/methods/get/

func (*API)GetDLPPayloadLogSettingsadded inv0.62.0

func (api *API) GetDLPPayloadLogSettings(ctxcontext.Context, rc *ResourceContainer, paramsGetDLPPayloadLogSettingsParams) (DLPPayloadLogSettings,error)

GetDLPPayloadLogSettings gets the current DLP payload logging settings.

API reference:https://api.cloudflare.com/#dlp-payload-log-settings-get-settings

func (*API)GetDLPProfileadded inv0.53.0

func (api *API) GetDLPProfile(ctxcontext.Context, rc *ResourceContainer, profileIDstring) (DLPProfile,error)

GetDLPProfile returns a single DLP profile (custom or predefined) based onthe profile ID.

API reference:https://api.cloudflare.com/#dlp-profiles-get-dlp-profile

func (*API)GetDNSFirewallClusteradded inv0.70.0

func (api *API) GetDNSFirewallCluster(ctxcontext.Context, rc *ResourceContainer, paramsGetDNSFirewallClusterParams) (*DNSFirewallCluster,error)

GetDNSFirewallCluster fetches a single DNS Firewall cluster.

API reference:https://api.cloudflare.com/#dns-firewall-dns-firewall-cluster-details

func (*API)GetDNSFirewallUserAnalyticsadded inv0.70.0

func (api *API) GetDNSFirewallUserAnalytics(ctxcontext.Context, rc *ResourceContainer, paramsGetDNSFirewallUserAnalyticsParams) (DNSFirewallAnalytics,error)

GetDNSFirewallUserAnalytics retrieves analytics report for a specified dimension and time range.

func (*API)GetDNSRecordadded inv0.58.0

func (api *API) GetDNSRecord(ctxcontext.Context, rc *ResourceContainer, recordIDstring) (DNSRecord,error)

GetDNSRecord returns a single DNS record for the given zone & recordidentifiers.

API reference:https://api.cloudflare.com/#dns-records-for-a-zone-dns-record-details

func (*API)GetDataLocalizationRegionalHostnameadded inv0.66.0

func (api *API) GetDataLocalizationRegionalHostname(ctxcontext.Context, rc *ResourceContainer, hostnamestring) (RegionalHostname,error)

GetDataLocalizationRegionalHostname returns the details of a specific regional hostname.

API reference:https://developers.cloudflare.com/data-localization/regional-services/get-started/#configure-regional-services-via-api

func (*API)GetDefaultDeviceSettingsPolicyadded inv0.52.0

func (api *API) GetDefaultDeviceSettingsPolicy(ctxcontext.Context, rc *ResourceContainer, paramsGetDefaultDeviceSettingsPolicyParams) (DeviceSettingsPolicy,error)

GetDefaultDeviceSettings gets the default device settings policy.

API reference:https://api.cloudflare.com/#devices-get-default-device-settings-policy

func (*API)GetDefaultZarazConfigadded inv0.86.0

func (api *API) GetDefaultZarazConfig(ctxcontext.Context, rc *ResourceContainer) (ZarazConfigResponse,error)

func (*API)GetDeviceClientCertificatesadded inv0.81.0

func (api *API) GetDeviceClientCertificates(ctxcontext.Context, rc *ResourceContainer, paramsGetDeviceClientCertificatesParams) (DeviceClientCertificates,error)

GetDeviceClientCertificates controls the zero trust zone used to provisionclient certificates.

API reference:https://api.cloudflare.com/#device-client-certificates

func (*API)GetDeviceDexTestadded inv0.62.0

func (api *API) GetDeviceDexTest(ctxcontext.Context, rc *ResourceContainer, testIDstring) (DeviceDexTest,error)

GetDeviceDexTest gets a single Device Dex Test.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/devices/subresources/dex_tests/methods/get/

func (*API)GetDeviceManagedNetworkadded inv0.57.0

func (api *API) GetDeviceManagedNetwork(ctxcontext.Context, rc *ResourceContainer, networkIDstring) (DeviceManagedNetwork,error)

GetDeviceManagedNetwork gets a single Device Managed Network.

API reference:https://api.cloudflare.com/#device-managed-networks-device-managed-network-details

func (*API)GetDeviceSettingsPolicyadded inv0.52.0

func (api *API) GetDeviceSettingsPolicy(ctxcontext.Context, rc *ResourceContainer, paramsGetDeviceSettingsPolicyParams) (DeviceSettingsPolicy,error)

GetDefaultDeviceSettings gets the device settings policy by its policyID.

API reference:https://api.cloudflare.com/#devices-get-device-settings-policy-by-id

func (*API)GetEligibleNotificationDestinationsadded inv0.19.0

func (api *API) GetEligibleNotificationDestinations(ctxcontext.Context, accountIDstring) (NotificationEligibilityResponse,error)

GetEligibleNotificationDestinations will return the types ofdestinations an account is eligible to configure.

API Reference:https://api.cloudflare.com/#notification-mechanism-eligibility-properties

func (*API)GetEligibleZonesAccountCustomNameserversadded inv0.70.0

func (api *API) GetEligibleZonesAccountCustomNameservers(ctxcontext.Context, rc *ResourceContainer, paramsGetEligibleZonesAccountCustomNameserversParams) ([]string,error)

GetEligibleZonesAccountCustomNameservers lists zones eligible for custom nameservers.

API documentation:https://developers.cloudflare.com/api/resources/custom_nameservers/methods/availabilty/

func (*API)GetEmailRoutingCatchAllRuleadded inv0.47.0

func (api *API) GetEmailRoutingCatchAllRule(ctxcontext.Context, rc *ResourceContainer) (EmailRoutingCatchAllRule,error)

GetEmailRoutingCatchAllRule Get information on the default catch-all routing rule.

API reference:https://api.cloudflare.com/#email-routing-routing-rules-get-catch-all-rule

func (*API)GetEmailRoutingDNSSettingsadded inv0.47.0

func (api *API) GetEmailRoutingDNSSettings(ctxcontext.Context, rc *ResourceContainer) ([]DNSRecord,error)

GetEmailRoutingDNSSettings Show the DNS records needed to configure your Email Routing zone.

API reference:https://api.cloudflare.com/#email-routing-settings-email-routing---dns-settings

func (*API)GetEmailRoutingDestinationAddressadded inv0.47.0

func (api *API) GetEmailRoutingDestinationAddress(ctxcontext.Context, rc *ResourceContainer, addressIDstring) (EmailRoutingDestinationAddress,error)

GetEmailRoutingDestinationAddress Gets information for a specific destination email already created.

API reference:https://api.cloudflare.com/#email-routing-destination-addresses-get-a-destination-address

func (*API)GetEmailRoutingRuleadded inv0.47.0

func (api *API) GetEmailRoutingRule(ctxcontext.Context, rc *ResourceContainer, ruleIDstring) (EmailRoutingRule,error)

GetEmailRoutingRule Get information for a specific routing rule already created.

API reference:https://api.cloudflare.com/#email-routing-routing-rules-get-routing-rule

func (*API)GetEmailRoutingSettingsadded inv0.47.0

func (api *API) GetEmailRoutingSettings(ctxcontext.Context, rc *ResourceContainer) (EmailRoutingSettings,error)

GetEmailRoutingSettings Get information about the settings for your Email Routing zone.

API reference:https://api.cloudflare.com/#email-routing-settings-get-email-routing-settings

func (*API)GetEntrypointRulesetadded inv0.73.0

func (api *API) GetEntrypointRuleset(ctxcontext.Context, rc *ResourceContainer, phasestring) (Ruleset,error)

GetEntrypointRuleset returns an entry point ruleset base on the phase.

API reference:https://developers.cloudflare.com/api/operations/getAccountEntrypointRulesetAPI reference:https://developers.cloudflare.com/api/resources/rulesets/subresources/phases/methods/get/

func (*API)GetHyperdriveConfigadded inv0.88.0

func (api *API) GetHyperdriveConfig(ctxcontext.Context, rc *ResourceContainer, hyperdriveIDstring) (HyperdriveConfig,error)

GetHyperdriveConfig returns a single Hyperdrive config based on the ID.

API reference:https://developers.cloudflare.com/api/resources/hyperdrive/subresources/configs/methods/get/

func (*API)GetIPListdeprecatedadded inv0.13.0

func (api *API) GetIPList(ctxcontext.Context, accountID, IDstring) (IPList,error)

GetIPList returns a single IP List

API reference:https://api.cloudflare.com/#rules-lists-get-list

Deprecated: Use `GetList` instead.

func (*API)GetIPListBulkOperationdeprecatedadded inv0.13.0

func (api *API) GetIPListBulkOperation(ctxcontext.Context, accountID, IDstring) (IPListBulkOperation,error)

GetIPListBulkOperation returns the status of a bulk operation.

API reference:https://api.cloudflare.com/#rules-lists-get-bulk-operation

Deprecated: Use `GetListBulkOperation` instead.

func (*API)GetIPListItemdeprecatedadded inv0.13.0

func (api *API) GetIPListItem(ctxcontext.Context, accountID, listID, idstring) (IPListItem,error)

GetIPListItem returns a single IP List Item.

API reference:https://api.cloudflare.com/#rules-lists-get-list-item

Deprecated: Use `GetListItem` instead.

func (*API)GetImageadded inv0.71.0

func (api *API) GetImage(ctxcontext.Context, rc *ResourceContainer, idstring) (Image,error)

GetImage gets the details of an uploaded image.

API Reference:https://api.cloudflare.com/#cloudflare-images-image-details

func (*API)GetImagesStatsadded inv0.71.0

func (api *API) GetImagesStats(ctxcontext.Context, rc *ResourceContainer) (ImagesStatsCount,error)

GetImagesStats gets an account's statistics for Cloudflare Images.

API Reference:https://api.cloudflare.com/#cloudflare-images-images-usage-statistics

func (*API)GetImagesVariantadded inv0.88.0

func (api *API) GetImagesVariant(ctxcontext.Context, rc *ResourceContainer, variantIDstring) (ImagesVariant,error)

Fetch details for a single variant.

API Reference:https://developers.cloudflare.com/api/resources/images/subresources/v1/subresources/variants/methods/get/

func (*API)GetInfrastructureAccessTargetadded inv0.105.0

func (api *API) GetInfrastructureAccessTarget(ctxcontext.Context, rc *ResourceContainer, targetIDstring) (InfrastructureAccessTarget,error)

GetInfrastructureAccessTarget returns a single infrastructure access target based on target IDID for either account or zone.

Account API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/infrastructure/subresources/targets/methods/get/

func (*API)GetListadded inv0.41.0

func (api *API) GetList(ctxcontext.Context, rc *ResourceContainer, listIDstring) (List,error)

GetList returns a single List.

API reference:https://api.cloudflare.com/#rules-lists-get-list

func (*API)GetListBulkOperationadded inv0.41.0

func (api *API) GetListBulkOperation(ctxcontext.Context, rc *ResourceContainer, IDstring) (ListBulkOperation,error)

GetListBulkOperation returns the status of a bulk operation.

API reference:https://api.cloudflare.com/#rules-lists-get-bulk-operation

func (*API)GetListItemadded inv0.41.0

func (api *API) GetListItem(ctxcontext.Context, rc *ResourceContainer, listID, itemIDstring) (ListItem,error)

GetListItem returns a single List Item.

API reference:https://api.cloudflare.com/#rules-lists-get-list-item

func (*API)GetLoadBalanceradded inv0.51.0

func (api *API) GetLoadBalancer(ctxcontext.Context, rc *ResourceContainer, loadbalancerIDstring) (LoadBalancer,error)

GetLoadBalancer returns the details for a load balancer.

API reference:https://api.cloudflare.com/#load-balancers-load-balancer-details

func (*API)GetLoadBalancerMonitoradded inv0.51.0

func (api *API) GetLoadBalancerMonitor(ctxcontext.Context, rc *ResourceContainer, monitorIDstring) (LoadBalancerMonitor,error)

GetLoadBalancerMonitor returns the details for a load balancer monitor.

API reference:https://api.cloudflare.com/#load-balancer-monitors-monitor-details

func (*API)GetLoadBalancerPooladded inv0.51.0

func (api *API) GetLoadBalancerPool(ctxcontext.Context, rc *ResourceContainer, poolIDstring) (LoadBalancerPool,error)

GetLoadBalancerPool returns the details for a load balancer pool.

API reference:https://api.cloudflare.com/#load-balancer-pools-pool-details

func (*API)GetLoadBalancerPoolHealthadded inv0.51.0

func (api *API) GetLoadBalancerPoolHealth(ctxcontext.Context, rc *ResourceContainer, poolIDstring) (LoadBalancerPoolHealth,error)

GetLoadBalancerPoolHealth fetches the latest healtcheck details for a singlepool.

API reference:https://api.cloudflare.com/#load-balancer-pools-pool-health-details

Example
package mainimport (context "context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {// Construct a new API object.api, err := cloudflare.New("deadbeef", "test@example.com")if err != nil {log.Fatal(err)}// Fetch pool health details.healthInfo, err := api.GetLoadBalancerPoolHealth(context.Background(), cloudflare.AccountIdentifier("01a7362d577a6c3019a474fd6f485823"), "example-pool-id")if err != nil {log.Fatal(err)}fmt.Println(healthInfo)}

func (*API)GetLogpullRetentionFlagadded inv0.12.0

func (api *API) GetLogpullRetentionFlag(ctxcontext.Context, zoneIDstring) (*LogpullRetentionConfiguration,error)

GetLogpullRetentionFlag gets the current setting flag.

API reference:https://developers.cloudflare.com/logs/logpull-api/enabling-log-retention/

func (*API)GetLogpushFieldsadded inv0.72.0

func (api *API) GetLogpushFields(ctxcontext.Context, rc *ResourceContainer, paramsGetLogpushFieldsParams) (LogpushFields,error)

LogpushFields returns fields for a given dataset.

API reference:https://api.cloudflare.com/#logpush-jobs-list-logpush-jobs

func (*API)GetLogpushJobadded inv0.72.0

func (api *API) GetLogpushJob(ctxcontext.Context, rc *ResourceContainer, jobIDint) (LogpushJob,error)

LogpushJob fetches detail about one Logpush Job for a zone.

API reference:https://api.cloudflare.com/#logpush-jobs-logpush-job-details

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}job, err := api.GetLogpushJob(context.Background(), cloudflare.ZoneIdentifier(zoneID), 1)if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", job)

func (*API)GetLogpushOwnershipChallengeadded inv0.9.0

GetLogpushOwnershipChallenge returns ownership challenge.

API reference:https://api.cloudflare.com/#logpush-jobs-get-ownership-challenge

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}ownershipChallenge, err := api.GetLogpushOwnershipChallenge(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.GetLogpushOwnershipChallengeParams{DestinationConf: "destination_conf"})if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", ownershipChallenge)

func (*API)GetMTLSCertificateadded inv0.58.0

func (api *API) GetMTLSCertificate(ctxcontext.Context, rc *ResourceContainer, certificateIDstring) (MTLSCertificate,error)

GetMTLSCertificate returns the metadata associated with a user-uploaded mTLScertificate.

API reference:https://api.cloudflare.com/#mtls-certificate-management-get-mtls-certificate

func (*API)GetMagicFirewallRulesetdeprecatedadded inv0.13.7

func (api *API) GetMagicFirewallRuleset(ctxcontext.Context, accountID, IDstring) (MagicFirewallRuleset,error)

GetMagicFirewallRuleset returns a specific Magic Firewall Ruleset

API reference:https://api.cloudflare.com/#rulesets-get-a-ruleset

Deprecated: Use `GetZoneRuleset` or `GetAccountRuleset` instead.

func (*API)GetMagicTransitGRETunneladded inv0.32.0

func (api *API) GetMagicTransitGRETunnel(ctxcontext.Context, accountIDstring, idstring) (MagicTransitGRETunnel,error)

GetMagicTransitGRETunnel returns zero or one GRE tunnel.

API reference:https://api.cloudflare.com/#magic-gre-tunnels-gre-tunnel-details

func (*API)GetMagicTransitIPsecTunneladded inv0.31.0

func (api *API) GetMagicTransitIPsecTunnel(ctxcontext.Context, accountIDstring, idstring) (MagicTransitIPsecTunnel,error)

GetMagicTransitIPsecTunnel returns zero or one IPsec tunnel

API reference:https://api.cloudflare.com/#magic-ipsec-tunnels-ipsec-tunnel-details

func (*API)GetMagicTransitStaticRouteadded inv0.18.0

func (api *API) GetMagicTransitStaticRoute(ctxcontext.Context, accountID, IDstring) (MagicTransitStaticRoute,error)

GetMagicTransitStaticRoute returns exactly one static route

API reference:https://api.cloudflare.com/#magic-transit-static-routes-route-details

func (*API)GetNotificationPolicyadded inv0.19.0

func (api *API) GetNotificationPolicy(ctxcontext.Context, accountID, policyIDstring) (NotificationPolicyResponse,error)

GetNotificationPolicy returns a specific created by a user, given the accountid and the policy id.

API Reference:https://api.cloudflare.com/#notification-policies-properties

func (*API)GetNotificationWebhooksadded inv0.19.0

func (api *API) GetNotificationWebhooks(ctxcontext.Context, accountID, webhookIDstring) (NotificationWebhookResponse,error)

GetNotificationWebhooks will return a specific webhook destination,given the account and webhooks ids.

API Reference:https://api.cloudflare.com/#notification-webhooks-get-webhook

func (*API)GetObservatoryPageTestadded inv0.78.0

func (api *API) GetObservatoryPageTest(ctxcontext.Context, rc *ResourceContainer, paramsGetObservatoryPageTestParams) (*ObservatoryPageTest,error)

GetObservatoryPageTest returns a specific test for a page.

API reference:https://api.cloudflare.com/#speed-get-test

func (*API)GetObservatoryPageTrendadded inv0.78.0

func (api *API) GetObservatoryPageTrend(ctxcontext.Context, rc *ResourceContainer, paramsGetObservatoryPageTrendParams) (*ObservatoryPageTrend,error)

GetObservatoryPageTrend returns a the trend of web vital metrics for a page in a specific region.

API reference:https://api.cloudflare.com/#speed-list-page-trend

func (*API)GetObservatoryScheduledPageTestadded inv0.78.0

func (api *API) GetObservatoryScheduledPageTest(ctxcontext.Context, rc *ResourceContainer, paramsGetObservatoryScheduledPageTestParams) (*ObservatorySchedule,error)

GetObservatoryScheduledPageTest returns the test schedule for a page in a specific region.

API reference:https://api.cloudflare.com/#speed-get-scheduled-test

func (*API)GetOrganizationAuditLogsadded inv0.9.0

func (api *API) GetOrganizationAuditLogs(ctxcontext.Context, organizationIDstring, aAuditLogFilter) (AuditLogResponse,error)

GetOrganizationAuditLogs will return the audit logs of a specificorganization, based on the ID passed in. The audit logs can befiltered based on any argument in the AuditLogFilter.

API Reference:https://api.cloudflare.com/#audit-logs-list-organization-audit-logs

func (*API)GetOriginCACertificateadded inv0.58.0

func (api *API) GetOriginCACertificate(ctxcontext.Context, certificateIDstring) (*OriginCACertificate,error)

GetOriginCACertificate returns the details for a Cloudflare-issuedcertificate.

API reference:https://api.cloudflare.com/#cloudflare-ca-certificate-details

func (*API)GetPageShieldConnectionadded inv0.84.0

func (api *API) GetPageShieldConnection(ctxcontext.Context, rc *ResourceContainer, connectionIDstring) (*PageShieldConnection,error)

GetPageShieldConnection gets a page shield connection for a zone.

API documentation:https://developers.cloudflare.com/api/operations/page-shield-get-a-page-shield-connection

func (*API)GetPageShieldPolicyadded inv0.84.0

func (api *API) GetPageShieldPolicy(ctxcontext.Context, rc *ResourceContainer, policyIDstring) (*PageShieldPolicy,error)

GetPageShieldPolicy gets a page shield policy for a zone.

API documentation:https://developers.cloudflare.com/api/operations/page-shield-get-page-shield-policy

func (*API)GetPageShieldScriptadded inv0.84.0

func (api *API) GetPageShieldScript(ctxcontext.Context, rc *ResourceContainer, scriptIDstring) (*PageShieldScript, []PageShieldScriptVersion,error)

GetPageShieldScript returns a PageShield Script.

API reference:https://developers.cloudflare.com/api/operations/page-shield-get-a-page-shield-script

func (*API)GetPageShieldSettingsadded inv0.84.0

GetPageShieldSettings returns the page shield settings for a zone.

API documentation:https://developers.cloudflare.com/api/operations/page-shield-get-page-shield-settings

func (*API)GetPagesDeploymentInfoadded inv0.40.0

func (api *API) GetPagesDeploymentInfo(ctxcontext.Context, rc *ResourceContainer, projectName, deploymentIDstring) (PagesProjectDeployment,error)

GetPagesDeploymentInfo returns a deployment for a Pages project.

API reference:https://api.cloudflare.com/#pages-deployment-get-deployment-info

func (*API)GetPagesDeploymentLogsadded inv0.43.0

func (api *API) GetPagesDeploymentLogs(ctxcontext.Context, rc *ResourceContainer, paramsGetPagesDeploymentLogsParams) (PagesDeploymentLogs,error)

GetPagesDeploymentLogs returns the logs for a Pages deployment.

API reference:https://api.cloudflare.com/#pages-deployment-get-deployment-logs

func (*API)GetPagesDomainadded inv0.44.0

func (api *API) GetPagesDomain(ctxcontext.Context, paramsPagesDomainParameters) (PagesDomain,error)

GetPagesDomain gets a single domain.

API Reference:https://api.cloudflare.com/#pages-domains-get-domains

func (*API)GetPagesDomainsadded inv0.44.0

func (api *API) GetPagesDomains(ctxcontext.Context, paramsPagesDomainsParameters) ([]PagesDomain,error)

GetPagesDomains gets all domains for a pages project.

API Reference:https://api.cloudflare.com/#pages-domains-get-domains

func (*API)GetPagesProjectadded inv0.73.0

func (api *API) GetPagesProject(ctxcontext.Context, rc *ResourceContainer, projectNamestring) (PagesProject,error)

GetPagesProject returns a single Pages project by name.

API reference:https://api.cloudflare.com/#pages-project-get-project

func (*API)GetPerHostnameAuthenticatedOriginPullsCertificateadded inv0.12.2

func (api *API) GetPerHostnameAuthenticatedOriginPullsCertificate(ctxcontext.Context, zoneID, certificateIDstring) (PerHostnameAuthenticatedOriginPullsCertificateDetails,error)

GetPerHostnameAuthenticatedOriginPullsCertificate retrieves certificate metadata about the requested Per Hostname certificate.

API reference:https://api.cloudflare.com/#per-hostname-authenticated-origin-pull-get-the-hostname-client-certificate

func (*API)GetPerHostnameAuthenticatedOriginPullsConfigadded inv0.12.2

func (api *API) GetPerHostnameAuthenticatedOriginPullsConfig(ctxcontext.Context, zoneID, hostnamestring) (PerHostnameAuthenticatedOriginPullsDetails,error)

GetPerHostnameAuthenticatedOriginPullsConfig returns the config state of Per Hostname AuthenticatedOriginPulls of the provided hostname within a zone.

API reference:https://api.cloudflare.com/#per-hostname-authenticated-origin-pull-get-the-hostname-status-for-client-authentication

func (*API)GetPerZoneAuthenticatedOriginPullsCertificateDetailsadded inv0.12.2

func (api *API) GetPerZoneAuthenticatedOriginPullsCertificateDetails(ctxcontext.Context, zoneID, certificateIDstring) (PerZoneAuthenticatedOriginPullsCertificateDetails,error)

GetPerZoneAuthenticatedOriginPullsCertificateDetails returns the metadata associated with a user uploaded client certificate to Per Zone AuthenticatedOriginPulls.

API reference:https://api.cloudflare.com/#zone-level-authenticated-origin-pulls-get-certificate-details

func (*API)GetPerZoneAuthenticatedOriginPullsStatusadded inv0.12.2

func (api *API) GetPerZoneAuthenticatedOriginPullsStatus(ctxcontext.Context, zoneIDstring) (PerZoneAuthenticatedOriginPullsSettings,error)

GetPerZoneAuthenticatedOriginPullsStatus returns whether per zone AuthenticatedOriginPulls is enabled or not. It is false by default.

API reference:https://api.cloudflare.com/#zone-level-authenticated-origin-pulls-get-enablement-setting-for-zone

func (*API)GetPermissionGroupadded inv0.53.0

func (api *API) GetPermissionGroup(ctxcontext.Context, rc *ResourceContainer, permissionGroupIdstring) (PermissionGroup,error)

GetPermissionGroup returns a specific permission group from the API giventhe account ID and permission group ID.

func (*API)GetPrefixadded inv0.11.7

func (api *API) GetPrefix(ctxcontext.Context, accountID, IDstring) (IPPrefix,error)

GetPrefix returns a specific IP prefix

API reference:https://api.cloudflare.com/#ip-address-management-prefixes-prefix-details

func (*API)GetQueueadded inv0.55.0

func (api *API) GetQueue(ctxcontext.Context, rc *ResourceContainer, queueNamestring) (Queue,error)

GetQueue returns a single queue based on the name.

API reference:https://api.cloudflare.com/#queue-get-queue

func (*API)GetR2Bucketadded inv0.68.0

func (api *API) GetR2Bucket(ctxcontext.Context, rc *ResourceContainer, bucketNamestring) (R2Bucket,error)

GetR2Bucket Gets an existing R2 bucket.

API reference:https://api.cloudflare.com/#r2-bucket-get-bucket

func (*API)GetRegionalTieredCacheadded inv0.73.0

func (api *API) GetRegionalTieredCache(ctxcontext.Context, rc *ResourceContainer, paramsGetRegionalTieredCacheParams) (RegionalTieredCache,error)

GetRegionalTieredCache returns information about the current regional tieredcache settings.

API reference:https://developers.cloudflare.com/api/resources/cache/subresources/regional_tiered_cache/methods/get/

func (*API)GetRiskScoreIntegrationadded inv0.101.0

func (api *API) GetRiskScoreIntegration(ctxcontext.Context, rc *ResourceContainer, integrationIDstring) (RiskScoreIntegration,error)

GetRiskScoreIntegration returns a single Risk Score Integration by its ID.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/risk_scoring/subresources/integrations/methods/get/

func (*API)GetRulesetadded inv0.73.0

func (api *API) GetRuleset(ctxcontext.Context, rc *ResourceContainer, rulesetIDstring) (Ruleset,error)

GetRuleset fetches a single ruleset.

API reference:https://developers.cloudflare.com/api/operations/getAccountRulesetAPI reference:https://developers.cloudflare.com/api/resources/rulesets/methods/get/

func (*API)GetSecondaryDNSPrimaryadded inv0.15.0

func (api *API) GetSecondaryDNSPrimary(ctxcontext.Context, accountID, primaryIDstring) (SecondaryDNSPrimary,error)

GetSecondaryDNSPrimary returns a single secondary DNS primary.

API reference:https://api.cloudflare.com/#secondary-dns-primary--primary-details

func (*API)GetSecondaryDNSTSIGadded inv0.15.0

func (api *API) GetSecondaryDNSTSIG(ctxcontext.Context, accountID, tsigIDstring) (SecondaryDNSTSIG,error)

GetSecondaryDNSTSIG gets a single account level TSIG for a secondary DNSconfiguration.

API reference:https://api.cloudflare.com/#secondary-dns-tsig--tsig-details

func (*API)GetSecondaryDNSZoneadded inv0.15.0

func (api *API) GetSecondaryDNSZone(ctxcontext.Context, zoneIDstring) (SecondaryDNSZone,error)

GetSecondaryDNSZone returns the secondary DNS zone configuration for asingle zone.

API reference:https://api.cloudflare.com/#secondary-dns-secondary-zone-configuration-details

func (*API)GetTeamsDeviceDetailsadded inv0.32.0

func (api *API) GetTeamsDeviceDetails(ctxcontext.Context, accountIDstring, deviceIDstring) (TeamsDeviceListItem,error)

GetTeamsDeviceDetails gets device details.

API reference :https://api.cloudflare.com/#devices-device-details

func (*API)GetTeamsListadded inv0.53.0

func (api *API) GetTeamsList(ctxcontext.Context, rc *ResourceContainer, listIDstring) (TeamsList,error)

GetTeamsList returns a single list based on the list ID.

API reference:https://api.cloudflare.com/#teams-lists-teams-list-details

func (*API)GetTieredCacheadded inv0.57.1

func (api *API) GetTieredCache(ctxcontext.Context, rc *ResourceContainer) (TieredCache,error)

GetTieredCache allows you to retrieve the current Tiered Cache Settings for a Zone.This function does not support custom topologies, only Generic and Smart Tiered Caching.

API Reference:https://api.cloudflare.com/#smart-tiered-cache-get-smart-tiered-cache-settingAPI Reference:https://api.cloudflare.com/#tiered-cache-get-tiered-cache-setting

func (*API)GetTotalTLSadded inv0.53.0

func (api *API) GetTotalTLS(ctxcontext.Context, rc *ResourceContainer) (TotalTLS,error)

GetTotalTLS Get Total TLS Settings for a Zone.

API Reference:https://api.cloudflare.com/#total-tls-total-tls-settings-details

func (*API)GetTunneladded inv0.63.0

func (api *API) GetTunnel(ctxcontext.Context, rc *ResourceContainer, tunnelIDstring) (Tunnel,error)

GetTunnel returns a single Argo tunnel.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-get-cloudflare-tunnel

func (*API)GetTunnelConfigurationadded inv0.43.0

func (api *API) GetTunnelConfiguration(ctxcontext.Context, rc *ResourceContainer, tunnelIDstring) (TunnelConfigurationResult,error)

GetTunnelConfiguration updates an existing tunnel for the account.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-configuration-properties

func (*API)GetTunnelRouteForIPadded inv0.37.0

func (api *API) GetTunnelRouteForIP(ctxcontext.Context, rc *ResourceContainer, paramsTunnelRoutesForIPParams) (TunnelRoute,error)

GetTunnelRouteForIP finds the Tunnel Route that encompasses the given IP.

See:https://api.cloudflare.com/#tunnel-route-get-tunnel-route-by-ip

func (*API)GetTunnelTokenadded inv0.63.0

func (api *API) GetTunnelToken(ctxcontext.Context, rc *ResourceContainer, tunnelIDstring) (string,error)

GetTunnelToken that allows to run a tunnel.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-get-cloudflare-tunnel-token

func (*API)GetTurnstileWidgetadded inv0.66.0

func (api *API) GetTurnstileWidget(ctxcontext.Context, rc *ResourceContainer, siteKeystring) (TurnstileWidget,error)

GetTurnstileWidget shows a single challenge widget configuration.

API reference:https://api.cloudflare.com/#challenge-widgets-challenge-widget-details

func (*API)GetUserAuditLogsadded inv0.9.0

func (api *API) GetUserAuditLogs(ctxcontext.Context, aAuditLogFilter) (AuditLogResponse,error)

GetUserAuditLogs will return your user's audit logs. The audit logs can befiltered based on any argument in the AuditLogFilter.

API Reference:https://api.cloudflare.com/#audit-logs-list-user-audit-logs

func (*API)GetWaitingRoomSettingsadded inv0.67.0

func (api *API) GetWaitingRoomSettings(ctxcontext.Context, rc *ResourceContainer) (WaitingRoomSettings,error)

GetWaitingRoomSettings fetches the Waiting Room zone-level settings for a zone.

API reference:https://api.cloudflare.com/#waiting-room-get-zone-settings

func (*API)GetWeb3Hostnameadded inv0.45.0

func (api *API) GetWeb3Hostname(ctxcontext.Context, paramsWeb3HostnameDetailsParameters) (Web3Hostname,error)

GetWeb3Hostname gets a single web3 hostname by identifier.

API Reference:https://api.cloudflare.com/#web3-hostname-web3-hostname-details

func (*API)GetWebAnalyticsSiteadded inv0.75.0

func (api *API) GetWebAnalyticsSite(ctxcontext.Context, rc *ResourceContainer, paramsGetWebAnalyticsSiteParams) (*WebAnalyticsSite,error)

GetWebAnalyticsSite fetches detail about one Web Analytics Site for an Account.

API reference:https://api.cloudflare.com/#web-analytics-get-site

func (*API)GetWorkeradded inv0.57.0

func (api *API) GetWorker(ctxcontext.Context, rc *ResourceContainer, scriptNamestring) (WorkerScriptResponse,error)

GetWorker fetch raw script content for your worker returns string containingworker code js.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/get/

func (*API)GetWorkerRouteadded inv0.16.0

func (api *API) GetWorkerRoute(ctxcontext.Context, rc *ResourceContainer, routeIDstring) (WorkerRouteResponse,error)

GetWorkerRoute returns a Workers route.

API reference:https://developers.cloudflare.com/api/operations/worker-routes-get-route

func (*API)GetWorkerWithDispatchNamespaceadded inv0.90.0

func (api *API) GetWorkerWithDispatchNamespace(ctxcontext.Context, rc *ResourceContainer, scriptNamestring, dispatchNamespacestring) (WorkerScriptResponse,error)

GetWorker fetch raw script content for your worker returns string containingworker code js.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/get/

func (*API)GetWorkersDomainadded inv0.55.0

func (api *API) GetWorkersDomain(ctxcontext.Context, rc *ResourceContainer, domainIDstring) (WorkersDomain,error)

GetWorkersDomain gets a single Worker Domain.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/domains/methods/get/

func (*API)GetWorkersForPlatformsDispatchNamespaceadded inv0.90.0

func (api *API) GetWorkersForPlatformsDispatchNamespace(ctxcontext.Context, rc *ResourceContainer, namestring) (*GetWorkersForPlatformsDispatchNamespaceResponse,error)

GetWorkersForPlatformsDispatchNamespace gets a specific dispatch namespace.

API reference:https://developers.cloudflare.com/api/resources/workers_for_platforms/subresources/dispatch/subresources/namespaces/methods/get/

func (API)GetWorkersKVadded inv0.55.0

func (apiAPI) GetWorkersKV(ctxcontext.Context, rc *ResourceContainer, paramsGetWorkersKVParams) ([]byte,error)

GetWorkersKV returns the value associated with the given key in thegiven namespace.

API reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/subresources/values/methods/get/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}key := "test_key"resp, err := api.GetWorkersKV(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.GetWorkersKVParams{NamespaceID: namespace, Key: key})if err != nil {log.Fatal(err)}fmt.Printf("%s\n", resp)

func (*API)GetWorkersScriptContentadded inv0.76.0

func (api *API) GetWorkersScriptContent(ctxcontext.Context, rc *ResourceContainer, scriptNamestring) (string,error)

GetWorkersScriptContent returns the pure script content of a worker.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/content/methods/get/

func (*API)GetWorkersScriptSettingsadded inv0.76.0

func (api *API) GetWorkersScriptSettings(ctxcontext.Context, rc *ResourceContainer, scriptNamestring) (WorkerScriptSettingsResponse,error)

GetWorkersScriptSettings returns the metadata of a worker.

API reference:https://developers.cloudflare.com/api/operations/worker-script-get-settings

func (*API)GetZarazConfigadded inv0.86.0

func (api *API) GetZarazConfig(ctxcontext.Context, rc *ResourceContainer) (ZarazConfigResponse,error)

func (*API)GetZarazWorkflowadded inv0.86.0

func (api *API) GetZarazWorkflow(ctxcontext.Context, rc *ResourceContainer) (ZarazWorkflowResponse,error)

func (*API)GetZoneHoldadded inv0.75.0

func (api *API) GetZoneHold(ctxcontext.Context, rc *ResourceContainer, paramsGetZoneHoldParams) (ZoneHold,error)

GetZoneHold retrieves whether the zone is subject to a zone hold, and themetadata about the hold.

API reference:https://developers.cloudflare.com/api/resources/zones/subresources/holds/methods/get/

func (*API)GetZoneSettingadded inv0.64.0

func (api *API) GetZoneSetting(ctxcontext.Context, rc *ResourceContainer, paramsGetZoneSettingParams) (ZoneSetting,error)

GetZoneSetting returns information about specified setting to the specifiedzone.

API reference:https://api.cloudflare.com/#zone-settings-get-all-zone-settings

func (*API)GetZoneSnippetadded inv0.109.0

func (api *API) GetZoneSnippet(ctxcontext.Context, rc *ResourceContainer, snippetNamestring) (*Snippet,error)

func (*API)Healthcheckadded inv0.11.1

func (api *API) Healthcheck(ctxcontext.Context, zoneID, healthcheckIDstring) (Healthcheck,error)

Healthcheck returns a single healthcheck by ID.

API reference:https://api.cloudflare.com/#health-checks-health-check-details

func (*API)HealthcheckPreviewadded inv0.11.5

func (api *API) HealthcheckPreview(ctxcontext.Context, zoneID, idstring) (Healthcheck,error)

HealthcheckPreview returns a single healthcheck preview by its ID.

API reference:https://api.cloudflare.com/#health-checks-health-check-preview-details

func (*API)Healthchecksadded inv0.11.1

func (api *API) Healthchecks(ctxcontext.Context, zoneIDstring) ([]Healthcheck,error)

Healthchecks returns all healthchecks for a zone.

API reference:https://api.cloudflare.com/#health-checks-list-health-checks

func (*API)ImportDNSRecordsadded inv0.66.0

func (api *API) ImportDNSRecords(ctxcontext.Context, rc *ResourceContainer, paramsImportDNSRecordsParams)error

ImportDNSRecords takes the contents of a BIND configuration file and importsall records at once.

The current state of the API doesn't allow the proxying field to beautomatically set on records where the TTL is 1. Instead you need toexplicitly tell the endpoint which records are proxied in the form data. Toachieve a simpler abstraction, we do the legwork in the method of making thetwo separate API calls (one for proxied and one for non-proxied) instead ofmaking the end user know about this detail.

API reference:https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/import/

func (*API)IntelligenceASNOverviewadded inv0.44.0

func (api *API) IntelligenceASNOverview(ctxcontext.Context, paramsIntelligenceASNOverviewParameters) ([]ASNInfo,error)

IntelligenceASNOverview get overview for an ASN number

API Reference:https://api.cloudflare.com/#asn-intelligence-get-asn-overview

func (*API)IntelligenceASNSubnetsadded inv0.44.0

IntelligenceASNSubnets gets all subnets of an ASN

API Reference:https://api.cloudflare.com/#asn-intelligence-get-asn-subnets

func (*API)IntelligenceBulkDomainDetailsadded inv0.44.0

func (api *API) IntelligenceBulkDomainDetails(ctxcontext.Context, paramsGetBulkDomainDetailsParameters) ([]DomainDetails,error)

IntelligenceBulkDomainDetails gets domain information for a list of domains.

API Reference:https://api.cloudflare.com/#domain-intelligence-get-multiple-domain-details

func (*API)IntelligenceDomainDetailsadded inv0.44.0

func (api *API) IntelligenceDomainDetails(ctxcontext.Context, paramsGetDomainDetailsParameters) (DomainDetails,error)

IntelligenceDomainDetails gets domain information.

API Reference:https://api.cloudflare.com/#domain-intelligence-get-domain-details

func (*API)IntelligenceDomainHistoryadded inv0.44.0

func (api *API) IntelligenceDomainHistory(ctxcontext.Context, paramsGetDomainHistoryParameters) ([]DomainHistory,error)

IntelligenceDomainHistory get domain history for given domain

API Reference:https://api.cloudflare.com/#domain-history-get-domain-history

func (*API)IntelligenceGetIPListadded inv0.44.0

func (api *API) IntelligenceGetIPList(ctxcontext.Context, paramsIPIntelligenceListParameters) ([]IPIntelligenceItem,error)

IntelligenceGetIPList gets intelligence ip-lists.

API Reference:https://api.cloudflare.com/#ip-list-get-ip-lists

func (*API)IntelligenceGetIPOverviewadded inv0.44.0

func (api *API) IntelligenceGetIPOverview(ctxcontext.Context, paramsIPIntelligenceParameters) ([]IPIntelligence,error)

IntelligenceGetIPOverview gets information about ipv4 or ipv6 address.

API Reference:https://api.cloudflare.com/#ip-intelligence-get-ip-overview

func (*API)IntelligencePassiveDNSadded inv0.44.0

func (api *API) IntelligencePassiveDNS(ctxcontext.Context, paramsIPIntelligencePassiveDNSParameters) (IPPassiveDNS,error)

IntelligencePassiveDNS gets a history of DNS for an ip.

API Reference:https://api.cloudflare.com/#passive-dns-by-ip-get-passive-dns-by-ip

func (*API)IntelligencePhishingScanadded inv0.44.0

func (api *API) IntelligencePhishingScan(ctxcontext.Context, paramsPhishingScanParameters) (PhishingScan,error)

IntelligencePhishingScan scans a URL for suspected phishing

API Reference:https://api.cloudflare.com/#phishing-url-scanner-scan-suspicious-url

func (*API)IntelligenceWHOISadded inv0.44.0

func (api *API) IntelligenceWHOIS(ctxcontext.Context, paramsWHOISParameters) (WHOIS,error)

IntelligenceWHOIS gets whois information for a domain.

API Reference:https://api.cloudflare.com/#whois-record-get-whois-record

func (*API)KeylessSSLadded inv0.17.0

func (api *API) KeylessSSL(ctxcontext.Context, zoneID, keylessSSLIDstring) (KeylessSSL,error)

KeylessSSL provides the configuration for a given Keyless SSL identifier.

API reference:https://api.cloudflare.com/#keyless-ssl-for-a-zone-keyless-ssl-details

func (*API)LeakedCredentialCheckCreateDetectionadded inv0.111.0

LeakedCredentialCheckCreateDetection creates user-defined detection pattern for Leaked Credential Checks

API reference:https://developers.cloudflare.com/api/resources/leaked_credential_checks/subresources/detections/methods/create/

func (*API)LeakedCredentialCheckDeleteDetectionadded inv0.111.0

LeakedCredentialCheckDeleteDetection removes user-defined detection pattern for Leaked Credential Checks

API reference:https://developers.cloudflare.com/api/resources/leaked_credential_checks/subresources/detections/methods/delete/

func (*API)LeakedCredentialCheckGetStatusadded inv0.111.0

LeakCredentialCheckGetStatus returns whether Leaked credential check is enabled or not. It is false by default.

API reference:https://developers.cloudflare.com/api/resources/leaked_credential_checks/methods/get/

func (*API)LeakedCredentialCheckListDetectionsadded inv0.111.0

LeakedCredentialCheckListDetections lists user-defined detection patterns for Leaked Credential Checks.

API reference:https://developers.cloudflare.com/api/resources/leaked_credential_checks/subresources/detections/methods/list/

func (*API)LeakedCredentialCheckSetStatusadded inv0.111.0

func (api *API) LeakedCredentialCheckSetStatus(ctxcontext.Context, rc *ResourceContainer, paramsLeakCredentialCheckSetStatusParams) (LeakedCredentialCheckStatus,error)

LeakedCredentialCheckSetStatus enable or disable the Leak Credential Check. Returns the status.

API reference:https://developers.cloudflare.com/api/resources/leaked_credential_checks/methods/create/

func (*API)LeakedCredentialCheckUpdateDetectionadded inv0.111.0

LeakedCredentialCheckUpdateDetection updates user-defined detection pattern for Leaked Credential Checks. Returns updated detection.

API reference:https://developers.cloudflare.com/api/resources/leaked_credential_checks/subresources/detections/methods/update/

func (*API)ListAPIShieldDiscoveryOperationsadded inv0.79.0

ListAPIShieldDiscoveryOperations retrieve the most up to date view of discovered operations.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/discovery/subresources/operations/methods/list/

func (*API)ListAPIShieldOperationsadded inv0.78.0

ListAPIShieldOperations retrieve information about all operations on a zone

API documentationhttps://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/methods/list/

func (*API)ListAPIShieldSchemasadded inv0.79.0

func (api *API) ListAPIShieldSchemas(ctxcontext.Context, rc *ResourceContainer, paramsListAPIShieldSchemasParams) ([]APIShieldSchema,ResultInfo,error)

ListAPIShieldSchemas retrieves all schemas for a zone

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/list/

func (*API)ListAPITokensPermissionGroupsadded inv0.13.5

func (api *API) ListAPITokensPermissionGroups(ctxcontext.Context) ([]APITokenPermissionGroups,error)

ListAPITokensPermissionGroups returns all available API token permission groups.

API reference:https://api.cloudflare.com/#permission-groups-list-permission-groups

func (*API)ListAccessCustomPagesadded inv0.74.0

func (api *API) ListAccessCustomPages(ctxcontext.Context, rc *ResourceContainer, paramsListAccessCustomPagesParams) ([]AccessCustomPage,error)

func (*API)ListAccessGroupsadded inv0.71.0

func (api *API) ListAccessGroups(ctxcontext.Context, rc *ResourceContainer, paramsListAccessGroupsParams) ([]AccessGroup, *ResultInfo,error)

ListAccessGroups returns all access groups for an access application.

Account API Reference:https://developers.cloudflare.com/api/operations/access-groups-list-access-groupsZone API Reference:https://developers.cloudflare.com/api/operations/zone-level-access-groups-list-access-groups

func (*API)ListAccessIdentityProviderAuthContextsadded inv0.75.0

func (api *API) ListAccessIdentityProviderAuthContexts(ctxcontext.Context, rc *ResourceContainer, identityProviderIDstring) ([]AccessAuthContext,error)

ListAccessIdentityProviderAuthContexts returns an identity provider's auth contextsAzureAD onlyAccount API Reference:https://developers.cloudflare.com/api/operations/access-identity-providers-get-an-access-identity-providerZone API Reference:https://developers.cloudflare.com/api/operations/zone-level-access-identity-providers-get-an-access-identity-provider

func (*API)ListAccessPoliciesadded inv0.71.0

func (api *API) ListAccessPolicies(ctxcontext.Context, rc *ResourceContainer, paramsListAccessPoliciesParams) ([]AccessPolicy, *ResultInfo,error)

ListAccessPolicies returns all access policies that match the parameters.

Account API reference:https://developers.cloudflare.com/api/operations/access-policies-list-access-policiesZone API reference:https://developers.cloudflare.com/api/operations/zone-level-access-policies-list-access-policies

func (*API)ListAccessServiceTokensadded inv0.71.0

func (*API)ListAccessTagsadded inv0.78.0

func (api *API) ListAccessTags(ctxcontext.Context, rc *ResourceContainer, paramsListAccessTagsParams) ([]AccessTag,error)

func (*API)ListAccessUsersadded inv0.81.0

func (api *API) ListAccessUsers(ctxcontext.Context, rc *ResourceContainer, paramsAccessUserParams) ([]AccessUser, *ResultInfo,error)

ListAccessUsers returns a list of users for a single cloudflare access/zerotrust account.

API documentation:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/users/methods/list/

func (*API)ListAccountAccessRulesadded inv0.10.0

func (api *API) ListAccountAccessRules(ctxcontext.Context, accountIDstring, accessRuleAccessRule, pageint) (*AccessRuleListResponse,error)

ListAccountAccessRules returns a slice of access rules for the givenaccount identifier.

This takes an AccessRule to allow filtering of the results returned.

API reference:https://api.cloudflare.com/#account-level-firewall-access-rule-list-access-rules

func (*API)ListAccountRolesadded inv0.78.0

func (api *API) ListAccountRoles(ctxcontext.Context, rc *ResourceContainer, paramsListAccountRolesParams) ([]AccountRole,error)

ListAccountRoles returns all roles of an account.

API reference:https://developers.cloudflare.com/api/resources/accounts/subresources/roles/methods/list/

func (*API)ListAddressMapsadded inv0.63.0

func (api *API) ListAddressMaps(ctxcontext.Context, rc *ResourceContainer, paramsListAddressMapsParams) ([]AddressMap,error)

ListAddressMaps lists all address maps owned by the account.

API reference:https://developers.cloudflare.com/api/resources/addressing/subresources/address_maps/methods/list/

func (*API)ListAllRateLimitsadded inv0.8.5

func (api *API) ListAllRateLimits(ctxcontext.Context, zoneIDstring) ([]RateLimit,error)

ListAllRateLimits returns all Rate Limits for a zone.

API reference:https://api.cloudflare.com/#rate-limits-for-a-zone-list-rate-limits

func (*API)ListCertificatePacksadded inv0.13.0

func (api *API) ListCertificatePacks(ctxcontext.Context, zoneIDstring) ([]CertificatePack,error)

ListCertificatePacks returns all available TLS certificate packs for a zone.

API Reference:https://api.cloudflare.com/#certificate-packs-list-certificate-packs

func (*API)ListD1Databasesadded inv0.79.0

func (api *API) ListD1Databases(ctxcontext.Context, rc *ResourceContainer, paramsListD1DatabasesParams) ([]D1Database, *ResultInfo,error)

ListD1Databases returns all databases for an account.

API reference:https://developers.cloudflare.com/api/resources/d1/subresources/database/methods/list/

func (*API)ListDLPDatasetsadded inv0.87.0

func (api *API) ListDLPDatasets(ctxcontext.Context, rc *ResourceContainer, paramsListDLPDatasetsParams) ([]DLPDataset,error)

ListDLPDatasets returns all the DLP datasets associated with an account.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/dlp/subresources/datasets/methods/list/

func (*API)ListDLPProfilesadded inv0.53.0

func (api *API) ListDLPProfiles(ctxcontext.Context, rc *ResourceContainer, paramsListDLPProfilesParams) ([]DLPProfile,error)

ListDLPProfiles returns all DLP profiles within an account.

API reference:https://api.cloudflare.com/#dlp-profiles-list-all-profiles

func (*API)ListDNSFirewallClustersadded inv0.29.0

func (api *API) ListDNSFirewallClusters(ctxcontext.Context, rc *ResourceContainer, paramsListDNSFirewallClustersParams) ([]*DNSFirewallCluster,error)

ListDNSFirewallClusters lists the DNS Firewall clusters associated with an account.

API reference:https://api.cloudflare.com/#dns-firewall-list-dns-firewall-clusters

func (*API)ListDNSRecordsadded inv0.58.0

func (api *API) ListDNSRecords(ctxcontext.Context, rc *ResourceContainer, paramsListDNSRecordsParams) ([]DNSRecord, *ResultInfo,error)

ListDNSRecords returns a slice of DNS records for the given zone identifier.

API reference:https://api.cloudflare.com/#dns-records-for-a-zone-list-dns-records

Example (All)
api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}// Fetch all records for a zonerecs, _, err := api.ListDNSRecords(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListDNSRecordsParams{})if err != nil {log.Fatal(err)}for _, r := range recs {fmt.Printf("%s: %s\n", r.Name, r.Content)}
Example (FilterByContent)
api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}recs, _, err := api.ListDNSRecords(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListDNSRecordsParams{Content: "198.51.100.1"})if err != nil {log.Fatal(err)}for _, r := range recs {fmt.Printf("%s: %s\n", r.Name, r.Content)}
Example (FilterByName)
api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}recs, _, err := api.ListDNSRecords(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListDNSRecordsParams{Name: "foo.example.com"})if err != nil {log.Fatal(err)}for _, r := range recs {fmt.Printf("%s: %s\n", r.Name, r.Content)}
Example (FilterByType)
api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}recs, _, err := api.ListDNSRecords(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListDNSRecordsParams{Type: "AAAA"})if err != nil {log.Fatal(err)}for _, r := range recs {fmt.Printf("%s: %s\n", r.Name, r.Content)}

func (*API)ListDataLocalizationRegionalHostnamesadded inv0.66.0

func (api *API) ListDataLocalizationRegionalHostnames(ctxcontext.Context, rc *ResourceContainer, paramsListDataLocalizationRegionalHostnamesParams) ([]RegionalHostname,error)

ListDataLocalizationRegionalHostnames lists all regional hostnames for a zone.

API reference:https://developers.cloudflare.com/data-localization/regional-services/get-started/#configure-regional-services-via-api

func (*API)ListDataLocalizationRegionsadded inv0.66.0

func (api *API) ListDataLocalizationRegions(ctxcontext.Context, rc *ResourceContainer, paramsListDataLocalizationRegionsParams) ([]Region,error)

ListDataLocalizationRegions lists all available regions.

API reference:https://developers.cloudflare.com/data-localization/regional-services/get-started/#configure-regional-services-via-api

func (*API)ListDeviceManagedNetworksadded inv0.57.0

func (api *API) ListDeviceManagedNetworks(ctxcontext.Context, rc *ResourceContainer, paramsListDeviceManagedNetworksParams) ([]DeviceManagedNetwork,error)

ListDeviceManagedNetwork returns all Device Managed Networks for a givenaccount.

API reference :https://api.cloudflare.com/#device-managed-networks-list-device-managed-networks

func (*API)ListDeviceSettingsPoliciesadded inv0.81.0

func (api *API) ListDeviceSettingsPolicies(ctxcontext.Context, rc *ResourceContainer, paramsListDeviceSettingsPoliciesParams) ([]DeviceSettingsPolicy, *ResultInfo,error)

ListDeviceSettingsPolicies returns all device settings policies for an account

API reference:https://api.cloudflare.com/#devices-list-device-settings-policies

func (*API)ListDexTestsadded inv0.62.0

ListDexTests returns all Device Dex Tests for a given account.

API reference :https://developers.cloudflare.com/api/resources/zero_trust/subresources/devices/subresources/dex_tests/methods/list/

func (*API)ListEmailRoutingDestinationAddressesadded inv0.47.0

func (api *API) ListEmailRoutingDestinationAddresses(ctxcontext.Context, rc *ResourceContainer, paramsListEmailRoutingAddressParameters) ([]EmailRoutingDestinationAddress, *ResultInfo,error)

ListEmailRoutingDestinationAddresses Lists existing destination addresses.

API reference:https://api.cloudflare.com/#email-routing-destination-addresses-list-destination-addresses

func (*API)ListEmailRoutingRulesadded inv0.47.0

ListEmailRoutingRules Lists existing routing rules.

API reference:https://api.cloudflare.com/#email-routing-routing-rules-list-routing-rules

func (*API)ListFallbackDomainsadded inv0.29.0

func (api *API) ListFallbackDomains(ctxcontext.Context, accountIDstring) ([]FallbackDomain,error)

ListFallbackDomains returns all fallback domains within an account.

API reference:https://api.cloudflare.com/#devices-get-local-domain-fallback-list

func (*API)ListFallbackDomainsDeviceSettingsPolicyadded inv0.52.0

func (api *API) ListFallbackDomainsDeviceSettingsPolicy(ctxcontext.Context, accountID, policyIDstring) ([]FallbackDomain,error)

ListFallbackDomainsDeviceSettingsPolicy returns all fallback domains within an account for a specific device settings policy.

API reference:https://api.cloudflare.com/#devices-get-local-domain-fallback-list

func (*API)ListGatewayCategoriesadded inv0.100.0

func (api *API) ListGatewayCategories(ctxcontext.Context, rc *ResourceContainer, paramsListGatewayCategoriesParams) ([]GatewayCategory,ResultInfo,error)

ListGatewayCategories returns all gateway categories within an account.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/gateway/subresources/categories/methods/list/

func (*API)ListHostnameTLSSettingsadded inv0.75.0

ListHostnameTLSSettings returns a list of all user-created tls setting values for the specified setting and hostnames.

API reference:https://developers.cloudflare.com/api/resources/hostnames/subresources/settings/subresources/tls/methods/get/

func (*API)ListHostnameTLSSettingsCiphersadded inv0.75.0

ListHostnameTLSSettingsCiphers returns a list of all user-created tls setting ciphers values for the specified setting and hostnames.Ciphers functions are separate due to the API returning a list of strings as the value, rather than a string (as is the case for the other tls settings).

API reference:https://developers.cloudflare.com/api/resources/hostnames/subresources/settings/subresources/tls/methods/get/

func (*API)ListHyperdriveConfigsadded inv0.88.0

func (api *API) ListHyperdriveConfigs(ctxcontext.Context, rc *ResourceContainer, paramsListHyperdriveConfigParams) ([]HyperdriveConfig,error)

ListHyperdriveConfigs returns the Hyperdrive configs owned by an account.

API reference:https://developers.cloudflare.com/api/resources/hyperdrive/subresources/configs/methods/list/

func (*API)ListIPListItemsdeprecatedadded inv0.13.0

func (api *API) ListIPListItems(ctxcontext.Context, accountID, IDstring) ([]IPListItem,error)

ListIPListItems returns a list with all items in an IP List.

API reference:https://api.cloudflare.com/#rules-lists-list-list-items

Deprecated: Use `ListListItems` instead.

func (*API)ListIPListsdeprecatedadded inv0.13.0

func (api *API) ListIPLists(ctxcontext.Context, accountIDstring) ([]IPList,error)

ListIPLists lists all IP Lists.

API reference:https://api.cloudflare.com/#rules-lists-list-lists

Deprecated: Use `ListLists` instead.

func (*API)ListImagesadded inv0.30.0

func (api *API) ListImages(ctxcontext.Context, rc *ResourceContainer, paramsListImagesParams) ([]Image,error)

ListImages lists all images.

API Reference:https://api.cloudflare.com/#cloudflare-images-list-images

func (*API)ListInfrastructureAccessTargetsadded inv0.105.0

ListInfrastructureAccessTargets returns all infrastructure access targets within an account.

Account API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/infrastructure/subresources/targets/methods/list/

func (*API)ListKeylessSSLadded inv0.17.0

func (api *API) ListKeylessSSL(ctxcontext.Context, zoneIDstring) ([]KeylessSSL,error)

ListKeylessSSL lists Keyless SSL configurations for a zone.

API reference:https://api.cloudflare.com/#keyless-ssl-for-a-zone-list-keyless-ssl-configurations

func (*API)ListListItemsadded inv0.41.0

func (api *API) ListListItems(ctxcontext.Context, rc *ResourceContainer, paramsListListItemsParams) ([]ListItem,error)

ListListItems returns a list with all items in a List.

API reference:https://api.cloudflare.com/#rules-lists-list-list-items

func (*API)ListListsadded inv0.41.0

func (api *API) ListLists(ctxcontext.Context, rc *ResourceContainer, paramsListListsParams) ([]List,error)

ListLists lists all Lists.

API reference:https://api.cloudflare.com/#rules-lists-list-lists

func (*API)ListLoadBalancerMonitorsadded inv0.8.0

func (api *API) ListLoadBalancerMonitors(ctxcontext.Context, rc *ResourceContainer, paramsListLoadBalancerMonitorParams) ([]LoadBalancerMonitor,error)

ListLoadBalancerMonitors lists load balancer monitors connected to an account.

API reference:https://api.cloudflare.com/#load-balancer-monitors-list-monitors

func (*API)ListLoadBalancerPoolsadded inv0.8.0

func (api *API) ListLoadBalancerPools(ctxcontext.Context, rc *ResourceContainer, paramsListLoadBalancerPoolParams) ([]LoadBalancerPool,error)

ListLoadBalancerPools lists load balancer pools connected to an account.

API reference:https://api.cloudflare.com/#load-balancer-pools-list-pools

func (*API)ListLoadBalancersadded inv0.8.0

func (api *API) ListLoadBalancers(ctxcontext.Context, rc *ResourceContainer, paramsListLoadBalancerParams) ([]LoadBalancer,error)

ListLoadBalancers lists load balancers configured on a zone.

API reference:https://api.cloudflare.com/#load-balancers-list-load-balancers

Example
package mainimport (context "context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {// Construct a new API object.api, err := cloudflare.New("deadbeef", "test@example.com")if err != nil {log.Fatal(err)}// List LBs configured in zone.lbList, err := api.ListLoadBalancers(context.Background(), cloudflare.ZoneIdentifier("d56084adb405e0b7e32c52321bf07be6"), cloudflare.ListLoadBalancerParams{})if err != nil {log.Fatal(err)}for _, lb := range lbList {fmt.Println(lb)}}

func (*API)ListLogpushJobsadded inv0.72.0

func (api *API) ListLogpushJobs(ctxcontext.Context, rc *ResourceContainer, paramsListLogpushJobsParams) ([]LogpushJob,error)

ListAccountLogpushJobs returns all Logpush Jobs for all datasets.

API reference:https://api.cloudflare.com/#logpush-jobs-list-logpush-jobs

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}jobs, err := api.ListLogpushJobs(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListLogpushJobsParams{})if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", jobs)for _, r := range jobs {fmt.Printf("%+v\n", r)}

func (*API)ListLogpushJobsForDatasetadded inv0.72.0

func (api *API) ListLogpushJobsForDataset(ctxcontext.Context, rc *ResourceContainer, paramsListLogpushJobsForDatasetParams) ([]LogpushJob,error)

LogpushJobsForDataset returns all Logpush Jobs for a dataset.

API reference:https://api.cloudflare.com/#logpush-jobs-list-logpush-jobs-for-a-dataset

func (*API)ListMTLSCertificateAssociationsadded inv0.58.0

func (api *API) ListMTLSCertificateAssociations(ctxcontext.Context, rc *ResourceContainer, paramsListMTLSCertificateAssociationsParams) ([]MTLSAssociation,error)

ListMTLSCertificateAssociations returns a list of all existing associationsbetween the mTLS certificate and Cloudflare services.

API reference:https://api.cloudflare.com/#mtls-certificate-management-list-mtls-certificate-associations

func (*API)ListMTLSCertificatesadded inv0.58.0

func (api *API) ListMTLSCertificates(ctxcontext.Context, rc *ResourceContainer, paramsListMTLSCertificatesParams) ([]MTLSCertificate,ResultInfo,error)

ListMTLSCertificates returns a list of all user-uploaded mTLS certificates.

API reference:https://api.cloudflare.com/#mtls-certificate-management-list-mtls-certificates

func (*API)ListMagicFirewallRulesetsdeprecatedadded inv0.13.7

func (api *API) ListMagicFirewallRulesets(ctxcontext.Context, accountIDstring) ([]MagicFirewallRuleset,error)

ListMagicFirewallRulesets lists all Rulesets for a given account

API reference:https://api.cloudflare.com/#rulesets-list-rulesets

Deprecated: Use `ListZoneRuleset` or `ListAccountRuleset` instead.

func (*API)ListMagicTransitGRETunnelsadded inv0.32.0

func (api *API) ListMagicTransitGRETunnels(ctxcontext.Context, accountIDstring) ([]MagicTransitGRETunnel,error)

ListMagicTransitGRETunnels lists all GRE tunnels for a given account.

API reference:https://api.cloudflare.com/#magic-gre-tunnels-list-gre-tunnels

func (*API)ListMagicTransitIPsecTunnelsadded inv0.31.0

func (api *API) ListMagicTransitIPsecTunnels(ctxcontext.Context, accountIDstring) ([]MagicTransitIPsecTunnel,error)

ListMagicTransitIPsecTunnels lists all IPsec tunnels for a given account

API reference:https://api.cloudflare.com/#magic-ipsec-tunnels-list-ipsec-tunnels

func (*API)ListMagicTransitStaticRoutesadded inv0.18.0

func (api *API) ListMagicTransitStaticRoutes(ctxcontext.Context, accountIDstring) ([]MagicTransitStaticRoute,error)

ListMagicTransitStaticRoutes lists all static routes for a given account

API reference:https://api.cloudflare.com/#magic-transit-static-routes-list-routes

func (*API)ListNotificationHistoryadded inv0.28.0

func (api *API) ListNotificationHistory(ctxcontext.Context, accountIDstring, alertHistoryFilterAlertHistoryFilter) ([]NotificationHistory,ResultInfo,error)

ListNotificationHistory will return the history of alerts sent fora given account. The time period varies based on zone plan.Free, Biz, Pro = 30 daysEnt = 90 days

API Reference:https://api.cloudflare.com/#notification-history-list-history

func (*API)ListNotificationPoliciesadded inv0.19.0

func (api *API) ListNotificationPolicies(ctxcontext.Context, accountIDstring) (NotificationPoliciesResponse,error)

ListNotificationPolicies will return the notification policiescreated by a user for a specific account.

API Reference:https://api.cloudflare.com/#notification-policies-properties

func (*API)ListNotificationWebhooksadded inv0.19.0

func (api *API) ListNotificationWebhooks(ctxcontext.Context, accountIDstring) (NotificationWebhooksResponse,error)

ListNotificationWebhooks will return the webhook destinations configuredfor an account.

API Reference:https://api.cloudflare.com/#notification-webhooks-list-webhooks

func (*API)ListObservatoryPageTestsadded inv0.78.0

func (api *API) ListObservatoryPageTests(ctxcontext.Context, rc *ResourceContainer, paramsListObservatoryPageTestParams) ([]ObservatoryPageTest, *ResultInfo,error)

ListObservatoryPageTests returns a list of tests for a page in a specific region.

API reference:https://api.cloudflare.com/#speed-list-test-history

func (*API)ListObservatoryPagesadded inv0.78.0

func (api *API) ListObservatoryPages(ctxcontext.Context, rc *ResourceContainer, paramsListObservatoryPagesParams) ([]ObservatoryPage,error)

ListObservatoryPages returns a list of pages which have been tested.

API reference:https://api.cloudflare.com/#speed-list-pages

func (*API)ListOriginCACertificatesadded inv0.58.0

func (api *API) ListOriginCACertificates(ctxcontext.Context, paramsListOriginCertificatesParams) ([]OriginCACertificate,error)

ListOriginCACertificates lists all Cloudflare-issued certificates.

API reference:https://api.cloudflare.com/#cloudflare-ca-list-certificates

func (*API)ListPageRulesadded inv0.7.2

func (api *API) ListPageRules(ctxcontext.Context, zoneIDstring) ([]PageRule,error)

ListPageRules returns all Page Rules for a zone.

API reference:https://api.cloudflare.com/#page-rules-for-a-zone-list-page-rules

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}pageRules, err := api.ListPageRules(context.Background(), zoneID)if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", pageRules)for _, r := range pageRules {fmt.Printf("%+v\n", r)}

func (*API)ListPageShieldConnectionsadded inv0.84.0

ListPageShieldConnections lists all page shield connections for a zone.

API documentation:https://developers.cloudflare.com/api/operations/page-shield-list-page-shield-connections

func (*API)ListPageShieldPoliciesadded inv0.84.0

func (api *API) ListPageShieldPolicies(ctxcontext.Context, rc *ResourceContainer, paramsListPageShieldPoliciesParams) ([]PageShieldPolicy,ResultInfo,error)

ListPageShieldPolicies lists all page shield policies for a zone.

API documentation:https://developers.cloudflare.com/api/operations/page-shield-list-page-shield-policies

func (*API)ListPageShieldScriptsadded inv0.84.0

ListPageShieldScripts returns a list of PageShield Scripts.

API reference:https://developers.cloudflare.com/api/operations/page-shield-list-page-shield-scripts

func (*API)ListPagerDutyNotificationDestinationsadded inv0.19.0

func (api *API) ListPagerDutyNotificationDestinations(ctxcontext.Context, accountIDstring) (NotificationPagerDutyResponse,error)

ListPagerDutyNotificationDestinations will return the pagerdutydestinations configured for an account.

API Reference:https://api.cloudflare.com/#notification-destinations-with-pagerduty-list-pagerduty-services

func (*API)ListPagesDeploymentsadded inv0.40.0

ListPagesDeployments returns all deployments for a Pages project.

API reference:https://api.cloudflare.com/#pages-deployment-get-deployments

func (*API)ListPagesProjectsadded inv0.26.0

func (api *API) ListPagesProjects(ctxcontext.Context, rc *ResourceContainer, paramsListPagesProjectsParams) ([]PagesProject,ResultInfo,error)

ListPagesProjects returns all Pages projects for an account.

API reference:https://api.cloudflare.com/#pages-project-get-projects

func (*API)ListPerHostnameAuthenticatedOriginPullsCertificatesadded inv0.17.0

func (api *API) ListPerHostnameAuthenticatedOriginPullsCertificates(ctxcontext.Context, zoneIDstring) ([]PerHostnameAuthenticatedOriginPullsDetails,error)

ListPerHostnameAuthenticatedOriginPullsCertificates will get all certificate under Per Hostname AuthenticatedOriginPulls zone.

API reference:https://api.cloudflare.com/#per-hostname-authenticated-origin-pull-list-certificates

func (*API)ListPerZoneAuthenticatedOriginPullsCertificatesadded inv0.12.2

func (api *API) ListPerZoneAuthenticatedOriginPullsCertificates(ctxcontext.Context, zoneIDstring) ([]PerZoneAuthenticatedOriginPullsCertificateDetails,error)

ListPerZoneAuthenticatedOriginPullsCertificates returns a list of all user uploaded client certificates to Per Zone AuthenticatedOriginPulls.

API reference:https://api.cloudflare.com/#zone-level-authenticated-origin-pulls-list-certificates

func (*API)ListPermissionGroupsadded inv0.53.0

func (api *API) ListPermissionGroups(ctxcontext.Context, rc *ResourceContainer, paramsListPermissionGroupParams) ([]PermissionGroup,error)

ListPermissionGroups returns all valid permission groups for the providedparameters.

func (*API)ListPrefixesadded inv0.11.7

func (api *API) ListPrefixes(ctxcontext.Context, accountIDstring) ([]IPPrefix,error)

ListPrefixes lists all IP prefixes for a given account

API reference:https://api.cloudflare.com/#ip-address-management-prefixes-list-prefixes

func (*API)ListQueueConsumersadded inv0.55.0

func (api *API) ListQueueConsumers(ctxcontext.Context, rc *ResourceContainer, paramsListQueueConsumersParams) ([]QueueConsumer, *ResultInfo,error)

ListQueueConsumers returns the consumers of a queue.

API reference:https://api.cloudflare.com/#queue-list-queue-consumers

func (*API)ListQueuesadded inv0.55.0

func (api *API) ListQueues(ctxcontext.Context, rc *ResourceContainer, paramsListQueuesParams) ([]Queue, *ResultInfo,error)

ListQueues returns the queues owned by an account.

API reference:https://api.cloudflare.com/#queue-list-queues

func (*API)ListR2Bucketsadded inv0.55.0

func (api *API) ListR2Buckets(ctxcontext.Context, rc *ResourceContainer, paramsListR2BucketsParams) ([]R2Bucket,error)

ListR2Buckets Lists R2 buckets.

func (*API)ListRateLimitsadded inv0.8.5

func (api *API) ListRateLimits(ctxcontext.Context, zoneIDstring, pageOptsPaginationOptions) ([]RateLimit,ResultInfo,error)

ListRateLimits returns Rate Limits for a zone, paginated according to the provided options

API reference:https://api.cloudflare.com/#rate-limits-for-a-zone-list-rate-limits

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}pageOpts := cloudflare.PaginationOptions{PerPage: 5,Page:    1,}rateLimits, _, err := api.ListRateLimits(context.Background(), zoneID, pageOpts)if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", rateLimits)for _, r := range rateLimits {fmt.Printf("%+v\n", r)}

func (*API)ListRiskScoreIntegrationsadded inv0.101.0

func (api *API) ListRiskScoreIntegrations(ctxcontext.Context, rc *ResourceContainer, paramsListRiskScoreIntegrationParams) ([]RiskScoreIntegration,error)

ListRiskScoreIntegrations returns all Risk Score Integrations for an account.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/risk_scoring/subresources/integrations/methods/list/

func (*API)ListRulesetsadded inv0.73.0

func (api *API) ListRulesets(ctxcontext.Context, rc *ResourceContainer, paramsListRulesetsParams) ([]Ruleset,error)

ListRulesets lists all Rulesets in a given zone or account depending on theResourceContainer type provided.

API reference:https://developers.cloudflare.com/api/operations/listAccountRulesetsAPI reference:https://developers.cloudflare.com/api/resources/rulesets/methods/list/

func (*API)ListSSLadded inv0.7.2

func (api *API) ListSSL(ctxcontext.Context, zoneIDstring) ([]ZoneCustomSSL,error)

ListSSL lists the custom certificates for the given zone.

API reference:https://api.cloudflare.com/#custom-ssl-for-a-zone-list-ssl-configurations

func (*API)ListSecondaryDNSPrimariesadded inv0.15.0

func (api *API) ListSecondaryDNSPrimaries(ctxcontext.Context, accountIDstring) ([]SecondaryDNSPrimary,error)

ListSecondaryDNSPrimaries returns all secondary DNS primaries for an account.

API reference:https://api.cloudflare.com/#secondary-dns-primary--list-primaries

func (*API)ListSecondaryDNSTSIGsadded inv0.15.0

func (api *API) ListSecondaryDNSTSIGs(ctxcontext.Context, accountIDstring) ([]SecondaryDNSTSIG,error)

ListSecondaryDNSTSIGs gets all account level TSIG for a secondary DNSconfiguration.

API reference:https://api.cloudflare.com/#secondary-dns-tsig--list-tsigs

func (*API)ListSplitTunnelsadded inv0.25.0

func (api *API) ListSplitTunnels(ctxcontext.Context, accountIDstring, modestring) ([]SplitTunnel,error)

ListSplitTunnel returns all include or exclude split tunnel within an account.

API reference for include:https://api.cloudflare.com/#device-policy-get-split-tunnel-include-listAPI reference for exclude:https://api.cloudflare.com/#device-policy-get-split-tunnel-exclude-list

func (*API)ListSplitTunnelsDeviceSettingsPolicyadded inv0.52.0

func (api *API) ListSplitTunnelsDeviceSettingsPolicy(ctxcontext.Context, accountID, policyIDstring, modestring) ([]SplitTunnel,error)

ListSplitTunnelDeviceSettingsPolicy returns all include or exclude split tunnel within a device settings policy

API reference for include:https://api.cloudflare.com/#device-policy-get-split-tunnel-include-listAPI reference for exclude:https://api.cloudflare.com/#device-policy-get-split-tunnel-exclude-list

func (*API)ListTeamsDevicesadded inv0.32.0

func (api *API) ListTeamsDevices(ctxcontext.Context, accountIDstring) ([]TeamsDeviceListItem,error)

ListTeamsDevice returns all devices for a given account.

API reference :https://api.cloudflare.com/#devices-list-devices

func (*API)ListTeamsListItemsadded inv0.53.0

func (api *API) ListTeamsListItems(ctxcontext.Context, rc *ResourceContainer, paramsListTeamsListItemsParams) ([]TeamsListItem,ResultInfo,error)

ListTeamsListItems returns all list items for a list.

API reference:https://api.cloudflare.com/#teams-lists-teams-list-items

func (*API)ListTeamsListsadded inv0.53.0

func (api *API) ListTeamsLists(ctxcontext.Context, rc *ResourceContainer, paramsListTeamListsParams) ([]TeamsList,ResultInfo,error)

ListTeamsLists returns all lists within an account.

API reference:https://api.cloudflare.com/#teams-lists-list-teams-lists

func (*API)ListTunnelConnectionsadded inv0.63.0

func (api *API) ListTunnelConnections(ctxcontext.Context, rc *ResourceContainer, tunnelIDstring) ([]Connection,error)

ListTunnelConnections gets all connections on a tunnel.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-list-cloudflare-tunnel-connections

func (*API)ListTunnelRoutesadded inv0.37.0

func (api *API) ListTunnelRoutes(ctxcontext.Context, rc *ResourceContainer, paramsTunnelRoutesListParams) ([]TunnelRoute,error)

ListTunnelRoutes lists all defined routes for tunnels in the account.

See:https://api.cloudflare.com/#tunnel-route-list-tunnel-routes

func (*API)ListTunnelVirtualNetworksadded inv0.41.0

func (api *API) ListTunnelVirtualNetworks(ctxcontext.Context, rc *ResourceContainer, paramsTunnelVirtualNetworksListParams) ([]TunnelVirtualNetwork,error)

ListTunnelVirtualNetworks lists all defined virtual networks for tunnels inthe account.

API reference:https://api.cloudflare.com/#tunnel-virtual-network-list-virtual-networks

func (*API)ListTunnelsadded inv0.63.0

func (api *API) ListTunnels(ctxcontext.Context, rc *ResourceContainer, paramsTunnelListParams) ([]Tunnel, *ResultInfo,error)

ListTunnels lists all tunnels.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-list-cloudflare-tunnels

func (*API)ListTurnstileWidgetsadded inv0.66.0

func (api *API) ListTurnstileWidgets(ctxcontext.Context, rc *ResourceContainer, paramsListTurnstileWidgetParams) ([]TurnstileWidget, *ResultInfo,error)

ListTurnstileWidgets lists challenge widgets.

API reference:https://api.cloudflare.com/#challenge-widgets-list-challenge-widgets

func (*API)ListUserAccessRulesadded inv0.8.1

func (api *API) ListUserAccessRules(ctxcontext.Context, accessRuleAccessRule, pageint) (*AccessRuleListResponse,error)

ListUserAccessRules returns a slice of access rules for the logged-in user.

This takes an AccessRule to allow filtering of the results returned.

API reference:https://api.cloudflare.com/#user-level-firewall-access-rule-list-access-rules

func (*API)ListUserAgentRulesadded inv0.8.0

func (api *API) ListUserAgentRules(ctxcontext.Context, zoneIDstring, pageint) (*UserAgentRuleListResponse,error)

ListUserAgentRules retrieves a list of User-Agent Block rules for a given zone ID by page number.

API reference:https://api.cloudflare.com/#user-agent-blocking-rules-list-useragent-rules

Example (All)
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}// Fetch all Zone Lockdown rules for a zone, by page.rules, err := api.ListUserAgentRules(context.Background(), zoneID, 1)if err != nil {log.Fatal(err)}for _, r := range rules.Result {fmt.Printf("%s: %s\n", r.Configuration.Target, r.Configuration.Value)}}

func (*API)ListWAFGroupsadded inv0.10.0

func (api *API) ListWAFGroups(ctxcontext.Context, zoneID, packageIDstring) ([]WAFGroup,error)

ListWAFGroups returns a slice of the WAF groups for the given WAF package.

API Reference:https://api.cloudflare.com/#waf-rule-groups-list-rule-groups

func (*API)ListWAFOverridesadded inv0.11.1

func (api *API) ListWAFOverrides(ctxcontext.Context, zoneIDstring) ([]WAFOverride,error)

ListWAFOverrides returns a slice of the WAF overrides.

API Reference:https://api.cloudflare.com/#waf-overrides-list-uri-controlled-waf-configurations

func (*API)ListWAFPackagesadded inv0.7.2

func (api *API) ListWAFPackages(ctxcontext.Context, zoneIDstring) ([]WAFPackage,error)

ListWAFPackages returns a slice of the WAF packages for the given zone.

API Reference:https://api.cloudflare.com/#waf-rule-packages-list-firewall-packages

func (*API)ListWAFRulesadded inv0.7.2

func (api *API) ListWAFRules(ctxcontext.Context, zoneID, packageIDstring) ([]WAFRule,error)

ListWAFRules returns a slice of the WAF rules for the given WAF package.

API Reference:https://api.cloudflare.com/#waf-rules-list-rules

func (*API)ListWaitingRoomEventsadded inv0.33.0

func (api *API) ListWaitingRoomEvents(ctxcontext.Context, zoneIDstring, waitingRoomIDstring) ([]WaitingRoomEvent,error)

ListWaitingRoomEvents returns all Waiting Room Events for a zone.

API reference:https://api.cloudflare.com/#waiting-room-list-events

func (*API)ListWaitingRoomRulesadded inv0.53.0

func (api *API) ListWaitingRoomRules(ctxcontext.Context, rc *ResourceContainer, paramsListWaitingRoomRuleParams) ([]WaitingRoomRule,error)

ListWaitingRoomRules lists all rules for a Waiting Room.

API reference:https://api.cloudflare.com/#waiting-room-list-waiting-room-rules

func (*API)ListWaitingRoomsadded inv0.17.0

func (api *API) ListWaitingRooms(ctxcontext.Context, zoneIDstring) ([]WaitingRoom,error)

ListWaitingRooms returns all Waiting Room for a zone.

API reference:https://api.cloudflare.com/#waiting-room-list-waiting-rooms

func (*API)ListWeb3Hostnamesadded inv0.45.0

func (api *API) ListWeb3Hostnames(ctxcontext.Context, paramsWeb3HostnameListParameters) ([]Web3Hostname,error)

ListWeb3Hostnames lists all web3 hostnames.

API Reference:https://api.cloudflare.com/#web3-hostname-list-web3-hostnames

func (*API)ListWebAnalyticsRulesadded inv0.75.0

ListWebAnalyticsRules fetches all Web Analytics Rules in a Web Analytics ruleset.

API reference:https://api.cloudflare.com/#web-analytics-list-rules

func (*API)ListWebAnalyticsSitesadded inv0.75.0

func (api *API) ListWebAnalyticsSites(ctxcontext.Context, rc *ResourceContainer, paramsListWebAnalyticsSitesParams) ([]WebAnalyticsSite, *ResultInfo,error)

ListWebAnalyticsSites returns all Web Analytics Sites of an Account.

API reference:https://api.cloudflare.com/#web-analytics-list-sites

func (*API)ListWorkerBindingsadded inv0.10.7

ListWorkerBindings returns all the bindings for a particular worker.

func (*API)ListWorkerCronTriggersadded inv0.13.8

func (api *API) ListWorkerCronTriggers(ctxcontext.Context, rc *ResourceContainer, paramsListWorkerCronTriggersParams) ([]WorkerCronTrigger,error)

ListWorkerCronTriggers fetches all available cron triggers for a single Workerscript.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/schedules/methods/get/

func (*API)ListWorkerRoutesadded inv0.9.0

ListWorkerRoutes returns list of Worker routes.

API reference:https://developers.cloudflare.com/api/operations/worker-routes-list-routes

func (*API)ListWorkersadded inv0.57.0

ListWorkers returns list of Workers for given account.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/list/

func (*API)ListWorkersDomainsadded inv0.55.0

func (api *API) ListWorkersDomains(ctxcontext.Context, rc *ResourceContainer, paramsListWorkersDomainParams) ([]WorkersDomain,error)

ListWorkersDomains lists all Worker Domains.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/domains/methods/list/

func (*API)ListWorkersForPlatformsDispatchNamespacesadded inv0.90.0

func (api *API) ListWorkersForPlatformsDispatchNamespaces(ctxcontext.Context, rc *ResourceContainer) (*ListWorkersForPlatformsDispatchNamespaceResponse,error)

ListWorkersForPlatformsDispatchNamespaces lists the dispatch namespaces.

API reference:https://developers.cloudflare.com/api/resources/workers_for_platforms/subresources/dispatch/subresources/namespaces/methods/list/

func (API)ListWorkersKVKeysadded inv0.55.0

ListWorkersKVKeys lists a namespace's keys.

API Reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/subresources/keys/methods/list/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}limit := 50prefix := "my-prefix"cursor := "AArAbNSOuYcr4HmzGH02-cfDN8Ck9ejOwkn_Ai5rsn7S9NEqVJBenU9-gYRlrsziyjKLx48hNDLvtYzBAmkPsLGdye8ECr5PqFYcIOfUITdhkyTc1x6bV8nmyjz5DO-XaZH4kYY1KfqT8NRBIe5sic6yYt3FUDttGjafy0ivi-Up-TkVdRB0OxCf3O3OB-svG6DXheV5XTdDNrNx1o_CVqy2l2j0F4iKV1qFe_KhdkjC7Y6QjhUZ1MOb3J_uznNYVCoxZ-bVAAsJmXA"resp, err := api.ListWorkersKVKeys(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.ListWorkersKVsParams{NamespaceID: namespace,Prefix:      prefix,Limit:       limit,Cursor:      cursor,})if err != nil {log.Fatal(err)}fmt.Println(resp)

func (*API)ListWorkersKVNamespacesadded inv0.9.0

func (api *API) ListWorkersKVNamespaces(ctxcontext.Context, rc *ResourceContainer, paramsListWorkersKVNamespacesParams) ([]WorkersKVNamespace, *ResultInfo,error)

ListWorkersKVNamespaces lists storage namespaces.

API reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/methods/list/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}lsr, _, err := api.ListWorkersKVNamespaces(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.ListWorkersKVNamespacesParams{})if err != nil {log.Fatal(err)}fmt.Println(lsr)resp, _, err := api.ListWorkersKVNamespaces(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.ListWorkersKVNamespacesParams{ResultInfo: cloudflare.ResultInfo{PerPage: 10,}})if err != nil {log.Fatal(err)}fmt.Println(resp)

func (*API)ListWorkersSecretsadded inv0.13.1

ListWorkersSecrets lists secrets for a given workerAPI reference:https://api.cloudflare.com/

func (*API)ListWorkersTailadded inv0.47.0

func (api *API) ListWorkersTail(ctxcontext.Context, rc *ResourceContainer, paramsListWorkersTailParameters) (WorkersTail,error)

ListWorkersTail Get list of tails currently deployed on a Worker.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/tail/methods/get/

func (*API)ListZarazConfigHistoryadded inv0.86.0

func (api *API) ListZarazConfigHistory(ctxcontext.Context, rc *ResourceContainer, paramsListZarazConfigHistoryParams) ([]ZarazHistoryRecord, *ResultInfo,error)

func (*API)ListZoneAccessRulesadded inv0.8.1

func (api *API) ListZoneAccessRules(ctxcontext.Context, zoneIDstring, accessRuleAccessRule, pageint) (*AccessRuleListResponse,error)

ListZoneAccessRules returns a slice of access rules for the given zoneidentifier.

This takes an AccessRule to allow filtering of the results returned.

API reference:https://api.cloudflare.com/#firewall-access-rule-for-a-zone-list-access-rules

Example (All)
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}// Fetch all access rules for a zoneresponse, err := api.ListZoneAccessRules(context.Background(), zoneID, cloudflare.AccessRule{}, 1)if err != nil {log.Fatal(err)}for _, r := range response.Result {fmt.Printf("%s: %s\n", r.Configuration.Value, r.Mode)}}

Example (FilterByIP)
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}// Fetch only access rules whose target is 198.51.100.1localhost := cloudflare.AccessRule{Configuration: cloudflare.AccessRuleConfiguration{Target: "198.51.100.1"},}response, err := api.ListZoneAccessRules(context.Background(), zoneID, localhost, 1)if err != nil {log.Fatal(err)}for _, r := range response.Result {fmt.Printf("%s: %s\n", r.Configuration.Value, r.Mode)}}

Example (FilterByMode)
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}// Fetch access rules with an action of "block"foo := cloudflare.AccessRule{Mode: "block",}response, err := api.ListZoneAccessRules(context.Background(), zoneID, foo, 1)if err != nil {log.Fatal(err)}for _, r := range response.Result {fmt.Printf("%s: %s\n", r.Configuration.Value, r.Mode)}}

Example (FilterByNote)
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}// Fetch only access rules with notes containing "example"foo := cloudflare.AccessRule{Notes: "example",}response, err := api.ListZoneAccessRules(context.Background(), zoneID, foo, 1)if err != nil {log.Fatal(err)}for _, r := range response.Result {fmt.Printf("%s: %s\n", r.Configuration.Value, r.Mode)}}

func (*API)ListZoneCloudConnectorRulesadded inv0.100.0

func (api *API) ListZoneCloudConnectorRules(ctxcontext.Context, rc *ResourceContainer) ([]CloudConnectorRule,error)

func (*API)ListZoneLockdownsadded inv0.8.0

func (api *API) ListZoneLockdowns(ctxcontext.Context, rc *ResourceContainer, paramsLockdownListParams) ([]ZoneLockdown, *ResultInfo,error)

ListZoneLockdowns retrieves every Zone ZoneLockdown rules for a given zone ID.

Automatically paginates all results unless `params.PerPage` and `params.Page`is set.

API reference:https://api.cloudflare.com/#zone-ZoneLockdown-list-ZoneLockdown-rules

Example (All)
package mainimport ("context""fmt""log""strings"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName("example.com")if err != nil {log.Fatal(err)}// Fetch all Zone Lockdown rules for a zone, by page.rules, _, err := api.ListZoneLockdowns(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.LockdownListParams{})if err != nil {log.Fatal(err)}for _, r := range rules {fmt.Printf("%s: %s\n", strings.Join(r.URLs, ", "), r.Configurations)}}

func (*API)ListZoneManagedHeadersadded inv0.42.0

func (api *API) ListZoneManagedHeaders(ctxcontext.Context, rc *ResourceContainer, paramsListManagedHeadersParams) (ManagedHeaders,error)

func (*API)ListZoneSnippetsadded inv0.108.0

func (api *API) ListZoneSnippets(ctxcontext.Context, rc *ResourceContainer) ([]Snippet,error)

func (*API)ListZoneSnippetsRulesadded inv0.108.0

func (api *API) ListZoneSnippetsRules(ctxcontext.Context, rc *ResourceContainer) ([]SnippetRule,error)

func (*API)ListZonesadded inv0.7.2

func (api *API) ListZones(ctxcontext.Context, z ...string) ([]Zone,error)

ListZones lists zones on an account. Optionally takes a list of zone namesto filter against.

API reference:https://api.cloudflare.com/#zone-list-zones

Example (All)
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}// Fetch all zones available to this user.zones, err := api.ListZones(context.Background())if err != nil {log.Fatal(err)}for _, z := range zones {fmt.Println(z.Name)}}

Example (Filter)
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}// Fetch a slice of zones example.org and example.net.zones, err := api.ListZones(context.Background(), "example.org", "example.net")if err != nil {log.Fatal(err)}for _, z := range zones {fmt.Println(z.Name)}}

func (*API)ListZonesContextadded inv0.9.0

func (api *API) ListZonesContext(ctxcontext.Context, opts ...ReqOption) (rZonesResponse, errerror)

ListZonesContext lists all zones on an account automatically handling thepagination. Optionally takes a list of ReqOptions.

func (*API)PageRuleadded inv0.7.2

func (api *API) PageRule(ctxcontext.Context, zoneID, ruleIDstring) (PageRule,error)

PageRule fetches detail about one Page Rule for a zone.

API reference:https://api.cloudflare.com/#page-rules-for-a-zone-page-rule-details

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}pageRules, err := api.PageRule(context.Background(), zoneID, "my_page_rule_id")if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", pageRules)

func (*API)PagesAddDomainadded inv0.44.0

func (api *API) PagesAddDomain(ctxcontext.Context, paramsPagesDomainParameters) (PagesDomain,error)

PagesAddDomain adds a domain to a pages project.

API Reference:https://api.cloudflare.com/#pages-domains-add-domain

func (*API)PagesDeleteDomainadded inv0.44.0

func (api *API) PagesDeleteDomain(ctxcontext.Context, paramsPagesDomainParameters)error

PagesDeleteDomain removes a domain from a pages project.

API Reference:https://api.cloudflare.com/#pages-domains-delete-domain

func (*API)PagesPatchDomainadded inv0.44.0

func (api *API) PagesPatchDomain(ctxcontext.Context, paramsPagesDomainParameters) (PagesDomain,error)

PagesPatchDomain retries the validation status of a single domain.

API Reference:https://api.cloudflare.com/#pages-domains-patch-domain

func (*API)PatchTeamsListadded inv0.17.0

func (api *API) PatchTeamsList(ctxcontext.Context, rc *ResourceContainer, listPatchPatchTeamsListParams) (TeamsList,error)

PatchTeamsList updates the items in an existing teams list.

API reference:https://api.cloudflare.com/#teams-lists-patch-teams-list

func (*API)PatchWaitingRoomSettingsadded inv0.67.0

func (api *API) PatchWaitingRoomSettings(ctxcontext.Context, rc *ResourceContainer, paramsPatchWaitingRoomSettingsParams) (WaitingRoomSettings,error)

PatchWaitingRoomSettings lets you change individual zone-level Waiting Room settings. This isin contrast to UpdateWaitingRoomSettings which replaces all settings.

API reference:https://api.cloudflare.com/#waiting-room-patch-zone-settings

func (*API)PerformTracerouteadded inv0.13.1

func (api *API) PerformTraceroute(ctxcontext.Context, accountIDstring, targets, colos []string, tracerouteOptionsDiagnosticsTracerouteConfigurationOptions) ([]DiagnosticsTracerouteResponseResult,error)

PerformTraceroute initiates a traceroute from the Cloudflare network to therequested targets.

API documentation:https://api.cloudflare.com/#diagnostics-traceroute

func (*API)PublishZarazConfigadded inv0.86.0

func (*API)PurgeCacheadded inv0.7.2

func (api *API) PurgeCache(ctxcontext.Context, zoneIDstring, pcrPurgeCacheRequest) (PurgeCacheResponse,error)

PurgeCache purges the cache using the given PurgeCacheRequest (zone/url/tag).

API reference:https://api.cloudflare.com/#zone-purge-individual-files-by-url-and-cache-tags

func (*API)PurgeCacheContextadded inv0.13.1

func (api *API) PurgeCacheContext(ctxcontext.Context, zoneIDstring, pcrPurgeCacheRequest) (PurgeCacheResponse,error)

PurgeCacheContext purges the cache using the given PurgeCacheRequest (zone/url/tag).

API reference:https://api.cloudflare.com/#zone-purge-individual-files-by-url-and-cache-tags

func (*API)PurgeEverythingadded inv0.7.2

func (api *API) PurgeEverything(ctxcontext.Context, zoneIDstring) (PurgeCacheResponse,error)

PurgeEverything purges the cache for the given zone.

Note: this will substantially increase load on the origin server for thatzone if there is a high cached vs. uncached request ratio.

API reference:https://api.cloudflare.com/#zone-purge-all-files

func (*API)QueryD1Databaseadded inv0.79.0

func (api *API) QueryD1Database(ctxcontext.Context, rc *ResourceContainer, paramsQueryD1DatabaseParams) ([]D1Result,error)

QueryD1Database queries a database for an account.

API reference:https://developers.cloudflare.com/api/resources/d1/subresources/database/methods/query/

func (*API)RateLimitadded inv0.8.5

func (api *API) RateLimit(ctxcontext.Context, zoneID, limitIDstring) (RateLimit,error)

RateLimit fetches detail about one Rate Limit for a zone.

API reference:https://api.cloudflare.com/#rate-limits-for-a-zone-rate-limit-details

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}rateLimits, err := api.RateLimit(context.Background(), zoneID, "my_rate_limit_id")if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", rateLimits)

func (*API)Rawadded inv0.8.0

func (api *API) Raw(ctxcontext.Context, method, endpointstring, data interface{}, headershttp.Header) (RawResponse,error)

Raw makes a HTTP request with user provided params and returns theresult as a RawResponse, which contains the untouched JSON result.

func (*API)RefreshAccessServiceTokenadded inv0.49.0

func (api *API) RefreshAccessServiceToken(ctxcontext.Context, rc *ResourceContainer, idstring) (AccessServiceTokenRefreshResponse,error)

RefreshAccessServiceToken updates the expiry of an Access Service Tokenin place.

API reference:https://api.cloudflare.com/#access-service-tokens-refresh-a-service-token

func (*API)RegistrarDomainadded inv0.9.0

func (api *API) RegistrarDomain(ctxcontext.Context, accountID, domainNamestring) (RegistrarDomain,error)

RegistrarDomain returns a single domain based on the account ID anddomain name.

API reference:https://api.cloudflare.com/#registrar-domains-get-domain

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}domain, err := api.RegistrarDomain(context.Background(), "01a7362d577a6c3019a474fd6f485823", "cloudflare.com")if err != nil {log.Fatal(err)}if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", domain)

func (*API)RegistrarDomainsadded inv0.9.0

func (api *API) RegistrarDomains(ctxcontext.Context, accountIDstring) ([]RegistrarDomain,error)

RegistrarDomains returns all registrar domains based on the accountID.

API reference:https://api.cloudflare.com/#registrar-domains-list-domains

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}domains, err := api.RegistrarDomains(context.Background(), "01a7362d577a6c3019a474fd6f485823")if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", domains)

func (*API)ReplaceIPListItemsdeprecatedadded inv0.13.0

func (api *API) ReplaceIPListItems(ctxcontext.Context, accountID, IDstring, items []IPListItemCreateRequest) ([]IPListItem,error)

ReplaceIPListItems replaces all IP List Items synchronously and returns thecurrent set of IP List Items.

Deprecated: Use `ReplaceListItems` instead.

func (*API)ReplaceIPListItemsAsyncdeprecatedadded inv0.13.0

func (api *API) ReplaceIPListItemsAsync(ctxcontext.Context, accountID, IDstring, items []IPListItemCreateRequest) (IPListItemCreateResponse,error)

ReplaceIPListItemsAsync replaces all IP List Items asynchronously. Users haveto poll the operation status by using the operation_id returned by thisfunction.

API reference:https://api.cloudflare.com/#rules-lists-replace-list-items

Deprecated: Use `ReplaceListItemsAsync` instead.

func (*API)ReplaceListItemsadded inv0.41.0

func (api *API) ReplaceListItems(ctxcontext.Context, rc *ResourceContainer, paramsListReplaceItemsParams) ([]ListItem,error)

ReplaceListItems replaces all List Items synchronously and returns thecurrent set of List Items.

func (*API)ReplaceListItemsAsyncadded inv0.41.0

func (api *API) ReplaceListItemsAsync(ctxcontext.Context, rc *ResourceContainer, paramsListReplaceItemsParams) (ListItemCreateResponse,error)

ReplaceListItemsAsync replaces all List Items asynchronously. Users have topoll the operation status by using the operation_id returned by thisfunction.

API reference:https://api.cloudflare.com/#rules-lists-replace-list-items

func (*API)ReplaceWaitingRoomRulesadded inv0.53.0

func (api *API) ReplaceWaitingRoomRules(ctxcontext.Context, rc *ResourceContainer, paramsReplaceWaitingRoomRuleParams) ([]WaitingRoomRule,error)

ReplaceWaitingRoomRules replaces all rules for a Waiting Room.

API reference:https://api.cloudflare.com/#waiting-room-replace-waiting-room-rules

func (*API)ReprioritizeSSLadded inv0.7.2

func (api *API) ReprioritizeSSL(ctxcontext.Context, zoneIDstring, p []ZoneCustomSSLPriority) ([]ZoneCustomSSL,error)

ReprioritizeSSL allows you to change the priority (which is served for a givenrequest) of custom SSL certificates associated with the given zone.

API reference:https://api.cloudflare.com/#custom-ssl-for-a-zone-re-prioritize-ssl-certificates

func (*API)RestartCertificateValidationadded inv0.47.0

func (api *API) RestartCertificateValidation(ctxcontext.Context, zoneID, certificateIDstring) (CertificatePack,error)

RestartCertificateValidation kicks off the validation process for apending certificate pack.

API Reference:https://api.cloudflare.com/#certificate-packs-restart-validation-for-advanced-certificate-manager-certificate-pack

func (*API)RestoreFallbackDomainDefaultsadded inv0.31.0

func (api *API) RestoreFallbackDomainDefaults(ctxcontext.Context, accountIDstring)error

RestoreFallbackDomainDefaultsDeviceSettingsPolicy resets the domain fallback values to the defaultlist for a specific device settings policy.

API reference: TBA.

func (*API)RestoreFallbackDomainDefaultsDeviceSettingsPolicyadded inv0.52.0

func (api *API) RestoreFallbackDomainDefaultsDeviceSettingsPolicy(ctxcontext.Context, accountID, policyIDstring)error

RestoreFallbackDomainDefaults resets the domain fallback values to the defaultlist.

API reference: TBA.

func (*API)RetryPagesDeploymentadded inv0.40.0

func (api *API) RetryPagesDeployment(ctxcontext.Context, rc *ResourceContainer, projectName, deploymentIDstring) (PagesProjectDeployment,error)

RetryPagesDeployment retries a specific Pages deployment.

API reference:https://api.cloudflare.com/#pages-deployment-retry-deployment

func (*API)RevokeAccessApplicationTokensadded inv0.9.0

func (api *API) RevokeAccessApplicationTokens(ctxcontext.Context, rc *ResourceContainer, applicationIDstring)error

RevokeAccessApplicationTokens revokes tokens associated with anaccess application.

Account API reference:https://developers.cloudflare.com/api/operations/access-applications-revoke-service-tokensZone API reference:https://developers.cloudflare.com/api/operations/zone-level-access-applications-revoke-service-tokens

func (*API)RevokeAccessUserTokensadded inv0.31.0

func (api *API) RevokeAccessUserTokens(ctxcontext.Context, rc *ResourceContainer, paramsRevokeAccessUserTokensParams)error

RevokeAccessUserTokens revokes any outstanding tokens issued for a specific userAccess User.

func (*API)RevokeOriginCACertificateadded inv0.58.0

func (api *API) RevokeOriginCACertificate(ctxcontext.Context, certificateIDstring) (*OriginCACertificateID,error)

RevokeOriginCACertificate revokes a created certificate for a zone.

API reference:https://api.cloudflare.com/#cloudflare-ca-revoke-certificate

func (*API)RevokeTeamsDevicesadded inv0.32.0

func (api *API) RevokeTeamsDevices(ctxcontext.Context, accountIDstring, deviceIds []string) (Response,error)

RevokeTeamsDevice revokes device with given identifiers.

API reference :https://api.cloudflare.com/#devices-revoke-devices

func (*API)RollAPITokenadded inv0.13.5

func (api *API) RollAPIToken(ctxcontext.Context, tokenIDstring) (string,error)

RollAPIToken rolls the credential associated with the token.

API reference:https://api.cloudflare.com/#user-api-tokens-roll-token

func (*API)RollbackPagesDeploymentadded inv0.40.0

func (api *API) RollbackPagesDeployment(ctxcontext.Context, rc *ResourceContainer, projectName, deploymentIDstring) (PagesProjectDeployment,error)

RollbackPagesDeployment rollbacks the Pages production deployment to a previous production deployment.

API reference:https://api.cloudflare.com/#pages-deployment-rollback-deployment

func (*API)RotateAccessKeysadded inv0.23.0

func (api *API) RotateAccessKeys(ctxcontext.Context, accountIDstring) (AccessKeysConfig,error)

RotateAccessKeys rotates the Access Keys for an account and returns the updated Access Keys Configuration

API reference:https://api.cloudflare.com/#access-keys-configuration-rotate-access-keys

func (*API)RotateAccessServiceTokenadded inv0.54.0

func (api *API) RotateAccessServiceToken(ctxcontext.Context, rc *ResourceContainer, idstring) (AccessServiceTokenRotateResponse,error)

RotateAccessServiceToken rotates the client secret of an Access ServiceToken in place.API reference:https://api.cloudflare.com/#access-service-tokens-rotate-a-service-token

func (*API)RotateTurnstileWidgetadded inv0.66.0

func (api *API) RotateTurnstileWidget(ctxcontext.Context, rc *ResourceContainer, paramRotateTurnstileWidgetParams) (TurnstileWidget,error)

RotateTurnstileWidget generates a new secret key for this widget. Ifinvalidate_immediately is set to false, the previous secret remains valid for2 hours.

Note that secrets cannot be rotated again during the grace period.

API reference:https://api.cloudflare.com/#challenge-widgets-rotate-secret-for-a-challenge-widget

func (*API)SSLDetailsadded inv0.7.2

func (api *API) SSLDetails(ctxcontext.Context, zoneID, certificateIDstring) (ZoneCustomSSL,error)

SSLDetails returns the configuration details for a custom SSL certificate.

API reference:https://api.cloudflare.com/#custom-ssl-for-a-zone-ssl-configuration-details

func (*API)SetAuthTypeadded inv0.7.4

func (api *API) SetAuthType(authTypeint)

SetAuthType sets the authentication method (AuthKeyEmail, AuthToken, or AuthUserService).

func (*API)SetAuthenticatedOriginPullsStatusadded inv0.12.2

func (api *API) SetAuthenticatedOriginPullsStatus(ctxcontext.Context, zoneIDstring, enablebool) (AuthenticatedOriginPulls,error)

SetAuthenticatedOriginPullsStatus toggles whether global AuthenticatedOriginPulls is enabled for the zone.

API reference:https://api.cloudflare.com/#zone-settings-change-tls-client-auth-setting

func (*API)SetLogpullRetentionFlagadded inv0.12.0

func (api *API) SetLogpullRetentionFlag(ctxcontext.Context, zoneIDstring, enabledbool) (*LogpullRetentionConfiguration,error)

SetLogpullRetentionFlag updates the retention flag to the defined boolean.

API reference:https://developers.cloudflare.com/logs/logpull-api/enabling-log-retention/

func (*API)SetPerZoneAuthenticatedOriginPullsStatusadded inv0.12.2

func (api *API) SetPerZoneAuthenticatedOriginPullsStatus(ctxcontext.Context, zoneIDstring, enablebool) (PerZoneAuthenticatedOriginPullsSettings,error)

SetPerZoneAuthenticatedOriginPullsStatus will update whether Per Zone AuthenticatedOriginPulls is enabled for the zone.

API reference:https://api.cloudflare.com/#zone-level-authenticated-origin-pulls-set-enablement-for-zone

func (*API)SetTieredCacheadded inv0.57.1

func (api *API) SetTieredCache(ctxcontext.Context, rc *ResourceContainer, valueTieredCacheType) (TieredCache,error)

SetTieredCache allows you to set a zone's tiered cache topology between the available types.Using the value of TieredCacheOff will disable Tiered Cache entirely.

API Reference:https://api.cloudflare.com/#smart-tiered-cache-patch-smart-tiered-cache-settingAPI Reference:https://api.cloudflare.com/#tiered-cache-patch-tiered-cache-setting

func (*API)SetTotalTLSadded inv0.53.0

func (api *API) SetTotalTLS(ctxcontext.Context, rc *ResourceContainer, paramsTotalTLS) (TotalTLS,error)

SetTotalTLS Set Total TLS Settings or disable the feature for a Zone.

API Reference:https://api.cloudflare.com/#total-tls-enable-or-disable-total-tls

func (*API)SetWorkersSecretadded inv0.13.1

SetWorkersSecret creates or updates a secret.

API reference:https://api.cloudflare.com/

func (*API)SpectrumApplicationadded inv0.9.0

func (api *API) SpectrumApplication(ctxcontext.Context, zoneIDstring, applicationIDstring) (SpectrumApplication,error)

SpectrumApplication fetches a single Spectrum application based on the ID.

API reference:https://developers.cloudflare.com/spectrum/api-reference/#list-spectrum-applications

func (*API)SpectrumApplicationsadded inv0.9.0

func (api *API) SpectrumApplications(ctxcontext.Context, zoneIDstring) ([]SpectrumApplication,error)

SpectrumApplications fetches all of the Spectrum applications for a zone.

API reference:https://developers.cloudflare.com/spectrum/api-reference/#list-spectrum-applications

func (*API)StartWorkersTailadded inv0.47.0

func (api *API) StartWorkersTail(ctxcontext.Context, rc *ResourceContainer, scriptNamestring) (WorkersTail,error)

StartWorkersTail Starts a tail that receives logs and exception from a Worker.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/tail/methods/create/

func (*API)StreamAssociateNFTadded inv0.44.0

func (api *API) StreamAssociateNFT(ctxcontext.Context, optionsStreamVideoNFTParameters) (StreamVideo,error)

StreamAssociateNFT associates a video to a token and contract address.

API Reference:https://api.cloudflare.com/#stream-videos-associate-video-to-an-nft

func (*API)StreamCreateSignedURLadded inv0.44.0

func (api *API) StreamCreateSignedURL(ctxcontext.Context, paramsStreamSignedURLParameters) (string,error)

StreamCreateSignedURL creates a signed URL token for a video.

API Reference:https://api.cloudflare.com/#stream-videos-associate-video-to-an-nft

func (*API)StreamCreateVideoDirectURLadded inv0.44.0

func (api *API) StreamCreateVideoDirectURL(ctxcontext.Context, paramsStreamCreateVideoParameters) (StreamVideoCreate,error)

StreamCreateVideoDirectURL creates a video and returns an authenticated URL.

API Reference:https://api.cloudflare.com/#stream-videos-create-a-video-and-get-authenticated-direct-upload-url

func (*API)StreamDeleteVideoadded inv0.44.0

func (api *API) StreamDeleteVideo(ctxcontext.Context, optionsStreamParameters)error

StreamDeleteVideo deletes a video.

API Reference:https://api.cloudflare.com/#stream-videos-delete-video

func (*API)StreamEmbedHTMLadded inv0.44.0

func (api *API) StreamEmbedHTML(ctxcontext.Context, optionsStreamParameters) (string,error)

StreamEmbedHTML gets an HTML fragment to embed on a web page.

API Reference:https://api.cloudflare.com/#stream-videos-embed-code-html

func (*API)StreamGetVideoadded inv0.44.0

func (api *API) StreamGetVideo(ctxcontext.Context, optionsStreamParameters) (StreamVideo,error)

StreamGetVideo gets the details for a specific video.

API Reference:https://api.cloudflare.com/#stream-videos-video-details

func (*API)StreamInitiateTUSVideoUploadadded inv0.77.0

StreamInitiateTUSVideoUpload generates a direct upload TUS url for a video.

API Reference:https://developers.cloudflare.com/api/resources/stream/methods/create/

func (*API)StreamListVideosadded inv0.44.0

func (api *API) StreamListVideos(ctxcontext.Context, paramsStreamListParameters) ([]StreamVideo,error)

StreamListVideos list videos currently in stream.

API reference:https://api.cloudflare.com/#stream-videos-list-videos

func (*API)StreamUploadFromURLadded inv0.44.0

func (api *API) StreamUploadFromURL(ctxcontext.Context, paramsStreamUploadFromURLParameters) (StreamVideo,error)

StreamUploadFromURL send a video URL to it will be downloaded and made available on Stream.

API Reference:https://api.cloudflare.com/#stream-videos-upload-a-video-from-a-url

func (*API)StreamUploadVideoFileadded inv0.44.0

func (api *API) StreamUploadVideoFile(ctxcontext.Context, paramsStreamUploadFileParameters) (StreamVideo,error)

StreamUploadVideoFile uploads a video from a path to the file.

API Reference:https://api.cloudflare.com/#stream-videos-upload-a-video-using-a-single-http-request

func (*API)TeamsAccountadded inv0.21.0

func (api *API) TeamsAccount(ctxcontext.Context, accountIDstring) (TeamsAccount,error)

TeamsAccount returns teams account information with internal and external ID.

API reference: TBA.

func (*API)TeamsAccountConfigurationadded inv0.21.0

func (api *API) TeamsAccountConfiguration(ctxcontext.Context, accountIDstring) (TeamsConfiguration,error)

TeamsAccountConfiguration returns teams account configuration.

API reference: TBA.

func (*API)TeamsAccountConnectivityConfigurationadded inv0.97.0

func (api *API) TeamsAccountConnectivityConfiguration(ctxcontext.Context, accountIDstring) (TeamsConnectivitySettings,error)

TeamsAccountConnectivityConfiguration returns zero trust account connectivity settings.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/connectivity_settings/methods/get/

func (*API)TeamsAccountConnectivityUpdateConfigurationadded inv0.97.0

func (api *API) TeamsAccountConnectivityUpdateConfiguration(ctxcontext.Context, accountIDstring, settingsTeamsConnectivitySettings) (TeamsConnectivitySettings,error)

TeamsAccountConnectivityUpdateConfiguration updates zero trust account connectivity settings.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/connectivity_settings/methods/edit/

func (*API)TeamsAccountDeviceConfigurationadded inv0.31.0

func (api *API) TeamsAccountDeviceConfiguration(ctxcontext.Context, accountIDstring) (TeamsDeviceSettings,error)

TeamsAccountDeviceConfiguration returns teams account device configuration with udp status.

API reference: TBA.

func (*API)TeamsAccountDeviceUpdateConfigurationadded inv0.31.0

func (api *API) TeamsAccountDeviceUpdateConfiguration(ctxcontext.Context, accountIDstring, settingsTeamsDeviceSettings) (TeamsDeviceSettings,error)

TeamsAccountDeviceUpdateConfiguration updates teams account device configuration including udp filtering status.

API reference: TBA.

func (*API)TeamsAccountLoggingConfigurationadded inv0.30.0

func (api *API) TeamsAccountLoggingConfiguration(ctxcontext.Context, accountIDstring) (TeamsLoggingSettings,error)

TeamsAccountLoggingConfiguration returns teams account logging configuration.

API reference: TBA.

func (*API)TeamsAccountUpdateConfigurationadded inv0.21.0

func (api *API) TeamsAccountUpdateConfiguration(ctxcontext.Context, accountIDstring, configTeamsConfiguration) (TeamsConfiguration,error)

TeamsAccountUpdateConfiguration updates a teams account configuration.

API reference: TBA.

func (*API)TeamsAccountUpdateLoggingConfigurationadded inv0.30.0

func (api *API) TeamsAccountUpdateLoggingConfiguration(ctxcontext.Context, accountIDstring, configTeamsLoggingSettings) (TeamsLoggingSettings,error)

TeamsAccountUpdateLoggingConfiguration updates the log settings and returns new teams account logging configuration.

API reference: TBA.

func (*API)TeamsActivateCertificateadded inv0.100.0

func (api *API) TeamsActivateCertificate(ctxcontext.Context, accountIDstring, certificateIdstring) (TeamsCertificate,error)

TeamsActivateCertificate activates a certificate

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/gateway/subresources/certificates/methods/activate/

func (*API)TeamsCertificateadded inv0.100.0

func (api *API) TeamsCertificate(ctxcontext.Context, accountIDstring, certificateIdstring) (TeamsCertificate,error)

TeamsCertificate returns teams account certificate.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/gateway/subresources/certificates/methods/get/

func (*API)TeamsCertificatesadded inv0.100.0

func (api *API) TeamsCertificates(ctxcontext.Context, accountIDstring) ([]TeamsCertificate,error)

TeamsCertificates returns all certificates in an account

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/gateway/subresources/certificates/methods/list/

func (*API)TeamsCreateRuleadded inv0.21.0

func (api *API) TeamsCreateRule(ctxcontext.Context, accountIDstring, ruleTeamsRule) (TeamsRule,error)

TeamsCreateRule creates a rule with wirefilter expression.

API reference:https://api.cloudflare.com/#teams-rules-properties

func (*API)TeamsDeactivateCertificateadded inv0.100.0

func (api *API) TeamsDeactivateCertificate(ctxcontext.Context, accountIDstring, certificateIdstring) (TeamsCertificate,error)

TeamsDectivateCertificate deactivates a certificate

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/gateway/subresources/certificates/methods/deactivate/

func (*API)TeamsDeleteCertificateadded inv0.100.0

func (api *API) TeamsDeleteCertificate(ctxcontext.Context, accountIDstring, certificateIdstring)error

TeamsDeleteCertificate deletes a certificate.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/gateway/subresources/certificates/methods/delete/

func (*API)TeamsDeleteRuleadded inv0.21.0

func (api *API) TeamsDeleteRule(ctxcontext.Context, accountIDstring, ruleIdstring)error

TeamsDeleteRule deletes a rule.

API reference:https://api.cloudflare.com/#teams-rules-properties

func (*API)TeamsGenerateCertificateadded inv0.100.0

func (api *API) TeamsGenerateCertificate(ctxcontext.Context, accountIDstring, certificateRequestTeamsCertificateCreateRequest) (TeamsCertificate,error)

TeamsGenerateCertificate generates a new gateway managed certificate

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/gateway/subresources/certificates/methods/create/

func (*API)TeamsLocationadded inv0.21.0

func (api *API) TeamsLocation(ctxcontext.Context, accountID, locationIDstring) (TeamsLocation,error)

TeamsLocation returns a single location based on the ID.

API reference:https://api.cloudflare.com/#teams-locations-teams-location-details

func (*API)TeamsLocationsadded inv0.21.0

func (api *API) TeamsLocations(ctxcontext.Context, accountIDstring) ([]TeamsLocation,ResultInfo,error)

TeamsLocations returns all locations within an account.

API reference:https://api.cloudflare.com/#teams-locations-list-teams-locations

func (*API)TeamsPatchRuleadded inv0.21.0

func (api *API) TeamsPatchRule(ctxcontext.Context, accountIDstring, ruleIdstring, ruleTeamsRulePatchRequest) (TeamsRule,error)

TeamsPatchRule patches a rule associated values.

API reference:https://api.cloudflare.com/#teams-rules-properties

func (*API)TeamsProxyEndpointadded inv0.35.0

func (api *API) TeamsProxyEndpoint(ctxcontext.Context, accountID, proxyEndpointIDstring) (TeamsProxyEndpoint,error)

TeamsProxyEndpoint returns a single proxy endpoints within an account.

API reference:https://api.cloudflare.com/#zero-trust-gateway-proxy-endpoints-proxy-endpoint-details

func (*API)TeamsProxyEndpointsadded inv0.35.0

func (api *API) TeamsProxyEndpoints(ctxcontext.Context, accountIDstring) ([]TeamsProxyEndpoint,ResultInfo,error)

TeamsProxyEndpoints returns all proxy endpoints within an account.

API reference:https://api.cloudflare.com/#zero-trust-gateway-proxy-endpoints-list-proxy-endpoints

func (*API)TeamsRuleadded inv0.21.0

func (api *API) TeamsRule(ctxcontext.Context, accountIDstring, ruleIdstring) (TeamsRule,error)

TeamsRule returns the rule with rule ID in the URL.

API reference:https://api.cloudflare.com/#teams-rules-properties

func (*API)TeamsRulesadded inv0.21.0

func (api *API) TeamsRules(ctxcontext.Context, accountIDstring) ([]TeamsRule,error)

TeamsRules returns all rules within an account.

API reference:https://api.cloudflare.com/#teams-rules-properties

func (*API)TeamsUpdateRuleadded inv0.21.0

func (api *API) TeamsUpdateRule(ctxcontext.Context, accountIDstring, ruleIdstring, ruleTeamsRule) (TeamsRule,error)

TeamsUpdateRule updates a rule with wirefilter expression.

API reference:https://api.cloudflare.com/#teams-rules-properties

func (*API)TransferRegistrarDomainadded inv0.9.0

func (api *API) TransferRegistrarDomain(ctxcontext.Context, accountID, domainNamestring) ([]RegistrarDomain,error)

TransferRegistrarDomain initiates the transfer from another registrarto Cloudflare Registrar.

API reference:https://api.cloudflare.com/#registrar-domains-transfer-domain

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}domain, err := api.TransferRegistrarDomain(context.Background(), "01a7362d577a6c3019a474fd6f485823", "cloudflare.com")if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", domain)

func (*API)URLNormalizationSettingsadded inv0.49.0

func (api *API) URLNormalizationSettings(ctxcontext.Context, rc *ResourceContainer) (URLNormalizationSettings,error)

URLNormalizationSettings API reference:https://api.cloudflare.com/#url-normalization-get-url-normalization-settings

func (*API)UniversalSSLSettingDetailsadded inv0.9.0

func (api *API) UniversalSSLSettingDetails(ctxcontext.Context, zoneIDstring) (UniversalSSLSetting,error)

UniversalSSLSettingDetails returns the details for a universal ssl setting

API reference:https://api.cloudflare.com/#universal-ssl-settings-for-a-zone-universal-ssl-settings-details

func (*API)UniversalSSLVerificationDetailsadded inv0.10.0

func (api *API) UniversalSSLVerificationDetails(ctxcontext.Context, zoneIDstring) ([]UniversalSSLVerificationDetails,error)

UniversalSSLVerificationDetails returns the details for a universal ssl verification

API reference:https://api.cloudflare.com/#ssl-verification-ssl-verification-details

func (*API)UpdateAPIShieldConfigurationadded inv0.49.0

func (api *API) UpdateAPIShieldConfiguration(ctxcontext.Context, rc *ResourceContainer, paramsUpdateAPIShieldParams) (Response,error)

UpdateAPIShieldConfiguration sets a zone API shield configuration.

API documentation:https://api.cloudflare.com/#api-shield-settings-set-configuration-properties

func (*API)UpdateAPIShieldDiscoveryOperationadded inv0.79.0

UpdateAPIShieldDiscoveryOperation updates certain fields on a discovered operation.

API Documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/discovery/subresources/operations/methods/edit/

func (*API)UpdateAPIShieldDiscoveryOperationsadded inv0.79.0

UpdateAPIShieldDiscoveryOperations bulk updates certain fields on multiple discovered operations

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/discovery/subresources/operations/methods/bulk_edit/

func (*API)UpdateAPIShieldOperationSchemaValidationSettingsadded inv0.80.0

UpdateAPIShieldOperationSchemaValidationSettings update multiple operation level schema validation settings

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/subresources/schema_validation/methods/edit/

func (*API)UpdateAPIShieldSchemaadded inv0.79.0

func (api *API) UpdateAPIShieldSchema(ctxcontext.Context, rc *ResourceContainer, paramsUpdateAPIShieldSchemaParams) (*APIShieldSchema,error)

UpdateAPIShieldSchema updates certain fields on an existing schema.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/edit/

func (*API)UpdateAPIShieldSchemaValidationSettingsadded inv0.80.0

UpdateAPIShieldSchemaValidationSettings updates certain fields on zone level schema validation settings

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/settings/subresources/schema_validation/methods/edit/

func (*API)UpdateAPITokenadded inv0.13.5

func (api *API) UpdateAPIToken(ctxcontext.Context, tokenIDstring, tokenAPIToken) (APIToken,error)

UpdateAPIToken updates an existing API token.

API reference:https://api.cloudflare.com/#user-api-tokens-update-token

func (*API)UpdateAccessBookmarkadded inv0.36.0

func (api *API) UpdateAccessBookmark(ctxcontext.Context, accountIDstring, accessBookmarkAccessBookmark) (AccessBookmark,error)

UpdateAccessBookmark updates an existing access bookmark.

API reference:https://api.cloudflare.com/#access-bookmarks-update-access-bookmark

func (*API)UpdateAccessCustomPageadded inv0.74.0

func (api *API) UpdateAccessCustomPage(ctxcontext.Context, rc *ResourceContainer, paramsUpdateAccessCustomPageParams) (AccessCustomPage,error)

func (*API)UpdateAccessIdentityProviderAuthContextsadded inv0.75.0

func (api *API) UpdateAccessIdentityProviderAuthContexts(ctxcontext.Context, rc *ResourceContainer, identityProviderIDstring) (AccessIdentityProvider,error)

UpdateAccessIdentityProviderAuthContexts updates an existing Access IdentityProvider.AzureAD onlyAccount API Reference:https://developers.cloudflare.com/api/operations/access-identity-providers-refresh-an-access-identity-provider-auth-contextsZone API Reference:https://developers.cloudflare.com/api/operations/zone-level-access-identity-providers-update-an-access-identity-provider

func (*API)UpdateAccessKeysConfigadded inv0.23.0

func (api *API) UpdateAccessKeysConfig(ctxcontext.Context, accountIDstring, requestAccessKeysConfigUpdateRequest) (AccessKeysConfig,error)

UpdateAccessKeysConfig updates the Access Keys Configuration for an account.

API reference:https://api.cloudflare.com/#access-keys-configuration-update-access-keys-configuration

func (*API)UpdateAccessOrganizationadded inv0.10.1

func (api *API) UpdateAccessOrganization(ctxcontext.Context, rc *ResourceContainer, paramsUpdateAccessOrganizationParams) (AccessOrganization,error)

UpdateAccessOrganization updates the Access organisation details.

Account API reference:https://api.cloudflare.com/#access-organizations-update-access-organizationZone API reference:https://api.cloudflare.com/#zone-level-access-organizations-update-access-organization

func (*API)UpdateAccessServiceTokenadded inv0.10.1

func (*API)UpdateAccessUserSeatadded inv0.81.0

UpdateAccessUserSeat updates a single Access User Seat.

API documentation:https://developers.cloudflare.com/api/resources/zero_trust/subresources/seats/methods/edit/

func (*API)UpdateAccessUsersSeatsadded inv0.87.0

UpdateAccessUsersSeats updates many Access User Seats.

API documentation:https://developers.cloudflare.com/api/resources/zero_trust/subresources/seats/methods/edit/

func (*API)UpdateAccountadded inv0.9.0

func (api *API) UpdateAccount(ctxcontext.Context, accountIDstring, accountAccount) (Account,error)

UpdateAccount allows management of an account using the account ID.

API reference:https://api.cloudflare.com/#accounts-update-account

func (*API)UpdateAccountAccessRuleadded inv0.10.0

func (api *API) UpdateAccountAccessRule(ctxcontext.Context, accountID, accessRuleIDstring, accessRuleAccessRule) (*AccessRuleResponse,error)

UpdateAccountAccessRule updates a single access rule for the givenaccount & access rule identifiers.

API reference:https://api.cloudflare.com/#account-level-firewall-access-rule-update-access-rule

func (*API)UpdateAccountMemberadded inv0.9.0

func (api *API) UpdateAccountMember(ctxcontext.Context, accountIDstring, userIDstring, memberAccountMember) (AccountMember,error)

UpdateAccountMember modifies an existing account member.

API reference:https://api.cloudflare.com/#account-members-update-member

func (*API)UpdateAddressMapadded inv0.63.0

func (api *API) UpdateAddressMap(ctxcontext.Context, rc *ResourceContainer, paramsUpdateAddressMapParams) (AddressMap,error)

UpdateAddressMap modifies properties of an address map owned by the account.

API reference:https://developers.cloudflare.com/api/resources/addressing/subresources/address_maps/methods/edit/

func (*API)UpdateAdvertisementStatusadded inv0.11.7

func (api *API) UpdateAdvertisementStatus(ctxcontext.Context, accountID, IDstring, advertisedbool) (AdvertisementStatus,error)

UpdateAdvertisementStatus changes the BGP status of an IP prefix

API reference:https://api.cloudflare.com/#ip-address-management-prefixes-update-prefix-description

func (*API)UpdateArgoSmartRoutingadded inv0.9.0

func (api *API) UpdateArgoSmartRouting(ctxcontext.Context, zoneID, settingValuestring) (ArgoFeatureSetting,error)

UpdateArgoSmartRouting updates the setting for smart routing.

API reference:https://api.cloudflare.com/#argo-smart-routing-patch-argo-smart-routing-setting

Example
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}smartRoutingSettings, err := api.UpdateArgoSmartRouting(context.Background(), "01a7362d577a6c3019a474fd6f485823", "on")if err != nil {log.Fatal(err)}fmt.Printf("smart routing is %s", smartRoutingSettings.Value)}

func (*API)UpdateArgoTieredCachingadded inv0.9.0

func (api *API) UpdateArgoTieredCaching(ctxcontext.Context, zoneID, settingValuestring) (ArgoFeatureSetting,error)

UpdateArgoTieredCaching updates the setting for tiered caching.

API reference: TBA.

Example
package mainimport ("context""fmt""log"cloudflare "github.com/cloudflare/cloudflare-go")func main() {api, err := cloudflare.New("deadbeef", "test@example.org")if err != nil {log.Fatal(err)}tieredCachingSettings, err := api.UpdateArgoTieredCaching(context.Background(), "01a7362d577a6c3019a474fd6f485823", "on")if err != nil {log.Fatal(err)}fmt.Printf("tiered caching is %s", tieredCachingSettings.Value)}

func (*API)UpdateAuditSSHSettingsadded inv0.79.0

func (api *API) UpdateAuditSSHSettings(ctxcontext.Context, rc *ResourceContainer, paramsUpdateAuditSSHSettingsParams) (AuditSSHSettings,error)

UpdateAuditSSHSettings updates an existing zt audit ssh setting.

API reference:https://api.cloudflare.com/#zero-trust-update-audit-ssh-settings

func (*API)UpdateBehaviorsadded inv0.95.0

func (api *API) UpdateBehaviors(ctxcontext.Context, accountIDstring, behaviorsBehaviors) (Behaviors,error)

UpdateBehaviors returns all zero trust risk scoring behaviors for the provided accountNOTE: description/name updates are no-ops, risk_level [low medium high] and enabledtrue/false results in modifications

API reference:https://developers.cloudflare.com/api/operations/dlp-zt-risk-score-put-behaviors

func (*API)UpdateBotManagementadded inv0.75.0

func (api *API) UpdateBotManagement(ctxcontext.Context, rc *ResourceContainer, paramsUpdateBotManagementParams) (BotManagement,error)

UpdateBotManagement sets a zone API shield configuration.

API documentation:https://developers.cloudflare.com/api/resources/bot_management/methods/update/

func (*API)UpdateCacheReserveadded inv0.68.0

func (api *API) UpdateCacheReserve(ctxcontext.Context, rc *ResourceContainer, paramsUpdateCacheReserveParams) (CacheReserve,error)

UpdateCacheReserve updates the cache reserve setting for a zone

API reference:https://developers.cloudflare.com/api/resources/cache/subresources/cache_reserve/methods/edit/

func (*API)UpdateCustomHostnameadded inv0.12.0

func (api *API) UpdateCustomHostname(ctxcontext.Context, zoneIDstring, customHostnameIDstring, chCustomHostname) (*CustomHostnameResponse,error)

UpdateCustomHostname modifies configuration for the given customhostname in the given zone.

API reference:https://api.cloudflare.com/#custom-hostname-for-a-zone-update-custom-hostname-configuration

func (*API)UpdateCustomHostnameFallbackOriginadded inv0.12.0

func (api *API) UpdateCustomHostnameFallbackOrigin(ctxcontext.Context, zoneIDstring, chfoCustomHostnameFallbackOrigin) (*CustomHostnameFallbackOriginResponse,error)

UpdateCustomHostnameFallbackOrigin modifies the Custom Hostname Fallback origin in the given zone.

API reference:https://api.cloudflare.com/#custom-hostname-fallback-origin-for-a-zone-update-fallback-origin-for-custom-hostnames

func (*API)UpdateCustomHostnameSSLadded inv0.7.4

func (api *API) UpdateCustomHostnameSSL(ctxcontext.Context, zoneIDstring, customHostnameIDstring, ssl *CustomHostnameSSL) (*CustomHostnameResponse,error)

UpdateCustomHostnameSSL modifies SSL configuration for the given customhostname in the given zone.

API reference:https://api.cloudflare.com/#custom-hostname-for-a-zone-update-custom-hostname-configuration

func (*API)UpdateCustomNameserverZoneMetadataadded inv0.70.0

func (api *API) UpdateCustomNameserverZoneMetadata(ctxcontext.Context, rc *ResourceContainer, paramsUpdateCustomNameserverZoneMetadataParams)error

UpdateCustomNameserverZoneMetadata set metadata for custom nameservers on a zone.

API documentation:https://developers.cloudflare.com/api/resources/zones/subresources/custom_nameservers/methods/update/

func (*API)UpdateCustomPageadded inv0.9.0

func (api *API) UpdateCustomPage(ctxcontext.Context, options *CustomPageOptions, customPageIDstring, pageParametersCustomPageParameters) (CustomPage,error)

UpdateCustomPage updates a single custom page setting.

Zone API reference:https://api.cloudflare.com/#custom-pages-for-a-zone-update-custom-page-urlAccount API reference:https://api.cloudflare.com/#custom-pages-account--update-custom-page

func (*API)UpdateDLPDatasetadded inv0.87.0

func (api *API) UpdateDLPDataset(ctxcontext.Context, rc *ResourceContainer, paramsUpdateDLPDatasetParams) (DLPDataset,error)

UpdateDLPDataset updates the details of a DLP dataset.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/dlp/subresources/datasets/methods/update/

func (*API)UpdateDLPPayloadLogSettingsadded inv0.62.0

func (api *API) UpdateDLPPayloadLogSettings(ctxcontext.Context, rc *ResourceContainer, settingsDLPPayloadLogSettings) (DLPPayloadLogSettings,error)

UpdateDLPPayloadLogSettings sets the current DLP payload logging settings to new values.

API reference:https://api.cloudflare.com/#dlp-payload-log-settings-update-settings

func (*API)UpdateDLPProfileadded inv0.53.0

func (api *API) UpdateDLPProfile(ctxcontext.Context, rc *ResourceContainer, paramsUpdateDLPProfileParams) (DLPProfile,error)

UpdateDLPProfile updates a DLP profile.

API reference:https://api.cloudflare.com/#dlp-profiles-update-custom-profileAPI reference:https://api.cloudflare.com/#dlp-profiles-update-predefined-profile

func (*API)UpdateDNSFirewallClusteradded inv0.29.0

func (api *API) UpdateDNSFirewallCluster(ctxcontext.Context, rc *ResourceContainer, paramsUpdateDNSFirewallClusterParams)error

UpdateDNSFirewallCluster updates a DNS Firewall cluster.

API reference:https://api.cloudflare.com/#dns-firewall-update-dns-firewall-cluster

func (*API)UpdateDNSRecordadded inv0.7.2

func (api *API) UpdateDNSRecord(ctxcontext.Context, rc *ResourceContainer, paramsUpdateDNSRecordParams) (DNSRecord,error)

UpdateDNSRecord updates a single DNS record for the given zone & recordidentifiers.

API reference:https://api.cloudflare.com/#dns-records-for-a-zone-update-dns-record

func (*API)UpdateDataLocalizationRegionalHostnameadded inv0.66.0

func (api *API) UpdateDataLocalizationRegionalHostname(ctxcontext.Context, rc *ResourceContainer, paramsUpdateDataLocalizationRegionalHostnameParams) (RegionalHostname,error)

UpdateDataLocalizationRegionalHostname returns the details of a specific regional hostname.

API reference:https://developers.cloudflare.com/data-localization/regional-services/get-started/#configure-regional-services-via-api

func (*API)UpdateDefaultDeviceSettingsPolicyadded inv0.52.0

func (api *API) UpdateDefaultDeviceSettingsPolicy(ctxcontext.Context, rc *ResourceContainer, paramsUpdateDefaultDeviceSettingsPolicyParams) (DeviceSettingsPolicy,error)

UpdateDefaultDeviceSettingsPolicy updates the default settings policy for an account

API reference:https://api.cloudflare.com/#devices-update-default-device-settings-policy

func (*API)UpdateDeviceClientCertificatesadded inv0.81.0

func (api *API) UpdateDeviceClientCertificates(ctxcontext.Context, rc *ResourceContainer, paramsUpdateDeviceClientCertificatesParams) (DeviceClientCertificates,error)

UpdateDeviceClientCertificates controls the zero trust zone used to provision client certificates.

API reference:https://api.cloudflare.com/#device-client-certificates

func (*API)UpdateDeviceManagedNetworkadded inv0.57.0

func (api *API) UpdateDeviceManagedNetwork(ctxcontext.Context, rc *ResourceContainer, paramsUpdateDeviceManagedNetworkParams) (DeviceManagedNetwork,error)

UpdateDeviceManagedNetwork Update a Device Managed Network.

API reference:https://api.cloudflare.com/#device-managed-networks-update-device-managed-network

func (*API)UpdateDevicePostureIntegrationadded inv0.29.0

func (api *API) UpdateDevicePostureIntegration(ctxcontext.Context, accountIDstring, integrationDevicePostureIntegration) (DevicePostureIntegration,error)

UpdateDevicePostureIntegration updates a device posture integration within an account.

API reference:https://api.cloudflare.com/#device-posture-integrations-update-device-posture-integration

func (*API)UpdateDevicePostureRuleadded inv0.17.0

func (api *API) UpdateDevicePostureRule(ctxcontext.Context, accountIDstring, ruleDevicePostureRule) (DevicePostureRule,error)

UpdateDevicePostureRule updates an existing device posture rule.

API reference:https://api.cloudflare.com/#device-posture-rules-update-device-posture-rule

func (*API)UpdateDeviceSettingsPolicyadded inv0.52.0

func (api *API) UpdateDeviceSettingsPolicy(ctxcontext.Context, rc *ResourceContainer, paramsUpdateDeviceSettingsPolicyParams) (DeviceSettingsPolicy,error)

UpdateDeviceSettingsPolicy updates a settings policy

API reference:https://api.cloudflare.com/#devices-update-device-settings-policy

func (*API)UpdateEmailRoutingCatchAllRuleadded inv0.47.0

func (api *API) UpdateEmailRoutingCatchAllRule(ctxcontext.Context, rc *ResourceContainer, paramsEmailRoutingCatchAllRule) (EmailRoutingCatchAllRule,error)

UpdateEmailRoutingCatchAllRule Enable or disable catch-all routing rule, or change action to forward to specific destination address.

API reference:https://api.cloudflare.com/#email-routing-routing-rules-update-catch-all-rule

func (*API)UpdateEmailRoutingRuleadded inv0.47.0

func (api *API) UpdateEmailRoutingRule(ctxcontext.Context, rc *ResourceContainer, paramsUpdateEmailRoutingRuleParameters) (EmailRoutingRule,error)

UpdateEmailRoutingRule Update actions, matches, or enable/disable specific routing rules

API reference:https://api.cloudflare.com/#email-routing-routing-rules-update-routing-rule

func (*API)UpdateEntrypointRulesetadded inv0.73.0

func (api *API) UpdateEntrypointRuleset(ctxcontext.Context, rc *ResourceContainer, paramsUpdateEntrypointRulesetParams) (Ruleset,error)

UpdateEntrypointRuleset updates an entry point ruleset phase based on thephase.

API reference:https://developers.cloudflare.com/api/operations/updateAccountEntrypointRulesetAPI reference:https://developers.cloudflare.com/api/resources/rulesets/subresources/phases/methods/update/

func (*API)UpdateFallbackDomainadded inv0.29.0

func (api *API) UpdateFallbackDomain(ctxcontext.Context, accountIDstring, domains []FallbackDomain) ([]FallbackDomain,error)

UpdateFallbackDomain updates the existing fallback domain policy.

API reference:https://api.cloudflare.com/#devices-set-local-domain-fallback-list

func (*API)UpdateFallbackDomainDeviceSettingsPolicyadded inv0.52.0

func (api *API) UpdateFallbackDomainDeviceSettingsPolicy(ctxcontext.Context, accountID, policyIDstring, domains []FallbackDomain) ([]FallbackDomain,error)

UpdateFallbackDomainDeviceSettingsPolicy updates the existing fallback domain policy for a specific device settings policy.

API reference:https://api.cloudflare.com/#devices-set-local-domain-fallback-list

func (*API)UpdateFallbackOriginadded inv0.10.1

func (api *API) UpdateFallbackOrigin(ctxcontext.Context, zoneIDstring, fboFallbackOrigin) (*FallbackOriginResponse,error)

UpdateFallbackOrigin updates the fallback origin for a given zone.

API reference:https://developers.cloudflare.com/ssl/ssl-for-saas/api-calls/#4-example-patch-to-change-fallback-origin

func (*API)UpdateFilteradded inv0.9.0

func (api *API) UpdateFilter(ctxcontext.Context, rc *ResourceContainer, paramsFilterUpdateParams) (Filter,error)

UpdateFilter updates a single filter.

API reference:https://developers.cloudflare.com/firewall/api/cf-filters/put/#update-a-single-filter

func (*API)UpdateFiltersadded inv0.9.0

func (api *API) UpdateFilters(ctxcontext.Context, rc *ResourceContainer, params []FilterUpdateParams) ([]Filter,error)

UpdateFilters updates many filters at once.

API reference:https://developers.cloudflare.com/firewall/api/cf-filters/put/#update-multiple-filters

func (*API)UpdateFirewallRuleadded inv0.9.0

func (api *API) UpdateFirewallRule(ctxcontext.Context, rc *ResourceContainer, paramsFirewallRuleUpdateParams) (FirewallRule,error)

UpdateFirewallRule updates a single firewall rule.

API reference:https://developers.cloudflare.com/firewall/api/cf-firewall-rules/put/#update-a-single-rule

func (*API)UpdateFirewallRulesadded inv0.9.0

func (api *API) UpdateFirewallRules(ctxcontext.Context, rc *ResourceContainer, params []FirewallRuleUpdateParams) ([]FirewallRule,error)

UpdateFirewallRules updates a single firewall rule.

API reference:https://developers.cloudflare.com/firewall/api/cf-firewall-rules/put/#update-multiple-rules

func (*API)UpdateHealthcheckadded inv0.11.1

func (api *API) UpdateHealthcheck(ctxcontext.Context, zoneIDstring, healthcheckIDstring, healthcheckHealthcheck) (Healthcheck,error)

UpdateHealthcheck updates an existing healthcheck.

API reference:https://api.cloudflare.com/#health-checks-update-health-check

func (*API)UpdateHostnameTLSSettingadded inv0.75.0

func (api *API) UpdateHostnameTLSSetting(ctxcontext.Context, rc *ResourceContainer, paramsUpdateHostnameTLSSettingParams) (HostnameTLSSetting,error)

UpdateHostnameTLSSetting will update the per-hostname tls setting for the specified hostname.

API reference:https://developers.cloudflare.com/api/resources/hostnames/subresources/settings/subresources/tls/methods/update/

func (*API)UpdateHostnameTLSSettingCiphersadded inv0.75.0

func (api *API) UpdateHostnameTLSSettingCiphers(ctxcontext.Context, rc *ResourceContainer, paramsUpdateHostnameTLSSettingCiphersParams) (HostnameTLSSettingCiphers,error)

UpdateHostnameTLSSettingCiphers will update the per-hostname ciphers tls setting for the specified hostname.Ciphers functions are separate due to the API returning a list of strings as the value, rather than a string (as is the case for the other tls settings).

API reference:https://developers.cloudflare.com/api/resources/hostnames/subresources/settings/subresources/tls/methods/update/

func (*API)UpdateHyperdriveConfigadded inv0.88.0

func (api *API) UpdateHyperdriveConfig(ctxcontext.Context, rc *ResourceContainer, paramsUpdateHyperdriveConfigParams) (HyperdriveConfig,error)

UpdateHyperdriveConfig updates a Hyperdrive config.

API reference:https://developers.cloudflare.com/api/resources/hyperdrive/subresources/configs/methods/update/

func (*API)UpdateIPListdeprecatedadded inv0.13.0

func (api *API) UpdateIPList(ctxcontext.Context, accountID, ID, descriptionstring) (IPList,error)

UpdateIPList updates the description of an existing IP List.

API reference:https://api.cloudflare.com/#rules-lists-update-list

Deprecated: Use `UpdateList` instead.

func (*API)UpdateImageadded inv0.30.0

func (api *API) UpdateImage(ctxcontext.Context, rc *ResourceContainer, paramsUpdateImageParams) (Image,error)

UpdateImage updates an existing image's metadata.

API Reference:https://api.cloudflare.com/#cloudflare-images-update-image

func (*API)UpdateImagesVariantadded inv0.88.0

func (api *API) UpdateImagesVariant(ctxcontext.Context, rc *ResourceContainer, paramsUpdateImagesVariantParams) (ImagesVariant,error)

Updating a variant purges the cache for all images associated with the variant.

API Reference:https://developers.cloudflare.com/api/resources/images/subresources/v1/subresources/variants/methods/get/

func (*API)UpdateInfrastructureAccessTargetadded inv0.105.0

func (api *API) UpdateInfrastructureAccessTarget(ctxcontext.Context, rc *ResourceContainer, paramsUpdateInfrastructureAccessTargetParams) (InfrastructureAccessTarget,error)

UpdateInfrastructureAccessTarget updates an existing infrastructure access target.

Account API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/access/subresources/infrastructure/subresources/targets/methods/update/

func (*API)UpdateKeylessSSLadded inv0.17.0

func (api *API) UpdateKeylessSSL(ctxcontext.Context, zoneID, kelessSSLIDstring, keylessSSLKeylessSSLUpdateRequest) (KeylessSSL,error)

UpdateKeylessSSL updates an existing Keyless SSL configuration.

API reference:https://api.cloudflare.com/#keyless-ssl-for-a-zone-edit-keyless-ssl-configuration

func (*API)UpdateListadded inv0.41.0

func (api *API) UpdateList(ctxcontext.Context, rc *ResourceContainer, paramsListUpdateParams) (List,error)

UpdateList updates the description of an existing List.

API reference:https://api.cloudflare.com/#rules-lists-update-list

func (*API)UpdateLoadBalanceradded inv0.51.0

func (api *API) UpdateLoadBalancer(ctxcontext.Context, rc *ResourceContainer, paramsUpdateLoadBalancerParams) (LoadBalancer,error)

UpdateLoadBalancer modifies a configured load balancer.

API reference:https://api.cloudflare.com/#load-balancers-update-load-balancer

func (*API)UpdateLoadBalancerMonitoradded inv0.51.0

func (api *API) UpdateLoadBalancerMonitor(ctxcontext.Context, rc *ResourceContainer, paramsUpdateLoadBalancerMonitorParams) (LoadBalancerMonitor,error)

UpdateLoadBalancerMonitor modifies a configured load balancer monitor.

API reference:https://api.cloudflare.com/#load-balancer-monitors-update-monitor

func (*API)UpdateLoadBalancerPooladded inv0.51.0

func (api *API) UpdateLoadBalancerPool(ctxcontext.Context, rc *ResourceContainer, paramsUpdateLoadBalancerPoolParams) (LoadBalancerPool,error)

UpdateLoadBalancerPool modifies a configured load balancer pool.

API reference:https://api.cloudflare.com/#load-balancer-pools-update-pool

func (*API)UpdateLogpushJobadded inv0.9.0

func (api *API) UpdateLogpushJob(ctxcontext.Context, rc *ResourceContainer, paramsUpdateLogpushJobParams)error

UpdateLogpushJob lets you update a Logpush Job.

API reference:https://api.cloudflare.com/#logpush-jobs-update-logpush-job

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}err = api.UpdateLogpushJob(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.UpdateLogpushJobParams{ID:              1,Enabled:         true,Name:            "updated.com",LogpullOptions:  "fields=RayID,ClientIP,EdgeStartTimestamp",DestinationConf: "gs://mybucket/logs",})if err != nil {log.Fatal(err)}

func (*API)UpdateMagicFirewallRulesetdeprecatedadded inv0.13.7

func (api *API) UpdateMagicFirewallRuleset(ctxcontext.Context, accountID, IDstring, descriptionstring, rules []MagicFirewallRulesetRule) (MagicFirewallRuleset,error)

UpdateMagicFirewallRuleset updates a Magic Firewall ruleset

API reference:https://api.cloudflare.com/#rulesets-update-ruleset

Deprecated: Use `UpdateZoneRuleset` or `UpdateAccountRuleset` instead.

func (*API)UpdateMagicTransitGRETunneladded inv0.32.0

func (api *API) UpdateMagicTransitGRETunnel(ctxcontext.Context, accountIDstring, idstring, tunnelMagicTransitGRETunnel) (MagicTransitGRETunnel,error)

UpdateMagicTransitGRETunnel updates a GRE tunnel.

API reference:https://api.cloudflare.com/#magic-gre-tunnels-update-gre-tunnel

func (*API)UpdateMagicTransitIPsecTunneladded inv0.31.0

func (api *API) UpdateMagicTransitIPsecTunnel(ctxcontext.Context, accountIDstring, idstring, tunnelMagicTransitIPsecTunnel) (MagicTransitIPsecTunnel,error)

UpdateMagicTransitIPsecTunnel updates an IPsec tunnel

API reference:https://api.cloudflare.com/#magic-ipsec-tunnels-update-ipsec-tunnel

func (*API)UpdateMagicTransitStaticRouteadded inv0.18.0

func (api *API) UpdateMagicTransitStaticRoute(ctxcontext.Context, accountID, IDstring, routeMagicTransitStaticRoute) (MagicTransitStaticRoute,error)

UpdateMagicTransitStaticRoute updates a static route

API reference:https://api.cloudflare.com/#magic-transit-static-routes-update-route

func (*API)UpdateNotificationPolicyadded inv0.19.0

func (api *API) UpdateNotificationPolicy(ctxcontext.Context, accountIDstring, policy *NotificationPolicy) (SaveResponse,error)

UpdateNotificationPolicy updates a notification policy, given theaccount id and the policy id and returns the policy id.

API Reference:https://api.cloudflare.com/#notification-policies-update-notification-policy

func (*API)UpdateNotificationWebhooksadded inv0.19.0

func (api *API) UpdateNotificationWebhooks(ctxcontext.Context, accountID, webhookIDstring, webhooks *NotificationUpsertWebhooks) (SaveResponse,error)

UpdateNotificationWebhooks will update a particular webhook's name,given the account and webhooks ids.

The webhook url and secret cannot be updated.

API Reference:https://api.cloudflare.com/#notification-webhooks-update-webhook

func (*API)UpdatePageRuleadded inv0.7.2

func (api *API) UpdatePageRule(ctxcontext.Context, zoneID, ruleIDstring, rulePageRule)error

UpdatePageRule lets you replace a Page Rule. This is in contrast toChangePageRule which lets you change individual settings.

API reference:https://api.cloudflare.com/#page-rules-for-a-zone-update-a-page-rule

func (*API)UpdatePageShieldPolicyadded inv0.84.0

func (api *API) UpdatePageShieldPolicy(ctxcontext.Context, rc *ResourceContainer, paramsUpdatePageShieldPolicyParams) (*PageShieldPolicy,error)

UpdatePageShieldPolicy updates a page shield policy for a zone.

API documentation:https://developers.cloudflare.com/api/operations/page-shield-update-page-shield-policy

func (*API)UpdatePageShieldSettingsadded inv0.84.0

UpdatePageShieldSettings updates the page shield settings for a zone.

API documentation:https://developers.cloudflare.com/api/operations/page-shield-update-page-shield-settings

func (*API)UpdatePagesProjectadded inv0.26.0

func (api *API) UpdatePagesProject(ctxcontext.Context, rc *ResourceContainer, paramsUpdatePagesProjectParams) (PagesProject,error)

UpdatePagesProject updates an existing Pages project.

API reference:https://api.cloudflare.com/#pages-project-update-project

func (*API)UpdatePrefixDescriptionadded inv0.11.7

func (api *API) UpdatePrefixDescription(ctxcontext.Context, accountID, IDstring, descriptionstring) (IPPrefix,error)

UpdatePrefixDescription edits the description of the IP prefix

API reference:https://api.cloudflare.com/#ip-address-management-prefixes-update-prefix-description

func (*API)UpdateQueueadded inv0.55.0

func (api *API) UpdateQueue(ctxcontext.Context, rc *ResourceContainer, paramsUpdateQueueParams) (Queue,error)

UpdateQueue updates a queue.

API reference:https://api.cloudflare.com/#queue-update-queue

func (*API)UpdateQueueConsumeradded inv0.55.0

func (api *API) UpdateQueueConsumer(ctxcontext.Context, rc *ResourceContainer, paramsUpdateQueueConsumerParams) (QueueConsumer,error)

UpdateQueueConsumer updates the consumer for a queue, or creates one if it does not exist..

API reference:https://api.cloudflare.com/#queue-update-queue-consumer

func (*API)UpdateRateLimitadded inv0.8.5

func (api *API) UpdateRateLimit(ctxcontext.Context, zoneID, limitIDstring, limitRateLimit) (RateLimit,error)

UpdateRateLimit lets you replace a Rate Limit for a zone.

API reference:https://api.cloudflare.com/#rate-limits-for-a-zone-update-rate-limit

func (*API)UpdateRegionalTieredCacheadded inv0.73.0

func (api *API) UpdateRegionalTieredCache(ctxcontext.Context, rc *ResourceContainer, paramsUpdateRegionalTieredCacheParams) (RegionalTieredCache,error)

UpdateRegionalTieredCache updates the regional tiered cache setting for azone.

API reference:https://developers.cloudflare.com/api/resources/cache/subresources/regional_tiered_cache/methods/edit/

func (*API)UpdateRegistrarDomainadded inv0.9.0

func (api *API) UpdateRegistrarDomain(ctxcontext.Context, accountID, domainNamestring, domainConfigurationRegistrarDomainConfiguration) (RegistrarDomain,error)

UpdateRegistrarDomain updates an existing Registrar Domain configuration.

API reference:https://api.cloudflare.com/#registrar-domains-update-domain

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}domain, err := api.UpdateRegistrarDomain(context.Background(), "01a7362d577a6c3019a474fd6f485823", "cloudflare.com", cloudflare.RegistrarDomainConfiguration{NameServers: []string{"ns1.cloudflare.com", "ns2.cloudflare.com"},Locked:      false,})if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", domain)

func (*API)UpdateRiskScoreIntegrationadded inv0.101.0

func (api *API) UpdateRiskScoreIntegration(ctxcontext.Context, rc *ResourceContainer, integrationIDstring, paramsRiskScoreIntegrationUpdateRequest) (RiskScoreIntegration,error)

UpdateRiskScoreIntegration updates a Risk Score Integration.

Can be used to disable or active the integration using the "active" boolean property.API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/risk_scoring/subresources/integrations/methods/update/

func (*API)UpdateRulesetadded inv0.73.0

func (api *API) UpdateRuleset(ctxcontext.Context, rc *ResourceContainer, paramsUpdateRulesetParams) (Ruleset,error)

UpdateRuleset updates a ruleset based on the ruleset ID.

API reference:https://developers.cloudflare.com/api/operations/updateAccountRulesetAPI reference:https://developers.cloudflare.com/api/resources/rulesets/methods/update/

func (*API)UpdateSSLadded inv0.7.2

func (api *API) UpdateSSL(ctxcontext.Context, zoneID, certificateIDstring, optionsZoneCustomSSLOptions) (ZoneCustomSSL,error)

UpdateSSL updates (replaces) a custom SSL certificate.

API reference:https://api.cloudflare.com/#custom-ssl-for-a-zone-update-ssl-configuration

func (*API)UpdateSecondaryDNSPrimaryadded inv0.15.0

func (api *API) UpdateSecondaryDNSPrimary(ctxcontext.Context, accountIDstring, primarySecondaryDNSPrimary) (SecondaryDNSPrimary,error)

UpdateSecondaryDNSPrimary creates a secondary DNS primary.

API reference:https://api.cloudflare.com/#secondary-dns-primary--update-primary

func (*API)UpdateSecondaryDNSTSIGadded inv0.15.0

func (api *API) UpdateSecondaryDNSTSIG(ctxcontext.Context, accountIDstring, tsigSecondaryDNSTSIG) (SecondaryDNSTSIG,error)

UpdateSecondaryDNSTSIG updates an existing secondary DNS TSIG atthe account level.

API reference:https://api.cloudflare.com/#secondary-dns-tsig--update-tsig

func (*API)UpdateSecondaryDNSZoneadded inv0.15.0

func (api *API) UpdateSecondaryDNSZone(ctxcontext.Context, zoneIDstring, zoneSecondaryDNSZone) (SecondaryDNSZone,error)

UpdateSecondaryDNSZone updates an existing secondary DNS zone.

API reference:https://api.cloudflare.com/#secondary-dns-update-secondary-zone-configuration

func (*API)UpdateSpectrumApplicationadded inv0.9.0

func (api *API) UpdateSpectrumApplication(ctxcontext.Context, zoneID, appIDstring, appDetailsSpectrumApplication) (SpectrumApplication,error)

UpdateSpectrumApplication updates an existing Spectrum application.

API reference:https://developers.cloudflare.com/spectrum/api-reference/#update-a-spectrum-application

func (*API)UpdateSplitTunneladded inv0.25.0

func (api *API) UpdateSplitTunnel(ctxcontext.Context, accountIDstring, modestring, tunnels []SplitTunnel) ([]SplitTunnel,error)

UpdateSplitTunnel updates the existing split tunnel policy.

API reference for include:https://api.cloudflare.com/#device-policy-set-split-tunnel-include-listAPI reference for exclude:https://api.cloudflare.com/#device-policy-set-split-tunnel-exclude-list

func (*API)UpdateSplitTunnelDeviceSettingsPolicyadded inv0.52.0

func (api *API) UpdateSplitTunnelDeviceSettingsPolicy(ctxcontext.Context, accountID, policyIDstring, modestring, tunnels []SplitTunnel) ([]SplitTunnel,error)

UpdateSplitTunnelDeviceSettingsPolicy updates the existing split tunnel policy within a device settings policy

API reference for include:https://api.cloudflare.com/#device-policy-set-split-tunnel-include-listAPI reference for exclude:https://api.cloudflare.com/#device-policy-set-split-tunnel-exclude-list

func (*API)UpdateTeamsListadded inv0.17.0

func (api *API) UpdateTeamsList(ctxcontext.Context, rc *ResourceContainer, paramsUpdateTeamsListParams) (TeamsList,error)

UpdateTeamsList updates an existing teams list.

API reference:https://api.cloudflare.com/#teams-lists-update-teams-list

func (*API)UpdateTeamsLocationadded inv0.21.0

func (api *API) UpdateTeamsLocation(ctxcontext.Context, accountIDstring, teamsLocationTeamsLocation) (TeamsLocation,error)

UpdateTeamsLocation updates an existing teams location.

API reference:https://api.cloudflare.com/#teams-locations-update-teams-location

func (*API)UpdateTeamsProxyEndpointadded inv0.35.0

func (api *API) UpdateTeamsProxyEndpoint(ctxcontext.Context, accountIDstring, proxyEndpointTeamsProxyEndpoint) (TeamsProxyEndpoint,error)

UpdateTeamsProxyEndpoint updates an existing teams Proxy Endpoint.

API reference:https://api.cloudflare.com/#zero-trust-gateway-proxy-endpoints-update-proxy-endpoint

func (*API)UpdateTunneladded inv0.39.0

func (api *API) UpdateTunnel(ctxcontext.Context, rc *ResourceContainer, paramsTunnelUpdateParams) (Tunnel,error)

UpdateTunnel updates an existing tunnel for the account.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-update-cloudflare-tunnel

func (*API)UpdateTunnelConfigurationadded inv0.43.0

func (api *API) UpdateTunnelConfiguration(ctxcontext.Context, rc *ResourceContainer, paramsTunnelConfigurationParams) (TunnelConfigurationResult,error)

UpdateTunnelConfiguration updates an existing tunnel for the account.

API reference:https://api.cloudflare.com/#cloudflare-tunnel-configuration-properties

func (*API)UpdateTunnelRouteadded inv0.36.0

func (api *API) UpdateTunnelRoute(ctxcontext.Context, rc *ResourceContainer, paramsTunnelRoutesUpdateParams) (TunnelRoute,error)

UpdateTunnelRoute updates an existing route in the account routing table forthe given tunnel.

See:https://api.cloudflare.com/#tunnel-route-update-route

func (*API)UpdateTunnelVirtualNetworkadded inv0.41.0

func (api *API) UpdateTunnelVirtualNetwork(ctxcontext.Context, rc *ResourceContainer, paramsTunnelVirtualNetworkUpdateParams) (TunnelVirtualNetwork,error)

UpdateTunnelRoute updates an existing virtual network in the account.

API reference:https://api.cloudflare.com/#tunnel-virtual-network-update-virtual-network

func (*API)UpdateTurnstileWidgetadded inv0.66.0

func (api *API) UpdateTurnstileWidget(ctxcontext.Context, rc *ResourceContainer, paramsUpdateTurnstileWidgetParams) (TurnstileWidget,error)

UpdateTurnstileWidget update the configuration of a widget.

API reference:https://api.cloudflare.com/#challenge-widgets-update-a-challenge-widget

func (*API)UpdateUniversalSSLCertificatePackValidationMethodadded inv0.20.0

func (api *API) UpdateUniversalSSLCertificatePackValidationMethod(ctxcontext.Context, zoneIDstring, certPackUUIDstring, settingUniversalSSLCertificatePackValidationMethodSetting) (UniversalSSLCertificatePackValidationMethodSetting,error)

UpdateUniversalSSLCertificatePackValidationMethod changes the validation method for a certificate pack

API reference:https://api.cloudflare.com/#ssl-verification-ssl-verification-details

func (*API)UpdateUseradded inv0.7.2

func (api *API) UpdateUser(ctxcontext.Context, user *User) (User,error)

UpdateUser updates the properties of the given user.

API reference:https://api.cloudflare.com/#user-update-user

func (*API)UpdateUserAccessRuleadded inv0.8.1

func (api *API) UpdateUserAccessRule(ctxcontext.Context, accessRuleIDstring, accessRuleAccessRule) (*AccessRuleResponse,error)

UpdateUserAccessRule updates a single access rule for the logged-in user &given access rule identifier.

API reference:https://api.cloudflare.com/#user-level-firewall-access-rule-update-access-rule

func (*API)UpdateUserAgentRuleadded inv0.8.0

func (api *API) UpdateUserAgentRule(ctxcontext.Context, zoneIDstring, idstring, ldUserAgentRule) (*UserAgentRuleResponse,error)

UpdateUserAgentRule updates a User-Agent Block rule (based on the ID) for the given zone ID.

API reference:https://api.cloudflare.com/#user-agent-blocking-rules-update-useragent-rule

func (*API)UpdateWAFGroupadded inv0.10.1

func (api *API) UpdateWAFGroup(ctxcontext.Context, zoneID, packageID, groupID, modestring) (WAFGroup,error)

UpdateWAFGroup lets you update the mode of a WAF Group.

API Reference:https://api.cloudflare.com/#waf-rule-groups-edit-rule-group

func (*API)UpdateWAFOverrideadded inv0.11.1

func (api *API) UpdateWAFOverride(ctxcontext.Context, zoneID, overrideIDstring, overrideWAFOverride) (WAFOverride,error)

UpdateWAFOverride updates an existing WAF override.

API reference:https://api.cloudflare.com/#waf-overrides-update-uri-controlled-waf-configuration

func (*API)UpdateWAFPackageadded inv0.10.0

func (api *API) UpdateWAFPackage(ctxcontext.Context, zoneID, packageIDstring, optsWAFPackageOptions) (WAFPackage,error)

UpdateWAFPackage lets you update the a WAF Package.

API Reference:https://api.cloudflare.com/#waf-rule-packages-edit-firewall-package

func (*API)UpdateWAFRuleadded inv0.9.0

func (api *API) UpdateWAFRule(ctxcontext.Context, zoneID, packageID, ruleID, modestring) (WAFRule,error)

UpdateWAFRule lets you update the mode of a WAF Rule.

API Reference:https://api.cloudflare.com/#waf-rules-edit-rule

func (*API)UpdateWaitingRoomadded inv0.17.0

func (api *API) UpdateWaitingRoom(ctxcontext.Context, zoneIDstring, waitingRoomWaitingRoom) (WaitingRoom,error)

UpdateWaitingRoom lets you replace a Waiting Room. This is in contrast toChangeWaitingRoom which lets you change individual settings.

API reference:https://api.cloudflare.com/#waiting-room-update-waiting-room

func (*API)UpdateWaitingRoomEventadded inv0.33.0

func (api *API) UpdateWaitingRoomEvent(ctxcontext.Context, zoneIDstring, waitingRoomIDstring, waitingRoomEventWaitingRoomEvent) (WaitingRoomEvent,error)

UpdateWaitingRoomEvent lets you replace a Waiting Room Event. This is in contrast toChangeWaitingRoomEvent which lets you change individual settings.

API reference:https://api.cloudflare.com/#waiting-room-update-event

func (*API)UpdateWaitingRoomRuleadded inv0.53.0

func (api *API) UpdateWaitingRoomRule(ctxcontext.Context, rc *ResourceContainer, paramsUpdateWaitingRoomRuleParams) ([]WaitingRoomRule,error)

UpdateWaitingRoomRule updates a rule for a Waiting Room.

API reference:https://api.cloudflare.com/#waiting-room-patch-waiting-room-rule

func (*API)UpdateWaitingRoomSettingsadded inv0.67.0

func (api *API) UpdateWaitingRoomSettings(ctxcontext.Context, rc *ResourceContainer, paramsUpdateWaitingRoomSettingsParams) (WaitingRoomSettings,error)

UpdateWaitingRoomSettings lets you replace all zone-level Waiting Room settings. This is in contrast toPatchWaitingRoomSettings which lets you change individual settings.

API reference:https://api.cloudflare.com/#waiting-room-update-zone-settings

func (*API)UpdateWeb3Hostnameadded inv0.45.0

func (api *API) UpdateWeb3Hostname(ctxcontext.Context, paramsWeb3HostnameUpdateParameters) (Web3Hostname,error)

UpdateWeb3Hostname edits a web3 hostname.

API Reference:https://api.cloudflare.com/#web3-hostname-edit-web3-hostname

func (*API)UpdateWebAnalyticsRuleadded inv0.75.0

func (api *API) UpdateWebAnalyticsRule(ctxcontext.Context, rc *ResourceContainer, paramsUpdateWebAnalyticsRuleParams) (*WebAnalyticsRule,error)

UpdateWebAnalyticsRule updates a Web Analytics Rule in a Web Analytics ruleset.

API reference:https://api.cloudflare.com/#web-analytics-update-rule

func (*API)UpdateWebAnalyticsSiteadded inv0.75.0

func (api *API) UpdateWebAnalyticsSite(ctxcontext.Context, rc *ResourceContainer, paramsUpdateWebAnalyticsSiteParams) (*WebAnalyticsSite,error)

UpdateWebAnalyticsSite updates an existing Web Analytics Site for an Account.

API reference:https://api.cloudflare.com/#web-analytics-update-site

func (*API)UpdateWorkerCronTriggersadded inv0.13.8

func (api *API) UpdateWorkerCronTriggers(ctxcontext.Context, rc *ResourceContainer, paramsUpdateWorkerCronTriggersParams) ([]WorkerCronTrigger,error)

UpdateWorkerCronTriggers updates a single schedule for a Worker cron trigger.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/schedules/methods/update/

func (*API)UpdateWorkerRouteadded inv0.9.0

func (api *API) UpdateWorkerRoute(ctxcontext.Context, rc *ResourceContainer, paramsUpdateWorkerRouteParams) (WorkerRouteResponse,error)

UpdateWorkerRoute updates worker route for a script.

API reference:https://developers.cloudflare.com/api/operations/worker-routes-update-route

func (*API)UpdateWorkersKVNamespaceadded inv0.9.0

func (api *API) UpdateWorkersKVNamespace(ctxcontext.Context, rc *ResourceContainer, paramsUpdateWorkersKVNamespaceParams) (Response,error)

UpdateWorkersKVNamespace modifies a KV namespace based on the ID.

API reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/methods/update/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}resp, err := api.UpdateWorkersKVNamespace(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.UpdateWorkersKVNamespaceParams{NamespaceID: namespace,Title:       "test_title",})if err != nil {log.Fatal(err)}fmt.Println(resp)

func (*API)UpdateWorkersScriptContentadded inv0.76.0

func (api *API) UpdateWorkersScriptContent(ctxcontext.Context, rc *ResourceContainer, paramsUpdateWorkersScriptContentParams) (WorkerScriptResponse,error)

UpdateWorkersScriptContent pushes only script content, no metadata.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/content/methods/update/

func (*API)UpdateWorkersScriptSettingsadded inv0.76.0

UpdateWorkersScriptSettings pushes only script metadata.

API reference:https://developers.cloudflare.com/api/operations/worker-script-patch-settings

func (*API)UpdateZarazConfigadded inv0.86.0

func (api *API) UpdateZarazConfig(ctxcontext.Context, rc *ResourceContainer, paramsUpdateZarazConfigParams) (ZarazConfigResponse,error)

func (*API)UpdateZarazWorkflowadded inv0.86.0

func (*API)UpdateZoneAccessRuleadded inv0.8.1

func (api *API) UpdateZoneAccessRule(ctxcontext.Context, zoneID, accessRuleIDstring, accessRuleAccessRule) (*AccessRuleResponse,error)

UpdateZoneAccessRule updates a single access rule for the given zone &access rule identifiers.

API reference:https://api.cloudflare.com/#firewall-access-rule-for-a-zone-update-access-rule

func (*API)UpdateZoneCacheVariantsadded inv0.32.0

func (api *API) UpdateZoneCacheVariants(ctxcontext.Context, zoneIDstring, variantsZoneCacheVariantsValues) (ZoneCacheVariants,error)

UpdateZoneCacheVariants updates the cache variants for a given zone.

API reference:https://api.cloudflare.com/#zone-cache-settings-change-variants-setting

func (*API)UpdateZoneCloudConnectorRulesadded inv0.100.0

func (api *API) UpdateZoneCloudConnectorRules(ctxcontext.Context, rc *ResourceContainer, params []CloudConnectorRule) ([]CloudConnectorRule,error)

func (*API)UpdateZoneDNSSECadded inv0.13.5

func (api *API) UpdateZoneDNSSEC(ctxcontext.Context, zoneIDstring, optionsZoneDNSSECUpdateOptions) (ZoneDNSSEC,error)

UpdateZoneDNSSEC updates DNSSEC for a zone

API reference:https://api.cloudflare.com/#dnssec-edit-dnssec-status

func (*API)UpdateZoneLevelAccessBookmarkadded inv0.36.0

func (api *API) UpdateZoneLevelAccessBookmark(ctxcontext.Context, zoneIDstring, accessBookmarkAccessBookmark) (AccessBookmark,error)

UpdateZoneLevelAccessBookmark updates an existing zone level access bookmark.

API reference:https://api.cloudflare.com/#zone-level-access-bookmarks-update-access-bookmark

func (*API)UpdateZoneLockdownadded inv0.8.0

func (api *API) UpdateZoneLockdown(ctxcontext.Context, rc *ResourceContainer, paramsZoneLockdownUpdateParams) (ZoneLockdown,error)

UpdateZoneLockdown updates a Zone ZoneLockdown rule (based on the ID) for the given zone ID.

API reference:https://api.cloudflare.com/#zone-ZoneLockdown-update-ZoneLockdown-rule

func (*API)UpdateZoneManagedHeadersadded inv0.42.0

func (api *API) UpdateZoneManagedHeaders(ctxcontext.Context, rc *ResourceContainer, paramsUpdateManagedHeadersParams) (ManagedHeaders,error)

func (*API)UpdateZoneSSLSettingsadded inv0.25.0

func (api *API) UpdateZoneSSLSettings(ctxcontext.Context, zoneIDstring, sslValuestring) (ZoneSSLSetting,error)

UpdateZoneSSLSettings update information about SSL setting to the specified zone.

API reference:https://api.cloudflare.com/#zone-settings-change-ssl-setting

func (*API)UpdateZoneSettingadded inv0.64.0

func (api *API) UpdateZoneSetting(ctxcontext.Context, rc *ResourceContainer, paramsUpdateZoneSettingParams) (ZoneSetting,error)

UpdateZoneSetting updates the specified setting for a given zone.

API reference:https://api.cloudflare.com/#zone-settings-edit-zone-settings-info

func (*API)UpdateZoneSettingsadded inv0.8.5

func (api *API) UpdateZoneSettings(ctxcontext.Context, zoneIDstring, settings []ZoneSetting) (*ZoneSettingResponse,error)

UpdateZoneSettings updates the settings for a given zone.

API reference:https://api.cloudflare.com/#zone-settings-edit-zone-settings-info

func (*API)UpdateZoneSnippetadded inv0.108.0

func (api *API) UpdateZoneSnippet(ctxcontext.Context, rc *ResourceContainer, paramsSnippetRequest) (*Snippet,error)

func (*API)UpdateZoneSnippetsRulesadded inv0.108.0

func (api *API) UpdateZoneSnippetsRules(ctxcontext.Context, rc *ResourceContainer, params []SnippetRule) ([]SnippetRule,error)

func (*API)UploadDLPDatasetVersionadded inv0.87.0

func (api *API) UploadDLPDatasetVersion(ctxcontext.Context, rc *ResourceContainer, paramsUploadDLPDatasetVersionParams) (DLPDataset,error)

UploadDLPDatasetVersion uploads a new version of the specified DLP dataset.

API reference:https://developers.cloudflare.com/api/resources/zero_trust/subresources/dlp/subresources/datasets/subresources/upload/methods/edit/

func (*API)UploadImageadded inv0.30.0

func (api *API) UploadImage(ctxcontext.Context, rc *ResourceContainer, paramsUploadImageParams) (Image,error)

UploadImage uploads a single image.

API Reference:https://api.cloudflare.com/#cloudflare-images-upload-an-image-using-a-single-http-request

func (*API)UploadPerHostnameAuthenticatedOriginPullsCertificateadded inv0.12.2

func (api *API) UploadPerHostnameAuthenticatedOriginPullsCertificate(ctxcontext.Context, zoneIDstring, paramsPerHostnameAuthenticatedOriginPullsCertificateParams) (PerHostnameAuthenticatedOriginPullsCertificateDetails,error)

UploadPerHostnameAuthenticatedOriginPullsCertificate will upload the provided certificate and private key to the edge under Per Hostname AuthenticatedOriginPulls.

API reference:https://api.cloudflare.com/#per-hostname-authenticated-origin-pull-upload-a-hostname-client-certificate

func (*API)UploadPerZoneAuthenticatedOriginPullsCertificateadded inv0.12.2

func (api *API) UploadPerZoneAuthenticatedOriginPullsCertificate(ctxcontext.Context, zoneIDstring, paramsPerZoneAuthenticatedOriginPullsCertificateParams) (PerZoneAuthenticatedOriginPullsCertificateDetails,error)

UploadPerZoneAuthenticatedOriginPullsCertificate will upload a provided client certificate and enable it to be used in all AuthenticatedOriginPulls requests for the zone.

API reference:https://api.cloudflare.com/#zone-level-authenticated-origin-pulls-upload-certificate

func (*API)UploadWorkeradded inv0.9.0

UploadWorker pushes raw script content for your Worker.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/update/

func (*API)UserAccessRuleadded inv0.9.0

func (api *API) UserAccessRule(ctxcontext.Context, accessRuleIDstring) (*AccessRuleResponse,error)

UserAccessRule returns the details of a user's account access rule.

API reference:https://api.cloudflare.com/#user-level-firewall-access-rule-list-access-rules

func (*API)UserAgentRuleadded inv0.8.0

func (api *API) UserAgentRule(ctxcontext.Context, zoneIDstring, idstring) (*UserAgentRuleResponse,error)

UserAgentRule retrieves a User-Agent Block rule (based on the ID) for the given zone ID.

API reference:https://api.cloudflare.com/#user-agent-blocking-rules-useragent-rule-details

func (*API)UserBillingHistoryadded inv0.43.0

func (api *API) UserBillingHistory(ctxcontext.Context, pageOptsUserBillingOptions) ([]UserBillingHistory,error)

UserBillingHistory return the billing history of the user

API reference:https://api.cloudflare.com/#user-billing-history-billing-history-details

func (*API)UserBillingProfileadded inv0.7.3

func (api *API) UserBillingProfile(ctxcontext.Context) (UserBillingProfile,error)

UserBillingProfile returns the billing profile of the user.

API reference:https://api.cloudflare.com/#user-billing-profile

func (*API)UserDetailsadded inv0.7.2

func (api *API) UserDetails(ctxcontext.Context) (User,error)

UserDetails provides information about the logged-in user.

API reference:https://api.cloudflare.com/#user-user-details

func (*API)ValidateFilterExpressionadded inv0.9.0

func (api *API) ValidateFilterExpression(ctxcontext.Context, expressionstring)error

ValidateFilterExpression checks correctness of a filter expression.

API reference:https://developers.cloudflare.com/firewall/api/cf-filters/validation/

func (*API)ValidateLogpushOwnershipChallengeadded inv0.9.0

func (api *API) ValidateLogpushOwnershipChallenge(ctxcontext.Context, rc *ResourceContainer, paramsValidateLogpushOwnershipChallengeParams) (bool,error)

ValidateLogpushOwnershipChallenge returns zone-level ownership challenge validation result.

API reference:https://api.cloudflare.com/#logpush-jobs-validate-ownership-challenge

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}zoneID, err := api.ZoneIDByName(domain)if err != nil {log.Fatal(err)}isValid, err := api.ValidateLogpushOwnershipChallenge(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ValidateLogpushOwnershipChallengeParams{DestinationConf:    "destination_conf",OwnershipChallenge: "ownership_challenge",})if err != nil {log.Fatal(err)}fmt.Printf("%+v\n", isValid)

func (*API)VerifyAPITokenadded inv0.13.5

func (api *API) VerifyAPIToken(ctxcontext.Context) (APITokenVerifyBody,error)

VerifyAPIToken tests the validity of the token.

API reference:https://api.cloudflare.com/#user-api-tokens-verify-token

func (*API)WAFGroupadded inv0.10.1

func (api *API) WAFGroup(ctxcontext.Context, zoneID, packageID, groupIDstring) (WAFGroup,error)

WAFGroup returns a WAF rule group from the given WAF package.

API Reference:https://api.cloudflare.com/#waf-rule-groups-rule-group-details

func (*API)WAFOverrideadded inv0.11.1

func (api *API) WAFOverride(ctxcontext.Context, zoneID, overrideIDstring) (WAFOverride,error)

WAFOverride returns a WAF override from the given override ID.

API Reference:https://api.cloudflare.com/#waf-overrides-uri-controlled-waf-configuration-details

func (*API)WAFPackageadded inv0.10.0

func (api *API) WAFPackage(ctxcontext.Context, zoneID, packageIDstring) (WAFPackage,error)

WAFPackage returns a WAF package for the given zone.

API Reference:https://api.cloudflare.com/#waf-rule-packages-firewall-package-details

func (*API)WAFRuleadded inv0.9.0

func (api *API) WAFRule(ctxcontext.Context, zoneID, packageID, ruleIDstring) (WAFRule,error)

WAFRule returns a WAF rule from the given WAF package.

API Reference:https://api.cloudflare.com/#waf-rules-rule-details

func (*API)WaitingRoomadded inv0.17.0

func (api *API) WaitingRoom(ctxcontext.Context, zoneID, waitingRoomIDstring) (WaitingRoom,error)

WaitingRoom fetches detail about one Waiting room for a zone.

API reference:https://api.cloudflare.com/#waiting-room-waiting-room-details

func (*API)WaitingRoomEventadded inv0.33.0

func (api *API) WaitingRoomEvent(ctxcontext.Context, zoneIDstring, waitingRoomIDstring, eventIDstring) (WaitingRoomEvent,error)

WaitingRoomEvent fetches detail about one Waiting Room Event for a zone.

API reference:https://api.cloudflare.com/#waiting-room-event-details

func (*API)WaitingRoomEventPreviewadded inv0.33.0

func (api *API) WaitingRoomEventPreview(ctxcontext.Context, zoneIDstring, waitingRoomIDstring, eventIDstring) (WaitingRoomEvent,error)

WaitingRoomEventPreview returns an event's configuration as if it was active.Inherited fields from the waiting room will be displayed with their current values.

API reference:https://api.cloudflare.com/#waiting-room-preview-active-event-details

func (*API)WaitingRoomPagePreviewadded inv0.34.0

func (api *API) WaitingRoomPagePreview(ctxcontext.Context, zoneID, customHTMLstring) (WaitingRoomPagePreviewURL,error)

WaitingRoomPagePreview uploads a custom waiting room page for preview andreturns a preview URL.

API reference:https://api.cloudflare.com/#waiting-room-create-a-custom-waiting-room-page-preview

func (*API)WaitingRoomStatusadded inv0.33.0

func (api *API) WaitingRoomStatus(ctxcontext.Context, zoneID, waitingRoomIDstring) (WaitingRoomStatus,error)

WaitingRoomStatus returns the status of one Waiting Room for a zone.

API reference:https://api.cloudflare.com/#waiting-room-get-waiting-room-status

func (*API)WorkersAccountSettingsadded inv0.47.0

WorkersAccountSettings returns the current account settings for Workers.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/account_settings/methods/get/

func (*API)WorkersCreateSubdomainadded inv0.47.0

func (api *API) WorkersCreateSubdomain(ctxcontext.Context, rc *ResourceContainer, paramsWorkersSubdomain) (WorkersSubdomain,error)

WorkersCreateSubdomain Creates a Workers subdomain for an account.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/subdomains/methods/update/

func (*API)WorkersGetSubdomainadded inv0.47.0

func (api *API) WorkersGetSubdomain(ctxcontext.Context, rc *ResourceContainer) (WorkersSubdomain,error)

WorkersGetSubdomain Creates a Workers subdomain for an account.

API reference:https://developers.cloudflare.com/api/resources/workers/subresources/subdomains/methods/get/

func (*API)WriteWorkersKVEntriesadded inv0.55.0

func (api *API) WriteWorkersKVEntries(ctxcontext.Context, rc *ResourceContainer, paramsWriteWorkersKVEntriesParams) (Response,error)

WriteWorkersKVEntries writes multiple KVs at once.

API reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/methods/bulk_update/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}payload := []*cloudflare.WorkersKVPair{{Key:   "key1",Value: "value1",},{Key:      "key2",Value:    base64.StdEncoding.EncodeToString([]byte("value2")),Base64:   true,Metadata: "key2's value will be decoded in base64 before it is stored",},}resp, err := api.WriteWorkersKVEntries(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.WriteWorkersKVEntriesParams{NamespaceID: namespace,KVs:         payload,})if err != nil {log.Fatal(err)}fmt.Println(resp)

func (*API)WriteWorkersKVEntryadded inv0.55.0

func (api *API) WriteWorkersKVEntry(ctxcontext.Context, rc *ResourceContainer, paramsWriteWorkersKVEntryParams) (Response,error)

WriteWorkersKVEntry writes a single KV value based on the key.

API reference:https://developers.cloudflare.com/api/resources/kv/subresources/namespaces/subresources/values/methods/update/

Example
api, err := cloudflare.New(apiKey, user)if err != nil {log.Fatal(err)}payload := []byte("test payload")key := "test_key"resp, err := api.WriteWorkersKVEntry(context.Background(), cloudflare.AccountIdentifier(accountID), cloudflare.WriteWorkersKVEntryParams{NamespaceID: namespace,Key:         key,Value:       payload,})if err != nil {log.Fatal(err)}fmt.Println(resp)

func (*API)ZoneAccessRuleadded inv0.9.0

func (api *API) ZoneAccessRule(ctxcontext.Context, zoneIDstring, accessRuleIDstring) (*AccessRuleResponse,error)

ZoneAccessRule returns the details of a zone's access rule.

API reference:https://api.cloudflare.com/#firewall-access-rule-for-a-zone-list-access-rules

func (*API)ZoneActivationCheckadded inv0.7.2

func (api *API) ZoneActivationCheck(ctxcontext.Context, zoneIDstring) (Response,error)

ZoneActivationCheck initiates another zone activation check for newly-created zones.

API reference:https://api.cloudflare.com/#zone-initiate-another-zone-activation-check

func (*API)ZoneAnalyticsByColocationadded inv0.7.2

func (api *API) ZoneAnalyticsByColocation(ctxcontext.Context, zoneIDstring, optionsZoneAnalyticsOptions) ([]ZoneAnalyticsColocation,error)

ZoneAnalyticsByColocation returns zone analytics information by datacenter.

API reference:https://api.cloudflare.com/#zone-analytics-analytics-by-co-locations

func (*API)ZoneAnalyticsDashboardadded inv0.7.2

func (api *API) ZoneAnalyticsDashboard(ctxcontext.Context, zoneIDstring, optionsZoneAnalyticsOptions) (ZoneAnalyticsData,error)

ZoneAnalyticsDashboard returns zone analytics information.

API reference:https://api.cloudflare.com/#zone-analytics-dashboard

func (*API)ZoneCacheVariantsadded inv0.32.0

func (api *API) ZoneCacheVariants(ctxcontext.Context, zoneIDstring) (ZoneCacheVariants,error)

ZoneCacheVariants returns information about the current cache variants

API reference:https://api.cloudflare.com/#zone-cache-settings-get-variants-setting

func (*API)ZoneDNSSECSettingadded inv0.13.5

func (api *API) ZoneDNSSECSetting(ctxcontext.Context, zoneIDstring) (ZoneDNSSEC,error)

ZoneDNSSECSetting returns the DNSSEC details of a zone

API reference:https://api.cloudflare.com/#dnssec-dnssec-details

func (*API)ZoneDetailsadded inv0.7.2

func (api *API) ZoneDetails(ctxcontext.Context, zoneIDstring) (Zone,error)

ZoneDetails fetches information about a zone.

API reference:https://api.cloudflare.com/#zone-zone-details

func (*API)ZoneExportadded inv0.10.9

func (api *API) ZoneExport(ctxcontext.Context, zoneIDstring) (string,error)

ZoneExport returns the text BIND config for the given zone

API reference:https://api.cloudflare.com/#dns-records-for-a-zone-export-dns-records

func (*API)ZoneIDByNameadded inv0.7.2

func (api *API) ZoneIDByName(zoneNamestring) (string,error)

ZoneIDByName retrieves a zone's ID from the name.

func (*API)ZoneLevelAccessBookmarkadded inv0.36.0

func (api *API) ZoneLevelAccessBookmark(ctxcontext.Context, zoneID, bookmarkIDstring) (AccessBookmark,error)

ZoneLevelAccessBookmark returns a single zone level bookmark based on thebookmark ID.

API reference:https://api.cloudflare.com/#zone-level-access-bookmarks-access-bookmarks-details

func (*API)ZoneLevelAccessBookmarksadded inv0.36.0

func (api *API) ZoneLevelAccessBookmarks(ctxcontext.Context, zoneIDstring, pageOptsPaginationOptions) ([]AccessBookmark,ResultInfo,error)

ZoneLevelAccessBookmarks returns all bookmarks within a zone.

API reference:https://api.cloudflare.com/#zone-level-access-bookmarks-list-access-bookmarks

func (*API)ZoneLockdownadded inv0.8.0

func (api *API) ZoneLockdown(ctxcontext.Context, rc *ResourceContainer, idstring) (ZoneLockdown,error)

ZoneLockdown retrieves a Zone ZoneLockdown rule (based on the ID) for the given zone ID.

API reference:https://api.cloudflare.com/#zone-ZoneLockdown-ZoneLockdown-rule-details

func (*API)ZoneSSLSettingsadded inv0.7.4

func (api *API) ZoneSSLSettings(ctxcontext.Context, zoneIDstring) (ZoneSSLSetting,error)

ZoneSSLSettings returns information about SSL setting to the specified zone.

API reference:https://api.cloudflare.com/#zone-settings-get-ssl-setting

func (*API)ZoneSetPausedadded inv0.7.2

func (api *API) ZoneSetPaused(ctxcontext.Context, zoneIDstring, pausedbool) (Zone,error)

ZoneSetPaused pauses Cloudflare service for the entire zone, sending alltraffic direct to the origin.

func (*API)ZoneSetPlanadded inv0.7.2

func (api *API) ZoneSetPlan(ctxcontext.Context, zoneIDstring, planTypestring)error

ZoneSetPlan sets the rate plan of an existing zone.

Valid values for `planType` are "CF_FREE", "CF_PRO", "CF_BIZ" and"CF_ENT".

API reference:https://api.cloudflare.com/#zone-subscription-create-zone-subscription

func (*API)ZoneSetTypeadded inv0.27.0

func (api *API) ZoneSetType(ctxcontext.Context, zoneIDstring, zoneTypestring) (Zone,error)

ZoneSetType toggles the type for an existing zone.

Valid values for `type` are "full" and "partial"

API reference:https://api.cloudflare.com/#zone-edit-zone

func (*API)ZoneSetVanityNSadded inv0.7.2

func (api *API) ZoneSetVanityNS(ctxcontext.Context, zoneIDstring, ns []string) (Zone,error)

ZoneSetVanityNS sets custom nameservers for the zone.These names must be within the same zone.

func (*API)ZoneSettingsadded inv0.8.5

func (api *API) ZoneSettings(ctxcontext.Context, zoneIDstring) (*ZoneSettingResponse,error)

ZoneSettings returns all of the settings for a given zone.

API reference:https://api.cloudflare.com/#zone-settings-get-all-zone-settings

func (*API)ZoneUpdatePlanadded inv0.10.6

func (api *API) ZoneUpdatePlan(ctxcontext.Context, zoneIDstring, planTypestring)error

ZoneUpdatePlan updates the rate plan of an existing zone.

Valid values for `planType` are "CF_FREE", "CF_PRO", "CF_BIZ" and"CF_ENT".

API reference:https://api.cloudflare.com/#zone-subscription-update-zone-subscription

typeAPIResponseadded inv0.49.0

type APIResponse struct {Body       []byteStatusstringStatusCodeintHeadershttp.Header}

APIResponse holds the structure for a response from the API. It looks alotlike `http.Response` however, uses a `[]byte` for the `Body` instead of a`io.ReadCloser`.

This may go away in the experimental client in favour of `http.Response`.

typeAPIShieldadded inv0.49.0

type APIShield struct {AuthIdCharacteristics []AuthIdCharacteristics `json:"auth_id_characteristics"`}

APIShield is all the available options underconfiguration?properties=auth_id_characteristics.

typeAPIShieldBasicOperationadded inv0.78.0

type APIShieldBasicOperation struct {Methodstring `json:"method"`Hoststring `json:"host"`Endpointstring `json:"endpoint"`}

APIShieldBasicOperation should be used when creating an operation in API Shield Endpoint Management.

typeAPIShieldCreateSchemaEventadded inv0.79.0

type APIShieldCreateSchemaEvent struct {// Code identifies the event that occurredCodeuint `json:"code"`// Message describes the event that occurredMessagestring `json:"message"`}

APIShieldCreateSchemaEvent is an event log that occurred during processing.

typeAPIShieldCreateSchemaEventWithLocationadded inv0.79.0

type APIShieldCreateSchemaEventWithLocation struct {APIShieldCreateSchemaEvent// Location is where the event occurred// Seehttps://goessner.net/articles/JsonPath/ for JSONPath specification.Locationstring `json:"location,omitempty"`}

APIShieldCreateSchemaEventWithLocation is an event log that occurred during processing, with the locationin the schema where the event occurred.

typeAPIShieldCreateSchemaEventWithLocationsadded inv0.79.0

type APIShieldCreateSchemaEventWithLocations struct {APIShieldCreateSchemaEvent// Locations lists JSONPath locations where the event occurred// Seehttps://goessner.net/articles/JsonPath/ for JSONPath specificationLocations []string `json:"locations"`}

APIShieldCreateSchemaEventWithLocations is an event log that occurred during processing, with the location(s)in the schema where the event occurred.

func (APIShieldCreateSchemaEventWithLocations)Stringadded inv0.79.0

typeAPIShieldCreateSchemaEventsadded inv0.79.0

type APIShieldCreateSchemaEvents struct {Critical *APIShieldCreateSchemaEventWithLocation   `json:"critical,omitempty"`Errors   []APIShieldCreateSchemaEventWithLocations `json:"errors,omitempty"`Warnings []APIShieldCreateSchemaEventWithLocations `json:"warnings,omitempty"`}

APIShieldCreateSchemaEvents are event logs that occurred during processing.

The logs are separated into levels of severity.

typeAPIShieldCreateSchemaResponseadded inv0.79.0

type APIShieldCreateSchemaResponse struct {ResultAPIShieldCreateSchemaResult `json:"result"`Response}

APIShieldCreateSchemaResponse represents the response from the POST api_gateway/user_schemas endpoint.

typeAPIShieldCreateSchemaResultadded inv0.79.0

type APIShieldCreateSchemaResult struct {// APIShieldSchema is the schema that was createdSchemaAPIShieldSchema `json:"schema"`// APIShieldCreateSchemaEvents are non-critical event logs that occurred during processing.EventsAPIShieldCreateSchemaEvents `json:"upload_details"`}

APIShieldCreateSchemaResult represents the successful result of creating a schema in Schema Validation 2.0.

typeAPIShieldDeleteOperationResponseadded inv0.78.0

type APIShieldDeleteOperationResponse struct {Result interface{} `json:"result"`Response}

APIShieldDeleteOperationResponse represents the response from the api_gateway/operations/{id} endpoint (DELETE).

typeAPIShieldDeleteSchemaResponseadded inv0.79.0

type APIShieldDeleteSchemaResponse struct {Result interface{} `json:"result"`Response}

APIShieldDeleteSchemaResponse represents the response from the DELETE api_gateway/user_schemas/{id} endpoint.

typeAPIShieldDiscoveryOperationadded inv0.79.0

type APIShieldDiscoveryOperation struct {// ID represents the ID of the operation, formatted as UUIDIDstring `json:"id"`// Origin represents the API discovery engine(s) that discovered this operationOrigin []APIShieldDiscoveryOrigin `json:"origin"`// State represents the state of operation in API DiscoveryStateAPIShieldDiscoveryState `json:"state"`// LastUpdated timestamp of when this operation was last updatedLastUpdated *time.Time `json:"last_updated"`// Features are additional data about the operationFeatures map[string]any `json:"features,omitempty"`Methodstring `json:"method"`Hoststring `json:"host"`Endpointstring `json:"endpoint"`}

APIShieldDiscoveryOperation is an operation that was discovered by API Discovery.

typeAPIShieldDiscoveryOriginadded inv0.79.0

type APIShieldDiscoveryOriginstring

APIShieldDiscoveryOrigin is an enumeration on what discovery engine an operation was discovered by.

const (// APIShieldDiscoveryOriginML discovered operations that were sourced using ML API Discovery.APIShieldDiscoveryOriginMLAPIShieldDiscoveryOrigin = "ML"// APIShieldDiscoveryOriginSessionIdentifier discovered operations that were sourced using Session Identifier// API Discovery.APIShieldDiscoveryOriginSessionIdentifierAPIShieldDiscoveryOrigin = "SessionIdentifier")

typeAPIShieldDiscoveryStateadded inv0.79.0

type APIShieldDiscoveryStatestring

APIShieldDiscoveryState is an enumeration on states a discovery operation can be in.

const (// APIShieldDiscoveryStateReview discovered operations that are not saved into API Shield Endpoint Management.APIShieldDiscoveryStateReviewAPIShieldDiscoveryState = "review"// APIShieldDiscoveryStateSaved discovered operations that are already saved into API Shield Endpoint Management.APIShieldDiscoveryStateSavedAPIShieldDiscoveryState = "saved"// APIShieldDiscoveryStateIgnored discovered operations that have been marked as ignored.APIShieldDiscoveryStateIgnoredAPIShieldDiscoveryState = "ignored")

typeAPIShieldGetOperationResponseadded inv0.78.0

type APIShieldGetOperationResponse struct {ResultAPIShieldOperation `json:"result"`Response}

APIShieldGetOperationResponse represents the response from the api_gateway/operations/{id} endpoint.

typeAPIShieldGetOperationsResponseadded inv0.78.0

type APIShieldGetOperationsResponse struct {Result     []APIShieldOperation `json:"result"`ResultInfo `json:"result_info"`Response}

APIShieldGetOperationsResponse represents the response from the api_gateway/operations endpoint.

typeAPIShieldGetSchemaResponseadded inv0.79.0

type APIShieldGetSchemaResponse struct {ResultAPIShieldSchema `json:"result"`Response}

APIShieldGetSchemaResponse represents the response from the GET api_gateway/user_schemas/{id} endpoint.

typeAPIShieldListDiscoveryOperationsResponseadded inv0.79.0

type APIShieldListDiscoveryOperationsResponse struct {Result     []APIShieldDiscoveryOperation `json:"result"`ResultInfo `json:"result_info"`Response}

APIShieldListDiscoveryOperationsResponse represents the response from the api_gateway/discovery/operations endpoint.

typeAPIShieldListOperationsFiltersadded inv0.78.0

type APIShieldListOperationsFilters struct {// Hosts filters results to only include the specified hosts.Hosts []string `url:"host,omitempty"`// Methods filters results to only include the specified methods.Methods []string `url:"method,omitempty"`// Endpoint filter results to only include endpoints containing this pattern.Endpointstring `url:"endpoint,omitempty"`}

APIShieldListOperationsFilters represents the filtering query parameters to set when retrieving operations

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/methods/list/

typeAPIShieldListSchemasResponseadded inv0.79.0

type APIShieldListSchemasResponse struct {Result     []APIShieldSchema `json:"result"`ResultInfo `json:"result_info"`Response}

APIShieldListSchemasResponse represents the response from the GET api_gateway/user_schemas endpoint.

typeAPIShieldOperationadded inv0.78.0

type APIShieldOperation struct {APIShieldBasicOperationIDstring         `json:"operation_id"`LastUpdated *time.Time     `json:"last_updated"`Features    map[string]any `json:"features,omitempty"`}

APIShieldOperation represents an operation stored in API Shield Endpoint Management.

typeAPIShieldOperationSchemaValidationSettingsadded inv0.80.0

type APIShieldOperationSchemaValidationSettings struct {// MitigationAction is the mitigation to apply to the operationMitigationAction *string `json:"mitigation_action" url:"-"`}

APIShieldOperationSchemaValidationSettings represents operation level schema validation settings forAPI Shield Schema Validation 2.0.

typeAPIShieldOperationSchemaValidationSettingsResponseadded inv0.80.0

type APIShieldOperationSchemaValidationSettingsResponse struct {ResultAPIShieldOperationSchemaValidationSettings `json:"result"`Response}

APIShieldOperationSchemaValidationSettingsResponse represents the response from the GET api_gateway/operation/{operationID}/schema_validation endpoint.

typeAPIShieldPatchDiscoveryOperationResponseadded inv0.79.0

type APIShieldPatchDiscoveryOperationResponse struct {ResultUpdateAPIShieldDiscoveryOperation `json:"result"`Response}

APIShieldPatchDiscoveryOperationResponse represents the response from the PATCH api_gateway/discovery/operations/{id} endpoint.

typeAPIShieldPatchDiscoveryOperationsResponseadded inv0.79.0

type APIShieldPatchDiscoveryOperationsResponse struct {ResultUpdateAPIShieldDiscoveryOperationsParams `json:"result"`Response}

APIShieldPatchDiscoveryOperationsResponse represents the response from the PATCH api_gateway/discovery/operations endpoint.

typeAPIShieldPatchSchemaResponseadded inv0.79.0

type APIShieldPatchSchemaResponse struct {ResultAPIShieldSchema `json:"result"`Response}

APIShieldPatchSchemaResponse represents the response from the PATCH api_gateway/user_schemas/{id} endpoint.

typeAPIShieldResponseadded inv0.49.0

type APIShieldResponse struct {ResultAPIShield `json:"result"`ResponseResultInfo `json:"result_info"`}

APIShieldResponse represents the response from the api_gateway/configuration endpoint.

typeAPIShieldSchemaadded inv0.79.0

type APIShieldSchema struct {// ID represents the ID of the schemaIDstring `json:"schema_id"`// Name represents the name of the schemaNamestring `json:"name"`// Kind of the schemaKindstring `json:"kind"`// Source is the contents of the schemaSourcestring `json:"source,omitempty"`// CreatedAt is the time the schema was createdCreatedAt *time.Time `json:"created_at,omitempty"`// ValidationEnabled controls if schema is used for validationValidationEnabledbool `json:"validation_enabled,omitempty"`}

APIShieldSchema represents a schema stored in API Shield Schema Validation 2.0.

typeAPIShieldSchemaValidationSettingsadded inv0.80.0

type APIShieldSchemaValidationSettings struct {// DefaultMitigationAction is the mitigation to apply when there is no operation-level// mitigation action definedDefaultMitigationActionstring `json:"validation_default_mitigation_action" url:"-"`// OverrideMitigationAction when set, will apply to all requests regardless of// zone-level/operation-level settingOverrideMitigationAction *string `json:"validation_override_mitigation_action" url:"-"`}

APIShieldSchemaValidationSettings represents zone level schema validation settings forAPI Shield Schema Validation 2.0.

typeAPIShieldSchemaValidationSettingsResponseadded inv0.80.0

type APIShieldSchemaValidationSettingsResponse struct {ResultAPIShieldSchemaValidationSettings `json:"result"`Response}

APIShieldSchemaValidationSettingsResponse represents the response from the GET api_gateway/settings/schema_validation endpoint.

typeAPITokenadded inv0.13.5

type APIToken struct {IDstring             `json:"id,omitempty"`Namestring             `json:"name,omitempty"`Statusstring             `json:"status,omitempty"`IssuedOn   *time.Time         `json:"issued_on,omitempty"`ModifiedOn *time.Time         `json:"modified_on,omitempty"`NotBefore  *time.Time         `json:"not_before,omitempty"`ExpiresOn  *time.Time         `json:"expires_on,omitempty"`Policies   []APITokenPolicies `json:"policies,omitempty"`Condition  *APITokenCondition `json:"condition,omitempty"`Valuestring             `json:"value,omitempty"`}

APIToken is the full API token.

typeAPITokenConditionadded inv0.13.5

type APITokenCondition struct {RequestIP *APITokenRequestIPCondition `json:"request.ip,omitempty"`}

APITokenCondition is the outer structure for request conditions (currentlyonly IPs).

typeAPITokenListResponseadded inv0.13.5

type APITokenListResponse struct {ResponseResult []APIToken `json:"result"`}

APITokenListResponse is the API response for multiple API tokens.

typeAPITokenPermissionGroupsadded inv0.13.5

type APITokenPermissionGroups struct {IDstring   `json:"id"`Namestring   `json:"name,omitempty"`Scopes []string `json:"scopes,omitempty"`}

APITokenPermissionGroups is the permission groups associated with API tokens.

typeAPITokenPermissionGroupsResponseadded inv0.13.5

type APITokenPermissionGroupsResponse struct {ResponseResult []APITokenPermissionGroups `json:"result"`}

APITokenPermissionGroupsResponse is the API response for the availablepermission groups.

typeAPITokenPoliciesadded inv0.13.5

type APITokenPolicies struct {IDstring                     `json:"id,omitempty"`Effectstring                     `json:"effect"`Resources        map[string]interface{}     `json:"resources"`PermissionGroups []APITokenPermissionGroups `json:"permission_groups"`}

APITokenPolicies are policies attached to an API token.

typeAPITokenRequestIPConditionadded inv0.13.5

type APITokenRequestIPCondition struct {In    []string `json:"in,omitempty"`NotIn []string `json:"not_in,omitempty"`}

APITokenRequestIPCondition is the struct for adding an IP restriction to anAPI token.

typeAPITokenResponseadded inv0.13.5

type APITokenResponse struct {ResponseResultAPIToken `json:"result"`}

APITokenResponse is the API response for a single API token.

typeAPITokenRollResponseadded inv0.13.5

type APITokenRollResponse struct {ResponseResultstring `json:"result"`}

APITokenRollResponse is the API response when rolling the token.

typeAPITokenVerifyBodyadded inv0.13.5

type APITokenVerifyBody struct {IDstring    `json:"id"`Statusstring    `json:"status"`NotBeforetime.Time `json:"not_before"`ExpiresOntime.Time `json:"expires_on"`}

APITokenVerifyBody is the API body for verifying a token.

typeAPITokenVerifyResponseadded inv0.13.5

type APITokenVerifyResponse struct {ResponseResultAPITokenVerifyBody `json:"result"`}

APITokenVerifyResponse is the API response for verifying a token.

typeASNInfoadded inv0.44.0

type ASNInfo struct {ASNint      `json:"asn"`Descriptionstring   `json:"description"`Countrystring   `json:"country"`Typestring   `json:"type"`DomainCountint      `json:"domain_count"`TopDomains  []string `json:"top_domains"`}

ASNInfo represents ASN information.

typeAccessAppLauncherCustomizationadded inv0.80.0

type AccessAppLauncherCustomization struct {LandingPageDesignAccessLandingPageDesign `json:"landing_page_design"`LogoURLstring                  `json:"app_launcher_logo_url"`HeaderBackgroundColorstring                  `json:"header_bg_color"`BackgroundColorstring                  `json:"bg_color"`FooterLinks              []AccessFooterLink      `json:"footer_links"`SkipAppLauncherLoginPage *bool                   `json:"skip_app_launcher_login_page,omitempty"`}

typeAccessApplicationadded inv0.9.0

type AccessApplication struct {GatewayRules             []AccessApplicationGatewayRule       `json:"gateway_rules,omitempty"`AllowedIdps              []string                             `json:"allowed_idps,omitempty"`CustomDenyMessagestring                               `json:"custom_deny_message,omitempty"`LogoURLstring                               `json:"logo_url,omitempty"`AUDstring                               `json:"aud,omitempty"`Domainstring                               `json:"domain"`DomainTypeAccessDestinationType                `json:"domain_type,omitempty"`Destinations             []AccessDestination                  `json:"destinations"`TypeAccessApplicationType                `json:"type,omitempty"`SessionDurationstring                               `json:"session_duration,omitempty"`SameSiteCookieAttributestring                               `json:"same_site_cookie_attribute,omitempty"`CustomDenyURLstring                               `json:"custom_deny_url,omitempty"`CustomNonIdentityDenyURLstring                               `json:"custom_non_identity_deny_url,omitempty"`Namestring                               `json:"name"`IDstring                               `json:"id,omitempty"`PrivateAddressstring                               `json:"private_address"`CorsHeaders              *AccessApplicationCorsHeaders        `json:"cors_headers,omitempty"`CreatedAt                *time.Time                           `json:"created_at,omitempty"`UpdatedAt                *time.Time                           `json:"updated_at,omitempty"`SaasApplication          *SaasApplication                     `json:"saas_app,omitempty"`AutoRedirectToIdentity   *bool                                `json:"auto_redirect_to_identity,omitempty"`SkipInterstitial         *bool                                `json:"skip_interstitial,omitempty"`AppLauncherVisible       *bool                                `json:"app_launcher_visible,omitempty"`EnableBindingCookie      *bool                                `json:"enable_binding_cookie,omitempty"`HttpOnlyCookieAttribute  *bool                                `json:"http_only_cookie_attribute,omitempty"`ServiceAuth401Redirect   *bool                                `json:"service_auth_401_redirect,omitempty"`PathCookieAttribute      *bool                                `json:"path_cookie_attribute,omitempty"`AllowAuthenticateViaWarp *bool                                `json:"allow_authenticate_via_warp,omitempty"`OptionsPreflightBypass   *bool                                `json:"options_preflight_bypass,omitempty"`CustomPages              []string                             `json:"custom_pages,omitempty"`Tags                     []string                             `json:"tags,omitempty"`SCIMConfig               *AccessApplicationSCIMConfig         `json:"scim_config,omitempty"`Policies                 []AccessPolicy                       `json:"policies,omitempty"`TargetContexts           *[]AccessInfrastructureTargetContext `json:"target_criteria,omitempty"`AccessAppLauncherCustomization}

AccessApplication represents an Access application.

typeAccessApplicationCorsHeadersadded inv0.12.1

type AccessApplicationCorsHeaders struct {AllowedMethods   []string `json:"allowed_methods,omitempty"`AllowedOrigins   []string `json:"allowed_origins,omitempty"`AllowedHeaders   []string `json:"allowed_headers,omitempty"`AllowAllMethodsbool     `json:"allow_all_methods,omitempty"`AllowAllHeadersbool     `json:"allow_all_headers,omitempty"`AllowAllOriginsbool     `json:"allow_all_origins,omitempty"`AllowCredentialsbool     `json:"allow_credentials,omitempty"`MaxAgeint      `json:"max_age,omitempty"`}

AccessApplicationCorsHeaders represents the CORS HTTP headers for an AccessApplication.

typeAccessApplicationDetailResponseadded inv0.9.0

type AccessApplicationDetailResponse struct {Successbool              `json:"success"`Errors   []string          `json:"errors"`Messages []string          `json:"messages"`ResultAccessApplication `json:"result"`}

AccessApplicationDetailResponse is the API response, containing a singleaccess application.

typeAccessApplicationGatewayRuleadded inv0.30.0

type AccessApplicationGatewayRule struct {IDstring `json:"id,omitempty"`}

typeAccessApplicationHybridAndImplicitOptionsadded inv0.97.0

type AccessApplicationHybridAndImplicitOptions struct {ReturnIDTokenFromAuthorizationEndpoint     *bool `json:"return_id_token_from_authorization_endpoint,omitempty"`ReturnAccessTokenFromAuthorizationEndpoint *bool `json:"return_access_token_from_authorization_endpoint,omitempty"`}

typeAccessApplicationListResponseadded inv0.9.0

type AccessApplicationListResponse struct {Result []AccessApplication `json:"result"`ResponseResultInfo `json:"result_info"`}

AccessApplicationListResponse represents the response from the listaccess applications endpoint.

typeAccessApplicationMultipleScimAuthenticationadded inv0.112.0

type AccessApplicationMultipleScimAuthentication []*AccessApplicationScimAuthenticationSingleJSON

typeAccessApplicationSCIMConfigadded inv0.95.0

type AccessApplicationSCIMConfig struct {Enabled            *bool                                    `json:"enabled,omitempty"`RemoteURIstring                                   `json:"remote_uri,omitempty"`Authentication     *AccessApplicationScimAuthenticationJson `json:"authentication,omitempty"`IdPUIDstring                                   `json:"idp_uid,omitempty"`DeactivateOnDelete *bool                                    `json:"deactivate_on_delete,omitempty"`Mappings           []*AccessApplicationScimMapping          `json:"mappings,omitempty"`}

AccessApplicationSCIMConfig represents the configuration for provisioning to an Access Application via SCIM.

typeAccessApplicationScimAuthenticationadded inv0.95.0

type AccessApplicationScimAuthentication interface {// contains filtered or unexported methods}

typeAccessApplicationScimAuthenticationHttpBasicadded inv0.95.0

type AccessApplicationScimAuthenticationHttpBasic struct {Userstring `json:"user"`Passwordstring `json:"password"`// contains filtered or unexported fields}

typeAccessApplicationScimAuthenticationJsonadded inv0.95.0

type AccessApplicationScimAuthenticationJson struct {ValueAccessApplicationScimAuthentication}

func (*AccessApplicationScimAuthenticationJson)MarshalJSONadded inv0.95.0

func (*AccessApplicationScimAuthenticationJson)UnmarshalJSONadded inv0.95.0

func (a *AccessApplicationScimAuthenticationJson) UnmarshalJSON(buf []byte)error

typeAccessApplicationScimAuthenticationOauth2added inv0.95.0

type AccessApplicationScimAuthenticationOauth2 struct {ClientIDstring   `json:"client_id"`ClientSecretstring   `json:"client_secret"`AuthorizationURLstring   `json:"authorization_url"`TokenURLstring   `json:"token_url"`Scopes           []string `json:"scopes,omitempty"`// contains filtered or unexported fields}

typeAccessApplicationScimAuthenticationOauthBearerTokenadded inv0.95.0

type AccessApplicationScimAuthenticationOauthBearerToken struct {Tokenstring `json:"token"`// contains filtered or unexported fields}

typeAccessApplicationScimAuthenticationSchemeadded inv0.95.0

type AccessApplicationScimAuthenticationSchemestring
const (AccessApplicationScimAuthenticationSchemeHttpBasicAccessApplicationScimAuthenticationScheme = "httpbasic"AccessApplicationScimAuthenticationSchemeOauthBearerTokenAccessApplicationScimAuthenticationScheme = "oauthbearertoken"AccessApplicationScimAuthenticationSchemeOauth2AccessApplicationScimAuthenticationScheme = "oauth2"AccessApplicationScimAuthenticationAccessServiceTokenAccessApplicationScimAuthenticationScheme = "access_service_token")

typeAccessApplicationScimAuthenticationServiceTokenadded inv0.112.0

type AccessApplicationScimAuthenticationServiceToken struct {ClientIDstring `json:"client_id,omitempty" validate:"required_with=ClientSecret,excluded_with=ServiceTokenID"`ClientSecretstring `json:"client_secret,omitempty" validate:"required_with=ClientID,excluded_with=ServiceTokenID"`// contains filtered or unexported fields}

typeAccessApplicationScimAuthenticationSingleJSONadded inv0.112.0

type AccessApplicationScimAuthenticationSingleJSON struct {ValueSingleScimAuthentication}

func (AccessApplicationScimAuthenticationSingleJSON)MarshalJSONadded inv0.112.0

func (*AccessApplicationScimAuthenticationSingleJSON)UnmarshalJSONadded inv0.112.0

typeAccessApplicationScimMappingadded inv0.95.0

type AccessApplicationScimMapping struct {Schemastring                                  `json:"schema"`Enabled          *bool                                   `json:"enabled,omitempty"`Filterstring                                  `json:"filter,omitempty"`TransformJsonatastring                                  `json:"transform_jsonata,omitempty"`Operations       *AccessApplicationScimMappingOperations `json:"operations,omitempty"`Strictnessstring                                  `json:"strictness,omitempty"`}

typeAccessApplicationScimMappingOperationsadded inv0.95.0

type AccessApplicationScimMappingOperations struct {Create *bool `json:"create,omitempty"`Update *bool `json:"update,omitempty"`Delete *bool `json:"delete,omitempty"`}

typeAccessApplicationTypeadded inv0.18.0

type AccessApplicationTypestring

AccessApplicationType represents the application type.

const (SelfHostedAccessApplicationType = "self_hosted"SSHAccessApplicationType = "ssh"VNCAccessApplicationType = "vnc"BisoAccessApplicationType = "biso"AppLauncherAccessApplicationType = "app_launcher"WarpAccessApplicationType = "warp"BookmarkAccessApplicationType = "bookmark"SaasAccessApplicationType = "saas"InfrastructureAccessApplicationType = "infrastructure")

These constants represent all valid application types.

typeAccessApprovalGroupadded inv0.23.0

type AccessApprovalGroup struct {EmailListUuidstring   `json:"email_list_uuid,omitempty"`EmailAddresses  []string `json:"email_addresses,omitempty"`ApprovalsNeededint      `json:"approvals_needed,omitempty"`}

typeAccessAuditLogFilterOptionsadded inv0.12.1

type AccessAuditLogFilterOptions struct {DirectionstringSince     *time.TimeUntil     *time.TimeLimitint}

AccessAuditLogFilterOptions provides the structure of available audit logfilters.

func (AccessAuditLogFilterOptions)Encodeadded inv0.12.1

Encode is a custom method for encoding the filter options into a usable HTTPquery parameter string.

typeAccessAuditLogListResponseadded inv0.12.1

type AccessAuditLogListResponse struct {Result []AccessAuditLogRecord `json:"result"`ResponseResultInfo `json:"result_info"`}

AccessAuditLogListResponse represents the response from the listaccess applications endpoint.

typeAccessAuditLogRecordadded inv0.12.1

type AccessAuditLogRecord struct {UserEmailstring     `json:"user_email"`IPAddressstring     `json:"ip_address"`AppUIDstring     `json:"app_uid"`AppDomainstring     `json:"app_domain"`Actionstring     `json:"action"`Connectionstring     `json:"connection"`Allowedbool       `json:"allowed"`CreatedAt  *time.Time `json:"created_at"`RayIDstring     `json:"ray_id"`}

AccessAuditLogRecord is the structure of a single Access Audit Log entry.

typeAccessAuthContextadded inv0.75.0

type AccessAuthContext struct {IDstring `json:"id"`UIDstring `json:"uid"`ACIDstring `json:"ac_id"`DisplayNamestring `json:"display_name"`Descriptionstring `json:"description"`}

AccessAuthContext represents an Access Azure Identity Provider Auth Context.

typeAccessAuthContextsListResponseadded inv0.75.0

type AccessAuthContextsListResponse struct {Result []AccessAuthContext `json:"result"`Response}

AccessAuthContextsListResponse represents the response from the listAccess Auth Contexts endpoint.

typeAccessBookmarkadded inv0.36.0

type AccessBookmark struct {IDstring     `json:"id,omitempty"`Domainstring     `json:"domain"`Namestring     `json:"name"`LogoURLstring     `json:"logo_url,omitempty"`AppLauncherVisible *bool      `json:"app_launcher_visible,omitempty"`CreatedAt          *time.Time `json:"created_at,omitempty"`UpdatedAt          *time.Time `json:"updated_at,omitempty"`}

AccessBookmark represents an Access bookmark application.

typeAccessBookmarkDetailResponseadded inv0.36.0

type AccessBookmarkDetailResponse struct {ResponseResultAccessBookmark `json:"result"`}

AccessBookmarkDetailResponse is the API response, containing a singleaccess bookmark.

typeAccessBookmarkListResponseadded inv0.36.0

type AccessBookmarkListResponse struct {Result []AccessBookmark `json:"result"`ResponseResultInfo `json:"result_info"`}

AccessBookmarkListResponse represents the response from the listaccess bookmarks endpoint.

typeAccessCACertificateadded inv0.12.1

type AccessCACertificate struct {IDstring `json:"id"`Audstring `json:"aud"`PublicKeystring `json:"public_key"`}

AccessCACertificate is the structure of the CA certificate used forshort-lived certificates.

typeAccessCACertificateListResponseadded inv0.12.1

type AccessCACertificateListResponse struct {ResponseResult []AccessCACertificate `json:"result"`ResultInfo}

AccessCACertificateListResponse represents the response of all CAcertificates within Access.

typeAccessCACertificateResponseadded inv0.12.1

type AccessCACertificateResponse struct {ResponseResultAccessCACertificate `json:"result"`}

AccessCACertificateResponse represents the response of a single CAcertificate.

typeAccessConfigadded inv0.68.0

type AccessConfig struct {// Required when set to true will fail every request that does not arrive// through an access authenticated endpoint.Requiredbool `yaml:"required" json:"required,omitempty"`// TeamName is the organization team name to get the public key certificates for.TeamNamestring `yaml:"teamName" json:"teamName"`// AudTag is the AudTag to verify access JWT against.AudTag []string `yaml:"audTag" json:"audTag"`}

typeAccessCustomPageadded inv0.74.0

type AccessCustomPage struct {// The HTML content of the custom page.CustomHTMLstring               `json:"custom_html,omitempty"`Namestring               `json:"name,omitempty"`AppCountint                  `json:"app_count,omitempty"`TypeAccessCustomPageType `json:"type,omitempty"`UIDstring               `json:"uid,omitempty"`}

typeAccessCustomPageListResponseadded inv0.74.0

type AccessCustomPageListResponse struct {ResponseResult     []AccessCustomPage `json:"result"`ResultInfo `json:"result_info"`}

typeAccessCustomPageResponseadded inv0.74.0

type AccessCustomPageResponse struct {ResponseResultAccessCustomPage `json:"result"`}

typeAccessCustomPageTypeadded inv0.74.0

type AccessCustomPageTypestring
const (ForbiddenAccessCustomPageType = "forbidden"IdentityDeniedAccessCustomPageType = "identity_denied")

typeAccessDestinationadded inv0.111.0

type AccessDestination struct {TypeAccessDestinationType `json:"type"`// URI is required and only used for public destinations.URIstring `json:"uri,omitempty"`// Hostname can only be used for private destinations.Hostnamestring `json:"hostname,omitempty"`// CIDR can only be used for private destinations.CIDRstring `json:"cidr,omitempty"`// PortRange can only be used for private destinations.PortRangestring `json:"port_range,omitempty"`// L4Protocol can only be used for private destinations.L4Protocolstring `json:"l4_protocol,omitempty"`// VnetID can only be used for private destinations.VnetIDstring `json:"vnet_id,omitempty"`}

typeAccessDestinationTypeadded inv0.111.0

type AccessDestinationTypestring
const (AccessDestinationPublicAccessDestinationType = "public"AccessDestinationPrivateAccessDestinationType = "private")

typeAccessFooterLinkadded inv0.80.0

type AccessFooterLink struct {Namestring `json:"name"`URLstring `json:"url"`}

typeAccessGroupadded inv0.10.5

type AccessGroup struct {IDstring     `json:"id,omitempty"`CreatedAt *time.Time `json:"created_at"`UpdatedAt *time.Time `json:"updated_at"`Namestring     `json:"name"`// The include group works like an OR logical operator. The user must// satisfy one of the rules.Include []interface{} `json:"include"`// The exclude group works like a NOT logical operator. The user must// not satisfy all the rules in exclude.Exclude []interface{} `json:"exclude"`// The require group works like a AND logical operator. The user must// satisfy all the rules in require.Require []interface{} `json:"require"`}

AccessGroup defines a group for allowing or disallowing access toone or more Access applications.

typeAccessGroupAccessGroupadded inv0.10.5

type AccessGroupAccessGroup struct {Group struct {IDstring `json:"id"`} `json:"group"`}

AccessGroupAccessGroup is used for managing access based on anaccess group.

typeAccessGroupAnyValidServiceTokenadded inv0.11.2

type AccessGroupAnyValidServiceToken struct {AnyValidServiceToken struct{} `json:"any_valid_service_token"`}

AccessGroupAnyValidServiceToken is used for managing access for all validservice tokens (not restricted).

typeAccessGroupAuthMethodadded inv0.13.1

type AccessGroupAuthMethod struct {AuthMethod struct {AuthMethodstring `json:"auth_method"`} `json:"auth_method"`}

AccessGroupAuthMethod is used for managing access by the "amr"(Authentication Methods References) identifier. For example, anapplication may want to require that users authenticate using a hardwarekey by setting the "auth_method" to "swk". A list of values are listedhere:https://tools.ietf.org/html/rfc8176#section-2. Custom values aresupported as well.

typeAccessGroupAzureadded inv0.11.5

type AccessGroupAzure struct {AzureAD struct {IDstring `json:"id"`IdentityProviderIDstring `json:"identity_provider_id"`} `json:"azureAD"`}

AccessGroupAzure is used to configure access based on a Azure group.

typeAccessGroupAzureAuthContextadded inv0.75.0

type AccessGroupAzureAuthContext struct {AuthContext struct {IDstring `json:"id"`IdentityProviderIDstring `json:"identity_provider_id"`ACIDstring `json:"ac_id"`} `json:"auth_context"`}

AccessGroupAzureAuthContext is used to configure access based on Azure auth contexts.

typeAccessGroupCertificateadded inv0.11.5

type AccessGroupCertificate struct {Certificate struct{} `json:"certificate"`}

AccessGroupCertificate is used for managing access to based on a validmTLS certificate being presented.

typeAccessGroupCertificateCommonNameadded inv0.11.5

type AccessGroupCertificateCommonName struct {CommonName struct {CommonNamestring `json:"common_name"`} `json:"common_name"`}

AccessGroupCertificateCommonName is used for managing access based on acommon name within a certificate.

typeAccessGroupDetailResponseadded inv0.10.5

type AccessGroupDetailResponse struct {Successbool        `json:"success"`Errors   []string    `json:"errors"`Messages []string    `json:"messages"`ResultAccessGroup `json:"result"`}

AccessGroupDetailResponse is the API response, containing a singleaccess group.

typeAccessGroupDevicePostureadded inv0.17.0

type AccessGroupDevicePosture struct {DevicePosture struct {IDstring `json:"integration_uid"`} `json:"device_posture"`}

AccessGroupDevicePosture restricts the application to specific devices.

typeAccessGroupEmailadded inv0.10.5

type AccessGroupEmail struct {Email struct {Emailstring `json:"email"`} `json:"email"`}

AccessGroupEmail is used for managing access based on the email.For example, restrict access to users with the email addresses`test@example.com` or `someone@example.com`.

typeAccessGroupEmailDomainadded inv0.10.5

type AccessGroupEmailDomain struct {EmailDomain struct {Domainstring `json:"domain"`} `json:"email_domain"`}

AccessGroupEmailDomain is used for managing access based on an emaildomain such as `example.com` instead of individual addresses.

typeAccessGroupEmailListadded inv0.84.0

type AccessGroupEmailList struct {EmailList struct {IDstring `json:"id"`} `json:"email_list"`}

AccessGroupEmailList is used for managing access based on the emaillist. For example, restrict access to users with the email addressesin the email list with the ID `1234567890abcdef1234567890abcdef`.

typeAccessGroupEveryoneadded inv0.10.5

type AccessGroupEveryone struct {Everyone struct{} `json:"everyone"`}

AccessGroupEveryone is used for managing access to everyone.

typeAccessGroupExternalEvaluationadded inv0.40.0

type AccessGroupExternalEvaluation struct {ExternalEvaluation struct {EvaluateURLstring `json:"evaluate_url"`KeysURLstring `json:"keys_url"`} `json:"external_evaluation"`}

AccessGroupExternalEvaluation is used for passing user identity to an external url.

typeAccessGroupGSuiteadded inv0.11.5

type AccessGroupGSuite struct {Gsuite struct {Emailstring `json:"email"`IdentityProviderIDstring `json:"identity_provider_id"`} `json:"gsuite"`}

AccessGroupGSuite is used to configure access based on GSuite group.

typeAccessGroupGeoadded inv0.13.3

type AccessGroupGeo struct {Geo struct {CountryCodestring `json:"country_code"`} `json:"geo"`}

AccessGroupGeo is used for managing access based on the country code.

typeAccessGroupGitHubadded inv0.11.5

type AccessGroupGitHub struct {GitHubOrganization struct {Namestring `json:"name"`Teamstring `json:"team,omitempty"`IdentityProviderIDstring `json:"identity_provider_id"`} `json:"github-organization"`}

AccessGroupGitHub is used to configure access based on a GitHub organisation.

typeAccessGroupIPadded inv0.10.5

type AccessGroupIP struct {IP struct {IPstring `json:"ip"`} `json:"ip"`}

AccessGroupIP is used for managing access based in the IP. Itaccepts individual IPs or CIDRs.

typeAccessGroupIPListadded inv0.44.0

type AccessGroupIPList struct {IPList struct {IDstring `json:"id"`} `json:"ip_list"`}

AccessGroupIPList restricts the application to specific teams_list of ips.

typeAccessGroupListResponseadded inv0.10.5

type AccessGroupListResponse struct {Result []AccessGroup `json:"result"`ResponseResultInfo `json:"result_info"`}

AccessGroupListResponse represents the response from the listaccess group endpoint.

typeAccessGroupLoginMethodadded inv0.16.0

type AccessGroupLoginMethod struct {LoginMethod struct {IDstring `json:"id"`} `json:"login_method"`}

AccessGroupLoginMethod restricts the application to specific IdP instances.

typeAccessGroupOktaadded inv0.11.5

type AccessGroupOkta struct {Okta struct {Namestring `json:"name"`IdentityProviderIDstring `json:"identity_provider_id"`} `json:"okta"`}

AccessGroupOkta is used to configure access based on a Okta group.

typeAccessGroupSAMLadded inv0.11.5

type AccessGroupSAML struct {Saml struct {AttributeNamestring `json:"attribute_name"`AttributeValuestring `json:"attribute_value"`IdentityProviderIDstring `json:"identity_provider_id"`} `json:"saml"`}

AccessGroupSAML is used to allow SAML users with a specific attributeconfiguration.

typeAccessGroupServiceTokenadded inv0.11.2

type AccessGroupServiceToken struct {ServiceToken struct {IDstring `json:"token_id"`} `json:"service_token"`}

AccessGroupServiceToken is used for managing access based on a specificservice token.

typeAccessIdentityProvideradded inv0.10.1

type AccessIdentityProvider struct {IDstring                                  `json:"id,omitempty"`Namestring                                  `json:"name"`Typestring                                  `json:"type"`ConfigAccessIdentityProviderConfiguration     `json:"config"`ScimConfigAccessIdentityProviderScimConfiguration `json:"scim_config"`}

AccessIdentityProvider is the structure of the provider object.

typeAccessIdentityProviderConfigurationadded inv0.11.2

type AccessIdentityProviderConfiguration struct {APITokenstring   `json:"api_token,omitempty"`AppsDomainstring   `json:"apps_domain,omitempty"`Attributes                []string `json:"attributes,omitempty"`AuthURLstring   `json:"auth_url,omitempty"`CentrifyAccountstring   `json:"centrify_account,omitempty"`CentrifyAppIDstring   `json:"centrify_app_id,omitempty"`CertsURLstring   `json:"certs_url,omitempty"`ClientIDstring   `json:"client_id,omitempty"`ClientSecretstring   `json:"client_secret,omitempty"`Claims                    []string `json:"claims,omitempty"`Scopes                    []string `json:"scopes,omitempty"`DirectoryIDstring   `json:"directory_id,omitempty"`EmailAttributeNamestring   `json:"email_attribute_name,omitempty"`EmailClaimNamestring   `json:"email_claim_name,omitempty"`IdpPublicCertstring   `json:"idp_public_cert,omitempty"`IssuerURLstring   `json:"issuer_url,omitempty"`OktaAccountstring   `json:"okta_account,omitempty"`OktaAuthorizationServerIDstring   `json:"authorization_server_id,omitempty"`OneloginAccountstring   `json:"onelogin_account,omitempty"`PingEnvIDstring   `json:"ping_env_id,omitempty"`RedirectURLstring   `json:"redirect_url,omitempty"`SignRequestbool     `json:"sign_request,omitempty"`SsoTargetURLstring   `json:"sso_target_url,omitempty"`SupportGroupsbool     `json:"support_groups,omitempty"`TokenURLstring   `json:"token_url,omitempty"`PKCEEnabled               *bool    `json:"pkce_enabled,omitempty"`ConditionalAccessEnabledbool     `json:"conditional_access_enabled,omitempty"`}

AccessIdentityProviderConfiguration is the combined structure of *all*identity provider configuration fields. This is done to simplify the use ofAccess products and their relationship to each other.

API reference:https://developers.cloudflare.com/access/configuring-identity-providers/

typeAccessIdentityProviderResponseadded inv0.71.0

type AccessIdentityProviderResponse struct {ResponseResultAccessIdentityProvider `json:"result"`}

AccessIdentityProviderResponse is the API response for a singleAccess Identity Provider.

typeAccessIdentityProviderScimConfigurationadded inv0.64.0

type AccessIdentityProviderScimConfiguration struct {Enabledbool   `json:"enabled,omitempty"`Secretstring `json:"secret,omitempty"`UserDeprovisionbool   `json:"user_deprovision,omitempty"`SeatDeprovisionbool   `json:"seat_deprovision,omitempty"`GroupMemberDeprovisionbool   `json:"group_member_deprovision,omitempty"`IdentityUpdateBehaviorstring `json:"identity_update_behavior,omitempty"`}

typeAccessIdentityProvidersListResponseadded inv0.10.1

type AccessIdentityProvidersListResponse struct {ResponseResult     []AccessIdentityProvider `json:"result"`ResultInfo `json:"result_info"`}

AccessIdentityProvidersListResponse is the API response for multipleAccess Identity Providers.

typeAccessInfrastructureConnectionRulesadded inv0.106.0

type AccessInfrastructureConnectionRules struct {SSH *AccessInfrastructureConnectionRulesSSH `json:"ssh,omitempty"`}

typeAccessInfrastructureConnectionRulesSSHadded inv0.106.0

type AccessInfrastructureConnectionRulesSSH struct {Usernames       []string `json:"usernames"`AllowEmailAlias *bool    `json:"allow_email_alias"`}

typeAccessInfrastructureProtocoladded inv0.106.0

type AccessInfrastructureProtocolstring
const (AccessInfrastructureSSHAccessInfrastructureProtocol = "SSH"AccessInfrastructureRDPAccessInfrastructureProtocol = "RDP")

typeAccessInfrastructureTargetContextadded inv0.106.0

type AccessInfrastructureTargetContext struct {TargetAttributes map[string][]string          `json:"target_attributes"`Portint                          `json:"port"`ProtocolAccessInfrastructureProtocol `json:"protocol"`}

typeAccessKeysConfigadded inv0.23.0

type AccessKeysConfig struct {KeyRotationIntervalDaysint       `json:"key_rotation_interval_days"`LastKeyRotationAttime.Time `json:"last_key_rotation_at"`DaysUntilNextRotationint       `json:"days_until_next_rotation"`}

typeAccessKeysConfigUpdateRequestadded inv0.23.0

type AccessKeysConfigUpdateRequest struct {KeyRotationIntervalDaysint `json:"key_rotation_interval_days"`}

typeAccessLandingPageDesignadded inv0.80.0

type AccessLandingPageDesign struct {Titlestring `json:"title"`Messagestring `json:"message"`ImageURLstring `json:"image_url"`ButtonColorstring `json:"button_color"`ButtonTextColorstring `json:"button_text_color"`}

typeAccessMutualTLSCertificateadded inv0.13.8

type AccessMutualTLSCertificate struct {IDstring    `json:"id,omitempty"`CreatedAttime.Time `json:"created_at,omitempty"`UpdatedAttime.Time `json:"updated_at,omitempty"`ExpiresOntime.Time `json:"expires_on,omitempty"`Namestring    `json:"name,omitempty"`Fingerprintstring    `json:"fingerprint,omitempty"`Certificatestring    `json:"certificate,omitempty"`AssociatedHostnames []string  `json:"associated_hostnames,omitempty"`}

AccessMutualTLSCertificate is the structure of a single Access Mutual TLScertificate.

typeAccessMutualTLSCertificateDetailResponseadded inv0.13.8

type AccessMutualTLSCertificateDetailResponse struct {ResponseResultAccessMutualTLSCertificate `json:"result"`}

AccessMutualTLSCertificateDetailResponse is the API response for a singleAccess Mutual TLS certificate.

typeAccessMutualTLSCertificateListResponseadded inv0.13.8

type AccessMutualTLSCertificateListResponse struct {ResponseResult     []AccessMutualTLSCertificate `json:"result"`ResultInfo `json:"result_info"`}

AccessMutualTLSCertificateListResponse is the API response for all AccessMutual TLS certificates.

typeAccessMutualTLSHostnameSettingsadded inv0.90.0

type AccessMutualTLSHostnameSettings struct {ChinaNetwork                *bool  `json:"china_network,omitempty"`ClientCertificateForwarding *bool  `json:"client_certificate_forwarding,omitempty"`Hostnamestring `json:"hostname,omitempty"`}

typeAccessOrganizationadded inv0.10.1

type AccessOrganization struct {CreatedAt                      *time.Time                    `json:"created_at"`UpdatedAt                      *time.Time                    `json:"updated_at"`Namestring                        `json:"name"`AuthDomainstring                        `json:"auth_domain"`LoginDesignAccessOrganizationLoginDesign `json:"login_design"`IsUIReadOnly                   *bool                         `json:"is_ui_read_only,omitempty"`UIReadOnlyToggleReasonstring                        `json:"ui_read_only_toggle_reason,omitempty"`UserSeatExpirationInactiveTimestring                        `json:"user_seat_expiration_inactive_time,omitempty"`AutoRedirectToIdentity         *bool                         `json:"auto_redirect_to_identity,omitempty"`SessionDuration                *string                       `json:"session_duration,omitempty"`CustomPagesAccessOrganizationCustomPages `json:"custom_pages,omitempty"`WarpAuthSessionDuration        *string                       `json:"warp_auth_session_duration,omitempty"`AllowAuthenticateViaWarp       *bool                         `json:"allow_authenticate_via_warp,omitempty"`}

AccessOrganization represents an Access organization.

typeAccessOrganizationCustomPagesadded inv0.74.0

type AccessOrganizationCustomPages struct {ForbiddenAccessCustomPageType `json:"forbidden,omitempty"`IdentityDeniedAccessCustomPageType `json:"identity_denied,omitempty"`}

typeAccessOrganizationDetailResponseadded inv0.10.1

type AccessOrganizationDetailResponse struct {Successbool               `json:"success"`Errors   []string           `json:"errors"`Messages []string           `json:"messages"`ResultAccessOrganization `json:"result"`}

AccessOrganizationDetailResponse is the API response, containing asingle access organization.

typeAccessOrganizationListResponseadded inv0.10.1

type AccessOrganizationListResponse struct {ResultAccessOrganization `json:"result"`ResponseResultInfo `json:"result_info"`}

AccessOrganizationListResponse represents the response from the listaccess organization endpoint.

typeAccessOrganizationLoginDesignadded inv0.10.1

type AccessOrganizationLoginDesign struct {BackgroundColorstring `json:"background_color"`LogoPathstring `json:"logo_path"`TextColorstring `json:"text_color"`HeaderTextstring `json:"header_text"`FooterTextstring `json:"footer_text"`}

AccessOrganizationLoginDesign represents the login design options.

typeAccessPolicyadded inv0.9.0

type AccessPolicy struct {IDstring `json:"id,omitempty"`// Precedence is the order in which the policy is executed in an Access application.// As a general rule, lower numbers take precedence over higher numbers.// This field can only be zero when a reusable policy is requested outside the context// of an Access application.Precedenceint        `json:"precedence"`Decisionstring     `json:"decision"`CreatedAt  *time.Time `json:"created_at"`UpdatedAt  *time.Time `json:"updated_at"`Reusable   *bool      `json:"reusable,omitempty"`Namestring     `json:"name"`IsolationRequired             *bool                                `json:"isolation_required,omitempty"`SessionDuration               *string                              `json:"session_duration,omitempty"`PurposeJustificationRequired  *bool                                `json:"purpose_justification_required,omitempty"`PurposeJustificationPrompt    *string                              `json:"purpose_justification_prompt,omitempty"`ApprovalRequired              *bool                                `json:"approval_required,omitempty"`ApprovalGroups                []AccessApprovalGroup                `json:"approval_groups"`InfrastructureConnectionRules *AccessInfrastructureConnectionRules `json:"connection_rules,omitempty"`// The include policy works like an OR logical operator. The user must// satisfy one of the rules.Include []interface{} `json:"include"`// The exclude policy works like a NOT logical operator. The user must// not satisfy all the rules in exclude.Exclude []interface{} `json:"exclude"`// The require policy works like a AND logical operator. The user must// satisfy all the rules in require.Require []interface{} `json:"require"`}

AccessPolicy defines a policy for allowing or disallowing access toone or more Access applications.

typeAccessPolicyDetailResponseadded inv0.9.0

type AccessPolicyDetailResponse struct {Successbool         `json:"success"`Errors   []string     `json:"errors"`Messages []string     `json:"messages"`ResultAccessPolicy `json:"result"`}

AccessPolicyDetailResponse is the API response, containing a singleaccess policy.

typeAccessPolicyListResponseadded inv0.9.0

type AccessPolicyListResponse struct {Result []AccessPolicy `json:"result"`ResponseResultInfo `json:"result_info"`}

AccessPolicyListResponse represents the response from the listaccess policies endpoint.

typeAccessRuleadded inv0.8.1

type AccessRule struct {IDstring                  `json:"id,omitempty"`Notesstring                  `json:"notes,omitempty"`AllowedModes  []string                `json:"allowed_modes,omitempty"`Modestring                  `json:"mode,omitempty"`ConfigurationAccessRuleConfiguration `json:"configuration,omitempty"`ScopeAccessRuleScope         `json:"scope,omitempty"`CreatedOntime.Time               `json:"created_on,omitempty"`ModifiedOntime.Time               `json:"modified_on,omitempty"`}

AccessRule represents a firewall access rule.

typeAccessRuleConfigurationadded inv0.8.1

type AccessRuleConfiguration struct {Targetstring `json:"target,omitempty"`Valuestring `json:"value,omitempty"`}

AccessRuleConfiguration represents the configuration of a firewallaccess rule.

typeAccessRuleListResponseadded inv0.8.1

type AccessRuleListResponse struct {Result []AccessRule `json:"result"`ResponseResultInfo `json:"result_info"`}

AccessRuleListResponse represents the response from the list access rulesendpoint.

typeAccessRuleResponseadded inv0.8.1

type AccessRuleResponse struct {ResultAccessRule `json:"result"`ResponseResultInfo `json:"result_info"`}

AccessRuleResponse represents the response from the firewall accessrule endpoint.

typeAccessRuleScopeadded inv0.8.1

type AccessRuleScope struct {IDstring `json:"id,omitempty"`Emailstring `json:"email,omitempty"`Namestring `json:"name,omitempty"`Typestring `json:"type,omitempty"`}

AccessRuleScope represents the scope of a firewall access rule.

typeAccessServiceTokenadded inv0.10.1

type AccessServiceToken struct {ClientIDstring     `json:"client_id"`CreatedAt  *time.Time `json:"created_at"`ExpiresAt  *time.Time `json:"expires_at"`IDstring     `json:"id"`Namestring     `json:"name"`UpdatedAt  *time.Time `json:"updated_at"`Durationstring     `json:"duration,omitempty"`LastSeenAt *time.Time `json:"last_seen_at,omitempty"`}

AccessServiceToken represents an Access Service Token.

typeAccessServiceTokenCreateResponseadded inv0.10.1

type AccessServiceTokenCreateResponse struct {CreatedAt    *time.Time `json:"created_at"`UpdatedAt    *time.Time `json:"updated_at"`ExpiresAt    *time.Time `json:"expires_at"`IDstring     `json:"id"`Namestring     `json:"name"`ClientIDstring     `json:"client_id"`ClientSecretstring     `json:"client_secret"`Durationstring     `json:"duration,omitempty"`}

AccessServiceTokenCreateResponse is the same API response as the Updateoperation with the exception that the `ClientSecret` is present in aCreate operation.

typeAccessServiceTokenRefreshResponseadded inv0.49.0

type AccessServiceTokenRefreshResponse struct {CreatedAt  *time.Time `json:"created_at"`UpdatedAt  *time.Time `json:"updated_at"`ExpiresAt  *time.Time `json:"expires_at"`IDstring     `json:"id"`Namestring     `json:"name"`ClientIDstring     `json:"client_id"`Durationstring     `json:"duration,omitempty"`LastSeenAt *time.Time `json:"last_seen_at,omitempty"`}

AccessServiceTokenRefreshResponse represents the response from the APIwhen an existing service token is refreshed to last longer.

typeAccessServiceTokenRotateResponseadded inv0.54.0

type AccessServiceTokenRotateResponse struct {CreatedAt    *time.Time `json:"created_at"`UpdatedAt    *time.Time `json:"updated_at"`ExpiresAt    *time.Time `json:"expires_at"`IDstring     `json:"id"`Namestring     `json:"name"`ClientIDstring     `json:"client_id"`ClientSecretstring     `json:"client_secret"`Durationstring     `json:"duration,omitempty"`}

AccessServiceTokenRotateResponse is the same API response as the Createoperation.

typeAccessServiceTokenUpdateResponseadded inv0.10.1

type AccessServiceTokenUpdateResponse struct {CreatedAt  *time.Time `json:"created_at"`UpdatedAt  *time.Time `json:"updated_at"`ExpiresAt  *time.Time `json:"expires_at"`IDstring     `json:"id"`Namestring     `json:"name"`ClientIDstring     `json:"client_id"`Durationstring     `json:"duration,omitempty"`LastSeenAt *time.Time `json:"last_seen_at,omitempty"`}

AccessServiceTokenUpdateResponse represents the response from the APIwhen a new Service Token is updated. This base struct is also used in theCreate as they are very similar responses.

typeAccessServiceTokensCreationDetailResponseadded inv0.10.1

type AccessServiceTokensCreationDetailResponse struct {Successbool                             `json:"success"`Errors   []string                         `json:"errors"`Messages []string                         `json:"messages"`ResultAccessServiceTokenCreateResponse `json:"result"`}

AccessServiceTokensCreationDetailResponse is the API response, containing asingle Access Service Token.

typeAccessServiceTokensDetailResponseadded inv0.10.1

type AccessServiceTokensDetailResponse struct {Successbool               `json:"success"`Errors   []string           `json:"errors"`Messages []string           `json:"messages"`ResultAccessServiceToken `json:"result"`}

AccessServiceTokensDetailResponse is the API response, containing a singleAccess Service Token.

typeAccessServiceTokensListResponseadded inv0.10.1

type AccessServiceTokensListResponse struct {Result []AccessServiceToken `json:"result"`ResponseResultInfo `json:"result_info"`}

AccessServiceTokensListResponse represents the response from the listAccess Service Tokens endpoint.

typeAccessServiceTokensRefreshDetailResponseadded inv0.49.0

type AccessServiceTokensRefreshDetailResponse struct {Successbool                              `json:"success"`Errors   []string                          `json:"errors"`Messages []string                          `json:"messages"`ResultAccessServiceTokenRefreshResponse `json:"result"`}

AccessServiceTokensRefreshDetailResponse is the API response, containing asingle Access Service Token.

typeAccessServiceTokensRotateSecretDetailResponseadded inv0.54.0

type AccessServiceTokensRotateSecretDetailResponse struct {Successbool                             `json:"success"`Errors   []string                         `json:"errors"`Messages []string                         `json:"messages"`ResultAccessServiceTokenRotateResponse `json:"result"`}

AccessServiceTokensRotateSecretDetailResponse is the API response, containing asingle Access Service Token.

typeAccessServiceTokensUpdateDetailResponseadded inv0.10.1

type AccessServiceTokensUpdateDetailResponse struct {Successbool                             `json:"success"`Errors   []string                         `json:"errors"`Messages []string                         `json:"messages"`ResultAccessServiceTokenUpdateResponse `json:"result"`}

AccessServiceTokensUpdateDetailResponse is the API response, containing asingle Access Service Token.

typeAccessTagadded inv0.78.0

type AccessTag struct {Namestring `json:"name,omitempty"`AppCountint    `json:"app_count,omitempty"`}

typeAccessTagListResponseadded inv0.78.0

type AccessTagListResponse struct {ResponseResult     []AccessTag `json:"result"`ResultInfo `json:"result_info"`}

typeAccessTagResponseadded inv0.78.0

type AccessTagResponse struct {ResponseResultAccessTag `json:"result"`}

typeAccessUpdateAccessUserSeatResultadded inv0.81.0

type AccessUpdateAccessUserSeatResult struct {AccessSeat  *bool      `json:"access_seat"`CreatedAt   *time.Time `json:"created_at"`UpdatedAt   *time.Time `json:"updated_at"`GatewaySeat *bool      `json:"gateway_seat"`SeatUIDstring     `json:"seat_uid,omitempty"`}

AccessUpdateAccessUserSeatResult represents a Access User Seat.

typeAccessUseradded inv0.81.0

type AccessUser struct {IDstring `json:"id"`AccessSeat          *bool  `json:"access_seat"`ActiveDeviceCountint    `json:"active_device_count"`CreatedAtstring `json:"created_at"`Emailstring `json:"email"`GatewaySeat         *bool  `json:"gateway_seat"`LastSuccessfulLoginstring `json:"last_successful_login"`Namestring `json:"name"`SeatUIDstring `json:"seat_uid"`UIDstring `json:"uid"`UpdatedAtstring `json:"updated_at"`}

typeAccessUserActiveSessionMetadataadded inv0.81.0

type AccessUserActiveSessionMetadata struct {Apps    map[string]AccessUserActiveSessionMetadataApp `json:"apps"`Expiresint64                                         `json:"expires"`IATint64                                         `json:"iat"`Noncestring                                        `json:"nonce"`TTLint64                                         `json:"ttl"`}

typeAccessUserActiveSessionMetadataAppadded inv0.81.0

type AccessUserActiveSessionMetadataApp struct {Hostnamestring `json:"hostname"`Namestring `json:"name"`Typestring `json:"type"`UIDstring `json:"uid"`}

typeAccessUserActiveSessionResultadded inv0.81.0

type AccessUserActiveSessionResult struct {Expirationint64                           `json:"expiration"`MetadataAccessUserActiveSessionMetadata `json:"metadata"`Namestring                          `json:"name"`}

typeAccessUserActiveSessionsResponseadded inv0.81.0

type AccessUserActiveSessionsResponse struct {Result     []AccessUserActiveSessionResult `json:"result"`ResultInfo `json:"result_info"`Response}

typeAccessUserDevicePostureadded inv0.81.0

type AccessUserDevicePosture struct {CheckAccessUserDevicePostureCheck `json:"check"`Data        map[string]interface{}       `json:"data"`Descriptionstring                       `json:"description"`Errorstring                       `json:"error"`IDstring                       `json:"id"`RuleNamestring                       `json:"rule_name"`Success     *bool                        `json:"success"`Timestampstring                       `json:"timestamp"`Typestring                       `json:"type"`}

typeAccessUserDevicePostureCheckadded inv0.81.0

type AccessUserDevicePostureCheck struct {Exists *bool  `json:"exists"`Pathstring `json:"path"`}

typeAccessUserDeviceSessionadded inv0.81.0

type AccessUserDeviceSession struct {LastAuthenticatedint64 `json:"last_authenticated"`}

typeAccessUserFailedLoginMetadataadded inv0.81.0

type AccessUserFailedLoginMetadata struct {AppNamestring `json:"app_name"`Audstring `json:"aud"`Datetimestring `json:"datetime"`RayIDstring `json:"ray_id"`UserEmailstring `json:"user_email"`UserUUIDstring `json:"user_uuid"`}

typeAccessUserFailedLoginResultadded inv0.81.0

type AccessUserFailedLoginResult struct {Expirationint64                         `json:"expiration"`MetadataAccessUserFailedLoginMetadata `json:"metadata"`}

typeAccessUserFailedLoginsResponseadded inv0.81.0

type AccessUserFailedLoginsResponse struct {Result     []AccessUserFailedLoginResult `json:"result"`ResultInfo `json:"result_info"`Response}

typeAccessUserIDPadded inv0.81.0

type AccessUserIDP struct {IDstring `json:"id"`Typestring `json:"type"`}

typeAccessUserIdentityGeoadded inv0.81.0

type AccessUserIdentityGeo struct {Countrystring `json:"country"`}

typeAccessUserLastSeenIdentityResponseadded inv0.81.0

type AccessUserLastSeenIdentityResponse struct {ResultAccessUserLastSeenIdentityResult `json:"result"`ResultInfoResultInfo                       `json:"result_info"`Response}

typeAccessUserLastSeenIdentityResultadded inv0.81.0

type AccessUserLastSeenIdentityResult struct {AccountIDstring                             `json:"account_id"`AuthStatusstring                             `json:"auth_status"`CommonNamestring                             `json:"common_name"`DeviceIDstring                             `json:"device_id"`DevicePosture      map[string]AccessUserDevicePosture `json:"devicePosture"`DeviceSessions     map[string]AccessUserDeviceSession `json:"device_sessions"`Emailstring                             `json:"email"`GeoAccessUserIdentityGeo              `json:"geo"`IATint64                              `json:"iat"`IDPAccessUserIDP                      `json:"idp"`IPstring                             `json:"ip"`IsGateway          *bool                              `json:"is_gateway"`IsWarp             *bool                              `json:"is_warp"`MtlsAuthAccessUserMTLSAuth                 `json:"mtls_auth"`ServiceTokenIDstring                             `json:"service_token_id"`ServiceTokenStatus *bool                              `json:"service_token_status"`UserUUIDstring                             `json:"user_uuid"`Versionint                                `json:"version"`}

typeAccessUserLastSeenIdentitySessionResponseadded inv0.81.0

type AccessUserLastSeenIdentitySessionResponse struct {ResultGetAccessUserLastSeenIdentityResult `json:"result"`ResultInfoResultInfo                          `json:"result_info"`Response}

typeAccessUserListResponseadded inv0.81.0

type AccessUserListResponse struct {Result     []AccessUser `json:"result"`ResultInfo `json:"result_info"`Response}

typeAccessUserMTLSAuthadded inv0.81.0

type AccessUserMTLSAuth struct {AuthStatusstring `json:"auth_status"`CertIssuerDNstring `json:"cert_issuer_dn"`CertIssuerSKIstring `json:"cert_issuer_ski"`CertPresented *bool  `json:"cert_presented"`CertSerialstring `json:"cert_serial"`}

typeAccessUserParamsadded inv0.81.0

type AccessUserParams struct {ResultInfo}

typeAccount

type Account struct {IDstring           `json:"id,omitempty"`Namestring           `json:"name,omitempty"`Typestring           `json:"type,omitempty"`CreatedOntime.Time        `json:"created_on,omitempty"`Settings  *AccountSettings `json:"settings,omitempty"`}

Account represents the root object that owns resources.

typeAccountDetailResponseadded inv0.9.0

type AccountDetailResponse struct {Successbool     `json:"success"`Errors   []string `json:"errors"`Messages []string `json:"messages"`ResultAccount  `json:"result"`}

AccountDetailResponse is the API response, containing a single Account.

typeAccountListResponse

type AccountListResponse struct {Result []Account `json:"result"`ResponseResultInfo `json:"result_info"`}

AccountListResponse represents the response from the list accounts endpoint.

typeAccountMember

type AccountMember struct {IDstring                   `json:"id"`Codestring                   `json:"code"`UserAccountMemberUserDetails `json:"user"`Statusstring                   `json:"status"`Roles    []AccountRole            `json:"roles,omitempty"`Policies []Policy                 `json:"policies,omitempty"`}

AccountMember is the definition of a member of an account.

typeAccountMemberDetailResponseadded inv0.9.0

type AccountMemberDetailResponse struct {Successbool          `json:"success"`Errors   []string      `json:"errors"`Messages []string      `json:"messages"`ResultAccountMember `json:"result"`}

AccountMemberDetailResponse is the API response, containing a singleaccount member.

typeAccountMemberInvitationadded inv0.9.0

type AccountMemberInvitation struct {Emailstring   `json:"email"`Roles    []string `json:"roles,omitempty"`Policies []Policy `json:"policies,omitempty"`Statusstring   `json:"status,omitempty"`}

AccountMemberInvitation represents the invitation for a new member tothe account.

typeAccountMemberUserDetailsadded inv0.9.0

type AccountMemberUserDetails struct {IDstring `json:"id"`FirstNamestring `json:"first_name"`LastNamestring `json:"last_name"`Emailstring `json:"email"`TwoFactorAuthenticationEnabledbool   `json:"two_factor_authentication_enabled"`}

AccountMemberUserDetails outlines all the personal information abouta member.

typeAccountMembersListResponseadded inv0.9.0

type AccountMembersListResponse struct {Result []AccountMember `json:"result"`ResponseResultInfo `json:"result_info"`}

AccountMembersListResponse represents the response from the listaccount members endpoint.

typeAccountResponseadded inv0.9.0

type AccountResponse struct {ResultAccount `json:"result"`ResponseResultInfo `json:"result_info"`}

AccountResponse represents the response from the accounts endpoint for asingle account ID.

typeAccountRoleadded inv0.9.0

type AccountRole struct {IDstring                           `json:"id"`Namestring                           `json:"name"`Descriptionstring                           `json:"description"`Permissions map[string]AccountRolePermission `json:"permissions"`}

AccountRole defines the roles that a member can have attached.

typeAccountRoleDetailResponseadded inv0.9.0

type AccountRoleDetailResponse struct {Successbool        `json:"success"`Errors   []string    `json:"errors"`Messages []string    `json:"messages"`ResultAccountRole `json:"result"`}

AccountRoleDetailResponse is the API response, containing a singleaccount role.

typeAccountRolePermissionadded inv0.9.0

type AccountRolePermission struct {Readbool `json:"read"`Editbool `json:"edit"`}

AccountRolePermission is the shared structure for all permissionsthat can be assigned to a member.

typeAccountRolesListResponseadded inv0.9.0

type AccountRolesListResponse struct {Result []AccountRole `json:"result"`ResponseResultInfo `json:"result_info"`}

AccountRolesListResponse represents the list response from theaccount roles.

typeAccountSettings

type AccountSettings struct {EnforceTwoFactorbool `json:"enforce_twofactor"`}

AccountSettings outlines the available options for an account.

typeAccountsListParamsadded inv0.40.0

type AccountsListParams struct {Namestring `url:"name,omitempty"`PaginationOptions}

AccountsListParams holds the filterable options for Accounts.

typeAdaptiveRoutingadded inv0.51.0

type AdaptiveRouting struct {// FailoverAcrossPools extends zero-downtime failover of requests to healthy origins// from alternate pools, when no healthy alternate exists in the same pool, according// to the failover order defined by traffic and origin steering.// When set false (the default) zero-downtime failover will only occur between origins// within the same pool. See SessionAffinityAttributes for control over when sessions// are broken or reassigned.FailoverAcrossPools *bool `json:"failover_across_pools,omitempty"`}

AdaptiveRouting controls features that modify the routing of requeststo pools and origins in response to dynamic conditions, such as duringthe interval between active health monitoring requests.For example, zero-downtime failover occurs immediately when an originbecomes unavailable due to HTTP 521, 522, or 523 response codes.If there is another healthy origin in the same pool, the request isretried once against this alternate origin.

typeAdditionalInformationadded inv0.44.0

type AdditionalInformation struct {SuspectedMalwareFamilystring `json:"suspected_malware_family"`}

AdditionalInformation represents any additional information for a domain.

typeAddressMapadded inv0.63.0

type AddressMap struct {IDstring                 `json:"id"`Description  *string                `json:"description,omitempty"`DefaultSNI   *string                `json:"default_sni"`Enabled      *bool                  `json:"enabled"`Deletable    *bool                  `json:"can_delete"`CanModifyIPs *bool                  `json:"can_modify_ips"`Memberships  []AddressMapMembership `json:"memberships"`IPs          []AddressMapIP         `json:"ips"`CreatedAttime.Time              `json:"created_at"`ModifiedAttime.Time              `json:"modified_at"`}

AddressMap contains information about an address map.

typeAddressMapIPadded inv0.63.0

type AddressMapIP struct {IPstring    `json:"ip"`CreatedAttime.Time `json:"created_at"`}

typeAddressMapMembershipadded inv0.63.0

type AddressMapMembership struct {Identifierstring                   `json:"identifier"`KindAddressMapMembershipKind `json:"kind"`Deletable  *bool                    `json:"can_delete"`CreatedAttime.Time                `json:"created_at"`}

typeAddressMapMembershipContaineradded inv0.63.0

type AddressMapMembershipContainer struct {Identifierstring                   `json:"identifier"`KindAddressMapMembershipKind `json:"kind"`}

func (*AddressMapMembershipContainer)URLFragmentadded inv0.63.0

func (ammb *AddressMapMembershipContainer) URLFragment()string

typeAddressMapMembershipKindadded inv0.63.0

type AddressMapMembershipKindstring
const (AddressMapMembershipZoneAddressMapMembershipKind = "zone"AddressMapMembershipAccountAddressMapMembershipKind = "account")

typeAdvertisementStatusadded inv0.11.7

type AdvertisementStatus struct {Advertisedbool       `json:"advertised"`AdvertisedModifiedAt *time.Time `json:"advertised_modified_at"`}

AdvertisementStatus contains information about the BGP status of an IP prefix.

typeAdvertisementStatusUpdateRequestadded inv0.11.7

type AdvertisementStatusUpdateRequest struct {Advertisedbool `json:"advertised"`}

AdvertisementStatusUpdateRequest contains information about bgp status updates.

typeAlertHistoryFilteradded inv0.40.0

type AlertHistoryFilter struct {TimeRangePaginationOptions}

AlertHistoryFilter is an object for filtering the alert history response from the api.

typeApplicationadded inv0.44.0

type Application struct {IDint    `json:"id"`Namestring `json:"name"`}

typeArgoDetailsResponseadded inv0.9.0

type ArgoDetailsResponse struct {ResultArgoFeatureSetting `json:"result"`Response}

ArgoDetailsResponse is the API response for the argo smart routingand tiered caching response.

typeArgoFeatureSettingadded inv0.9.0

type ArgoFeatureSetting struct {Editablebool      `json:"editable,omitempty"`IDstring    `json:"id,omitempty"`ModifiedOntime.Time `json:"modified_on,omitempty"`Valuestring    `json:"value"`}

ArgoFeatureSetting is the structure of the API object for theargo smart routing and tiered caching settings.

typeArgoTunneladded inv0.13.7

type ArgoTunnel struct {IDstring                 `json:"id,omitempty"`Namestring                 `json:"name,omitempty"`Secretstring                 `json:"tunnel_secret,omitempty"`CreatedAt   *time.Time             `json:"created_at,omitempty"`DeletedAt   *time.Time             `json:"deleted_at,omitempty"`Connections []ArgoTunnelConnection `json:"connections,omitempty"`}

ArgoTunnel is the struct definition of a tunnel.

typeArgoTunnelConnectionadded inv0.13.7

type ArgoTunnelConnection struct {ColoNamestring `json:"colo_name"`UUIDstring `json:"uuid"`IsPendingReconnectbool   `json:"is_pending_reconnect"`}

ArgoTunnelConnection represents the connections associated with a tunnel.

typeArgoTunnelDetailResponseadded inv0.13.7

type ArgoTunnelDetailResponse struct {ResultArgoTunnel `json:"result"`Response}

ArgoTunnelDetailResponse is used for representing the API response payload fora single tunnel.

typeArgoTunnelsDetailResponseadded inv0.13.7

type ArgoTunnelsDetailResponse struct {Result []ArgoTunnel `json:"result"`Response}

ArgoTunnelsDetailResponse is used for representing the API response payload formultiple tunnels.

typeAttachWorkersDomainParamsadded inv0.55.0

type AttachWorkersDomainParams struct {IDstring `json:"id,omitempty"`ZoneIDstring `json:"zone_id,omitempty"`ZoneNamestring `json:"zone_name,omitempty"`Hostnamestring `json:"hostname,omitempty"`Servicestring `json:"service,omitempty"`Environmentstring `json:"environment,omitempty"`}

typeAuditLogadded inv0.9.0

type AuditLog struct {ActionAuditLogAction         `json:"action"`ActorAuditLogActor          `json:"actor"`IDstring                 `json:"id"`Metadata     map[string]interface{} `json:"metadata"`NewValuestring                 `json:"newValue"`NewValueJSON map[string]interface{} `json:"newValueJson"`OldValuestring                 `json:"oldValue"`OldValueJSON map[string]interface{} `json:"oldValueJson"`OwnerAuditLogOwner          `json:"owner"`ResourceAuditLogResource       `json:"resource"`Whentime.Time              `json:"when"`}

AuditLog is an resource that represents an update in the cloudflare dash.

typeAuditLogActionadded inv0.9.0

type AuditLogAction struct {Resultbool   `json:"result"`Typestring `json:"type"`}

AuditLogAction is a member of AuditLog, the action that was taken.

typeAuditLogActoradded inv0.9.0

type AuditLogActor struct {Emailstring `json:"email"`IDstring `json:"id"`IPstring `json:"ip"`Typestring `json:"type"`}

AuditLogActor is a member of AuditLog, who performed the action.

typeAuditLogFilteradded inv0.9.0

type AuditLogFilter struct {IDstringActorIPstringActorEmailstringHideUserLogsboolDirectionstringZoneNamestringSincestringBeforestringPerPageintPageint}

AuditLogFilter is an object for filtering the audit log response from the api.

func (AuditLogFilter)ToQueryadded inv0.11.2

func (aAuditLogFilter) ToQuery()url.Values

ToQuery turns an audit log filter in to an HTTP Query Paramlist, suitable for use in a url.URL.RawQuery. It will not include emptymembers of the struct in the query parameters.

typeAuditLogOwneradded inv0.9.0

type AuditLogOwner struct {IDstring `json:"id"`}

AuditLogOwner is a member of AuditLog, who owns this audit log.

typeAuditLogResourceadded inv0.9.0

type AuditLogResource struct {IDstring `json:"id"`Typestring `json:"type"`}

AuditLogResource is a member of AuditLog, what was the action performed on.

typeAuditLogResponseadded inv0.9.0

type AuditLogResponse struct {ResponseResponseResult     []AuditLog `json:"result"`ResultInfo `json:"result_info"`}

AuditLogResponse is the response returned from the cloudflare v4 api.

typeAuditSSHRuleSettingsadded inv0.63.0

type AuditSSHRuleSettings struct {CommandLoggingbool `json:"command_logging"`}

typeAuditSSHSettingsadded inv0.79.0

type AuditSSHSettings struct {PublicKeystring     `json:"public_key"`SeedUUIDstring     `json:"seed_id"`IsPublicKeyValidbool       `json:"is_public_key_valid,omitempty"`CreatedAt        *time.Time `json:"created_at"`UpdatedAt        *time.Time `json:"updated_at"`}

TeamsList represents a Teams List.

typeAuditSSHSettingsResponseadded inv0.79.0

type AuditSSHSettingsResponse struct {ResultAuditSSHSettings `json:"result"`ResponseResultInfo `json:"result_info"`}

typeAuthIdCharacteristicsadded inv0.49.0

type AuthIdCharacteristics struct {Typestring `json:"type"`Namestring `json:"name"`}

AuthIdCharacteristics a single option fromconfiguration?properties=auth_id_characteristics.

typeAuthenticatedOriginPullsadded inv0.12.2

type AuthenticatedOriginPulls struct {IDstring    `json:"id"`Valuestring    `json:"value"`Editablebool      `json:"editable"`ModifiedOntime.Time `json:"modified_on"`}

AuthenticatedOriginPulls represents global AuthenticatedOriginPulls (tls_client_auth) metadata.

typeAuthenticatedOriginPullsResponseadded inv0.12.2

type AuthenticatedOriginPullsResponse struct {ResponseResultAuthenticatedOriginPulls `json:"result"`}

AuthenticatedOriginPullsResponse represents the response from the global AuthenticatedOriginPulls (tls_client_auth) details endpoint.

typeAuthenticationErroradded inv0.36.0

type AuthenticationError struct {// contains filtered or unexported fields}

AuthenticationError is for HTTP 401 responses.

funcNewAuthenticationErroradded inv0.48.0

func NewAuthenticationError(e *Error)AuthenticationError

func (AuthenticationError)Erroradded inv0.36.0

func (AuthenticationError)ErrorCodesadded inv0.36.0

func (eAuthenticationError) ErrorCodes() []int

func (AuthenticationError)ErrorMessagesadded inv0.36.0

func (eAuthenticationError) ErrorMessages() []string

func (AuthenticationError)Errorsadded inv0.36.0

func (AuthenticationError)InternalErrorCodeIsadded inv0.48.0

func (eAuthenticationError) InternalErrorCodeIs(codeint)bool

func (AuthenticationError)RayIDadded inv0.36.0

func (AuthenticationError)Typeadded inv0.36.0

func (AuthenticationError)Unwrapadded inv0.103.0

func (eAuthenticationError) Unwrap()error

typeAuthorizationErroradded inv0.36.0

type AuthorizationError struct {// contains filtered or unexported fields}

AuthorizationError is for HTTP 403 responses.

funcNewAuthorizationErroradded inv0.48.0

func NewAuthorizationError(e *Error)AuthorizationError

func (AuthorizationError)Erroradded inv0.36.0

func (eAuthorizationError) Error()string

func (AuthorizationError)ErrorCodesadded inv0.36.0

func (eAuthorizationError) ErrorCodes() []int

func (AuthorizationError)ErrorMessagesadded inv0.36.0

func (eAuthorizationError) ErrorMessages() []string

func (AuthorizationError)Errorsadded inv0.36.0

func (eAuthorizationError) Errors() []ResponseInfo

func (AuthorizationError)InternalErrorCodeIsadded inv0.48.0

func (eAuthorizationError) InternalErrorCodeIs(codeint)bool

func (AuthorizationError)RayIDadded inv0.36.0

func (eAuthorizationError) RayID()string

func (AuthorizationError)Typeadded inv0.36.0

func (AuthorizationError)Unwrapadded inv0.103.0

func (eAuthorizationError) Unwrap()error

typeAvailableZonePlansResponseadded inv0.7.2

type AvailableZonePlansResponse struct {ResponseResult []ZonePlan `json:"result"`ResultInfo}

AvailableZonePlansResponse represents the response from the Available Plans endpoint.

typeAvailableZoneRatePlansResponseadded inv0.7.4

type AvailableZoneRatePlansResponse struct {ResponseResult     []ZoneRatePlan `json:"result"`ResultInfo `json:"result_info"`}

AvailableZoneRatePlansResponse represents the response from the Available Rate Plans endpoint.

typeBehavioradded inv0.95.0

type Behavior struct {Namestring    `json:"name,omitempty"`Descriptionstring    `json:"description,omitempty"`RiskLevelRiskLevel `json:"risk_level"`Enabled     *bool     `json:"enabled"`}

Behavior represents a single zt risk behavior config.

typeBehaviorResponseadded inv0.95.0

type BehaviorResponse struct {Successbool      `json:"success"`ResultBehaviors `json:"result"`Errors   []string  `json:"errors"`Messages []string  `json:"messages"`}

BehaviorResponse represents the response from the zt risk scoring endpointand contains risk behaviors for an account.

typeBehaviorsadded inv0.95.0

type Behaviors struct {Behaviors map[string]Behavior `json:"behaviors"`}

Wrapper used to have full-fidelity repro of json structure.

typeBelongsToRefadded inv0.44.0

type BelongsToRef struct {IDstring `json:"id"`Valueint    `json:"value"`Typestring `json:"type"`Countrystring `json:"country"`Descriptionstring `json:"description"`}

BelongsToRef represents information about who owns an IP address.

typeBotManagementadded inv0.75.0

type BotManagement struct {EnableJS                     *bool   `json:"enable_js,omitempty"`FightMode                    *bool   `json:"fight_mode,omitempty"`SBFMDefinitelyAutomated      *string `json:"sbfm_definitely_automated,omitempty"`SBFMLikelyAutomated          *string `json:"sbfm_likely_automated,omitempty"`SBFMVerifiedBots             *string `json:"sbfm_verified_bots,omitempty"`SBFMStaticResourceProtection *bool   `json:"sbfm_static_resource_protection,omitempty"`OptimizeWordpress            *bool   `json:"optimize_wordpress,omitempty"`SuppressSessionScore         *bool   `json:"suppress_session_score,omitempty"`AutoUpdateModel              *bool   `json:"auto_update_model,omitempty"`UsingLatestModel             *bool   `json:"using_latest_model,omitempty"`AIBotsProtection             *string `json:"ai_bots_protection,omitempty"`}

BotManagement represents the bots config for a zone.

typeBotManagementResponseadded inv0.75.0

type BotManagementResponse struct {ResultBotManagement `json:"result"`Response}

BotManagementResponse represents the response from the bot_management endpoint.

typeBrowserIsolationadded inv0.30.0

type BrowserIsolation struct {UrlBrowserIsolationEnabled *bool `json:"url_browser_isolation_enabled,omitempty"`NonIdentityEnabled         *bool `json:"non_identity_enabled,omitempty"`}

typeCacheReserveadded inv0.68.0

type CacheReserve struct {IDstring    `json:"id,omitempty"`ModifiedOntime.Time `json:"modified_on,omitempty"`Valuestring    `json:"value"`}

CacheReserve is the structure of the API object for the cache reservesetting.

typeCacheReserveDetailsResponseadded inv0.68.0

type CacheReserveDetailsResponse struct {ResultCacheReserve `json:"result"`Response}

CacheReserveDetailsResponse is the API response for the cache reservesetting.

typeCategoriesadded inv0.44.0

type Categories struct {IDint    `json:"id"`Namestring `json:"name"`}

Categories represents categories for a domain.

typeCategorizationsadded inv0.44.0

type Categorizations struct {Categories []Categories `json:"categories"`Startstring       `json:"start"`Endstring       `json:"end"`}

Categorizations represents the categories and when those categories were set.

typeCertificateLocationsadded inv0.101.0

type CertificateLocations struct {Paths       []string `json:"paths,omitempty"`TrustStores []string `json:"trust_stores,omitempty"`}

Locations struct for client certificate rule v2.

typeCertificatePackadded inv0.13.0

type CertificatePack struct {IDstring                       `json:"id"`Typestring                       `json:"type"`Hosts                []string                     `json:"hosts"`Certificates         []CertificatePackCertificate `json:"certificates"`PrimaryCertificatestring                       `json:"primary_certificate"`Statusstring                       `json:"status"`ValidationRecords    []SSLValidationRecord        `json:"validation_records,omitempty"`ValidationErrors     []SSLValidationError         `json:"validation_errors,omitempty"`ValidationMethodstring                       `json:"validation_method"`ValidityDaysint                          `json:"validity_days"`CertificateAuthoritystring                       `json:"certificate_authority"`CloudflareBrandingbool                         `json:"cloudflare_branding"`}

CertificatePack is the overarching structure of a certificate pack response.

typeCertificatePackCertificateadded inv0.13.0

type CertificatePackCertificate struct {IDstring                         `json:"id"`Hosts           []string                       `json:"hosts"`Issuerstring                         `json:"issuer"`Signaturestring                         `json:"signature"`Statusstring                         `json:"status"`BundleMethodstring                         `json:"bundle_method"`GeoRestrictionsCertificatePackGeoRestrictions `json:"geo_restrictions"`ZoneIDstring                         `json:"zone_id"`UploadedOntime.Time                      `json:"uploaded_on"`ModifiedOntime.Time                      `json:"modified_on"`ExpiresOntime.Time                      `json:"expires_on"`Priorityint                            `json:"priority"`}

CertificatePackCertificate is the base structure of a TLS certificate that iscontained within a certificate pack.

typeCertificatePackGeoRestrictionsadded inv0.13.0

type CertificatePackGeoRestrictions struct {Labelstring `json:"label"`}

CertificatePackGeoRestrictions is for the structure of the geographicrestrictions for a TLS certificate.

typeCertificatePackRequestadded inv0.13.0

type CertificatePackRequest struct {Typestring   `json:"type"`Hosts                []string `json:"hosts"`ValidationMethodstring   `json:"validation_method"`ValidityDaysint      `json:"validity_days"`CertificateAuthoritystring   `json:"certificate_authority"`CloudflareBrandingbool     `json:"cloudflare_branding"`}

CertificatePackRequest is used for requesting a new certificate.

typeCertificatePacksDetailResponseadded inv0.13.0

type CertificatePacksDetailResponse struct {ResponseResultCertificatePack `json:"result"`}

CertificatePacksDetailResponse contains a single certificate pack in theresponse.

typeCertificatePacksResponseadded inv0.13.0

type CertificatePacksResponse struct {ResponseResult []CertificatePack `json:"result"`}

CertificatePacksResponse is for responses where multiple certificates areexpected.

typeCloudConnectorRuleadded inv0.100.0

type CloudConnectorRule struct {IDstring                       `json:"id"`Enabled     *bool                        `json:"enabled,omitempty"`Expressionstring                       `json:"expression"`Providerstring                       `json:"provider"`ParametersCloudConnectorRuleParameters `json:"parameters"`Descriptionstring                       `json:"description"`}

typeCloudConnectorRuleParametersadded inv0.100.0

type CloudConnectorRuleParameters struct {Hoststring `json:"host"`}

typeCloudConnectorRulesResponseadded inv0.100.0

type CloudConnectorRulesResponse struct {ResponseResult []CloudConnectorRule `json:"result"`}

typeConfigadded inv0.57.0

type Config struct {TlsSockAddrstring `json:"tls_sockaddr,omitempty"`Sha256string `json:"sha256,omitempty"`}

typeConnectionadded inv0.45.0

type Connection struct {IDstring             `json:"id,omitempty"`Features      []string           `json:"features,omitempty"`Versionstring             `json:"version,omitempty"`Archstring             `json:"arch,omitempty"`Connections   []TunnelConnection `json:"conns,omitempty"`RunAt         *time.Time         `json:"run_at,omitempty"`ConfigVersionint                `json:"config_version,omitempty"`}

Connection is the struct definition of a connection.

typeContentCategoriesadded inv0.44.0

type ContentCategories struct {IDint    `json:"id"`SuperCategoryIDint    `json:"super_category_id"`Namestring `json:"name"`}

ContentCategories represents the categories for a domain.

typeContentScanningAddCustomExpressionsParamsadded inv0.112.0

type ContentScanningAddCustomExpressionsParams struct {Payloads []ContentScanningCustomPayload}

typeContentScanningAddCustomExpressionsResponseadded inv0.112.0

type ContentScanningAddCustomExpressionsResponse struct {ResponseResult []ContentScanningCustomExpression `json:"result"`}

typeContentScanningCustomExpressionadded inv0.112.0

type ContentScanningCustomExpression struct {IDstring `json:"id"`Payloadstring `json:"payload"`}

typeContentScanningCustomPayloadadded inv0.112.0

type ContentScanningCustomPayload struct {Payloadstring `json:"payload"`}

typeContentScanningDeleteCustomExpressionsParamsadded inv0.112.0

type ContentScanningDeleteCustomExpressionsParams struct {IDstring}

typeContentScanningDeleteCustomExpressionsResponseadded inv0.112.0

type ContentScanningDeleteCustomExpressionsResponse struct {ResponseResult []ContentScanningCustomExpression `json:"result"`}

typeContentScanningDisableParamsadded inv0.112.0

type ContentScanningDisableParams struct{}

typeContentScanningDisableResponseadded inv0.112.0

type ContentScanningDisableResponse struct {ResponseResult *ContentScanningStatusResult `json:"result"`// nil}

typeContentScanningEnableParamsadded inv0.112.0

type ContentScanningEnableParams struct{}

typeContentScanningEnableResponseadded inv0.112.0

type ContentScanningEnableResponse struct {ResponseResult *ContentScanningStatusResult `json:"result"`// nil}

typeContentScanningListCustomExpressionsParamsadded inv0.112.0

type ContentScanningListCustomExpressionsParams struct{}

typeContentScanningListCustomExpressionsResponseadded inv0.112.0

type ContentScanningListCustomExpressionsResponse struct {ResponseResult []ContentScanningCustomExpression `json:"result"`}

typeContentScanningStatusParamsadded inv0.112.0

type ContentScanningStatusParams struct{}

typeContentScanningStatusResponseadded inv0.112.0

type ContentScanningStatusResponse struct {ResponseResult *ContentScanningStatusResult `json:"result"`// object or nil}

typeContentScanningStatusResultadded inv0.112.0

type ContentScanningStatusResult struct {Valuestring `json:"value"`Modifiedstring `json:"modified"`}

typeCreateAPIShieldOperationsParamsadded inv0.78.0

type CreateAPIShieldOperationsParams struct {// Operations are a slice of operations to be created in API Shield Endpoint ManagementOperations []APIShieldBasicOperation `url:"-"`}

CreateAPIShieldOperationsParams represents the parameters to pass when adding one or more operations.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/methods/create/

typeCreateAPIShieldSchemaParamsadded inv0.79.0

type CreateAPIShieldSchemaParams struct {// Source is a io.Reader containing the contents of the schemaSourceio.Reader// Name represents the name of the schema.Namestring// Kind of the schema. This is always set to openapi_v3.Kindstring// ValidationEnabled controls if schema is used for validationValidationEnabled *bool}

CreateAPIShieldSchemaParams represents the parameters to pass when creating a schema in Schema Validation 2.0.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/create/

typeCreateAccessApplicationParamsadded inv0.71.0

type CreateAccessApplicationParams struct {AllowedIdps              []string                             `json:"allowed_idps,omitempty"`AppLauncherVisible       *bool                                `json:"app_launcher_visible,omitempty"`AUDstring                               `json:"aud,omitempty"`AutoRedirectToIdentity   *bool                                `json:"auto_redirect_to_identity,omitempty"`CorsHeaders              *AccessApplicationCorsHeaders        `json:"cors_headers,omitempty"`CustomDenyMessagestring                               `json:"custom_deny_message,omitempty"`CustomDenyURLstring                               `json:"custom_deny_url,omitempty"`CustomNonIdentityDenyURLstring                               `json:"custom_non_identity_deny_url,omitempty"`Domainstring                               `json:"domain"`DomainTypeAccessDestinationType                `json:"domain_type,omitempty"`EnableBindingCookie      *bool                                `json:"enable_binding_cookie,omitempty"`GatewayRules             []AccessApplicationGatewayRule       `json:"gateway_rules,omitempty"`HttpOnlyCookieAttribute  *bool                                `json:"http_only_cookie_attribute,omitempty"`LogoURLstring                               `json:"logo_url,omitempty"`Namestring                               `json:"name"`PathCookieAttribute      *bool                                `json:"path_cookie_attribute,omitempty"`PrivateAddressstring                               `json:"private_address"`SaasApplication          *SaasApplication                     `json:"saas_app,omitempty"`SameSiteCookieAttributestring                               `json:"same_site_cookie_attribute,omitempty"`Destinations             []AccessDestination                  `json:"destinations"`ServiceAuth401Redirect   *bool                                `json:"service_auth_401_redirect,omitempty"`SessionDurationstring                               `json:"session_duration,omitempty"`SkipInterstitial         *bool                                `json:"skip_interstitial,omitempty"`OptionsPreflightBypass   *bool                                `json:"options_preflight_bypass,omitempty"`TypeAccessApplicationType                `json:"type,omitempty"`AllowAuthenticateViaWarp *bool                                `json:"allow_authenticate_via_warp,omitempty"`CustomPages              []string                             `json:"custom_pages,omitempty"`Tags                     []string                             `json:"tags,omitempty"`SCIMConfig               *AccessApplicationSCIMConfig         `json:"scim_config,omitempty"`TargetContexts           *[]AccessInfrastructureTargetContext `json:"target_criteria,omitempty"`// List of policy ids to link to this application in ascending order of precedence.Policies []string `json:"policies,omitempty"`AccessAppLauncherCustomization}

typeCreateAccessCACertificateParamsadded inv0.71.0

type CreateAccessCACertificateParams struct {ApplicationIDstring}

typeCreateAccessCustomPageParamsadded inv0.74.0

type CreateAccessCustomPageParams struct {CustomHTMLstring               `json:"custom_html,omitempty"`Namestring               `json:"name,omitempty"`TypeAccessCustomPageType `json:"type,omitempty"`}

typeCreateAccessGroupParamsadded inv0.71.0

type CreateAccessGroupParams struct {Namestring `json:"name"`// The include group works like an OR logical operator. The user must// satisfy one of the rules.Include []interface{} `json:"include"`// The exclude group works like a NOT logical operator. The user must// not satisfy all the rules in exclude.Exclude []interface{} `json:"exclude"`// The require group works like a AND logical operator. The user must// satisfy all the rules in require.Require []interface{} `json:"require"`}

typeCreateAccessIdentityProviderParamsadded inv0.71.0

type CreateAccessIdentityProviderParams struct {Namestring                                  `json:"name"`Typestring                                  `json:"type"`ConfigAccessIdentityProviderConfiguration     `json:"config"`ScimConfigAccessIdentityProviderScimConfiguration `json:"scim_config"`}

typeCreateAccessMutualTLSCertificateParamsadded inv0.71.0

type CreateAccessMutualTLSCertificateParams struct {ExpiresOntime.Time `json:"expires_on,omitempty"`Namestring    `json:"name,omitempty"`Fingerprintstring    `json:"fingerprint,omitempty"`Certificatestring    `json:"certificate,omitempty"`AssociatedHostnames []string  `json:"associated_hostnames,omitempty"`}

typeCreateAccessOrganizationParamsadded inv0.71.0

type CreateAccessOrganizationParams struct {Namestring                        `json:"name"`AuthDomainstring                        `json:"auth_domain"`LoginDesignAccessOrganizationLoginDesign `json:"login_design"`IsUIReadOnly                   *bool                         `json:"is_ui_read_only,omitempty"`UIReadOnlyToggleReasonstring                        `json:"ui_read_only_toggle_reason,omitempty"`UserSeatExpirationInactiveTimestring                        `json:"user_seat_expiration_inactive_time,omitempty"`AutoRedirectToIdentity         *bool                         `json:"auto_redirect_to_identity,omitempty"`SessionDuration                *string                       `json:"session_duration,omitempty"`CustomPagesAccessOrganizationCustomPages `json:"custom_pages,omitempty"`WarpAuthSessionDuration        *string                       `json:"warp_auth_session_duration,omitempty"`AllowAuthenticateViaWarp       *bool                         `json:"allow_authenticate_via_warp,omitempty"`}

typeCreateAccessPolicyParamsadded inv0.71.0

type CreateAccessPolicyParams struct {// ApplicationID is the application ID for which to create the policy for.// Pass an empty value to create a reusable policy.ApplicationIDstring `json:"-"`// Precedence is the order in which the policy is executed in an Access application.// As a general rule, lower numbers take precedence over higher numbers.// This field is ignored when creating a reusable policy.// Read more herehttps://developers.cloudflare.com/cloudflare-one/policies/access/#order-of-executionPrecedenceint    `json:"precedence"`Decisionstring `json:"decision"`Namestring `json:"name"`IsolationRequired             *bool                                `json:"isolation_required,omitempty"`SessionDuration               *string                              `json:"session_duration,omitempty"`PurposeJustificationRequired  *bool                                `json:"purpose_justification_required,omitempty"`PurposeJustificationPrompt    *string                              `json:"purpose_justification_prompt,omitempty"`ApprovalRequired              *bool                                `json:"approval_required,omitempty"`ApprovalGroups                []AccessApprovalGroup                `json:"approval_groups"`InfrastructureConnectionRules *AccessInfrastructureConnectionRules `json:"connection_rules,omitempty"`// The include policy works like an OR logical operator. The user must// satisfy one of the rules.Include []interface{} `json:"include"`// The exclude policy works like a NOT logical operator. The user must// not satisfy all the rules in exclude.Exclude []interface{} `json:"exclude"`// The require policy works like a AND logical operator. The user must// satisfy all the rules in require.Require []interface{} `json:"require"`}

typeCreateAccessServiceTokenParamsadded inv0.71.0

type CreateAccessServiceTokenParams struct {Namestring `json:"name"`Durationstring `json:"duration,omitempty"`}

typeCreateAccessTagParamsadded inv0.78.0

type CreateAccessTagParams struct {Namestring `json:"name,omitempty"`}

typeCreateAccountMemberParamsadded inv0.53.0

type CreateAccountMemberParams struct {EmailAddressstringRoles        []stringPolicies     []PolicyStatusstring}

typeCreateAddressMapParamsadded inv0.63.0

type CreateAddressMapParams struct {Description *string                         `json:"description"`Enabled     *bool                           `json:"enabled"`IPs         []string                        `json:"ips"`Memberships []AddressMapMembershipContainer `json:"memberships"`}

CreateAddressMapParams contains information about an address map to be created.

typeCreateCustomNameserversParamsadded inv0.70.0

type CreateCustomNameserversParams struct {NSNamestring `json:"ns_name"`NSSetint    `json:"ns_set"`}

typeCreateD1DatabaseParamsadded inv0.79.0

type CreateD1DatabaseParams struct {Namestring `json:"name"`}

typeCreateDLPDatasetParamsadded inv0.87.0

type CreateDLPDatasetParams struct {Descriptionstring `json:"description,omitempty"`Namestring `json:"name"`Secret      *bool  `json:"secret,omitempty"`}

typeCreateDLPDatasetResponseadded inv0.87.0

type CreateDLPDatasetResponse struct {ResultCreateDLPDatasetResult `json:"result"`Response}

typeCreateDLPDatasetResultadded inv0.87.0

type CreateDLPDatasetResult struct {MaxCellsint        `json:"max_cells"`Secretstring     `json:"secret"`Versionint        `json:"version"`DatasetDLPDataset `json:"dataset"`}

typeCreateDLPDatasetUploadParamsadded inv0.87.0

type CreateDLPDatasetUploadParams struct {DatasetIDstring}

typeCreateDLPDatasetUploadResponseadded inv0.87.0

type CreateDLPDatasetUploadResponse struct {ResultCreateDLPDatasetUploadResult `json:"result"`Response}

typeCreateDLPDatasetUploadResultadded inv0.87.0

type CreateDLPDatasetUploadResult struct {MaxCellsint    `json:"max_cells"`Secretstring `json:"secret"`Versionint    `json:"version"`}

typeCreateDLPProfilesParamsadded inv0.53.0

type CreateDLPProfilesParams struct {Profiles []DLPProfile `json:"profiles"`Typestring}

typeCreateDNSFirewallClusterParamsadded inv0.70.0

type CreateDNSFirewallClusterParams struct {Namestring   `json:"name"`UpstreamIPs          []string `json:"upstream_ips"`DNSFirewallIPs       []string `json:"dns_firewall_ips,omitempty"`MinimumCacheTTLuint     `json:"minimum_cache_ttl,omitempty"`MaximumCacheTTLuint     `json:"maximum_cache_ttl,omitempty"`DeprecateAnyRequestsbool     `json:"deprecate_any_requests"`}

typeCreateDNSRecordParamsadded inv0.58.0

type CreateDNSRecordParams struct {CreatedOntime.Time         `json:"created_on,omitempty" url:"created_on,omitempty"`ModifiedOntime.Time         `json:"modified_on,omitempty" url:"modified_on,omitempty"`Typestring            `json:"type,omitempty" url:"type,omitempty"`Namestring            `json:"name,omitempty" url:"name,omitempty"`Contentstring            `json:"content,omitempty" url:"content,omitempty"`Meta       interface{}       `json:"meta,omitempty"`Data       interface{}       `json:"data,omitempty"`// data returned by: SRV, LOCIDstring            `json:"id,omitempty"`Priority   *uint16           `json:"priority,omitempty"`TTLint               `json:"ttl,omitempty"`Proxied    *bool             `json:"proxied,omitempty" url:"proxied,omitempty"`Proxiablebool              `json:"proxiable,omitempty"`Commentstring            `json:"comment,omitempty" url:"comment,omitempty"`// to the server, there's no difference between "no comment" and "empty comment"Tags       []string          `json:"tags,omitempty"`SettingsDNSRecordSettings `json:"settings,omitempty"`}

typeCreateDataLocalizationRegionalHostnameParamsadded inv0.66.0

type CreateDataLocalizationRegionalHostnameParams struct {Hostnamestring `json:"hostname"`RegionKeystring `json:"region_key"`}

typeCreateDeviceDexTestParamsadded inv0.62.0

type CreateDeviceDexTestParams struct {TestIDstring             `json:"test_id,omitempty"`Namestring             `json:"name"`Descriptionstring             `json:"description,omitempty"`Intervalstring             `json:"interval"`Enabledbool               `json:"enabled"`Data        *DeviceDexTestData `json:"data"`}

typeCreateDeviceManagedNetworkParamsadded inv0.57.0

type CreateDeviceManagedNetworkParams struct {NetworkIDstring  `json:"network_id,omitempty"`Typestring  `json:"type"`Namestring  `json:"name"`Config    *Config `json:"config"`}

typeCreateDeviceSettingsPolicyParamsadded inv0.81.0

type CreateDeviceSettingsPolicyParams struct {DisableAutoFallback *bool          `json:"disable_auto_fallback,omitempty"`CaptivePortal       *int           `json:"captive_portal,omitempty"`AllowModeSwitch     *bool          `json:"allow_mode_switch,omitempty"`SwitchLocked        *bool          `json:"switch_locked,omitempty"`AllowUpdates        *bool          `json:"allow_updates,omitempty"`AutoConnect         *int           `json:"auto_connect,omitempty"`AllowedToLeave      *bool          `json:"allowed_to_leave,omitempty"`SupportURL          *string        `json:"support_url,omitempty"`ServiceModeV2       *ServiceModeV2 `json:"service_mode_v2,omitempty"`Precedence          *int           `json:"precedence,omitempty"`Name                *string        `json:"name,omitempty"`Match               *string        `json:"match,omitempty"`Enabled             *bool          `json:"enabled,omitempty"`ExcludeOfficeIps    *bool          `json:"exclude_office_ips"`Description         *string        `json:"description,omitempty"`LANAllowMinutes     *uint          `json:"lan_allow_minutes,omitempty"`LANAllowSubnetSize  *uint          `json:"lan_allow_subnet_size,omitempty"`TunnelProtocol      *string        `json:"tunnel_protocol,omitempty"`}

typeCreateEmailRoutingAddressParametersadded inv0.47.0

type CreateEmailRoutingAddressParameters struct {Emailstring `json:"email,omitempty"`}

typeCreateEmailRoutingAddressResponseadded inv0.47.0

type CreateEmailRoutingAddressResponse struct {ResultEmailRoutingDestinationAddress `json:"result,omitempty"`Response}

typeCreateEmailRoutingRuleParametersadded inv0.47.0

type CreateEmailRoutingRuleParameters struct {Matchers []EmailRoutingRuleMatcher `json:"matchers,omitempty"`Actions  []EmailRoutingRuleAction  `json:"actions,omitempty"`Namestring                    `json:"name,omitempty"`Enabled  *bool                     `json:"enabled,omitempty"`Priorityint                       `json:"priority,omitempty"`}

typeCreateEmailRoutingRuleResponseadded inv0.47.0

type CreateEmailRoutingRuleResponse struct {ResultEmailRoutingRule `json:"result"`Response}

typeCreateHyperdriveConfigParamsadded inv0.88.0

type CreateHyperdriveConfigParams struct {Namestring                            `json:"name"`OriginHyperdriveConfigOriginWithSecrets `json:"origin"`CachingHyperdriveConfigCaching           `json:"caching,omitempty"`}

typeCreateIPAddressToAddressMapParamsadded inv0.63.0

type CreateIPAddressToAddressMapParams struct {// ID represents the target address map for adding the IP address.IDstring// The IP address.IPstring}

CreateIPAddressToAddressMapParams contains request parameters to add/remove IP address to/from an address map.

typeCreateImageDirectUploadURLParamsadded inv0.71.0

type CreateImageDirectUploadURLParams struct {VersionImagesAPIVersion       `json:"-"`Expiry            *time.Time             `json:"expiry,omitempty"`Metadata          map[string]interface{} `json:"metadata,omitempty"`RequireSignedURLs *bool                  `json:"requireSignedURLs,omitempty"`}

CreateImageDirectUploadURLParams is the data required for a CreateImageDirectUploadURL request.

typeCreateImagesVariantParamsadded inv0.88.0

type CreateImagesVariantParams struct {IDstring                `json:"id,omitempty"`NeverRequireSignedURLs *bool                 `json:"neverRequireSignedURLs,omitempty"`OptionsImagesVariantsOptions `json:"options,omitempty"`}

typeCreateInfrastructureAccessTargetParamsadded inv0.105.0

type CreateInfrastructureAccessTargetParams struct {InfrastructureAccessTargetParams}

typeCreateLoadBalancerMonitorParamsadded inv0.51.0

type CreateLoadBalancerMonitorParams struct {LoadBalancerMonitorLoadBalancerMonitor}

typeCreateLoadBalancerParamsadded inv0.51.0

type CreateLoadBalancerParams struct {LoadBalancerLoadBalancer}

typeCreateLoadBalancerPoolParamsadded inv0.51.0

type CreateLoadBalancerPoolParams struct {LoadBalancerPoolLoadBalancerPool}

typeCreateLogpushJobParamsadded inv0.72.0

type CreateLogpushJobParams struct {Datasetstring                `json:"dataset"`Enabledbool                  `json:"enabled"`Kindstring                `json:"kind,omitempty"`Namestring                `json:"name"`LogpullOptionsstring                `json:"logpull_options,omitempty"`OutputOptions            *LogpushOutputOptions `json:"output_options,omitempty"`DestinationConfstring                `json:"destination_conf"`OwnershipChallengestring                `json:"ownership_challenge,omitempty"`ErrorMessagestring                `json:"error_message,omitempty"`Frequencystring                `json:"frequency,omitempty"`Filter                   *LogpushJobFilters    `json:"filter,omitempty"`MaxUploadBytesint                   `json:"max_upload_bytes,omitempty"`MaxUploadRecordsint                   `json:"max_upload_records,omitempty"`MaxUploadIntervalSecondsint                   `json:"max_upload_interval_seconds,omitempty"`}

func (CreateLogpushJobParams)MarshalJSONadded inv0.72.0

func (fCreateLogpushJobParams) MarshalJSON() ([]byte,error)

func (*CreateLogpushJobParams)UnmarshalJSONadded inv0.72.0

func (f *CreateLogpushJobParams) UnmarshalJSON(data []byte)error

Custom Unmarshaller for CreateLogpushJobParams filter key.

typeCreateMTLSCertificateParamsadded inv0.58.0

type CreateMTLSCertificateParams struct {Namestring `json:"name"`Certificatesstring `json:"certificates"`PrivateKeystring `json:"private_key"`CAbool   `json:"ca"`}

MTLSCertificateParams represents the data related to the mTLS certificatebeing uploaded. Name is an optional field.

typeCreateMagicFirewallRulesetRequestadded inv0.13.7

type CreateMagicFirewallRulesetRequest struct {Namestring                     `json:"name"`Descriptionstring                     `json:"description"`Kindstring                     `json:"kind"`Phasestring                     `json:"phase"`Rules       []MagicFirewallRulesetRule `json:"rules"`}

CreateMagicFirewallRulesetRequest contains data for a new Firewall ruleset.

typeCreateMagicFirewallRulesetResponseadded inv0.13.7

type CreateMagicFirewallRulesetResponse struct {ResponseResultMagicFirewallRuleset `json:"result"`}

CreateMagicFirewallRulesetResponse contains response data when creating a new Magic Firewall ruleset.

typeCreateMagicTransitGRETunnelsRequestadded inv0.32.0

type CreateMagicTransitGRETunnelsRequest struct {GRETunnels []MagicTransitGRETunnel `json:"gre_tunnels"`}

CreateMagicTransitGRETunnelsRequest is an array of GRE tunnels to create.

typeCreateMagicTransitIPsecTunnelsRequestadded inv0.31.0

type CreateMagicTransitIPsecTunnelsRequest struct {IPsecTunnels []MagicTransitIPsecTunnel `json:"ipsec_tunnels"`}

CreateMagicTransitIPsecTunnelsRequest is an array of IPsec tunnels to create.

typeCreateMagicTransitStaticRoutesRequestadded inv0.18.0

type CreateMagicTransitStaticRoutesRequest struct {Routes []MagicTransitStaticRoute `json:"routes"`}

CreateMagicTransitStaticRoutesRequest is an array of static routes to create.

typeCreateMembershipToAddressMapParamsadded inv0.63.0

type CreateMembershipToAddressMapParams struct {// ID represents the target address map for adding the membershp.IDstringMembershipAddressMapMembershipContainer}

CreateMembershipToAddressMapParams contains request parameters to add/remove membership from an address map.

typeCreateObservatoryPageTestParamsadded inv0.78.0

type CreateObservatoryPageTestParams struct {URLstringSettingsCreateObservatoryPageTestSettings}

typeCreateObservatoryPageTestSettingsadded inv0.78.0

type CreateObservatoryPageTestSettings struct {Regionstring `json:"region"`}

typeCreateObservatoryScheduledPageTestParamsadded inv0.78.0

type CreateObservatoryScheduledPageTestParams struct {URLstring `url:"-" json:"-"`Regionstring `url:"region" json:"-"`Frequencystring `url:"frequency" json:"-"`}

typeCreateObservatoryScheduledPageTestResponseadded inv0.78.0

type CreateObservatoryScheduledPageTestResponse struct {ResponseResultObservatoryScheduledPageTest `json:"result"`}

typeCreateOriginCertificateParamsadded inv0.58.0

type CreateOriginCertificateParams struct {IDstring    `json:"id"`Certificatestring    `json:"certificate"`Hostnames       []string  `json:"hostnames"`ExpiresOntime.Time `json:"expires_on"`RequestTypestring    `json:"request_type"`RequestValidityint       `json:"requested_validity"`RevokedAttime.Time `json:"revoked_at,omitempty"`CSRstring    `json:"csr"`}

typeCreatePageShieldPolicyParamsadded inv0.84.0

type CreatePageShieldPolicyParams struct {Actionstring `json:"action"`Descriptionstring `json:"description"`Enabled     *bool  `json:"enabled,omitempty"`Expressionstring `json:"expression"`IDstring `json:"id"`Valuestring `json:"value"`}

typeCreatePagesDeploymentParamsadded inv0.40.0

type CreatePagesDeploymentParams struct {ProjectNamestring `json:"-"`Branchstring `json:"branch,omitempty"`}

typeCreatePagesProjectParamsadded inv0.73.0

type CreatePagesProjectParams struct {Namestring                        `json:"name,omitempty"`SubDomainstring                        `json:"subdomain"`Domains             []string                      `json:"domains,omitempty"`Source              *PagesProjectSource           `json:"source,omitempty"`BuildConfigPagesProjectBuildConfig       `json:"build_config"`DeploymentConfigsPagesProjectDeploymentConfigs `json:"deployment_configs"`LatestDeploymentPagesProjectDeployment        `json:"latest_deployment"`CanonicalDeploymentPagesProjectDeployment        `json:"canonical_deployment"`ProductionBranchstring                        `json:"production_branch,omitempty"`}

typeCreateQueueConsumerParamsadded inv0.55.0

type CreateQueueConsumerParams struct {QueueNamestring `json:"-"`ConsumerQueueConsumer}

typeCreateQueueParamsadded inv0.55.0

type CreateQueueParams struct {Namestring `json:"queue_name"`}

typeCreateR2BucketParametersadded inv0.48.0

type CreateR2BucketParameters struct {Namestring `json:"name,omitempty"`LocationHintstring `json:"locationHint,omitempty"`}

typeCreateRulesetParamsadded inv0.73.0

type CreateRulesetParams struct {Namestring        `json:"name,omitempty"`Descriptionstring        `json:"description,omitempty"`Kindstring        `json:"kind,omitempty"`Phasestring        `json:"phase,omitempty"`Rules       []RulesetRule `json:"rules"`}

typeCreateRulesetResponseadded inv0.19.0

type CreateRulesetResponse struct {ResponseResultRuleset `json:"result"`}

CreateRulesetResponse contains response data when creating a new Ruleset.

typeCreateTeamsListParamsadded inv0.53.0

type CreateTeamsListParams struct {IDstring          `json:"id,omitempty"`Namestring          `json:"name"`Typestring          `json:"type"`Descriptionstring          `json:"description,omitempty"`Items       []TeamsListItem `json:"items,omitempty"`Countuint64          `json:"count,omitempty"`CreatedAt   *time.Time      `json:"created_at,omitempty"`UpdatedAt   *time.Time      `json:"updated_at,omitempty"`}

typeCreateTurnstileWidgetParamsadded inv0.66.0

type CreateTurnstileWidgetParams struct {Namestring   `json:"name,omitempty"`Domains      []string `json:"domains,omitempty"`Modestring   `json:"mode,omitempty"`BotFightModebool     `json:"bot_fight_mode,omitempty"`Regionstring   `json:"region,omitempty"`OffLabelbool     `json:"offlabel,omitempty"`}

typeCreateWaitingRoomRuleParamsadded inv0.53.0

type CreateWaitingRoomRuleParams struct {WaitingRoomIDstringRuleWaitingRoomRule}

typeCreateWebAnalyticsRuleadded inv0.75.0

type CreateWebAnalyticsRule struct {IDstring   `json:"id,omitempty"`Hoststring   `json:"host"`Paths []string `json:"paths"`// Inclusive defines whether the rule includes or excludes the matched traffic from being measured in web analytics.Inclusivebool `json:"inclusive"`IsPausedbool `json:"is_paused"`}

CreateWebAnalyticsRule describes the properties required to create or update a Web Analytics Rule object.

typeCreateWebAnalyticsRuleParamsadded inv0.75.0

type CreateWebAnalyticsRuleParams struct {RulesetIDstringRuleCreateWebAnalyticsRule}

typeCreateWebAnalyticsSiteParamsadded inv0.75.0

type CreateWebAnalyticsSiteParams struct {// Host is the host to measure traffic for.Hoststring `json:"host,omitempty"`// ZoneTag is the zone tag to measure traffic for.ZoneTagstring `json:"zone_tag,omitempty"`// AutoInstall defines whether Cloudflare will inject the JS snippet automatically for orange-clouded sites.AutoInstall *bool `json:"auto_install"`}

typeCreateWorkerParamsadded inv0.57.0

type CreateWorkerParams struct {ScriptNamestringScriptstring// DispatchNamespaceName uploads the worker to a WFP dispatch namespace if providedDispatchNamespaceName *string// Module changes the Content-Type header to specify the script is an// ES Module syntax script.Modulebool// Logpush opts the worker into Workers Logpush logging. A nil value leaves// the current setting unchanged.//// Documentation:https://developers.cloudflare.com/workers/platform/logpush/Logpush *bool// TailConsumers specifies a list of Workers that will consume the logs of// the attached Worker.// Documentation:https://developers.cloudflare.com/workers/platform/tail-workers/TailConsumers *[]WorkersTailConsumer// Bindings should be a map where the keys are the binding name, and the// values are the binding contentBindings map[string]WorkerBinding// CompatibilityDate is a date in the form yyyy-mm-dd,// which will be used to determine which version of the Workers runtime is used.//https://developers.cloudflare.com/workers/platform/compatibility-dates/CompatibilityDatestring// CompatibilityFlags are the names of features of the Workers runtime to be enabled or disabled,// usually used together with CompatibilityDate.//https://developers.cloudflare.com/workers/platform/compatibility-dates/#compatibility-flagsCompatibilityFlags []stringPlacement *Placement// Tags are used to better manage CRUD operations at scale.//https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/tags/Tags []string}

func (CreateWorkerParams)RequiresMultipartadded inv0.75.0

func (pCreateWorkerParams) RequiresMultipart()bool

typeCreateWorkerRouteParamsadded inv0.57.0

type CreateWorkerRouteParams struct {Patternstring `json:"pattern"`Scriptstring `json:"script,omitempty"`}

typeCreateWorkersAccountSettingsParametersadded inv0.47.0

type CreateWorkersAccountSettingsParameters struct {DefaultUsageModelstring `json:"default_usage_model,omitempty"`GreenComputebool   `json:"green_compute,omitempty"`}

typeCreateWorkersAccountSettingsResponseadded inv0.47.0

type CreateWorkersAccountSettingsResponse struct {ResponseResultWorkersAccountSettings}

typeCreateWorkersForPlatformsDispatchNamespaceParamsadded inv0.90.0

type CreateWorkersForPlatformsDispatchNamespaceParams struct {Namestring `json:"name"`}

typeCreateWorkersKVNamespaceParamsadded inv0.55.0

type CreateWorkersKVNamespaceParams struct {Titlestring `json:"title"`}

CreateWorkersKVNamespaceParams provides parameters for creating and updating storage namespaces.

typeCreateZoneHoldParamsadded inv0.75.0

type CreateZoneHoldParams struct {IncludeSubdomains *bool `url:"include_subdomains,omitempty"`}

CreateZoneHoldParams represents params for the Create Zone Holdendpoint.

typeCustomHostnameadded inv0.7.4

type CustomHostname struct {IDstring                                  `json:"id,omitempty"`Hostnamestring                                  `json:"hostname,omitempty"`CustomOriginServerstring                                  `json:"custom_origin_server,omitempty"`CustomOriginSNIstring                                  `json:"custom_origin_sni,omitempty"`SSL                       *CustomHostnameSSL                      `json:"ssl,omitempty"`CustomMetadata            *CustomMetadata                         `json:"custom_metadata,omitempty"`StatusCustomHostnameStatus                    `json:"status,omitempty"`VerificationErrors        []string                                `json:"verification_errors,omitempty"`OwnershipVerificationCustomHostnameOwnershipVerification     `json:"ownership_verification,omitempty"`OwnershipVerificationHTTPCustomHostnameOwnershipVerificationHTTP `json:"ownership_verification_http,omitempty"`CreatedAt                 *time.Time                              `json:"created_at,omitempty"`}

CustomHostname represents a custom hostname in a zone.

typeCustomHostnameFallbackOriginadded inv0.12.0

type CustomHostnameFallbackOrigin struct {Originstring   `json:"origin,omitempty"`Statusstring   `json:"status,omitempty"`Errors []string `json:"errors,omitempty"`}

CustomHostnameFallbackOrigin represents a Custom Hostnames Fallback Origin.

typeCustomHostnameFallbackOriginResponseadded inv0.12.0

type CustomHostnameFallbackOriginResponse struct {ResultCustomHostnameFallbackOrigin `json:"result"`Response}

CustomHostnameFallbackOriginResponse represents a response from the Custom Hostnames Fallback Origin endpoint.

typeCustomHostnameListResponse

type CustomHostnameListResponse struct {Result []CustomHostname `json:"result"`ResponseResultInfo `json:"result_info"`}

CustomHostnameListResponse represents a response from the Custom Hostnames endpoints.

typeCustomHostnameOwnershipVerificationadded inv0.11.7

type CustomHostnameOwnershipVerification struct {Typestring `json:"type,omitempty"`Namestring `json:"name,omitempty"`Valuestring `json:"value,omitempty"`}

CustomHostnameOwnershipVerification represents ownership verification status of a given custom hostname.

typeCustomHostnameOwnershipVerificationHTTPadded inv0.12.0

type CustomHostnameOwnershipVerificationHTTP struct {HTTPUrlstring `json:"http_url,omitempty"`HTTPBodystring `json:"http_body,omitempty"`}

CustomHostnameOwnershipVerificationHTTP represents a response from the Custom Hostnames endpoints.

typeCustomHostnameResponseadded inv0.7.4

type CustomHostnameResponse struct {ResultCustomHostname `json:"result"`Response}

CustomHostnameResponse represents a response from the Custom Hostnames endpoints.

typeCustomHostnameSSLadded inv0.7.4

type CustomHostnameSSL struct {IDstring                          `json:"id,omitempty"`Statusstring                          `json:"status,omitempty"`Methodstring                          `json:"method,omitempty"`Typestring                          `json:"type,omitempty"`Wildcard             *bool                           `json:"wildcard,omitempty"`CustomCertificatestring                          `json:"custom_certificate,omitempty"`CustomKeystring                          `json:"custom_key,omitempty"`CertificateAuthoritystring                          `json:"certificate_authority,omitempty"`Issuerstring                          `json:"issuer,omitempty"`SerialNumberstring                          `json:"serial_number,omitempty"`SettingsCustomHostnameSSLSettings       `json:"settings,omitempty"`Certificates         []CustomHostnameSSLCertificates `json:"certificates,omitempty"`// Deprecated: use ValidationRecords.// If there a single validation record, this will equal ValidationRecords[0] for backwards compatibility.SSLValidationRecordValidationRecords []SSLValidationRecord `json:"validation_records,omitempty"`ValidationErrors  []SSLValidationError  `json:"validation_errors,omitempty"`BundleMethodstring                `json:"bundle_method,omitempty"`}

CustomHostnameSSL represents the SSL section in a given custom hostname.

typeCustomHostnameSSLCertificatesadded inv0.31.0

type CustomHostnameSSLCertificates struct {Issuerstring     `json:"issuer"`SerialNumberstring     `json:"serial_number"`Signaturestring     `json:"signature"`ExpiresOn         *time.Time `json:"expires_on"`IssuedOn          *time.Time `json:"issued_on"`FingerprintSha256string     `json:"fingerprint_sha256"`IDstring     `json:"id"`}

CustomHostnameSSLCertificates represent certificate properties like issuer, expires date and etc.

typeCustomHostnameSSLSettingsadded inv0.9.0

type CustomHostnameSSLSettings struct {HTTP2string   `json:"http2,omitempty"`HTTP3string   `json:"http3,omitempty"`TLS13string   `json:"tls_1_3,omitempty"`MinTLSVersionstring   `json:"min_tls_version,omitempty"`Ciphers       []string `json:"ciphers,omitempty"`EarlyHintsstring   `json:"early_hints,omitempty"`}

CustomHostnameSSLSettings represents the SSL settings for a custom hostname.

typeCustomHostnameStatusadded inv0.11.7

type CustomHostnameStatusstring

CustomHostnameStatus is the enumeration of valid state values in the CustomHostnameSSL.

const (// PENDING status represents state of CustomHostname is pending.PENDINGCustomHostnameStatus = "pending"// ACTIVE status represents state of CustomHostname is active.ACTIVECustomHostnameStatus = "active"// MOVED status represents state of CustomHostname is moved.MOVEDCustomHostnameStatus = "moved"// DELETED status represents state of CustomHostname is deleted.DELETEDCustomHostnameStatus = "deleted"// BLOCKED status represents state of CustomHostname is blocked from going active.BLOCKEDCustomHostnameStatus = "blocked")

typeCustomMetadataadded inv0.7.4

type CustomMetadata map[string]interface{}

CustomMetadata defines custom metadata for the hostname. This requires logic to be implemented by Cloudflare to act on the data provided.

typeCustomNameserveradded inv0.70.0

type CustomNameserver struct {NSNamestring `json:"ns_name"`NSSetint    `json:"ns_set"`}

typeCustomNameserverRecordadded inv0.70.0

type CustomNameserverRecord struct {Typestring `json:"type"`Valuestring `json:"value"`}

typeCustomNameserverResultadded inv0.70.0

type CustomNameserverResult struct {DNSRecords []CustomNameserverRecord `json:"dns_records"`NSNamestring                   `json:"ns_name"`NSSetint                      `json:"ns_set"`Statusstring                   `json:"status"`ZoneTagstring                   `json:"zone_tag"`}

typeCustomNameserverZoneMetadataadded inv0.70.0

type CustomNameserverZoneMetadata struct {NSSetint  `json:"ns_set"`Enabledbool `json:"enabled"`}

typeCustomPageadded inv0.7.2

type CustomPage struct {CreatedOntime.Time   `json:"created_on"`ModifiedOntime.Time   `json:"modified_on"`URL            interface{} `json:"url"`Statestring      `json:"state"`RequiredTokens []string    `json:"required_tokens"`PreviewTargetstring      `json:"preview_target"`Descriptionstring      `json:"description"`IDstring      `json:"id"`}

CustomPage represents a custom page configuration.

typeCustomPageDetailResponseadded inv0.9.0

type CustomPageDetailResponse struct {ResponseResultCustomPage `json:"result"`}

CustomPageDetailResponse represents the response from the custom page endpoint.

typeCustomPageOptionsadded inv0.9.0

type CustomPageOptions struct {AccountIDstringZoneIDstring}

CustomPageOptions is used to determine whether or not the operationshould take place on an account or zone level based on which isprovided to the function.

A non-empty value denotes desired use.

typeCustomPageParametersadded inv0.9.0

type CustomPageParameters struct {URL   interface{} `json:"url"`Statestring      `json:"state"`}

CustomPageParameters is used to update a particular custom page withthe values provided.

typeCustomPageResponseadded inv0.7.2

type CustomPageResponse struct {ResponseResult []CustomPage `json:"result"`}

CustomPageResponse represents the response from the custom pages endpoint.

typeD1Bindingadded inv0.49.0

type D1Binding struct {IDstring `json:"id"`}

typeD1BindingMapadded inv0.49.0

type D1BindingMap map[string]*D1Binding

typeD1Databaseadded inv0.79.0

type D1Database struct {Namestring     `json:"name"`NumTablesint        `json:"num_tables"`UUIDstring     `json:"uuid"`Versionstring     `json:"version"`CreatedAt *time.Time `json:"created_at"`FileSizeint64      `json:"file_size"`}

typeD1DatabaseMetadataadded inv0.79.0

type D1DatabaseMetadata struct {ChangedDB   *bool   `json:"changed_db,omitempty"`Changesint     `json:"changes"`Durationfloat64 `json:"duration"`LastRowIDint     `json:"last_row_id"`RowsReadint     `json:"rows_read"`RowsWrittenint     `json:"rows_written"`SizeAfterint     `json:"size_after"`}

typeD1DatabaseResponseadded inv0.79.0

type D1DatabaseResponse struct {ResultD1Database `json:"result"`Response}

typeD1Resultadded inv0.79.0

type D1Result struct {Success *bool              `json:"success"`Results []map[string]any   `json:"results"`MetaD1DatabaseMetadata `json:"meta"`}

typeDCVDelegationadded inv0.77.0

type DCVDelegation struct {UUIDstring `json:"uuid"`}

typeDCVDelegationResponseadded inv0.77.0

type DCVDelegationResponse struct {ResultDCVDelegation `json:"result"`ResponseResultInfo `json:"result_info"`}

DCVDelegationResponse represents the response from the dcv_delegation/uuid endpoint.

typeDLPContextAwarenessadded inv0.90.0

type DLPContextAwareness struct {Enabled *bool                   `json:"enabled,omitempty"`SkipDLPContextAwarenessSkip `json:"skip"`}

Scan the context of predefined entries to only return matches surrounded by keywords.

typeDLPContextAwarenessSkipadded inv0.90.0

type DLPContextAwarenessSkip struct {// Return all matches, regardless of context analysis result, if the data is a file.Files *bool `json:"files,omitempty"`}

Content types to exclude from context analysis and return all matches.

typeDLPDatasetadded inv0.87.0

type DLPDataset struct {CreatedAt   *time.Time         `json:"created_at,omitempty"`Descriptionstring             `json:"description,omitempty"`IDstring             `json:"id,omitempty"`Namestring             `json:"name,omitempty"`NumCellsint                `json:"num_cells"`Secret      *bool              `json:"secret,omitempty"`Statusstring             `json:"status,omitempty"`UpdatedAt   *time.Time         `json:"updated_at,omitempty"`Uploads     []DLPDatasetUpload `json:"uploads"`}

DLPDataset represents a DLP Exact Data Match dataset or Custom Word List.

typeDLPDatasetGetResponseadded inv0.87.0

type DLPDatasetGetResponse struct {ResultDLPDataset `json:"result"`Response}

typeDLPDatasetListResponseadded inv0.87.0

type DLPDatasetListResponse struct {Result []DLPDataset `json:"result"`Response}

typeDLPDatasetUploadadded inv0.87.0

type DLPDatasetUpload struct {NumCellsint    `json:"num_cells"`Statusstring `json:"status,omitempty"`Versionint    `json:"version"`}

DLPDatasetUpload represents a single upload version attached to a DLP dataset.

typeDLPEntryadded inv0.53.0

type DLPEntry struct {IDstring `json:"id,omitempty"`Namestring `json:"name,omitempty"`ProfileIDstring `json:"profile_id,omitempty"`Enabled   *bool  `json:"enabled,omitempty"`Typestring `json:"type,omitempty"`Pattern   *DLPPattern `json:"pattern,omitempty"`CreatedAt *time.Time  `json:"created_at,omitempty"`UpdatedAt *time.Time  `json:"updated_at,omitempty"`}

DLPEntry represents a DLP Entry, which can be matched in HTTP bodies or files.

typeDLPPatternadded inv0.53.0

type DLPPattern struct {Regexstring `json:"regex,omitempty"`Validationstring `json:"validation,omitempty"`}

DLPPattern represents a DLP Pattern that matches an entry.

typeDLPPayloadLogSettingsadded inv0.62.0

type DLPPayloadLogSettings struct {PublicKeystring `json:"public_key,omitempty"`// Only present in responsesUpdatedAt *time.Time `json:"updated_at,omitempty"`}

typeDLPPayloadLogSettingsResponseadded inv0.62.0

type DLPPayloadLogSettingsResponse struct {ResponseResultDLPPayloadLogSettings `json:"result"`}

typeDLPProfileadded inv0.53.0

type DLPProfile struct {IDstring `json:"id,omitempty"`Namestring `json:"name,omitempty"`Typestring `json:"type,omitempty"`Descriptionstring `json:"description,omitempty"`AllowedMatchCountint    `json:"allowed_match_count"`OCREnabled        *bool  `json:"ocr_enabled,omitempty"`ContextAwareness *DLPContextAwareness `json:"context_awareness,omitempty"`// The following fields are omitted for predefined DLP// profiles.Entries   []DLPEntry `json:"entries,omitempty"`CreatedAt *time.Time `json:"created_at,omitempty"`UpdatedAt *time.Time `json:"updated_at,omitempty"`}

DLPProfile represents a DLP Profile, which contains a setof entries.

typeDLPProfileListResponseadded inv0.53.0

type DLPProfileListResponse struct {Result []DLPProfile `json:"result"`Response}

DLPProfileListResponse represents the response from the listdlp profiles endpoint.

typeDLPProfileResponseadded inv0.53.0

type DLPProfileResponse struct {Successbool       `json:"success"`Errors   []string   `json:"errors"`Messages []string   `json:"messages"`ResultDLPProfile `json:"result"`}

DLPProfileResponse is the API response, containing a singleaccess application.

typeDLPProfilesCreateRequestadded inv0.53.0

type DLPProfilesCreateRequest struct {Profiles []DLPProfile `json:"profiles"`}

DLPProfilesCreateRequest represents a request to create aset of profiles.

typeDNSFirewallAnalyticsadded inv0.29.0

type DNSFirewallAnalytics struct {TotalsDNSFirewallAnalyticsMetrics `json:"totals"`MinDNSFirewallAnalyticsMetrics `json:"min"`MaxDNSFirewallAnalyticsMetrics `json:"max"`}

DNSFirewallAnalytics represents a set of aggregated DNS Firewall metrics.TODO: Add the queried data and not only the aggregated values.

typeDNSFirewallAnalyticsMetricsadded inv0.29.0

type DNSFirewallAnalyticsMetrics struct {QueryCount         *int64   `json:"queryCount"`UncachedCount      *int64   `json:"uncachedCount"`StaleCount         *int64   `json:"staleCount"`ResponseTimeAvg    *float64 `json:"responseTimeAvg"`ResponseTimeMedian *float64 `json:"responseTimeMedian"`ResponseTime90th   *float64 `json:"responseTime90th"`ResponseTime99th   *float64 `json:"responseTime99th"`}

DNSFirewallAnalyticsMetrics represents a group of aggregated DNS Firewall metrics.

typeDNSFirewallClusteradded inv0.29.0

type DNSFirewallCluster struct {IDstring   `json:"id,omitempty"`Namestring   `json:"name"`UpstreamIPs          []string `json:"upstream_ips"`DNSFirewallIPs       []string `json:"dns_firewall_ips,omitempty"`MinimumCacheTTLuint     `json:"minimum_cache_ttl,omitempty"`MaximumCacheTTLuint     `json:"maximum_cache_ttl,omitempty"`DeprecateAnyRequestsbool     `json:"deprecate_any_requests"`ModifiedOnstring   `json:"modified_on,omitempty"`}

DNSFirewallCluster represents a DNS Firewall configuration.

typeDNSFirewallUserAnalyticsOptionsadded inv0.29.0

type DNSFirewallUserAnalyticsOptions struct {Metrics []string   `url:"metrics,omitempty" del:","`Since   *time.Time `url:"since,omitempty"`Until   *time.Time `url:"until,omitempty"`}

DNSFirewallUserAnalyticsOptions represents range and dimension selection on analytics endpoint.

typeDNSListResponseadded inv0.7.2

type DNSListResponse struct {Result []DNSRecord `json:"result"`ResponseResultInfo `json:"result_info"`}

DNSListResponse represents the response from the list DNS records endpoint.

typeDNSRecordadded inv0.7.2

type DNSRecord struct {CreatedOntime.Time         `json:"created_on,omitempty"`ModifiedOntime.Time         `json:"modified_on,omitempty"`Typestring            `json:"type,omitempty"`Namestring            `json:"name,omitempty"`Contentstring            `json:"content,omitempty"`Meta       interface{}       `json:"meta,omitempty"`Data       interface{}       `json:"data,omitempty"`// data returned by: SRV, LOCIDstring            `json:"id,omitempty"`Priority   *uint16           `json:"priority,omitempty"`TTLint               `json:"ttl,omitempty"`Proxied    *bool             `json:"proxied,omitempty"`Proxiablebool              `json:"proxiable,omitempty"`Commentstring            `json:"comment,omitempty"`// the server will omit the comment field when the comment is emptyTags       []string          `json:"tags,omitempty"`SettingsDNSRecordSettings `json:"settings,omitempty"`}

DNSRecord represents a DNS record in a zone.

typeDNSRecordResponseadded inv0.7.2

type DNSRecordResponse struct {ResultDNSRecord `json:"result"`ResponseResultInfo `json:"result_info"`}

DNSRecordResponse represents the response from the DNS endpoint.

typeDNSRecordSettingsadded inv0.115.0

type DNSRecordSettings struct {FlattenCNAME *bool `json:"flatten_cname,omitempty"`}

typeDeleteAPIShieldOperationParamsadded inv0.78.0

type DeleteAPIShieldOperationParams struct {// OperationID is the operation to be deletedOperationIDstring `url:"-"`}

DeleteAPIShieldOperationParams represents the parameters to pass to delete an operation.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/methods/delete/

typeDeleteAPIShieldSchemaParamsadded inv0.79.0

type DeleteAPIShieldSchemaParams struct {// SchemaID is the schema to be deletedSchemaIDstring `url:"-"`}

DeleteAPIShieldSchemaParams represents the parameters to pass to delete a schema.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/delete/

typeDeleteAccessPolicyParamsadded inv0.71.0

type DeleteAccessPolicyParams struct {// ApplicationID is the application ID the policy belongs to.// If the existing policy is reusable, this field must be omitted. Otherwise, it is required.ApplicationIDstring `json:"-"`PolicyIDstring `json:"-"`}

typeDeleteCustomNameserversParamsadded inv0.70.0

type DeleteCustomNameserversParams struct {NSNamestring}

typeDeleteDeviceSettingsPolicyResponseadded inv0.52.0

type DeleteDeviceSettingsPolicyResponse struct {ResponseResult []DeviceSettingsPolicy}

typeDeleteHostnameTLSSettingCiphersParamsadded inv0.75.0

type DeleteHostnameTLSSettingCiphersParams struct {Hostnamestring}

DeleteHostnameTLSSettingCiphersParams represents the data related to the per-hostname ciphers tls setting being deleted.

typeDeleteHostnameTLSSettingParamsadded inv0.75.0

type DeleteHostnameTLSSettingParams struct {SettingstringHostnamestring}

DeleteHostnameTLSSettingParams represents the data related to the per-hostname tls setting being deleted.

typeDeleteIPAddressFromAddressMapParamsadded inv0.63.0

type DeleteIPAddressFromAddressMapParams struct {// ID represents the target address map for adding the membershp.IDstringIPstring}

typeDeleteMagicTransitGRETunnelResponseadded inv0.32.0

type DeleteMagicTransitGRETunnelResponse struct {ResponseResult struct {Deletedbool                  `json:"deleted"`DeletedGRETunnelMagicTransitGRETunnel `json:"deleted_gre_tunnel"`} `json:"result"`}

DeleteMagicTransitGRETunnelResponse contains a response after deleting a GRE Tunnel.

typeDeleteMagicTransitIPsecTunnelResponseadded inv0.31.0

type DeleteMagicTransitIPsecTunnelResponse struct {ResponseResult struct {Deletedbool                    `json:"deleted"`DeletedIPsecTunnelMagicTransitIPsecTunnel `json:"deleted_ipsec_tunnel"`} `json:"result"`}

DeleteMagicTransitIPsecTunnelResponse contains a response after deleting an IPsec Tunnel.

typeDeleteMagicTransitStaticRouteResponseadded inv0.18.0

type DeleteMagicTransitStaticRouteResponse struct {ResponseResult struct {Deletedbool                    `json:"deleted"`DeletedRouteMagicTransitStaticRoute `json:"deleted_route"`} `json:"result"`}

DeleteMagicTransitStaticRouteResponse contains a static route deletion response.

typeDeleteMembershipFromAddressMapParamsadded inv0.63.0

type DeleteMembershipFromAddressMapParams struct {// ID represents the target address map for removing the IP address.IDstringMembershipAddressMapMembershipContainer}

typeDeleteObservatoryPageTestsParamsadded inv0.78.0

type DeleteObservatoryPageTestsParams struct {URLstring `url:"-"`Regionstring `url:"region"`}

typeDeleteObservatoryScheduledPageTestParamsadded inv0.78.0

type DeleteObservatoryScheduledPageTestParams struct {URLstring `url:"-"`Regionstring `url:"region"`}

typeDeletePagesDeploymentParamsadded inv0.40.0

type DeletePagesDeploymentParams struct {ProjectNamestring `url:"-"`DeploymentIDstring `url:"-"`Forcebool   `url:"force,omitempty"`}

typeDeleteQueueConsumerParamsadded inv0.55.0

type DeleteQueueConsumerParams struct {QueueName, ConsumerNamestring}

typeDeleteRulesetRuleParamsadded inv0.102.0

type DeleteRulesetRuleParams struct {RulesetIDstring `json:"-"`RulesetRuleIDstring `json:"-"`}

typeDeleteWaitingRoomRuleParamsadded inv0.53.0

type DeleteWaitingRoomRuleParams struct {WaitingRoomIDstringRuleIDstring}

typeDeleteWebAnalyticsRuleParamsadded inv0.75.0

type DeleteWebAnalyticsRuleParams struct {RulesetIDstringRuleIDstring}

typeDeleteWebAnalyticsSiteParamsadded inv0.75.0

type DeleteWebAnalyticsSiteParams struct {SiteTagstring}

typeDeleteWorkerParamsadded inv0.57.0

type DeleteWorkerParams struct {ScriptNamestring// DispatchNamespaceName is the dispatch namespace the Worker is uploaded to.DispatchNamespace *string}

typeDeleteWorkersKVEntriesParamsadded inv0.55.0

type DeleteWorkersKVEntriesParams struct {NamespaceIDstringKeys        []string}

typeDeleteWorkersKVEntryParamsadded inv0.55.0

type DeleteWorkersKVEntryParams struct {NamespaceIDstringKeystring}

typeDeleteWorkersSecretParamsadded inv0.57.0

type DeleteWorkersSecretParams struct {ScriptNamestringSecretNamestring}

typeDeleteZoneHoldParamsadded inv0.75.0

type DeleteZoneHoldParams struct {HoldAfter *time.Time `url:"hold_after,omitempty"`}

DeleteZoneHoldParams represents params for the Delete Zone Holdendpoint.

typeDeviceClientCertificatesadded inv0.81.0

type DeviceClientCertificates struct {ResponseResultEnabled}

DeviceClientCertificates identifies if the zero trust zone is configured for an account.

typeDeviceDexTestadded inv0.62.0

type DeviceDexTest struct {TestIDstring             `json:"test_id"`Namestring             `json:"name"`Descriptionstring             `json:"description,omitempty"`Intervalstring             `json:"interval"`Enabledbool               `json:"enabled"`Updatedtime.Time          `json:"updated"`Createdtime.Time          `json:"created"`Data        *DeviceDexTestData `json:"data"`}

typeDeviceDexTestDataadded inv0.62.0

type DeviceDexTestData map[string]interface{}

typeDeviceDexTestListResponseadded inv0.62.0

type DeviceDexTestListResponse struct {ResponseResultDeviceDexTests `json:"result"`}

typeDeviceDexTestResponseadded inv0.62.0

type DeviceDexTestResponse struct {ResponseResultDeviceDexTest `json:"result"`}

typeDeviceDexTestsadded inv0.62.0

type DeviceDexTests struct {DexTests []DeviceDexTest `json:"dex_tests"`}

typeDeviceManagedNetworkadded inv0.57.0

type DeviceManagedNetwork struct {NetworkIDstring  `json:"network_id,omitempty"`Typestring  `json:"type"`Namestring  `json:"name"`Config    *Config `json:"config"`}

typeDeviceManagedNetworkListResponseadded inv0.57.0

type DeviceManagedNetworkListResponse struct {ResponseResult []DeviceManagedNetwork `json:"result"`}

typeDeviceManagedNetworkResponseadded inv0.57.0

type DeviceManagedNetworkResponse struct {ResponseResultDeviceManagedNetwork `json:"result"`}

typeDevicePostureIntegrationadded inv0.29.0

type DevicePostureIntegration struct {IntegrationIDstring                         `json:"id,omitempty"`Namestring                         `json:"name,omitempty"`Typestring                         `json:"type,omitempty"`Intervalstring                         `json:"interval,omitempty"`ConfigDevicePostureIntegrationConfig `json:"config,omitempty"`}

DevicePostureIntegration represents a device posture integration.

typeDevicePostureIntegrationConfigadded inv0.29.0

type DevicePostureIntegrationConfig struct {ClientIDstring `json:"client_id,omitempty"`ClientSecretstring `json:"client_secret,omitempty"`AuthUrlstring `json:"auth_url,omitempty"`ApiUrlstring `json:"api_url,omitempty"`ClientKeystring `json:"client_key,omitempty"`CustomerIDstring `json:"customer_id,omitempty"`AccessClientIDstring `json:"access_client_id,omitempty"`AccessClientSecretstring `json:"access_client_secret,omitempty"`}

DevicePostureIntegrationConfig contains authentication informationfor a device posture integration.

typeDevicePostureIntegrationListResponseadded inv0.29.0

type DevicePostureIntegrationListResponse struct {Result []DevicePostureIntegration `json:"result"`ResponseResultInfo `json:"result_info"`}

DevicePostureIntegrationListResponse represents the response from the listdevice posture integrations endpoint.

typeDevicePostureIntegrationResponseadded inv0.29.0

type DevicePostureIntegrationResponse struct {ResultDevicePostureIntegration `json:"result"`ResponseResultInfo `json:"result_info"`}

DevicePostureIntegrationResponse represents the response from the getdevice posture integrations endpoint.

typeDevicePostureRuleadded inv0.17.0

type DevicePostureRule struct {IDstring                   `json:"id,omitempty"`Typestring                   `json:"type"`Namestring                   `json:"name"`Descriptionstring                   `json:"description,omitempty"`Schedulestring                   `json:"schedule,omitempty"`Match       []DevicePostureRuleMatch `json:"match,omitempty"`InputDevicePostureRuleInput   `json:"input,omitempty"`Expirationstring                   `json:"expiration,omitempty"`}

DevicePostureRule represents a device posture rule.

typeDevicePostureRuleDetailResponseadded inv0.17.0

type DevicePostureRuleDetailResponse struct {ResponseResultDevicePostureRule `json:"result"`}

DevicePostureRuleDetailResponse is the API response, containing a singledevice posture rule.

typeDevicePostureRuleInputadded inv0.17.0

type DevicePostureRuleInput struct {IDstring               `json:"id,omitempty"`Pathstring               `json:"path,omitempty"`Exists           *bool                `json:"exists,omitempty"`Thumbprintstring               `json:"thumbprint,omitempty"`Sha256string               `json:"sha256,omitempty"`Running          *bool                `json:"running,omitempty"`RequireAll       *bool                `json:"requireAll,omitempty"`CheckDisks       []string             `json:"checkDisks,omitempty"`Enabled          *bool                `json:"enabled,omitempty"`Versionstring               `json:"version,omitempty"`VersionOperatorstring               `json:"versionOperator,omitempty"`Overallstring               `json:"overall,omitempty"`SensorConfigstring               `json:"sensor_config,omitempty"`Osstring               `json:"os,omitempty"`OsDistroNamestring               `json:"os_distro_name,omitempty"`OsDistroRevisionstring               `json:"os_distro_revision,omitempty"`OSVersionExtrastring               `json:"os_version_extra,omitempty"`Operatorstring               `json:"operator,omitempty"`Domainstring               `json:"domain,omitempty"`ComplianceStatusstring               `json:"compliance_status,omitempty"`ConnectionIDstring               `json:"connection_id,omitempty"`IssueCountstring               `json:"issue_count,omitempty"`CountOperatorstring               `json:"countOperator,omitempty"`TotalScoreint                  `json:"total_score,omitempty"`ScoreOperatorstring               `json:"scoreOperator,omitempty"`CertificateIDstring               `json:"certificate_id,omitempty"`CommonNamestring               `json:"cn,omitempty"`ActiveThreatsint                  `json:"active_threats,omitempty"`NetworkStatusstring               `json:"network_status,omitempty"`Infected         *bool                `json:"infected,omitempty"`IsActive         *bool                `json:"is_active,omitempty"`OperationalState *string              `json:"operational_state,omitempty"`EidLastSeenstring               `json:"eid_last_seen,omitempty"`RiskLevelstring               `json:"risk_level,omitempty"`Statestring               `json:"state,omitempty"`LastSeenstring               `json:"last_seen,omitempty"`ExtendedKeyUsage []string             `json:"extended_key_usage,omitempty"`CheckPrivateKey  *bool                `json:"check_private_key,omitempty"`LocationsCertificateLocations `json:"locations,omitempty"`Scoreint                  `json:"score,omitempty"`}

DevicePostureRuleInput represents the value to be checked against.

typeDevicePostureRuleListResponseadded inv0.17.0

type DevicePostureRuleListResponse struct {Result []DevicePostureRule `json:"result"`ResponseResultInfo `json:"result_info"`}

DevicePostureRuleListResponse represents the response from the listdevice posture rules endpoint.

typeDevicePostureRuleMatchadded inv0.17.0

type DevicePostureRuleMatch struct {Platformstring `json:"platform,omitempty"`}

DevicePostureRuleMatch represents the conditions that the client must match to run the rule.

typeDeviceSettingsPolicyadded inv0.52.0

type DeviceSettingsPolicy struct {ServiceModeV2       *ServiceModeV2    `json:"service_mode_v2"`DisableAutoFallback *bool             `json:"disable_auto_fallback"`FallbackDomains     *[]FallbackDomain `json:"fallback_domains"`Include             *[]SplitTunnel    `json:"include"`Exclude             *[]SplitTunnel    `json:"exclude"`GatewayUniqueID     *string           `json:"gateway_unique_id"`SupportURL          *string           `json:"support_url"`CaptivePortal       *int              `json:"captive_portal"`AllowModeSwitch     *bool             `json:"allow_mode_switch"`SwitchLocked        *bool             `json:"switch_locked"`AllowUpdates        *bool             `json:"allow_updates"`AutoConnect         *int              `json:"auto_connect"`AllowedToLeave      *bool             `json:"allowed_to_leave"`PolicyID            *string           `json:"policy_id"`Enabled             *bool             `json:"enabled"`Name                *string           `json:"name"`Match               *string           `json:"match"`Precedence          *int              `json:"precedence"`Defaultbool              `json:"default"`ExcludeOfficeIps    *bool             `json:"exclude_office_ips"`Description         *string           `json:"description"`LANAllowMinutes     *uint             `json:"lan_allow_minutes"`LANAllowSubnetSize  *uint             `json:"lan_allow_subnet_size"`TunnelProtocol      *string           `json:"tunnel_protocol"`}

typeDeviceSettingsPolicyResponseadded inv0.52.0

type DeviceSettingsPolicyResponse struct {ResponseResultDeviceSettingsPolicy}

typeDiagnosticsTracerouteConfigurationadded inv0.13.1

type DiagnosticsTracerouteConfiguration struct {Targets []string                                  `json:"targets"`Colos   []string                                  `json:"colos,omitempty"`OptionsDiagnosticsTracerouteConfigurationOptions `json:"options,omitempty"`}

DiagnosticsTracerouteConfiguration is the overarching structure of thediagnostics traceroute requests.

typeDiagnosticsTracerouteConfigurationOptionsadded inv0.13.1

type DiagnosticsTracerouteConfigurationOptions struct {PacketsPerTTLint    `json:"packets_per_ttl"`PacketTypestring `json:"packet_type"`MaxTTLint    `json:"max_ttl"`WaitTimeint    `json:"wait_time"`}

DiagnosticsTracerouteConfigurationOptions contains the options for performingtraceroutes.

typeDiagnosticsTracerouteResponseadded inv0.13.1

type DiagnosticsTracerouteResponse struct {ResponseResult []DiagnosticsTracerouteResponseResult `json:"result"`}

DiagnosticsTracerouteResponse is the outer response of the API response.

typeDiagnosticsTracerouteResponseColoadded inv0.13.1

type DiagnosticsTracerouteResponseColo struct {Namestring `json:"name"`Citystring `json:"city"`}

DiagnosticsTracerouteResponseColo contains the Name and City of a colocation.

typeDiagnosticsTracerouteResponseColosadded inv0.13.1

type DiagnosticsTracerouteResponseColos struct {Errorstring                              `json:"error"`ColoDiagnosticsTracerouteResponseColo   `json:"colo"`TracerouteTimeMsint                                 `json:"traceroute_time_ms"`TargetSummaryDiagnosticsTracerouteResponseNodes  `json:"target_summary"`Hops             []DiagnosticsTracerouteResponseHops `json:"hops"`}

DiagnosticsTracerouteResponseColos is the summary struct of a colocation test.

typeDiagnosticsTracerouteResponseHopsadded inv0.13.1

type DiagnosticsTracerouteResponseHops struct {PacketsTTLint                                  `json:"packets_ttl"`PacketsSentint                                  `json:"packets_sent"`PacketsLostint                                  `json:"packets_lost"`Nodes       []DiagnosticsTracerouteResponseNodes `json:"nodes"`}

DiagnosticsTracerouteResponseHops holds packet and node information of thehops.

typeDiagnosticsTracerouteResponseNodesadded inv0.13.1

type DiagnosticsTracerouteResponseNodes struct {Asnstring  `json:"asn"`IPstring  `json:"ip"`Namestring  `json:"name"`PacketCountint     `json:"packet_count"`MeanRttMsfloat64 `json:"mean_rtt_ms"`StdDevRttMsfloat64 `json:"std_dev_rtt_ms"`MinRttMsfloat64 `json:"min_rtt_ms"`MaxRttMsfloat64 `json:"max_rtt_ms"`}

DiagnosticsTracerouteResponseNodes holds a summary of nodes contacted in thetraceroute.

typeDiagnosticsTracerouteResponseResultadded inv0.13.1

type DiagnosticsTracerouteResponseResult struct {Targetstring                               `json:"target"`Colos  []DiagnosticsTracerouteResponseColos `json:"colos"`}

DiagnosticsTracerouteResponseResult is the inner API response for thetraceroute request.

typeDispatchNamespaceBindingadded inv0.74.0

type DispatchNamespaceBinding struct {BindingstringNamespacestringOutbound  *NamespaceOutboundOptions}

DispatchNamespaceBinding is a binding to a Workers for Platforms namespace

https://developers.cloudflare.com/workers/platform/bindings/#dispatch-namespace-bindings-workers-for-platforms

func (DispatchNamespaceBinding)Typeadded inv0.74.0

Type returns the type of the binding.

typeDomainDetailsadded inv0.44.0

type DomainDetails struct {Domainstring                `json:"domain"`ResolvesToRefs        []ResolvesToRefs      `json:"resolves_to_refs"`PopularityRankint                   `json:"popularity_rank"`ApplicationApplication           `json:"application"`RiskTypes             []interface{}         `json:"risk_types"`ContentCategories     []ContentCategories   `json:"content_categories"`AdditionalInformationAdditionalInformation `json:"additional_information"`}

DomainDetails represents details for a domain.

typeDomainDetailsResponseadded inv0.44.0

type DomainDetailsResponse struct {ResponseResultDomainDetails `json:"result,omitempty"`}

DomainDetailsResponse represents an API response for domain details.

typeDomainHistoryadded inv0.44.0

type DomainHistory struct {Domainstring            `json:"domain"`Categorizations []Categorizations `json:"categorizations"`}

DomainHistory represents the history for a domain.

typeDurationadded inv0.9.0

type Duration struct {time.Duration}

Duration implements json.Marshaler and json.Unmarshaler for time.Durationusing the fmt.Stringer interface of time.Duration and time.ParseDuration.

Example
d := Duration{1 * time.Second}fmt.Println(d)buf, err := json.Marshal(d)fmt.Println(string(buf), err)err = json.Unmarshal([]byte(`"5s"`), &d)fmt.Println(d, err)d.Duration += time.Secondfmt.Println(d, err)
Output:1s"1s" <nil>5s <nil>6s <nil>

func (Duration)MarshalJSONadded inv0.9.0

func (dDuration) MarshalJSON() ([]byte,error)

MarshalJSON encodes a Duration as a JSON string formatted using String.

func (*Duration)UnmarshalJSONadded inv0.9.0

func (d *Duration) UnmarshalJSON(buf []byte)error

UnmarshalJSON decodes a Duration from a JSON string parsed using time.ParseDuration.

typeEgressSettingsadded inv0.59.0

type EgressSettings struct {Ipv6Rangestring `json:"ipv6"`Ipv4string `json:"ipv4"`Ipv4Fallbackstring `json:"ipv4_fallback"`}

typeEmailRoutingCatchAllRuleadded inv0.47.0

type EmailRoutingCatchAllRule struct {Tagstring                    `json:"tag,omitempty"`Namestring                    `json:"name,omitempty"`Enabled  *bool                     `json:"enabled,omitempty"`Matchers []EmailRoutingRuleMatcher `json:"matchers,omitempty"`Actions  []EmailRoutingRuleAction  `json:"actions,omitempty"`}

typeEmailRoutingCatchAllRuleResponseadded inv0.49.0

type EmailRoutingCatchAllRuleResponse struct {ResultEmailRoutingCatchAllRule `json:"result"`Response}

typeEmailRoutingDNSSettingsResponseadded inv0.47.0

type EmailRoutingDNSSettingsResponse struct {Result []DNSRecord `json:"result,omitempty"`Response}

typeEmailRoutingDestinationAddressadded inv0.47.0

type EmailRoutingDestinationAddress struct {Tagstring     `json:"tag,omitempty"`Emailstring     `json:"email,omitempty"`Verified *time.Time `json:"verified,omitempty"`Created  *time.Time `json:"created,omitempty"`Modified *time.Time `json:"modified,omitempty"`}

typeEmailRoutingRuleadded inv0.47.0

type EmailRoutingRule struct {Tagstring                    `json:"tag,omitempty"`Namestring                    `json:"name,omitempty"`Priorityint                       `json:"priority,omitempty"`Enabled  *bool                     `json:"enabled,omitempty"`Matchers []EmailRoutingRuleMatcher `json:"matchers,omitempty"`Actions  []EmailRoutingRuleAction  `json:"actions,omitempty"`}

typeEmailRoutingRuleActionadded inv0.47.0

type EmailRoutingRuleAction struct {Typestring   `json:"type,omitempty"`Value []string `json:"value,omitempty"`}

typeEmailRoutingRuleMatcheradded inv0.47.0

type EmailRoutingRuleMatcher struct {Typestring `json:"type,omitempty"`Fieldstring `json:"field,omitempty"`Valuestring `json:"value,omitempty"`}

typeEmailRoutingSettingsadded inv0.47.0

type EmailRoutingSettings struct {Tagstring     `json:"tag,omitempty"`Namestring     `json:"name,omitempty"`Enabledbool       `json:"enabled,omitempty"`Created    *time.Time `json:"created,omitempty"`Modified   *time.Time `json:"modified,omitempty"`SkipWizard *bool      `json:"skip_wizard,omitempty"`Statusstring     `json:"status,omitempty"`}

typeEmailRoutingSettingsResponseadded inv0.47.0

type EmailRoutingSettingsResponse struct {ResultEmailRoutingSettings `json:"result,omitempty"`Response}

typeEnabledadded inv0.33.0

type Enabled struct {Enabledbool `json:"enabled"`}

typeEnvVarTypeadded inv0.56.0

type EnvVarTypestring
const (PlainTextEnvVarType = "plain_text"SecretTextEnvVarType = "secret_text")

typeEnvironmentVariableadded inv0.56.0

type EnvironmentVariable struct {Valuestring     `json:"value"`TypeEnvVarType `json:"type"`}

PagesProjectDeploymentVar represents a deployment environment variable.

typeEnvironmentVariableMapadded inv0.56.0

type EnvironmentVariableMap map[string]*EnvironmentVariable

typeError

type Error struct {// The classification of error encountered.TypeErrorType// StatusCode is the HTTP status code from the response.StatusCodeint// Errors is all of the error messages and codes, combined.Errors []ResponseInfo// ErrorCodes is a list of all the error codes.ErrorCodes []int// ErrorMessages is a list of all the error codes.ErrorMessages []string// Messages is a list of informational messages provided by the endpoint.Messages []ResponseInfo// RayID is the internal identifier for the request that was made.RayIDstring}

func (*Error)ClientErroradded inv0.36.0

func (e *Error) ClientError()bool

ClientError returns a boolean whether or not the raised error was caused bysomething client side.

func (*Error)ClientRateLimitedadded inv0.36.0

func (e *Error) ClientRateLimited()bool

ClientRateLimited returns a boolean whether or not the raised error wascaused by too many requests from the client.

func (Error)Erroradded inv0.36.0

func (eError) Error()string

func (*Error)ErrorMessageContainsadded inv0.36.0

func (e *Error) ErrorMessageContains(sstring)bool

ErrorMessageContains returns a boolean whether or not a substring exists inany of the `e.ErrorMessages` slice entries.

func (*Error)InternalErrorCodeIsadded inv0.36.0

func (e *Error) InternalErrorCodeIs(codeint)bool

InternalErrorCodeIs returns a boolean whether or not the desired internalerror code is present in `e.InternalErrorCodes`.

typeErrorTypeadded inv0.36.0

type ErrorTypestring
const (ErrorTypeRequestErrorType = "request"ErrorTypeAuthenticationErrorType = "authentication"ErrorTypeAuthorizationErrorType = "authorization"ErrorTypeNotFoundErrorType = "not_found"ErrorTypeRateLimitErrorType = "rate_limit"ErrorTypeServiceErrorType = "service")

typeExportDNSRecordsParamsadded inv0.66.0

type ExportDNSRecordsParams struct{}

typeFallbackDomainadded inv0.29.0

type FallbackDomain struct {Suffixstring   `json:"suffix,omitempty"`Descriptionstring   `json:"description,omitempty"`DNSServer   []string `json:"dns_server,omitempty"`}

FallbackDomain represents the individual domain struct.

typeFallbackDomainResponseadded inv0.29.0

type FallbackDomainResponse struct {ResponseResult []FallbackDomain `json:"result"`}

FallbackDomainResponse represents the response from the get fallbackdomain endpoints.

typeFallbackOriginadded inv0.10.1

type FallbackOrigin struct {Valuestring `json:"value"`IDstring `json:"id,omitempty"`}

FallbackOrigin describes a fallback origin.

typeFallbackOriginResponseadded inv0.10.1

type FallbackOriginResponse struct {ResponseResultFallbackOrigin `json:"result"`}

FallbackOriginResponse represents the response from the fallback_origin endpoint.

typeFileTypeadded inv0.112.0

type FileType =string

typeFilteradded inv0.9.0

type Filter struct {IDstring `json:"id,omitempty"`Expressionstring `json:"expression"`Pausedbool   `json:"paused"`Descriptionstring `json:"description"`// Property is mentioned in documentation however isn't populated in// any of the API requests. For now, let's just omit it unless it's// provided.Refstring `json:"ref,omitempty"`}

Filter holds the structure of the filter type.

typeFilterCreateParamsadded inv0.47.0

type FilterCreateParams struct {IDstring `json:"id,omitempty"`Expressionstring `json:"expression"`Pausedbool   `json:"paused"`Descriptionstring `json:"description"`Refstring `json:"ref,omitempty"`}

FilterCreateParams contains required and optional paramsfor creating a filter.

typeFilterDetailResponseadded inv0.9.0

type FilterDetailResponse struct {ResultFilter `json:"result"`ResultInfo `json:"result_info"`Response}

FilterDetailResponse is the API response that is returnedfor requesting a single filter on a zone.

typeFilterListParams

type FilterListParams struct {ResultInfo}

typeFilterUpdateParams

type FilterUpdateParams struct {IDstring `json:"id"`Expressionstring `json:"expression"`Pausedbool   `json:"paused"`Descriptionstring `json:"description"`Refstring `json:"ref,omitempty"`}

FilterUpdateParams contains required and optional paramsfor updating a filter.

typeFilterValidateExpressionadded inv0.9.0

type FilterValidateExpression struct {Expressionstring `json:"expression"`}

FilterValidateExpression represents the JSON payload for checkingan expression.

typeFilterValidateExpressionResponseadded inv0.9.0

type FilterValidateExpressionResponse struct {Successbool                                `json:"success"`Errors  []FilterValidationExpressionMessage `json:"errors"`}

FilterValidateExpressionResponse represents the API response forchecking the expression. It conforms to the JSON API approach howeverwe don't need all of the fields exposed.

typeFilterValidationExpressionMessageadded inv0.9.0

type FilterValidationExpressionMessage struct {Messagestring `json:"message"`}

FilterValidationExpressionMessage represents the API error message.

typeFiltersDetailResponseadded inv0.9.0

type FiltersDetailResponse struct {Result     []Filter `json:"result"`ResultInfo `json:"result_info"`Response}

FiltersDetailResponse is the API response that is returnedfor requesting all filters on a zone.

typeFirewallRuleadded inv0.9.0

type FirewallRule struct {IDstring      `json:"id,omitempty"`Pausedbool        `json:"paused"`Descriptionstring      `json:"description"`Actionstring      `json:"action"`Priority    interface{} `json:"priority"`FilterFilter      `json:"filter"`Products    []string    `json:"products,omitempty"`Refstring      `json:"ref,omitempty"`CreatedOntime.Time   `json:"created_on,omitempty"`ModifiedOntime.Time   `json:"modified_on,omitempty"`}

FirewallRule is the struct of the firewall rule.

typeFirewallRuleCreateParamsadded inv0.47.0

type FirewallRuleCreateParams struct {IDstring      `json:"id,omitempty"`Pausedbool        `json:"paused"`Descriptionstring      `json:"description"`Actionstring      `json:"action"`Priority    interface{} `json:"priority"`FilterFilter      `json:"filter"`Products    []string    `json:"products,omitempty"`Refstring      `json:"ref,omitempty"`}

FirewallRuleCreateParams contains required and optional paramsfor creating a firewall rule.

typeFirewallRuleListParams

type FirewallRuleListParams struct {ResultInfo}

typeFirewallRuleResponseadded inv0.9.0

type FirewallRuleResponse struct {ResultFirewallRule `json:"result"`ResultInfo `json:"result_info"`Response}

FirewallRuleResponse is the API response that is returnedfor requesting a single firewall rule on a zone.

typeFirewallRuleUpdateParams

type FirewallRuleUpdateParams struct {IDstring      `json:"id"`Pausedbool        `json:"paused"`Descriptionstring      `json:"description"`Actionstring      `json:"action"`Priority    interface{} `json:"priority"`FilterFilter      `json:"filter"`Products    []string    `json:"products,omitempty"`Refstring      `json:"ref,omitempty"`}

FirewallRuleUpdateParams contains required and optional paramsfor updating a firewall rule.

typeFirewallRulesDetailResponseadded inv0.9.0

type FirewallRulesDetailResponse struct {Result     []FirewallRule `json:"result"`ResultInfo `json:"result_info"`Response}

FirewallRulesDetailResponse is the API response for the firewallrules.

typeGatewayCategoriesResponseadded inv0.100.0

type GatewayCategoriesResponse struct {Successbool              `json:"success"`Result     []GatewayCategory `json:"result"`Errors     []string          `json:"errors"`Messages   []string          `json:"messages"`ResultInfoResultInfo        `json:"result_info"`}

GatewayCategoriesResponse represents the response from the listgateway categories endpoint.

typeGatewayCategoryadded inv0.100.0

type GatewayCategory struct {Beta          *bool             `json:"beta,omitempty"`Classstring            `json:"class"`Descriptionstring            `json:"description"`IDint               `json:"id"`Namestring            `json:"name"`Subcategories []GatewayCategory `json:"subcategories"`}

GatewayCategory represents a single gateway category.

typeGenerateMagicTransitIPsecTunnelPSKResponseadded inv0.41.0

type GenerateMagicTransitIPsecTunnelPSKResponse struct {ResponseResult struct {Pskstring                              `json:"psk"`PskMetadata *MagicTransitIPsecTunnelPskMetadata `json:"psk_metadata"`} `json:"result"`}

GenerateMagicTransitIPsecTunnelPSKResponse contains a response after generating IPsec Tunnel.

typeGetAPIShieldOperationParamsadded inv0.78.0

type GetAPIShieldOperationParams struct {// The Operation ID to retrieveOperationIDstring `url:"-"`// Features represents a set of features to return in `features` object when// performing making read requests against an Operation or listing operations.Features []string `url:"feature,omitempty"`}

GetAPIShieldOperationParams represents the parameters to pass when retrieving an operation.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/methods/get/

typeGetAPIShieldOperationSchemaValidationSettingsParamsadded inv0.80.0

type GetAPIShieldOperationSchemaValidationSettingsParams struct {// The Operation ID to apply the mitigation action toOperationIDstring `url:"-"`}

GetAPIShieldOperationSchemaValidationSettingsParams represents the parameters to pass to retrievethe schema validation settings set on the operation.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/subresources/schema_validation/methods/get/

typeGetAPIShieldSchemaParamsadded inv0.79.0

type GetAPIShieldSchemaParams struct {// SchemaID is the ID of the schema to retrieveSchemaIDstring `url:"-"`// OmitSource specifies whether the contents of the schema should be returned in the "Source" field.OmitSource *bool `url:"omit_source,omitempty"`}

GetAPIShieldSchemaParams represents the parameters to pass when retrieving a schema with a given schema ID.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/get/

typeGetAccessMutualTLSHostnameSettingsResponseadded inv0.90.0

type GetAccessMutualTLSHostnameSettingsResponse struct {ResponseResult []AccessMutualTLSHostnameSettings `json:"result"`}

typeGetAccessOrganizationParamsadded inv0.71.0

type GetAccessOrganizationParams struct{}

typeGetAccessPolicyParamsadded inv0.71.0

type GetAccessPolicyParams struct {PolicyIDstring `json:"-"`// ApplicationID is the application ID for which to scope the policy for.// Optional, but if included, the policy returned will include its execution precedence within the application.ApplicationIDstring `json:"-"`}

typeGetAccessUserLastSeenIdentityResultadded inv0.81.0

type GetAccessUserLastSeenIdentityResult struct {AccountIDstring                             `json:"account_id"`AuthStatusstring                             `json:"auth_status"`CommonNamestring                             `json:"common_name"`DevicePosture      map[string]AccessUserDevicePosture `json:"devicePosture"`DeviceSessions     map[string]AccessUserDeviceSession `json:"device_sessions"`DeviceIDstring                             `json:"device_id"`Emailstring                             `json:"email"`GeoAccessUserIdentityGeo              `json:"geo"`IATint64                              `json:"iat"`IDPAccessUserIDP                      `json:"idp"`IPstring                             `json:"ip"`IsGateway          *bool                              `json:"is_gateway"`IsWarp             *bool                              `json:"is_warp"`MtlsAuthAccessUserMTLSAuth                 `json:"mtls_auth"`ServiceTokenIDstring                             `json:"service_token_id"`ServiceTokenStatus *bool                              `json:"service_token_status"`UserUUIDstring                             `json:"user_uuid"`Versionint                                `json:"version"`}

typeGetAccessUserSingleActiveSessionResponseadded inv0.81.0

type GetAccessUserSingleActiveSessionResponse struct {ResultGetAccessUserSingleActiveSessionResult `json:"result"`ResultInfo `json:"result_info"`Response}

typeGetAccessUserSingleActiveSessionResultadded inv0.81.0

type GetAccessUserSingleActiveSessionResult struct {AccountIDstring                             `json:"account_id"`AuthStatusstring                             `json:"auth_status"`CommonNamestring                             `json:"common_name"`DevicePosture      map[string]AccessUserDevicePosture `json:"devicePosture"`DeviceSessions     map[string]AccessUserDeviceSession `json:"device_sessions"`DeviceIDstring                             `json:"device_id"`Emailstring                             `json:"email"`GeoAccessUserIdentityGeo              `json:"geo"`IATint64                              `json:"iat"`IDPAccessUserIDP                      `json:"idp"`IPstring                             `json:"ip"`IsGateway          *bool                              `json:"is_gateway"`IsWarp             *bool                              `json:"is_warp"`MtlsAuthAccessUserMTLSAuth                 `json:"mtls_auth"`ServiceTokenIDstring                             `json:"service_token_id"`ServiceTokenStatus *bool                              `json:"service_token_status"`UserUUIDstring                             `json:"user_uuid"`Versionint                                `json:"version"`IsActive           *bool                              `json:"isActive"`}

typeGetAddressMapResponseadded inv0.63.0

type GetAddressMapResponse struct {ResponseResultAddressMap `json:"result"`}

GetAddressMapResponse contains a specific address map's API Response.

typeGetAdvertisementStatusResponseadded inv0.11.7

type GetAdvertisementStatusResponse struct {ResponseResultAdvertisementStatus `json:"result"`}

GetAdvertisementStatusResponse contains an API Response for the BGP status of the IP Prefix.

typeGetAuditSSHSettingsParamsadded inv0.79.0

type GetAuditSSHSettingsParams struct{}

typeGetBulkDomainDetailsParametersadded inv0.44.0

type GetBulkDomainDetailsParameters struct {AccountIDstring   `url:"-"`Domains   []string `url:"domain"`}

GetBulkDomainDetailsParameters represents the parameters for bulk domain details request.

typeGetBulkDomainDetailsResponseadded inv0.44.0

type GetBulkDomainDetailsResponse struct {ResponseResult []DomainDetails `json:"result,omitempty"`}

GetBulkDomainDetailsResponse represents an API response for bulk domain details.

typeGetCacheReserveParamsadded inv0.68.0

type GetCacheReserveParams struct{}

typeGetCustomNameserverZoneMetadataParamsadded inv0.70.0

type GetCustomNameserverZoneMetadataParams struct{}

typeGetCustomNameserversParamsadded inv0.70.0

type GetCustomNameserversParams struct{}

typeGetDCVDelegationParamsadded inv0.77.0

type GetDCVDelegationParams struct{}

typeGetDLPPayloadLogSettingsParamsadded inv0.62.0

type GetDLPPayloadLogSettingsParams struct{}

typeGetDNSFirewallClusterParamsadded inv0.70.0

type GetDNSFirewallClusterParams struct {ClusterIDstring `json:"-"`}

typeGetDNSFirewallUserAnalyticsParamsadded inv0.70.0

type GetDNSFirewallUserAnalyticsParams struct {ClusterIDstring `json:"-"`DNSFirewallUserAnalyticsOptions}

typeGetDefaultDeviceSettingsPolicyParamsadded inv0.81.0

type GetDefaultDeviceSettingsPolicyParams struct{}

typeGetDeviceClientCertificatesParamsadded inv0.81.0

type GetDeviceClientCertificatesParams struct{}

typeGetDeviceSettingsPolicyParamsadded inv0.81.0

type GetDeviceSettingsPolicyParams struct {PolicyID *string `json:"-"`}

typeGetDomainDetailsParametersadded inv0.44.0

type GetDomainDetailsParameters struct {AccountIDstring `url:"-"`Domainstring `url:"domain,omitempty"`}

GetDomainDetailsParameters represent the parameters for a domain details request.

typeGetDomainHistoryParametersadded inv0.44.0

type GetDomainHistoryParameters struct {AccountIDstring `url:"-"`Domainstring `url:"domain,omitempty"`}

GetDomainHistoryParameters represents the parameters for domain history request.

typeGetDomainHistoryResponseadded inv0.44.0

type GetDomainHistoryResponse struct {ResponseResult []DomainHistory `json:"result,omitempty"`}

GetDomainHistoryResponse represents an API response for domain history.

typeGetEligibleZonesAccountCustomNameserversParamsadded inv0.70.0

type GetEligibleZonesAccountCustomNameserversParams struct{}

typeGetEmailRoutingRuleResponseadded inv0.47.0

type GetEmailRoutingRuleResponse struct {ResultEmailRoutingRule `json:"result"`Response}

typeGetIPPrefixResponseadded inv0.11.7

type GetIPPrefixResponse struct {ResponseResultIPPrefix `json:"result"`}

GetIPPrefixResponse contains a specific IP prefix's API Response.

typeGetLogpushFieldsParamsadded inv0.72.0

type GetLogpushFieldsParams struct {Datasetstring `json:"-"`}

typeGetLogpushOwnershipChallengeParamsadded inv0.72.0

type GetLogpushOwnershipChallengeParams struct {DestinationConfstring `json:"destination_conf"`}

typeGetMagicFirewallRulesetResponseadded inv0.13.7

type GetMagicFirewallRulesetResponse struct {ResponseResultMagicFirewallRuleset `json:"result"`}

GetMagicFirewallRulesetResponse contains a single Magic Firewall Ruleset.

typeGetMagicTransitGRETunnelResponseadded inv0.32.0

type GetMagicTransitGRETunnelResponse struct {ResponseResult struct {GRETunnelMagicTransitGRETunnel `json:"gre_tunnel"`} `json:"result"`}

GetMagicTransitGRETunnelResponse contains a response including zero or one GRE tunnels.

typeGetMagicTransitIPsecTunnelResponseadded inv0.31.0

type GetMagicTransitIPsecTunnelResponse struct {ResponseResult struct {IPsecTunnelMagicTransitIPsecTunnel `json:"ipsec_tunnel"`} `json:"result"`}

GetMagicTransitIPsecTunnelResponse contains a response including zero or one IPsec tunnels.

typeGetMagicTransitStaticRouteResponseadded inv0.18.0

type GetMagicTransitStaticRouteResponse struct {ResponseResult struct {RouteMagicTransitStaticRoute `json:"route"`} `json:"result"`}

GetMagicTransitStaticRouteResponse contains a response including exactly one static route.

typeGetObservatoryPageTestParamsadded inv0.78.0

type GetObservatoryPageTestParams struct {URLstringTestIDstring}

typeGetObservatoryPageTrendParamsadded inv0.78.0

type GetObservatoryPageTrendParams struct {URLstring     `url:"-"`Regionstring     `url:"region"`DeviceTypestring     `url:"deviceType"`Start      *time.Time `url:"start"`End        *time.Time `url:"end,omitempty"`Timezonestring     `url:"tz"`Metrics    []string   `url:"metrics"`}

typeGetObservatoryScheduledPageTestParamsadded inv0.78.0

type GetObservatoryScheduledPageTestParams struct {URLstring `url:"-"`Regionstring `url:"region"`}

typeGetPageShieldSettingsParamsadded inv0.84.0

type GetPageShieldSettingsParams struct{}

typeGetPagesDeploymentInfoParamsadded inv0.40.0

type GetPagesDeploymentInfoParams struct {ProjectNamestringDeploymentIDstring}

typeGetPagesDeploymentLogsParamsadded inv0.43.0

type GetPagesDeploymentLogsParams struct {ProjectNamestringDeploymentIDstringSizeOptions}

typeGetPagesDeploymentStageLogsParamsadded inv0.40.0

type GetPagesDeploymentStageLogsParams struct {ProjectNamestringDeploymentIDstringStageNamestringSizeOptions}

typeGetRegionalTieredCacheParamsadded inv0.73.0

type GetRegionalTieredCacheParams struct{}

typeGetRulesetResponseadded inv0.19.0

type GetRulesetResponse struct {ResponseResultRuleset `json:"result"`}

GetRulesetResponse contains a single Ruleset.

typeGetWebAnalyticsSiteParamsadded inv0.75.0

type GetWebAnalyticsSiteParams struct {SiteTagstring}

typeGetWorkersForPlatformsDispatchNamespaceResponseadded inv0.90.0

type GetWorkersForPlatformsDispatchNamespaceResponse struct {ResponseResultWorkersForPlatformsDispatchNamespace `json:"result"`}

typeGetWorkersKVParamsadded inv0.55.0

type GetWorkersKVParams struct {NamespaceIDstringKeystring}

typeGetZarazConfigsByIdResponseadded inv0.86.0

type GetZarazConfigsByIdResponse = map[string]interface{}

typeGetZoneHoldParamsadded inv0.75.0

type GetZoneHoldParams struct{}

typeGetZoneSettingParamsadded inv0.64.0

type GetZoneSettingParams struct {Namestring `json:"-"`PathPrefixstring `json:"-"`}

typeHealthcheckadded inv0.11.1

type Healthcheck struct {IDstring                 `json:"id,omitempty"`CreatedOn            *time.Time             `json:"created_on,omitempty"`ModifiedOn           *time.Time             `json:"modified_on,omitempty"`Namestring                 `json:"name"`Descriptionstring                 `json:"description"`Suspendedbool                   `json:"suspended"`Addressstring                 `json:"address"`Retriesint                    `json:"retries,omitempty"`Timeoutint                    `json:"timeout,omitempty"`Intervalint                    `json:"interval,omitempty"`ConsecutiveSuccessesint                    `json:"consecutive_successes,omitempty"`ConsecutiveFailsint                    `json:"consecutive_fails,omitempty"`Typestring                 `json:"type,omitempty"`CheckRegions         []string               `json:"check_regions"`HTTPConfig           *HealthcheckHTTPConfig `json:"http_config,omitempty"`TCPConfig            *HealthcheckTCPConfig  `json:"tcp_config,omitempty"`Statusstring                 `json:"status"`FailureReasonstring                 `json:"failure_reason"`}

Healthcheck describes a Healthcheck object.

typeHealthcheckHTTPConfigadded inv0.11.1

type HealthcheckHTTPConfig struct {Methodstring              `json:"method"`Portuint16              `json:"port,omitempty"`Pathstring              `json:"path"`ExpectedCodes   []string            `json:"expected_codes"`ExpectedBodystring              `json:"expected_body"`FollowRedirectsbool                `json:"follow_redirects"`AllowInsecurebool                `json:"allow_insecure"`Header          map[string][]string `json:"header"`}

HealthcheckHTTPConfig describes configuration for a HTTP healthcheck.

typeHealthcheckListResponse

type HealthcheckListResponse struct {ResponseResult     []Healthcheck `json:"result"`ResultInfo `json:"result_info"`}

HealthcheckListResponse is the API response, containing an array of healthchecks.

typeHealthcheckResponseadded inv0.11.1

type HealthcheckResponse struct {ResponseResultHealthcheck `json:"result"`}

HealthcheckResponse is the API response, containing a single healthcheck.

typeHealthcheckTCPConfigadded inv0.11.5

type HealthcheckTCPConfig struct {Methodstring `json:"method"`Portuint16 `json:"port,omitempty"`}

HealthcheckTCPConfig describes configuration for a TCP healthcheck.

typeHostnameadded inv0.68.0

type Hostname struct {UrlHostnamestring `json:"url_hostname"`}

typeHostnameAssociationadded inv0.112.0

type HostnameAssociation =string

typeHostnameAssociationsadded inv0.112.0

type HostnameAssociations struct {Hostnames []HostnameAssociation `json:"hostnames"`}

typeHostnameAssociationsResponseadded inv0.112.0

type HostnameAssociationsResponse struct {ResponseResultHostnameAssociations `json:"result"`}

typeHostnameAssociationsUpdateRequestadded inv0.112.0

type HostnameAssociationsUpdateRequest struct {Hostnames         []HostnameAssociation `json:"hostnames,omitempty"`MTLSCertificateIDstring                `json:"mtls_certificate_id,omitempty"`}

typeHostnameTLSSettingadded inv0.75.0

type HostnameTLSSetting struct {Hostnamestring     `json:"hostname"`Valuestring     `json:"value"`Statusstring     `json:"status"`CreatedAt *time.Time `json:"created_at"`UpdatedAt *time.Time `json:"updated_at"`}

HostnameTLSSetting represents the metadata for a user-created tls setting.

typeHostnameTLSSettingCiphersadded inv0.75.0

type HostnameTLSSettingCiphers struct {Hostnamestring     `json:"hostname"`Value     []string   `json:"value"`Statusstring     `json:"status"`CreatedAt *time.Time `json:"created_at"`UpdatedAt *time.Time `json:"updated_at"`}

HostnameTLSSettingCiphers represents the metadata for a user-created ciphers tls setting.

typeHostnameTLSSettingCiphersResponseadded inv0.75.0

type HostnameTLSSettingCiphersResponse struct {ResponseResultHostnameTLSSettingCiphers `json:"result"`}

HostnameTLSSettingCiphersResponse represents the response from the PUT and DELETE endpoints for per-hostname ciphers tls settings.

typeHostnameTLSSettingResponseadded inv0.75.0

type HostnameTLSSettingResponse struct {ResponseResultHostnameTLSSetting `json:"result"`}

HostnameTLSSettingResponse represents the response from the PUT and DELETE endpoints for per-hostname tls settings.

typeHostnameTLSSettingsCiphersResponseadded inv0.75.0

type HostnameTLSSettingsCiphersResponse struct {ResponseResult     []HostnameTLSSettingCiphers `json:"result"`ResultInfo `json:"result_info"`}

HostnameTLSSettingsCiphersResponse represents the response from the retrieval endpoint for per-hostname ciphers tls settings.

typeHostnameTLSSettingsResponseadded inv0.75.0

type HostnameTLSSettingsResponse struct {ResponseResult     []HostnameTLSSetting `json:"result"`ResultInfo `json:"result_info"`}

HostnameTLSSettingsResponse represents the response from the retrieval endpoint for per-hostname tls settings.

typeHyperdriveConfigadded inv0.88.0

type HyperdriveConfig struct {IDstring                  `json:"id,omitempty"`Namestring                  `json:"name,omitempty"`OriginHyperdriveConfigOrigin  `json:"origin,omitempty"`CachingHyperdriveConfigCaching `json:"caching,omitempty"`}

typeHyperdriveConfigCachingadded inv0.88.0

type HyperdriveConfigCaching struct {Disabled             *bool `json:"disabled,omitempty"`MaxAgeint   `json:"max_age,omitempty"`StaleWhileRevalidateint   `json:"stale_while_revalidate,omitempty"`}

typeHyperdriveConfigListResponse

type HyperdriveConfigListResponse struct {ResponseResult []HyperdriveConfig `json:"result"`}

typeHyperdriveConfigOriginadded inv0.88.0

type HyperdriveConfigOrigin struct {Databasestring `json:"database,omitempty"`Hoststring `json:"host,omitempty"`Portint    `json:"port,omitempty"`Schemestring `json:"scheme,omitempty"`Userstring `json:"user,omitempty"`AccessClientIDstring `json:"access_client_id,omitempty"`}

typeHyperdriveConfigOriginWithSecretsadded inv0.100.0

type HyperdriveConfigOriginWithSecrets struct {HyperdriveConfigOriginPasswordstring `json:"password"`AccessClientSecretstring `json:"access_client_secret,omitempty"`}

typeHyperdriveConfigResponseadded inv0.88.0

type HyperdriveConfigResponse struct {ResponseResultHyperdriveConfig `json:"result"`}

typeHyperdriveOriginTypeadded inv0.100.0

type HyperdriveOriginTypestring

typeIPAccessRuleadded inv0.82.0

type IPAccessRule struct {AllowedModes  []IPAccessRulesModeOption `json:"allowed_modes"`ConfigurationIPAccessRuleConfiguration `json:"configuration"`CreatedOnstring                    `json:"created_on"`IDstring                    `json:"id"`ModeIPAccessRulesModeOption   `json:"mode"`ModifiedOnstring                    `json:"modified_on"`Notesstring                    `json:"notes"`}

typeIPAccessRuleConfigurationadded inv0.82.0

type IPAccessRuleConfiguration struct {Targetstring `json:"target,omitempty"`Valuestring `json:"value,omitempty"`}

typeIPAccessRulesModeOptionadded inv0.82.0

type IPAccessRulesModeOptionstring

typeIPIntelligenceadded inv0.44.0

type IPIntelligence struct {IPstring       `json:"ip"`BelongsToRefBelongsToRef `json:"belongs_to_ref"`RiskTypes    []RiskTypes  `json:"risk_types"`}

IPIntelligence represents IP intelligence information.

typeIPIntelligenceItemadded inv0.44.0

type IPIntelligenceItem struct {IDint    `json:"id,omitempty"`Namestring `json:"name,omitempty"`}

IPIntelligenceItem represents an item in an IP list.

typeIPIntelligenceListParametersadded inv0.44.0

type IPIntelligenceListParameters struct {AccountIDstring}

IPIntelligenceListParameters represents the parameters for an IP list request.

typeIPIntelligenceListResponseadded inv0.44.0

type IPIntelligenceListResponse struct {ResponseResult []IPIntelligenceItem `json:"result,omitempty"`}

IPIntelligenceListResponse represents the response for an IP list API response.

typeIPIntelligenceParametersadded inv0.44.0

type IPIntelligenceParameters struct {AccountIDstring `url:"-"`IPv4string `url:"ipv4,omitempty"`IPv6string `url:"ipv6,omitempty"`}

IPIntelligenceParameters represents parameters for an IP Intelligence request.

typeIPIntelligencePassiveDNSParametersadded inv0.44.0

type IPIntelligencePassiveDNSParameters struct {AccountIDstring `url:"-"`IPv4string `url:"ipv4,omitempty"`Startstring `url:"start,omitempty"`Endstring `url:"end,omitempty"`Pageint    `url:"page,omitempty"`PerPageint    `url:"per_page,omitempty"`}

IPIntelligencePassiveDNSParameters represents the parameters for a passive DNS request.

typeIPIntelligencePassiveDNSResponseadded inv0.44.0

type IPIntelligencePassiveDNSResponse struct {ResponseResultIPPassiveDNS `json:"result,omitempty"`}

IPIntelligencePassiveDNSResponse represents a passive API response.

typeIPIntelligenceResponseadded inv0.44.0

type IPIntelligenceResponse struct {ResponseResult []IPIntelligence `json:"result,omitempty"`}

IPIntelligenceResponse represents an IP Intelligence API response.

typeIPListadded inv0.13.0

type IPList struct {IDstring     `json:"id"`Namestring     `json:"name"`Descriptionstring     `json:"description"`Kindstring     `json:"kind"`NumItemsint        `json:"num_items"`NumReferencingFiltersint        `json:"num_referencing_filters"`CreatedOn             *time.Time `json:"created_on"`ModifiedOn            *time.Time `json:"modified_on"`}

IPList contains information about an IP List.

typeIPListBulkOperationadded inv0.13.0

type IPListBulkOperation struct {IDstring     `json:"id"`Statusstring     `json:"status"`Errorstring     `json:"error"`Completed *time.Time `json:"completed"`}

IPListBulkOperation contains information about a Bulk Operation.

typeIPListBulkOperationResponseadded inv0.13.0

type IPListBulkOperationResponse struct {ResponseResultIPListBulkOperation `json:"result"`}

IPListBulkOperationResponse contains information about a Bulk Operation.

typeIPListCreateRequestadded inv0.13.0

type IPListCreateRequest struct {Namestring `json:"name"`Descriptionstring `json:"description"`Kindstring `json:"kind"`}

IPListCreateRequest contains data for a new IP List.

typeIPListDeleteResponseadded inv0.13.0

type IPListDeleteResponse struct {ResponseResult struct {IDstring `json:"id"`} `json:"result"`}

IPListDeleteResponse contains information about the deletion of an IP List.

typeIPListItemadded inv0.13.0

type IPListItem struct {IDstring     `json:"id"`IPstring     `json:"ip"`Commentstring     `json:"comment"`CreatedOn  *time.Time `json:"created_on"`ModifiedOn *time.Time `json:"modified_on"`}

IPListItem contains information about a single IP List Item.

typeIPListItemCreateRequestadded inv0.13.0

type IPListItemCreateRequest struct {IPstring `json:"ip"`Commentstring `json:"comment"`}

IPListItemCreateRequest contains data for a new IP List Item.

typeIPListItemCreateResponseadded inv0.13.0

type IPListItemCreateResponse struct {ResponseResult struct {OperationIDstring `json:"operation_id"`} `json:"result"`}

IPListItemCreateResponse contains information about the creation of an IP List Item.

typeIPListItemDeleteItemRequestadded inv0.13.0

type IPListItemDeleteItemRequest struct {IDstring `json:"id"`}

IPListItemDeleteItemRequest contains single IP List Items that shall be deleted.

typeIPListItemDeleteRequestadded inv0.13.0

type IPListItemDeleteRequest struct {Items []IPListItemDeleteItemRequest `json:"items"`}

IPListItemDeleteRequest wraps IP List Items that shall be deleted.

typeIPListItemDeleteResponseadded inv0.13.0

type IPListItemDeleteResponse struct {ResponseResult struct {OperationIDstring `json:"operation_id"`} `json:"result"`}

IPListItemDeleteResponse contains information about the deletion of an IP List Item.

typeIPListItemsGetResponseadded inv0.13.0

type IPListItemsGetResponse struct {ResponseResultIPListItem `json:"result"`}

IPListItemsGetResponse contains information about a single IP List Item.

typeIPListItemsListResponseadded inv0.13.0

type IPListItemsListResponse struct {ResponseResultInfo `json:"result_info"`Result     []IPListItem `json:"result"`}

IPListItemsListResponse contains information about IP List Items.

typeIPListListResponseadded inv0.13.0

type IPListListResponse struct {ResponseResult []IPList `json:"result"`}

IPListListResponse contains a slice of IP Lists.

typeIPListResponse

type IPListResponse struct {ResponseResultIPList `json:"result"`}

IPListResponse contains a single IP List.

typeIPListUpdateRequestadded inv0.13.0

type IPListUpdateRequest struct {Descriptionstring `json:"description"`}

IPListUpdateRequest contains data for an IP List update.

typeIPPassiveDNSadded inv0.44.0

type IPPassiveDNS struct {ReverseRecords []ReverseRecords `json:"reverse_records,omitempty"`Countint              `json:"count,omitempty"`Pageint              `json:"page,omitempty"`PerPageint              `json:"per_page,omitempty"`}

IPPassiveDNS represent DNS response.

typeIPPrefixadded inv0.11.7

type IPPrefix struct {IDstring     `json:"id"`CreatedAt            *time.Time `json:"created_at"`ModifiedAt           *time.Time `json:"modified_at"`CIDRstring     `json:"cidr"`AccountIDstring     `json:"account_id"`Descriptionstring     `json:"description"`Approvedstring     `json:"approved"`OnDemandEnabledbool       `json:"on_demand_enabled"`OnDemandLockedbool       `json:"on_demand_locked"`Advertisedbool       `json:"advertised"`AdvertisedModifiedAt *time.Time `json:"advertised_modified_at"`}

IPPrefix contains information about an IP prefix.

typeIPPrefixUpdateRequestadded inv0.11.7

type IPPrefixUpdateRequest struct {Descriptionstring `json:"description"`}

IPPrefixUpdateRequest contains information about prefix updates.

typeIPRangesadded inv0.7.2

type IPRanges struct {IPv4CIDRs      []string `json:"ipv4_cidrs"`IPv6CIDRs      []string `json:"ipv6_cidrs"`ChinaIPv4CIDRs []string `json:"china_ipv4_cidrs"`ChinaIPv6CIDRs []string `json:"china_ipv6_cidrs"`}

IPRanges contains lists of IPv4 and IPv6 CIDRs.

funcIPs

func IPs() (IPRanges,error)

IPs gets a list of Cloudflare's IP ranges.

This does not require logging in to the API.

API reference:https://api.cloudflare.com/#cloudflare-ips

typeIPRangesResponseadded inv0.13.4

type IPRangesResponse struct {IPv4CIDRs  []string `json:"ipv4_cidrs"`IPv6CIDRs  []string `json:"ipv6_cidrs"`ChinaColos []string `json:"china_colos"`}

IPRangesResponse contains the structure for the API response, not modified.

typeIPsResponseadded inv0.7.2

type IPsResponse struct {ResponseResultIPRangesResponse `json:"result"`}

IPsResponse is the API response containing a list of IPs.

typeImageadded inv0.30.0

type Image struct {IDstring                 `json:"id"`Filenamestring                 `json:"filename"`Meta              map[string]interface{} `json:"meta,omitempty"`RequireSignedURLsbool                   `json:"requireSignedURLs"`Variants          []string               `json:"variants"`Uploadedtime.Time              `json:"uploaded"`}

Image represents a Cloudflare Image.

typeImageDetailsResponseadded inv0.30.0

type ImageDetailsResponse struct {ResultImage `json:"result"`Response}

ImageDetailsResponse is the API response for getting an image's details.

typeImageDirectUploadURLadded inv0.30.0

type ImageDirectUploadURL struct {IDstring `json:"id"`UploadURLstring `json:"uploadURL"`}

ImageDirectUploadURL .

typeImageDirectUploadURLResponseadded inv0.30.0

type ImageDirectUploadURLResponse struct {ResultImageDirectUploadURL `json:"result"`Response}

ImageDirectUploadURLResponse is the API response for a direct image upload url.

typeImagesAPIVersionadded inv0.71.0

type ImagesAPIVersionstring
const (ImagesAPIVersionV1ImagesAPIVersion = "v1"ImagesAPIVersionV2ImagesAPIVersion = "v2")

typeImagesListResponseadded inv0.30.0

type ImagesListResponse struct {Result struct {Images []Image `json:"images"`} `json:"result"`Response}

ImagesListResponse is the API response for listing all images.

typeImagesStatsCountadded inv0.30.0

type ImagesStatsCount struct {Currentint64 `json:"current"`Allowedint64 `json:"allowed"`}

ImagesStatsCount is the stats attached to a ImagesStatsResponse.

typeImagesStatsResponseadded inv0.30.0

type ImagesStatsResponse struct {Result struct {CountImagesStatsCount `json:"count"`} `json:"result"`Response}

ImagesStatsResponse is the API response for image stats.

typeImagesVariantadded inv0.88.0

type ImagesVariant struct {IDstring                `json:"id,omitempty"`NeverRequireSignedURLs *bool                 `json:"neverRequireSignedURLs,omitempty"`OptionsImagesVariantsOptions `json:"options,omitempty"`}

typeImagesVariantResponseadded inv0.88.0

type ImagesVariantResponse struct {ResultImagesVariantResult `json:"result,omitempty"`Response}

typeImagesVariantResultadded inv0.88.0

type ImagesVariantResult struct {VariantImagesVariant `json:"variant,omitempty"`}

typeImagesVariantsOptionsadded inv0.88.0

type ImagesVariantsOptions struct {Fitstring `json:"fit,omitempty"`Heightint    `json:"height,omitempty"`Metadatastring `json:"metadata,omitempty"`Widthint    `json:"width,omitempty"`}

typeImportDNSRecordsParamsadded inv0.66.0

type ImportDNSRecordsParams struct {BINDContentsstring}

typeInfrastructureAccessTargetadded inv0.105.0

type InfrastructureAccessTarget struct {Hostnamestring                           `json:"hostname"`IDstring                           `json:"id"`IPInfrastructureAccessTargetIPInfo `json:"ip"`CreatedAtstring                           `json:"created_at"`ModifiedAtstring                           `json:"modified_at"`}

typeInfrastructureAccessTargetDetailResponseadded inv0.105.0

type InfrastructureAccessTargetDetailResponse struct {ResultInfrastructureAccessTarget `json:"result"`Response}

InfrastructureAccessTargetDetailResponse is the API response, containing a single target.

typeInfrastructureAccessTargetIPDetailsadded inv0.105.0

type InfrastructureAccessTargetIPDetails struct {IPAddrstring `json:"ip_addr"`VirtualNetworkIdstring `json:"virtual_network_id"`}

typeInfrastructureAccessTargetIPInfoadded inv0.105.0

type InfrastructureAccessTargetIPInfo struct {IPV4 *InfrastructureAccessTargetIPDetails `json:"ipv4,omitempty"`IPV6 *InfrastructureAccessTargetIPDetails `json:"ipv6,omitempty"`}

typeInfrastructureAccessTargetListDetailResponseadded inv0.105.0

type InfrastructureAccessTargetListDetailResponse struct {Result []InfrastructureAccessTarget `json:"result"`ResponseResultInfo `json:"result_info"`}

typeInfrastructureAccessTargetListParamsadded inv0.105.0

type InfrastructureAccessTargetListParams struct {Hostnamestring `url:"hostname,omitempty"`HostnameContainsstring `url:"hostname_contains,omitempty"`IPV4string `url:"ip_v4,omitempty"`IPV6string `url:"ip_v6,omitempty"`CreatedAfterstring `url:"created_after,omitempty"`ModifedAfterstring `url:"modified_after,omitempty"`VirtualNetworkIdstring `url:"virtual_network_id,omitempty"`ResultInfo}

typeInfrastructureAccessTargetParamsadded inv0.105.0

type InfrastructureAccessTargetParams struct {Hostnamestring                           `json:"hostname"`IPInfrastructureAccessTargetIPInfo `json:"ip"`}

typeIngressIPRuleadded inv0.43.0

type IngressIPRule struct {Prefix *string `json:"prefix,omitempty"`Ports  []int   `json:"ports,omitempty"`Allowbool    `json:"allow,omitempty"`}

typeIntelligenceASNOverviewParametersadded inv0.44.0

type IntelligenceASNOverviewParameters struct {AccountIDstringASNint}

IntelligenceASNOverviewParameters represents parameters for an ASN request.

typeIntelligenceASNResponseadded inv0.44.0

type IntelligenceASNResponse struct {ResponseResult []ASNInfo `json:"result,omitempty"`}

IntelligenceASNResponse represents an API response for ASN info.

typeIntelligenceASNSubnetResponseadded inv0.44.0

type IntelligenceASNSubnetResponse struct {ASNint      `json:"asn,omitempty"`IPCountTotalint      `json:"ip_count_total,omitempty"`Subnets      []string `json:"subnets,omitempty"`Countint      `json:"count,omitempty"`Pageint      `json:"page,omitempty"`PerPageint      `json:"per_page,omitempty"`}

IntelligenceASNSubnetResponse represents an ASN subnet API response.

typeIntelligenceASNSubnetsParametersadded inv0.44.0

type IntelligenceASNSubnetsParameters struct {AccountIDstringASNint}

IntelligenceASNSubnetsParameters represents parameters for an ASN subnet request.

typeKeylessSSLadded inv0.7.2

type KeylessSSL struct {IDstring    `json:"id"`Namestring    `json:"name"`Hoststring    `json:"host"`Portint       `json:"port"`Statusstring    `json:"status"`Enabledbool      `json:"enabled"`Permissions []string  `json:"permissions"`CreatedOntime.Time `json:"created_on"`ModifiedOntime.Time `json:"modified_on"`}

KeylessSSL represents Keyless SSL configuration.

typeKeylessSSLCreateRequestadded inv0.17.0

type KeylessSSLCreateRequest struct {Hoststring `json:"host"`Portint    `json:"port"`Certificatestring `json:"certificate"`Namestring `json:"name,omitempty"`BundleMethodstring `json:"bundle_method,omitempty"`}

KeylessSSLCreateRequest represents the request format made for creating KeylessSSL.

typeKeylessSSLDetailResponseadded inv0.17.0

type KeylessSSLDetailResponse struct {ResponseResultKeylessSSL `json:"result"`}

KeylessSSLDetailResponse is the API response, containing a single Keyless SSL.

typeKeylessSSLListResponseadded inv0.17.0

type KeylessSSLListResponse struct {ResponseResult []KeylessSSL `json:"result"`}

KeylessSSLListResponse represents the response from the Keyless SSL list endpoint.

typeKeylessSSLUpdateRequestadded inv0.17.0

type KeylessSSLUpdateRequest struct {Hoststring `json:"host,omitempty"`Namestring `json:"name,omitempty"`Portint    `json:"port,omitempty"`Enabled *bool  `json:"enabled,omitempty"`}

KeylessSSLUpdateRequest represents the request for updating KeylessSSL.

typeLeakCredentialCheckSetStatusParamsadded inv0.111.0

type LeakCredentialCheckSetStatusParams struct {Enabled *bool `json:"enabled"`}

typeLeakCredentialCheckStatusResponseadded inv0.111.0

type LeakCredentialCheckStatusResponse struct {ResponseResultLeakedCredentialCheckStatus `json:"result"`}

typeLeakedCredentialCheckCreateDetectionParamsadded inv0.111.0

type LeakedCredentialCheckCreateDetectionParams struct {Usernamestring `json:"username"`Passwordstring `json:"password"`}

typeLeakedCredentialCheckCreateDetectionResponseadded inv0.111.0

type LeakedCredentialCheckCreateDetectionResponse struct {ResponseResultLeakedCredentialCheckDetectionEntry `json:"result"`}

typeLeakedCredentialCheckDeleteDetectionParamsadded inv0.111.0

type LeakedCredentialCheckDeleteDetectionParams struct {DetectionIDstring}

typeLeakedCredentialCheckDeleteDetectionResponseadded inv0.111.0

type LeakedCredentialCheckDeleteDetectionResponse struct {ResponseResult []struct{} `json:"result"`}

typeLeakedCredentialCheckDetectionEntryadded inv0.111.0

type LeakedCredentialCheckDetectionEntry struct {IDstring `json:"id"`Usernamestring `json:"username"`Passwordstring `json:"password"`}

typeLeakedCredentialCheckGetStatusParamsadded inv0.111.0

type LeakedCredentialCheckGetStatusParams struct{}

typeLeakedCredentialCheckListDetectionsParamsadded inv0.111.0

type LeakedCredentialCheckListDetectionsParams struct{}

typeLeakedCredentialCheckListDetectionsResponseadded inv0.111.0

type LeakedCredentialCheckListDetectionsResponse struct {ResponseResult []LeakedCredentialCheckDetectionEntry `json:"result"`}

typeLeakedCredentialCheckStatusadded inv0.111.0

type LeakedCredentialCheckStatus struct {Enabled *bool `json:"enabled"`}

typeLeakedCredentialCheckUpdateDetectionParamsadded inv0.111.0

type LeakedCredentialCheckUpdateDetectionParams struct {LeakedCredentialCheckDetectionEntry}

typeLeakedCredentialCheckUpdateDetectionResponseadded inv0.111.0

type LeakedCredentialCheckUpdateDetectionResponse struct {ResponseResultLeakedCredentialCheckDetectionEntry}

typeLeveladded inv0.36.0

type Leveluint32

Level represents a logging level.

const (// LevelNull sets a logger to show no messages at all.LevelNullLevel = 0// LevelError sets a logger to show error messages only.LevelErrorLevel = 1// LevelWarn sets a logger to show warning messages or anything more// severe.LevelWarnLevel = 2// LevelInfo sets a logger to show informational messages or anything more// severe.LevelInfoLevel = 3// LevelDebug sets a logger to show informational messages or anything more// severe.LevelDebugLevel = 4)

typeLeveledLoggeradded inv0.36.0

type LeveledLogger struct {// Level is the minimum logging level that will be emitted by this logger.//// For example, a Level set to LevelWarn will emit warnings and errors, but// not informational or debug messages.//// Always set this with a constant like LevelWarn because the individual// values are not guaranteed to be stable.LevelLevel// contains filtered or unexported fields}

LeveledLogger is a leveled logger implementation.

It prints warnings and errors to `os.Stderr` and other messages to`os.Stdout`.

func (*LeveledLogger)Debugfadded inv0.36.0

func (l *LeveledLogger) Debugf(formatstring, v ...interface{})

Debugf logs a debug message using Printf conventions.

func (*LeveledLogger)Errorfadded inv0.36.0

func (l *LeveledLogger) Errorf(formatstring, v ...interface{})

Errorf logs a warning message using Printf conventions.

func (*LeveledLogger)Infofadded inv0.36.0

func (l *LeveledLogger) Infof(formatstring, v ...interface{})

Infof logs an informational message using Printf conventions.

func (*LeveledLogger)Warnfadded inv0.36.0

func (l *LeveledLogger) Warnf(formatstring, v ...interface{})

Warnf logs a warning message using Printf conventions.

typeLeveledLoggerInterfaceadded inv0.36.0

type LeveledLoggerInterface interface {// Debugf logs a debug message using Printf conventions.Debugf(formatstring, v ...interface{})// Errorf logs a warning message using Printf conventions.Errorf(formatstring, v ...interface{})// Infof logs an informational message using Printf conventions.Infof(formatstring, v ...interface{})// Warnf logs a warning message using Printf conventions.Warnf(formatstring, v ...interface{})}

LeveledLoggerInterface provides a basic leveled logging interface forprinting debug, informational, warning, and error messages.

It's implemented by LeveledLogger and also provides out-of-the-boxcompatibility with a Logrus Logger, but may require a thin shim for use withother logging libraries that you use less standard conventions like Zap.

var DefaultLeveledLoggerLeveledLoggerInterface = &LeveledLogger{Level:LevelError,}

DefaultLeveledLogger is the default logger that the library will use to logerrors, warnings, and informational messages.

var SilentLeveledLoggerLeveledLoggerInterface = &LeveledLogger{Level:LevelNull,}

SilentLeveledLogger is a logger for disregarding all logs written.

typeListadded inv0.41.0

type List struct {IDstring     `json:"id"`Namestring     `json:"name"`Descriptionstring     `json:"description"`Kindstring     `json:"kind"`NumItemsint        `json:"num_items"`NumReferencingFiltersint        `json:"num_referencing_filters"`CreatedOn             *time.Time `json:"created_on"`ModifiedOn            *time.Time `json:"modified_on"`}

List contains information about a List.

typeListAPIShieldDiscoveryOperationsParamsadded inv0.79.0

type ListAPIShieldDiscoveryOperationsParams struct {// Direction to order results.Directionstring `url:"direction,omitempty"`// OrderBy when requesting a feature, the feature keys are available for ordering as well, e.g., thresholds.suggested_threshold.OrderBystring `url:"order,omitempty"`// Hosts filters results to only include the specified hosts.Hosts []string `url:"host,omitempty"`// Methods filters results to only include the specified methods.Methods []string `url:"method,omitempty"`// Endpoint filters results to only include endpoints containing this pattern.Endpointstring `url:"endpoint,omitempty"`// Diff when true, only return API Discovery results that are not saved into API Shield Endpoint ManagementDiffbool `url:"diff,omitempty"`// Origin filters results to only include discovery results sourced from a particular discovery engine// See APIShieldDiscoveryOrigin for valid values.OriginAPIShieldDiscoveryOrigin `url:"origin,omitempty"`// State filters results to only include discovery results in a particular state// See APIShieldDiscoveryState for valid values.StateAPIShieldDiscoveryState `url:"state,omitempty"`// Pagination options to apply to the request.PaginationOptions}

ListAPIShieldDiscoveryOperationsParams represents the parameters to pass when retrieving discovered operations.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/discovery/subresources/operations/methods/list/

typeListAPIShieldOperationsParamsadded inv0.78.0

type ListAPIShieldOperationsParams struct {// Features represents a set of features to return in `features` object when// performing making read requests against an Operation or listing operations.Features []string `url:"feature,omitempty"`// Direction to order results.Directionstring `url:"direction,omitempty"`// OrderBy when requesting a feature, the feature keys are available for ordering as well, e.g., thresholds.suggested_threshold.OrderBystring `url:"order,omitempty"`// Filters to only return operations that match filtering criteria, see APIShieldGetOperationsFiltersAPIShieldListOperationsFilters// Pagination options to apply to the request.PaginationOptions}

ListAPIShieldOperationsParams represents the parameters to pass when retrieving operations

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/methods/list/

typeListAPIShieldSchemasParamsadded inv0.79.0

type ListAPIShieldSchemasParams struct {// OmitSource specifies whether the contents of the schema should be returned in the "Source" field.OmitSource *bool `url:"omit_source,omitempty"`// ValidationEnabled specifies whether to return only schemas that have validation enabled.ValidationEnabled *bool `url:"validation_enabled,omitempty"`// PaginationOptions to apply to the request.PaginationOptions}

ListAPIShieldSchemasParams represents the parameters to pass when retrieving all schemas.

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/list/

typeListAccessApplicationsParamsadded inv0.71.0

type ListAccessApplicationsParams struct {ResultInfo}

typeListAccessCACertificatesParamsadded inv0.71.0

type ListAccessCACertificatesParams struct {ResultInfo}

typeListAccessCustomPagesParamsadded inv0.74.0

type ListAccessCustomPagesParams struct{}

typeListAccessGroupsParamsadded inv0.71.0

type ListAccessGroupsParams struct {ResultInfo}

typeListAccessIdentityProvidersParamsadded inv0.71.0

type ListAccessIdentityProvidersParams struct {ResultInfo}

typeListAccessMutualTLSCertificatesParamsadded inv0.71.0

type ListAccessMutualTLSCertificatesParams struct {ResultInfo}

typeListAccessPoliciesParamsadded inv0.71.0

type ListAccessPoliciesParams struct {// ApplicationID is the application ID to list attached access policies for.// If omitted, only reusable policies for the account are returned.ApplicationIDstring `json:"-"`ResultInfo}

typeListAccessServiceTokensParamsadded inv0.71.0

type ListAccessServiceTokensParams struct{}

typeListAccessTagsParamsadded inv0.78.0

type ListAccessTagsParams struct{}

typeListAccountRolesParamsadded inv0.78.0

type ListAccountRolesParams struct {ResultInfo}

typeListAddressMapResponseadded inv0.63.0

type ListAddressMapResponse struct {ResponseResult []AddressMap `json:"result"`}

ListAddressMapResponse contains a slice of address maps.

typeListAddressMapsParamsadded inv0.63.0

type ListAddressMapsParams struct {IP   *string `url:"ip,omitempty"`CIDR *string `url:"cidr,omitempty"`}

AddressMapFilter contains filter parameters for finding a list of address maps.

typeListBulkOperationadded inv0.41.0

type ListBulkOperation struct {IDstring     `json:"id"`Statusstring     `json:"status"`Errorstring     `json:"error"`Completed *time.Time `json:"completed"`}

ListBulkOperation contains information about a Bulk Operation.

typeListBulkOperationResponseadded inv0.41.0

type ListBulkOperationResponse struct {ResponseResultListBulkOperation `json:"result"`}

ListBulkOperationResponse contains information about a Bulk Operation.

typeListCertificateAuthoritiesHostnameAssociationsParamsadded inv0.112.0

type ListCertificateAuthoritiesHostnameAssociationsParams struct {MTLSCertificateIDstring `url:"mtls_certificate_id,omitempty"`}

typeListCreateItemParamsadded inv0.41.0

type ListCreateItemParams struct {IDstringItemListItemCreateRequest}

typeListCreateItemsParamsadded inv0.41.0

type ListCreateItemsParams struct {IDstringItems []ListItemCreateRequest}

typeListCreateParamsadded inv0.41.0

type ListCreateParams struct {NamestringDescriptionstringKindstring}

typeListCreateRequestadded inv0.41.0

type ListCreateRequest struct {Namestring `json:"name"`Descriptionstring `json:"description"`Kindstring `json:"kind"`}

ListCreateRequest contains data for a new List.

typeListD1DatabasesParamsadded inv0.79.0

type ListD1DatabasesParams struct {Namestring `url:"name,omitempty"`ResultInfo}

typeListD1Responseadded inv0.79.0

type ListD1Response struct {Result []D1Database `json:"result"`ResponseResultInfo `json:"result_info"`}

typeListDLPDatasetsParamsadded inv0.87.0

type ListDLPDatasetsParams struct{}

typeListDLPProfilesParamsadded inv0.53.0

type ListDLPProfilesParams struct{}

typeListDNSFirewallClustersParamsadded inv0.70.0

type ListDNSFirewallClustersParams struct{}

typeListDNSRecordsParamsadded inv0.58.0

type ListDNSRecordsParams struct {Typestring        `url:"type,omitempty"`Namestring        `url:"name,omitempty"`Contentstring        `url:"content,omitempty"`Proxied   *bool         `url:"proxied,omitempty"`Commentstring        `url:"comment,omitempty"`// currently, the server does not support searching for records with an empty commentTags      []string      `url:"tag,omitempty"`// potentially multiple `tag=`TagMatchstring        `url:"tag-match,omitempty"`Orderstring        `url:"order,omitempty"`DirectionListDirection `url:"direction,omitempty"`Matchstring        `url:"match,omitempty"`Priority  *uint16       `url:"-"`ResultInfo}

typeListDataLocalizationRegionalHostnamesParamsadded inv0.66.0

type ListDataLocalizationRegionalHostnamesParams struct{}

typeListDataLocalizationRegionsParamsadded inv0.66.0

type ListDataLocalizationRegionsParams struct{}

typeListDeleteItemsParamsadded inv0.41.0

type ListDeleteItemsParams struct {IDstringItemsListItemDeleteRequest}

typeListDeleteParamsadded inv0.41.0

type ListDeleteParams struct {IDstring}

typeListDeleteResponseadded inv0.41.0

type ListDeleteResponse struct {ResponseResult struct {IDstring `json:"id"`} `json:"result"`}

ListDeleteResponse contains information about the deletion of a List.

typeListDeviceDexTestParamsadded inv0.62.0

type ListDeviceDexTestParams struct{}

typeListDeviceManagedNetworksParamsadded inv0.57.0

type ListDeviceManagedNetworksParams struct{}

typeListDeviceSettingsPoliciesParamsadded inv0.81.0

type ListDeviceSettingsPoliciesParams struct {ResultInfo}

typeListDeviceSettingsPoliciesResponseadded inv0.81.0

type ListDeviceSettingsPoliciesResponse struct {ResponseResultInfoResultInfo             `json:"result_info"`Result     []DeviceSettingsPolicy `json:"result"`}

typeListDirectionadded inv0.58.0

type ListDirectionstring
const (ListDirectionAscListDirection = "asc"ListDirectionDescListDirection = "desc")

typeListEmailRoutingAddressParametersadded inv0.47.0

type ListEmailRoutingAddressParameters struct {ResultInfoDirectionstring `url:"direction,omitempty"`Verified  *bool  `url:"verified,omitempty"`}

typeListEmailRoutingAddressResponseadded inv0.47.0

type ListEmailRoutingAddressResponse struct {Result     []EmailRoutingDestinationAddress `json:"result"`ResultInfo `json:"result_info"`Response}

typeListEmailRoutingRuleResponseadded inv0.47.0

type ListEmailRoutingRuleResponse struct {Result     []EmailRoutingRule `json:"result"`ResultInfo `json:"result_info,omitempty"`Response}

typeListEmailRoutingRulesParametersadded inv0.47.0

type ListEmailRoutingRulesParameters struct {Enabled *bool `url:"enabled,omitempty"`ResultInfo}

typeListGatewayCategoriesParamsadded inv0.100.0

type ListGatewayCategoriesParams struct {ResultInfo}

ListGatewayCategoriesParams represents the parameters for listing gateway categories.

typeListGetBulkOperationParamsadded inv0.41.0

type ListGetBulkOperationParams struct {IDstring}

typeListGetItemParamsadded inv0.41.0

type ListGetItemParams struct {ListIDstringIDstring}

typeListGetParamsadded inv0.41.0

type ListGetParams struct {IDstring}

typeListHostnameTLSSettingsCiphersParamsadded inv0.75.0

type ListHostnameTLSSettingsCiphersParams struct {PaginationOptionsLimitint      `json:"-" url:"limit,omitempty"`Offsetint      `json:"-" url:"offset,omitempty"`Hostname []string `json:"-" url:"hostname,omitempty"`}

ListHostnameTLSSettingsCiphersParams represents the data related to per-hostname ciphers tls settings being retrieved.

typeListHostnameTLSSettingsParamsadded inv0.75.0

type ListHostnameTLSSettingsParams struct {Settingstring `json:"-" url:"setting,omitempty"`PaginationOptions `json:"-"`Limitint      `json:"-" url:"limit,omitempty"`Offsetint      `json:"-" url:"offset,omitempty"`Hostname          []string `json:"-" url:"hostname,omitempty"`}

ListHostnameTLSSettingsParams represents the data related to per-hostname tls settings being retrieved.

typeListHyperdriveConfigParamsadded inv0.88.0

type ListHyperdriveConfigParams struct{}

typeListIPAccessRulesFiltersadded inv0.82.0

type ListIPAccessRulesFilters struct {ConfigurationIPAccessRuleConfiguration    `json:"configuration,omitempty"`MatchListIPAccessRulesMatchOption `json:"match,omitempty"`ModeIPAccessRulesModeOption      `json:"mode,omitempty"`Notesstring                       `json:"notes,omitempty"`}

typeListIPAccessRulesMatchOptionadded inv0.82.0

type ListIPAccessRulesMatchOptionstring

typeListIPAccessRulesOrderOptionadded inv0.82.0

type ListIPAccessRulesOrderOptionstring

typeListIPAccessRulesParamsadded inv0.82.0

type ListIPAccessRulesParams struct {Directionstring                       `url:"direction,omitempty"`FiltersListIPAccessRulesFilters     `url:"filters,omitempty"`OrderListIPAccessRulesOrderOption `url:"order,omitempty"`PaginationOptions}

typeListIPAccessRulesResponseadded inv0.82.0

type ListIPAccessRulesResponse struct {Result     []IPAccessRule `json:"result"`ResultInfo `json:"result_info"`Response}

typeListIPPrefixResponseadded inv0.11.7

type ListIPPrefixResponse struct {ResponseResult []IPPrefix `json:"result"`}

ListIPPrefixResponse contains a slice of IP prefixes.

typeListImageVariantsParamsadded inv0.88.0

type ListImageVariantsParams struct{}

typeListImageVariantsResultadded inv0.88.0

type ListImageVariantsResult struct {ImagesVariants map[string]ImagesVariant `json:"variants,omitempty"`}

typeListImagesParamsadded inv0.71.0

type ListImagesParams struct {ResultInfo}

typeListImagesVariantsResponseadded inv0.88.0

type ListImagesVariantsResponse struct {ResultListImageVariantsResult `json:"result,omitempty"`Response}

typeListItemadded inv0.41.0

type ListItem struct {IDstring     `json:"id"`IP         *string    `json:"ip,omitempty"`Redirect   *Redirect  `json:"redirect,omitempty"`Hostname   *Hostname  `json:"hostname,omitempty"`ASN        *uint32    `json:"asn,omitempty"`Commentstring     `json:"comment"`CreatedOn  *time.Time `json:"created_on"`ModifiedOn *time.Time `json:"modified_on"`}

ListItem contains information about a single List Item.

typeListItemCreateRequestadded inv0.41.0

type ListItemCreateRequest struct {IP       *string   `json:"ip,omitempty"`Redirect *Redirect `json:"redirect,omitempty"`Hostname *Hostname `json:"hostname,omitempty"`ASN      *uint32   `json:"asn,omitempty"`Commentstring    `json:"comment"`}

ListItemCreateRequest contains data for a new List Item.

typeListItemCreateResponseadded inv0.41.0

type ListItemCreateResponse struct {ResponseResult struct {OperationIDstring `json:"operation_id"`} `json:"result"`}

ListItemCreateResponse contains information about the creation of a List Item.

typeListItemDeleteItemRequestadded inv0.41.0

type ListItemDeleteItemRequest struct {IDstring `json:"id"`}

ListItemDeleteItemRequest contains single List Items that shall be deleted.

typeListItemDeleteRequestadded inv0.41.0

type ListItemDeleteRequest struct {Items []ListItemDeleteItemRequest `json:"items"`}

ListItemDeleteRequest wraps List Items that shall be deleted.

typeListItemDeleteResponseadded inv0.41.0

type ListItemDeleteResponse struct {ResponseResult struct {OperationIDstring `json:"operation_id"`} `json:"result"`}

ListItemDeleteResponse contains information about the deletion of a List Item.

typeListItemsGetResponseadded inv0.41.0

type ListItemsGetResponse struct {ResponseResultListItem `json:"result"`}

ListItemsGetResponse contains information about a single List Item.

typeListItemsListResponseadded inv0.41.0

type ListItemsListResponse struct {ResponseResultInfo `json:"result_info"`Result     []ListItem `json:"result"`}

ListItemsListResponse contains information about List Items.

typeListListItemsParamsadded inv0.41.0

type ListListItemsParams struct {IDstring `url:"-"`Searchstring `url:"search,omitempty"`PerPageint    `url:"per_page,omitempty"`Cursorstring `url:"cursor,omitempty"`}

typeListListResponseadded inv0.41.0

type ListListResponse struct {ResponseResult []List `json:"result"`}

ListListResponse contains a slice of Lists.

typeListListsParamsadded inv0.41.0

type ListListsParams struct {}

typeListLoadBalancerMonitorParamsadded inv0.51.0

type ListLoadBalancerMonitorParams struct {PaginationOptions}

typeListLoadBalancerParamsadded inv0.51.0

type ListLoadBalancerParams struct {PaginationOptions}

typeListLoadBalancerPoolParamsadded inv0.51.0

type ListLoadBalancerPoolParams struct {PaginationOptions}

typeListLogpushJobsForDatasetParamsadded inv0.72.0

type ListLogpushJobsForDatasetParams struct {Datasetstring `json:"-"`}

typeListLogpushJobsParamsadded inv0.72.0

type ListLogpushJobsParams struct{}

typeListMTLSCertificateAssociationsParamsadded inv0.58.0

type ListMTLSCertificateAssociationsParams struct {CertificateIDstring}

typeListMTLSCertificatesParamsadded inv0.58.0

type ListMTLSCertificatesParams struct {PaginationOptionsLimitint    `url:"limit,omitempty"`Offsetint    `url:"offset,omitempty"`Namestring `url:"name,omitempty"`CAbool   `url:"ca,omitempty"`}

typeListMagicFirewallRulesetResponseadded inv0.13.7

type ListMagicFirewallRulesetResponse struct {ResponseResult []MagicFirewallRuleset `json:"result"`}

ListMagicFirewallRulesetResponse contains a list of Magic Firewall rulesets.

typeListMagicTransitGRETunnelsResponseadded inv0.32.0

type ListMagicTransitGRETunnelsResponse struct {ResponseResult struct {GRETunnels []MagicTransitGRETunnel `json:"gre_tunnels"`} `json:"result"`}

ListMagicTransitGRETunnelsResponse contains a response including GRE tunnels.

typeListMagicTransitIPsecTunnelsResponseadded inv0.31.0

type ListMagicTransitIPsecTunnelsResponse struct {ResponseResult struct {IPsecTunnels []MagicTransitIPsecTunnel `json:"ipsec_tunnels"`} `json:"result"`}

ListMagicTransitIPsecTunnelsResponse contains a response including IPsec tunnels.

typeListMagicTransitStaticRoutesResponseadded inv0.18.0

type ListMagicTransitStaticRoutesResponse struct {ResponseResult struct {Routes []MagicTransitStaticRoute `json:"routes"`} `json:"result"`}

ListMagicTransitStaticRoutesResponse contains a response including Magic Transit static routes.

typeListManagedHeadersParamsadded inv0.42.0

type ListManagedHeadersParams struct {Statusstring `url:"status,omitempty"`}

typeListManagedHeadersResponseadded inv0.42.0

type ListManagedHeadersResponse struct {ResponseResultManagedHeaders `json:"result"`}

typeListObservatoryPageTestParamsadded inv0.78.0

type ListObservatoryPageTestParams struct {URLstring `url:"-"`Regionstring `url:"region"`ResultInfo}

typeListObservatoryPagesParamsadded inv0.78.0

type ListObservatoryPagesParams struct {}

typeListOriginCertificatesParamsadded inv0.58.0

type ListOriginCertificatesParams struct {ZoneIDstring `url:"zone_id,omitempty"`}

ListOriginCertificatesParams represents the parameters used to listCloudflare-issued certificates.

typeListPageShieldConnectionsParamsadded inv0.84.0

type ListPageShieldConnectionsParams struct {Directionstring `url:"direction"`ExcludeCdnCgi       *bool  `url:"exclude_cdn_cgi,omitempty"`ExcludeUrlsstring `url:"exclude_urls"`Exportstring `url:"export"`Hostsstring `url:"hosts"`OrderBystring `url:"order_by"`Pagestring `url:"page"`PageURLstring `url:"page_url"`PerPageint    `url:"per_page"`PrioritizeMalicious *bool  `url:"prioritize_malicious,omitempty"`Statusstring `url:"status"`URLsstring `url:"urls"`}

ListPageShieldConnectionsParams represents parameters for a page shield connection request.

typeListPageShieldConnectionsResponseadded inv0.84.0

type ListPageShieldConnectionsResponse struct {Result []PageShieldConnection `json:"result"`ResponseResultInfo `json:"result_info"`}

ListPageShieldConnectionsResponse represents the response from the list page shield connections endpoint.

typeListPageShieldPoliciesParamsadded inv0.84.0

type ListPageShieldPoliciesParams struct{}

typeListPageShieldPoliciesResponseadded inv0.84.0

type ListPageShieldPoliciesResponse struct {Result []PageShieldPolicy `json:"result"`ResponseResultInfo `json:"result_info"`}

ListPageShieldPoliciesResponse represents the response from the list page shield policies endpoint.

typeListPageShieldScriptsParamsadded inv0.84.0

type ListPageShieldScriptsParams struct {Directionstring `url:"direction"`ExcludeCdnCgi       *bool  `url:"exclude_cdn_cgi,omitempty"`ExcludeDuplicates   *bool  `url:"exclude_duplicates,omitempty"`ExcludeUrlsstring `url:"exclude_urls"`Exportstring `url:"export"`Hostsstring `url:"hosts"`OrderBystring `url:"order_by"`Pagestring `url:"page"`PageURLstring `url:"page_url"`PerPageint    `url:"per_page"`PrioritizeMalicious *bool  `url:"prioritize_malicious,omitempty"`Statusstring `url:"status"`URLsstring `url:"urls"`}

ListPageShieldScriptsParams represents a PageShield Script request parameters.

API reference:https://developers.cloudflare.com/api/operations/page-shield-list-page-shield-scripts#Query-Parameters

typeListPagesDeploymentsParamsadded inv0.40.0

type ListPagesDeploymentsParams struct {ProjectNamestring `url:"-"`ResultInfo}

typeListPagesProjectsParamsadded inv0.73.0

type ListPagesProjectsParams struct {PaginationOptions}

typeListPermissionGroupParamsadded inv0.53.0

type ListPermissionGroupParams struct {Depthint    `url:"depth,omitempty"`RoleNamestring `url:"name,omitempty"`}

typeListQueueConsumersParamsadded inv0.55.0

type ListQueueConsumersParams struct {QueueNamestring `url:"-"`ResultInfo}

typeListQueueConsumersResponseadded inv0.55.0

type ListQueueConsumersResponse struct {ResponseResultInfo `json:"result_info"`Result     []QueueConsumer `json:"result"`}

typeListQueuesParamsadded inv0.55.0

type ListQueuesParams struct {ResultInfo}

typeListR2BucketsParamsadded inv0.55.0

type ListR2BucketsParams struct {Namestring `url:"name_contains,omitempty"`StartAfterstring `url:"start_after,omitempty"`PerPageint64  `url:"per_page,omitempty"`Orderstring `url:"order,omitempty"`Directionstring `url:"direction,omitempty"`Cursorstring `url:"cursor,omitempty"`}

typeListReplaceItemsParamsadded inv0.41.0

type ListReplaceItemsParams struct {IDstringItems []ListItemCreateRequest}

typeListResponseadded inv0.41.0

type ListResponse struct {ResponseResultList `json:"result"`}

ListResponse contains a single List.

typeListRiskScoreIntegrationParamsadded inv0.101.0

type ListRiskScoreIntegrationParams struct{}

typeListRulesetResponseadded inv0.19.0

type ListRulesetResponse struct {ResponseResult []Ruleset `json:"result"`}

ListRulesetResponse contains all Rulesets.

typeListRulesetsParamsadded inv0.73.0

type ListRulesetsParams struct{}

typeListStorageKeysResponseadded inv0.9.0

type ListStorageKeysResponse struct {ResponseResult     []StorageKey `json:"result"`ResultInfo `json:"result_info"`}

ListStorageKeysResponse contains a slice of keys belonging to a storage namespace,pagination information, and an embedded response struct.

typeListTeamListsParamsadded inv0.53.0

type ListTeamListsParams struct{}

typeListTeamsListItemsParamsadded inv0.53.0

type ListTeamsListItemsParams struct {ListIDstring `url:"-"`ResultInfo}

typeListTurnstileWidgetParamsadded inv0.66.0

type ListTurnstileWidgetParams struct {ResultInfoDirectionstring         `url:"direction,omitempty"`OrderOrderDirection `url:"order,omitempty"`}

typeListTurnstileWidgetResponseadded inv0.66.0

type ListTurnstileWidgetResponse struct {ResponseResultInfo `json:"result_info"`Result     []TurnstileWidget `json:"result"`}

typeListUpdateParamsadded inv0.41.0

type ListUpdateParams struct {IDstringDescriptionstring}

typeListUpdateRequestadded inv0.41.0

type ListUpdateRequest struct {Descriptionstring `json:"description"`}

ListUpdateRequest contains data for a List update.

typeListWaitingRoomRuleParamsadded inv0.53.0

type ListWaitingRoomRuleParams struct {WaitingRoomIDstring}

typeListWebAnalyticsRulesParamsadded inv0.75.0

type ListWebAnalyticsRulesParams struct {RulesetIDstring}

typeListWebAnalyticsSitesParamsadded inv0.75.0

type ListWebAnalyticsSitesParams struct {ResultInfo// Property to order Sites by, "host" or "created".OrderBystring `url:"order_by,omitempty"`}

typeListWorkerBindingsParamsadded inv0.57.0

type ListWorkerBindingsParams struct {ScriptNamestringDispatchNamespace *string}

typeListWorkerCronTriggersParamsadded inv0.57.0

type ListWorkerCronTriggersParams struct {ScriptNamestring}

typeListWorkerRoutesadded inv0.57.0

type ListWorkerRoutes struct{}

typeListWorkerRoutesParamsadded inv0.57.0

type ListWorkerRoutesParams struct{}

typeListWorkersDomainParamsadded inv0.55.0

type ListWorkersDomainParams struct {ZoneIDstring `url:"zone_id,omitempty"`ZoneNamestring `url:"zone_name,omitempty"`Hostnamestring `url:"hostname,omitempty"`Servicestring `url:"service,omitempty"`Environmentstring `url:"environment,omitempty"`}

typeListWorkersForPlatformsDispatchNamespaceResponseadded inv0.90.0

type ListWorkersForPlatformsDispatchNamespaceResponse struct {ResponseResult []WorkersForPlatformsDispatchNamespace `json:"result"`}

typeListWorkersKVNamespacesParamsadded inv0.55.0

type ListWorkersKVNamespacesParams struct {ResultInfo}

typeListWorkersKVNamespacesResponseadded inv0.9.0

type ListWorkersKVNamespacesResponse struct {ResponseResult     []WorkersKVNamespace `json:"result"`ResultInfo `json:"result_info"`}

ListWorkersKVNamespacesResponse contains a slice of storage namespaces associated with anaccount, pagination information, and an embedded response struct.

typeListWorkersKVsParamsadded inv0.55.0

type ListWorkersKVsParams struct {NamespaceIDstring `url:"-"`Limitint    `url:"limit,omitempty"`Cursorstring `url:"cursor,omitempty"`Prefixstring `url:"prefix,omitempty"`}

typeListWorkersParamsadded inv0.57.0

type ListWorkersParams struct{}

typeListWorkersSecretsParamsadded inv0.57.0

type ListWorkersSecretsParams struct {ScriptNamestring}

typeListWorkersTailParametersadded inv0.47.0

type ListWorkersTailParameters struct {AccountIDstringScriptNamestring}

typeListWorkersTailResponseadded inv0.47.0

type ListWorkersTailResponse struct {ResponseResultWorkersTail}

typeListZarazConfigHistoryParamsadded inv0.86.0

type ListZarazConfigHistoryParams struct {ResultInfo}

typeLoadBalancer

type LoadBalancer struct {IDstring                     `json:"id,omitempty"`CreatedOn                 *time.Time                 `json:"created_on,omitempty"`ModifiedOn                *time.Time                 `json:"modified_on,omitempty"`Descriptionstring                     `json:"description"`Namestring                     `json:"name,omitempty"`TTLint                        `json:"ttl,omitempty"`FallbackPoolstring                     `json:"fallback_pool"`DefaultPools              []string                   `json:"default_pools"`RegionPools               map[string][]string        `json:"region_pools"`PopPools                  map[string][]string        `json:"pop_pools"`CountryPools              map[string][]string        `json:"country_pools"`Proxiedbool                       `json:"proxied"`Enabled                   *bool                      `json:"enabled,omitempty"`Persistencestring                     `json:"session_affinity,omitempty"`PersistenceTTLint                        `json:"session_affinity_ttl,omitempty"`SessionAffinityAttributes *SessionAffinityAttributes `json:"session_affinity_attributes,omitempty"`Rules                     []*LoadBalancerRule        `json:"rules,omitempty"`RandomSteering            *RandomSteering            `json:"random_steering,omitempty"`AdaptiveRouting           *AdaptiveRouting           `json:"adaptive_routing,omitempty"`LocationStrategy          *LocationStrategy          `json:"location_strategy,omitempty"`// SteeringPolicy controls pool selection logic.//// "off": Select pools in DefaultPools order.//// "geo": Select pools based on RegionPools/PopPools/CountryPools.// For non-proxied requests, the country for CountryPools is determined by LocationStrategy.//// "dynamic_latency": Select pools based on RTT (requires health checks).//// "random": Selects pools in a random order.//// "proximity": Use the pools' latitude and longitude to select the closest pool using// the Cloudflare PoP location for proxied requests or the location determined by// LocationStrategy for non-proxied requests.//// "least_outstanding_requests": Select a pool by taking into consideration// RandomSteering weights, as well as each pool's number of outstanding requests.// Pools with more pending requests are weighted proportionately less relative to others.//// "least_connections": Select a pool by taking into consideration// RandomSteering weights, as well as each pool's number of open connections.// Pools with more open connections are weighted proportionately less relative to others.// Supported for HTTP/1 and HTTP/2 connections.//// "": Maps to "geo" if RegionPools or PopPools or CountryPools have entries otherwise "off".SteeringPolicystring `json:"steering_policy,omitempty"`// TunnelID is the ID of the tunnel associated with this load balancer.// It is only used for account load balancers and has no relation to any// tunnels used as origins for this load balancer.TunnelIDstring `json:"tunnel_id,omitempty"`}

LoadBalancer represents a load balancer's properties.

typeLoadBalancerFixedResponseDataadded inv0.14.0

type LoadBalancerFixedResponseData struct {// MessageBody data to write into the http bodyMessageBodystring `json:"message_body,omitempty"`// StatusCode the http status code to response withStatusCodeint `json:"status_code,omitempty"`// ContentType value of the http 'content-type' headerContentTypestring `json:"content_type,omitempty"`// Location value of the http 'location' headerLocationstring `json:"location,omitempty"`}

LoadBalancerFixedResponseData contains all the data needed to generatea fixed response from a Load Balancer. This behavior can be enabled via Rules.

typeLoadBalancerLoadSheddingadded inv0.19.0

type LoadBalancerLoadShedding struct {DefaultPercentfloat32 `json:"default_percent,omitempty"`DefaultPolicystring  `json:"default_policy,omitempty"`SessionPercentfloat32 `json:"session_percent,omitempty"`SessionPolicystring  `json:"session_policy,omitempty"`}

LoadBalancerLoadShedding contains the settings for controlling load shedding.

typeLoadBalancerMonitoradded inv0.8.0

type LoadBalancerMonitor struct {IDstring              `json:"id,omitempty"`CreatedOn       *time.Time          `json:"created_on,omitempty"`ModifiedOn      *time.Time          `json:"modified_on,omitempty"`Typestring              `json:"type"`Descriptionstring              `json:"description"`Methodstring              `json:"method"`Pathstring              `json:"path"`Header          map[string][]string `json:"header"`Timeoutint                 `json:"timeout"`Retriesint                 `json:"retries"`Intervalint                 `json:"interval"`ConsecutiveUpint                 `json:"consecutive_up"`ConsecutiveDownint                 `json:"consecutive_down"`Portuint16              `json:"port,omitempty"`ExpectedBodystring              `json:"expected_body"`ExpectedCodesstring              `json:"expected_codes"`FollowRedirectsbool                `json:"follow_redirects"`AllowInsecurebool                `json:"allow_insecure"`ProbeZonestring              `json:"probe_zone"`}

LoadBalancerMonitor represents a load balancer monitor's properties.

typeLoadBalancerOriginadded inv0.8.0

type LoadBalancerOrigin struct {Namestring `json:"name"`Addressstring `json:"address"`Enabledbool   `json:"enabled"`// Weight of this origin relative to other origins in the pool.// Based on the configured weight the total traffic is distributed// among origins within the pool.//// When LoadBalancerOriginSteering.Policy="least_outstanding_requests", this// weight is used to scale the origin's outstanding requests.// When LoadBalancerOriginSteering.Policy="least_connections", this// weight is used to scale the origin's open connections.Weightfloat64             `json:"weight"`Header map[string][]string `json:"header"`// The virtual network subnet ID the origin belongs in.// Virtual network must also belong to the account.VirtualNetworkIDstring `json:"virtual_network_id,omitempty"`}

LoadBalancerOrigin represents a Load Balancer origin's properties.

typeLoadBalancerOriginHealthadded inv0.9.0

type LoadBalancerOriginHealth struct {Healthybool     `json:"healthy,omitempty"`RTTDuration `json:"rtt,omitempty"`FailureReasonstring   `json:"failure_reason,omitempty"`ResponseCodeint      `json:"response_code,omitempty"`}

LoadBalancerOriginHealth represents the health of the origin.

typeLoadBalancerOriginSteeringadded inv0.25.0

type LoadBalancerOriginSteering struct {// Policy determines the type of origin steering policy to use.// It defaults to "random" (weighted) when empty or unspecified.//// "random": Select an origin randomly.//// "hash": Select an origin by computing a hash over the CF-Connecting-IP address.//// "least_outstanding_requests": Select an origin by taking into consideration origin weights,// as well as each origin's number of outstanding requests. Origins with more pending requests// are weighted proportionately less relative to others.//// "least_connections": Select an origin by taking into consideration origin weights,// as well as each origin's number of open connections. Origins with more open connections// are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.Policystring `json:"policy,omitempty"`}

LoadBalancerOriginSteering controls origin selection for new sessions and traffic without session affinity.

typeLoadBalancerPooladded inv0.8.0

type LoadBalancerPool struct {IDstring                      `json:"id,omitempty"`CreatedOn         *time.Time                  `json:"created_on,omitempty"`ModifiedOn        *time.Time                  `json:"modified_on,omitempty"`Descriptionstring                      `json:"description"`Namestring                      `json:"name"`Enabledbool                        `json:"enabled"`MinimumOrigins    *int                        `json:"minimum_origins,omitempty"`Monitorstring                      `json:"monitor,omitempty"`Origins           []LoadBalancerOrigin        `json:"origins"`NotificationEmailstring                      `json:"notification_email,omitempty"`Latitude          *float32                    `json:"latitude,omitempty"`Longitude         *float32                    `json:"longitude,omitempty"`LoadShedding      *LoadBalancerLoadShedding   `json:"load_shedding,omitempty"`OriginSteering    *LoadBalancerOriginSteering `json:"origin_steering,omitempty"`Healthy           *bool                       `json:"healthy,omitempty"`// CheckRegions defines the geographic region(s) from where to run health-checks from - e.g. "WNAM", "WEU", "SAF", "SAM".// Providing a null/empty value means "all regions", which may not be available to all plan types.CheckRegions []string `json:"check_regions"`}

LoadBalancerPool represents a load balancer pool's properties.

typeLoadBalancerPoolHealthadded inv0.9.0

type LoadBalancerPoolHealth struct {IDstring                               `json:"pool_id,omitempty"`PopHealth map[string]LoadBalancerPoolPopHealth `json:"pop_health,omitempty"`}

LoadBalancerPoolHealth represents the healthchecks from different PoPs for a pool.

typeLoadBalancerPoolPopHealthadded inv0.9.0

type LoadBalancerPoolPopHealth struct {Healthybool                                  `json:"healthy,omitempty"`Origins []map[string]LoadBalancerOriginHealth `json:"origins,omitempty"`}

LoadBalancerPoolPopHealth represents the health of the pool for given PoP.

typeLoadBalancerRule

type LoadBalancerRule struct {OverridesLoadBalancerRuleOverrides `json:"overrides"`// Name is required but is only used for human readabilityNamestring `json:"name"`Conditionstring `json:"condition"`// Priority controls the order of rule execution the lowest value will be invoked firstPriorityint `json:"priority"`// FixedResponse if set and the condition is true we will not run// routing logic but rather directly respond with the provided fields.// FixedResponse implies terminates.FixedResponse *LoadBalancerFixedResponseData `json:"fixed_response,omitempty"`Disabledbool `json:"disabled"`// Terminates flag this rule as 'terminating'. No further rules will// be executed after this one.Terminatesbool `json:"terminates,omitempty"`}

LoadBalancerRule represents a single rule entry for a Load Balancer. Each rulesis run one after the other in priority order. Disabled rules are skipped.

typeLoadBalancerRuleOverridesadded inv0.14.0

type LoadBalancerRuleOverrides struct {// session affinityPersistencestring `json:"session_affinity,omitempty"`PersistenceTTL *uint  `json:"session_affinity_ttl,omitempty"`SessionAffinityAttrs *LoadBalancerRuleOverridesSessionAffinityAttrs `json:"session_affinity_attributes,omitempty"`TTLuint `json:"ttl,omitempty"`SteeringPolicystring `json:"steering_policy,omitempty"`FallbackPoolstring `json:"fallback_pool,omitempty"`DefaultPools []string            `json:"default_pools,omitempty"`PoPPools     map[string][]string `json:"pop_pools,omitempty"`RegionPools  map[string][]string `json:"region_pools,omitempty"`CountryPools map[string][]string `json:"country_pools,omitempty"`RandomSteering   *RandomSteering   `json:"random_steering,omitempty"`AdaptiveRouting  *AdaptiveRouting  `json:"adaptive_routing,omitempty"`LocationStrategy *LocationStrategy `json:"location_strategy,omitempty"`}

LoadBalancerRuleOverrides are the set of field overridable by the rules system.

typeLoadBalancerRuleOverridesSessionAffinityAttrsadded inv0.14.0

type LoadBalancerRuleOverridesSessionAffinityAttrs struct {SameSitestring   `json:"samesite,omitempty"`Securestring   `json:"secure,omitempty"`ZeroDowntimeFailoverstring   `json:"zero_downtime_failover,omitempty"`Headers              []string `json:"headers,omitempty"`RequireAllHeaders    *bool    `json:"require_all_headers,omitempty"`}

LoadBalancerRuleOverridesSessionAffinityAttrs mimics SessionAffinityAttributes without theDrainDuration field as that field can not be overwritten via rules.

typeLocationStrategyadded inv0.51.0

type LocationStrategy struct {// PreferECS determines whether the EDNS Client Subnet (ECS) GeoIP should// be preferred as the authoritative location.//// "always": Always prefer ECS.//// "never": Never prefer ECS.//// "proximity": (default) Prefer ECS only when SteeringPolicy="proximity".//// "geo": Prefer ECS only when SteeringPolicy="geo".PreferECSstring `json:"prefer_ecs,omitempty"`// Mode determines the authoritative location when ECS is not preferred,// does not exist in the request, or its GeoIP lookup is unsuccessful.//// "pop": (default) Use the Cloudflare PoP location.//// "resolver_ip": Use the DNS resolver GeoIP location.// If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.Modestring `json:"mode,omitempty"`}

LocationStrategy controls location-based steering for non-proxied requests.See SteeringPolicy to learn how steering is affected.

typeLockdownListParamsadded inv0.47.0

type LockdownListParams struct {ResultInfo}

typeLoggeradded inv0.8.5

type Logger interface {Printf(formatstring, v ...interface{})}

Logger defines the interface this library needs to use loggingThis is a subset of the methods implemented in the log package.

typeLogpullRetentionConfigurationadded inv0.12.0

type LogpullRetentionConfiguration struct {Flagbool `json:"flag"`}

LogpullRetentionConfiguration describes a the structure of a Logpull Retentionpayload.

typeLogpullRetentionConfigurationResponseadded inv0.12.0

type LogpullRetentionConfigurationResponse struct {ResponseResultLogpullRetentionConfiguration `json:"result"`}

LogpullRetentionConfigurationResponse is the API response, containing theLogpull retention result.

typeLogpushDestinationExistsRequestadded inv0.9.0

type LogpushDestinationExistsRequest struct {DestinationConfstring `json:"destination_conf"`}

LogpushDestinationExistsRequest is the API request for check destination exists.

typeLogpushDestinationExistsResponseadded inv0.9.0

type LogpushDestinationExistsResponse struct {ResponseResult struct {Existsbool `json:"exists"`}}

LogpushDestinationExistsResponse is the API response,containing a destination exists check result.

typeLogpushFieldsadded inv0.11.1

type LogpushFields map[string]string

LogpushFields is a map of available Logpush field names & descriptions.

typeLogpushFieldsResponseadded inv0.11.1

type LogpushFieldsResponse struct {ResponseResultLogpushFields `json:"result"`}

LogpushFieldsResponse is the API response for a datasets fields.

typeLogpushGetOwnershipChallengeadded inv0.9.0

type LogpushGetOwnershipChallenge struct {Filenamestring `json:"filename"`Validbool   `json:"valid"`Messagestring `json:"message"`}

LogpushGetOwnershipChallenge describes a ownership validation.

typeLogpushGetOwnershipChallengeRequestadded inv0.9.0

type LogpushGetOwnershipChallengeRequest struct {DestinationConfstring `json:"destination_conf"`}

LogpushGetOwnershipChallengeRequest is the API request for get ownership challenge.

typeLogpushGetOwnershipChallengeResponseadded inv0.9.0

type LogpushGetOwnershipChallengeResponse struct {ResponseResultLogpushGetOwnershipChallenge `json:"result"`}

LogpushGetOwnershipChallengeResponse is the API response, containing a ownership challenge.

typeLogpushJobadded inv0.9.0

type LogpushJob struct {IDint                   `json:"id,omitempty"`Datasetstring                `json:"dataset"`Enabledbool                  `json:"enabled"`Kindstring                `json:"kind,omitempty"`Namestring                `json:"name"`LogpullOptionsstring                `json:"logpull_options,omitempty"`OutputOptions            *LogpushOutputOptions `json:"output_options,omitempty"`DestinationConfstring                `json:"destination_conf"`OwnershipChallengestring                `json:"ownership_challenge,omitempty"`LastComplete             *time.Time            `json:"last_complete,omitempty"`LastError                *time.Time            `json:"last_error,omitempty"`ErrorMessagestring                `json:"error_message,omitempty"`Frequencystring                `json:"frequency,omitempty"`Filter                   *LogpushJobFilters    `json:"filter,omitempty"`MaxUploadBytesint                   `json:"max_upload_bytes,omitempty"`MaxUploadRecordsint                   `json:"max_upload_records,omitempty"`MaxUploadIntervalSecondsint                   `json:"max_upload_interval_seconds,omitempty"`}

LogpushJob describes a Logpush job.

func (LogpushJob)MarshalJSONadded inv0.41.0

func (fLogpushJob) MarshalJSON() ([]byte,error)

Custom Marshaller for LogpushJob filter key.

Example
job := cloudflare.LogpushJob{Name:            "example.com static assets",LogpullOptions:  "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339&CVE-2021-44228=true",Dataset:         "http_requests",DestinationConf: "s3://<BUCKET_PATH>?region=us-west-2/",Filter: &cloudflare.LogpushJobFilters{Where: cloudflare.LogpushJobFilter{And: []cloudflare.LogpushJobFilter{{Key: "ClientRequestPath", Operator: cloudflare.Contains, Value: "/static\\"},{Key: "ClientRequestHost", Operator: cloudflare.Equal, Value: "example.com"},},},},}jobstring, err := json.Marshal(job)if err != nil {log.Fatal(err)}fmt.Printf("%s", jobstring)
Output:{"filter":"{\"where\":{\"and\":[{\"key\":\"ClientRequestPath\",\"operator\":\"contains\",\"value\":\"/static\\\\\"},{\"key\":\"ClientRequestHost\",\"operator\":\"eq\",\"value\":\"example.com\"}]}}","dataset":"http_requests","enabled":false,"name":"example.com static assets","logpull_options":"fields=RayID,ClientIP,EdgeStartTimestamp\u0026timestamps=rfc3339\u0026CVE-2021-44228=true","destination_conf":"s3://\u003cBUCKET_PATH\u003e?region=us-west-2/"}

func (*LogpushJob)UnmarshalJSONadded inv0.41.0

func (f *LogpushJob) UnmarshalJSON(data []byte)error

Custom Unmarshaller for LogpushJob filter key.

typeLogpushJobDetailsResponseadded inv0.9.0

type LogpushJobDetailsResponse struct {ResponseResultLogpushJob `json:"result"`}

LogpushJobDetailsResponse is the API response, containing a single Logpush Job.

typeLogpushJobFilteradded inv0.41.0

type LogpushJobFilter struct {// either thisAnd []LogpushJobFilter `json:"and,omitempty"`Or  []LogpushJobFilter `json:"or,omitempty"`// or thisKeystring      `json:"key,omitempty"`OperatorOperator    `json:"operator,omitempty"`Value    interface{} `json:"value,omitempty"`}

func (*LogpushJobFilter)Validateadded inv0.41.0

func (filter *LogpushJobFilter) Validate()error

typeLogpushJobFiltersadded inv0.41.0

type LogpushJobFilters struct {WhereLogpushJobFilter `json:"where"`}

typeLogpushJobsResponseadded inv0.9.0

type LogpushJobsResponse struct {ResponseResult []LogpushJob `json:"result"`}

LogpushJobsResponse is the API response, containing an array of Logpush Jobs.

typeLogpushOutputOptionsadded inv0.87.0

type LogpushOutputOptions struct {FieldNames      []string `json:"field_names"`OutputTypestring   `json:"output_type,omitempty"`BatchPrefixstring   `json:"batch_prefix,omitempty"`BatchSuffixstring   `json:"batch_suffix,omitempty"`RecordPrefixstring   `json:"record_prefix,omitempty"`RecordSuffixstring   `json:"record_suffix,omitempty"`RecordTemplatestring   `json:"record_template,omitempty"`RecordDelimiterstring   `json:"record_delimiter,omitempty"`FieldDelimiterstring   `json:"field_delimiter,omitempty"`TimestampFormatstring   `json:"timestamp_format,omitempty"`SampleRatefloat64  `json:"sample_rate,omitempty"`CVE202144228    *bool    `json:"CVE-2021-44228,omitempty"`}

typeLogpushOwnershipChallengeValidationResponseadded inv0.12.1

type LogpushOwnershipChallengeValidationResponse struct {ResponseResult struct {Validbool `json:"valid"`}}

LogpushOwnershipChallengeValidationResponse is the API response,containing a ownership challenge validation result.

typeLogpushValidateOwnershipChallengeRequestadded inv0.9.0

type LogpushValidateOwnershipChallengeRequest struct {DestinationConfstring `json:"destination_conf"`OwnershipChallengestring `json:"ownership_challenge"`}

LogpushValidateOwnershipChallengeRequest is the API request for validate ownership challenge.

typeMTLSAssociationadded inv0.58.0

type MTLSAssociation struct {Servicestring `json:"service"`Statusstring `json:"status"`}

MTLSAssociation represents the metadata for an existing associationbetween a user-uploaded mTLS certificate and a Cloudflare service.

typeMTLSAssociationResponseadded inv0.58.0

type MTLSAssociationResponse struct {ResponseResult []MTLSAssociation `json:"result"`}

MTLSAssociationResponse represents the response from the retrieval endpointfor mTLS certificate associations.

typeMTLSCertificateadded inv0.58.0

type MTLSCertificate struct {IDstring    `json:"id"`Namestring    `json:"name"`Issuerstring    `json:"issuer"`Signaturestring    `json:"signature"`SerialNumberstring    `json:"serial_number"`Certificatesstring    `json:"certificates"`CAbool      `json:"ca"`UploadedOntime.Time `json:"uploaded_on"`UpdatedAttime.Time `json:"updated_at"`ExpiresOntime.Time `json:"expires_on"`}

MTLSCertificate represents the metadata for a user-uploaded mTLScertificate.

typeMTLSCertificateResponseadded inv0.58.0

type MTLSCertificateResponse struct {ResponseResultMTLSCertificate `json:"result"`}

MTLSCertificateResponse represents the response from endpoints relating toretrieving, creating, and deleting an mTLS certificate.

typeMTLSCertificatesResponseadded inv0.58.0

type MTLSCertificatesResponse struct {ResponseResult     []MTLSCertificate `json:"result"`ResultInfo `json:"result_info"`}

MTLSCertificatesResponse represents the response from the mTLS certificatelist endpoint.

typeMagicFirewallRulesetadded inv0.13.7

type MagicFirewallRuleset struct {IDstring                     `json:"id"`Namestring                     `json:"name"`Descriptionstring                     `json:"description"`Kindstring                     `json:"kind"`Versionstring                     `json:"version,omitempty"`LastUpdated *time.Time                 `json:"last_updated,omitempty"`Phasestring                     `json:"phase"`Rules       []MagicFirewallRulesetRule `json:"rules"`}

MagicFirewallRuleset contains information about a Firewall Ruleset.

typeMagicFirewallRulesetRuleadded inv0.13.7

type MagicFirewallRulesetRule struct {IDstring                                    `json:"id,omitempty"`Versionstring                                    `json:"version,omitempty"`ActionMagicFirewallRulesetRuleAction            `json:"action"`ActionParameters *MagicFirewallRulesetRuleActionParameters `json:"action_parameters,omitempty"`Expressionstring                                    `json:"expression"`Descriptionstring                                    `json:"description"`LastUpdated      *time.Time                                `json:"last_updated,omitempty"`Refstring                                    `json:"ref,omitempty"`Enabledbool                                      `json:"enabled"`}

MagicFirewallRulesetRule contains information about a single Magic Firewall rule.

typeMagicFirewallRulesetRuleActionadded inv0.13.7

type MagicFirewallRulesetRuleActionstring

MagicFirewallRulesetRuleAction specifies the action for a Firewall rule.

typeMagicFirewallRulesetRuleActionParametersadded inv0.13.7

type MagicFirewallRulesetRuleActionParameters struct {Rulesetstring `json:"ruleset,omitempty"`}

MagicFirewallRulesetRuleActionParameters specifies the action parameters for a Firewall rule.

typeMagicTransitGRETunneladded inv0.32.0

type MagicTransitGRETunnel struct {IDstring                            `json:"id,omitempty"`CreatedOn             *time.Time                        `json:"created_on,omitempty"`ModifiedOn            *time.Time                        `json:"modified_on,omitempty"`Namestring                            `json:"name"`CustomerGREEndpointstring                            `json:"customer_gre_endpoint"`CloudflareGREEndpointstring                            `json:"cloudflare_gre_endpoint"`InterfaceAddressstring                            `json:"interface_address"`Descriptionstring                            `json:"description,omitempty"`TTLuint8                             `json:"ttl,omitempty"`MTUuint16                            `json:"mtu,omitempty"`HealthCheck           *MagicTransitGRETunnelHealthcheck `json:"health_check,omitempty"`}

MagicTransitGRETunnel contains information about a GRE tunnel.

typeMagicTransitGRETunnelHealthcheckadded inv0.32.0

type MagicTransitGRETunnelHealthcheck struct {Enabledbool   `json:"enabled"`Targetstring `json:"target,omitempty"`Typestring `json:"type,omitempty"`}

MagicTransitGRETunnelHealthcheck contains information about a GRE tunnel health check.

typeMagicTransitIPsecTunneladded inv0.31.0

type MagicTransitIPsecTunnel struct {IDstring                              `json:"id,omitempty"`CreatedOn          *time.Time                          `json:"created_on,omitempty"`ModifiedOn         *time.Time                          `json:"modified_on,omitempty"`Namestring                              `json:"name"`CustomerEndpointstring                              `json:"customer_endpoint,omitempty"`CloudflareEndpointstring                              `json:"cloudflare_endpoint"`InterfaceAddressstring                              `json:"interface_address"`Descriptionstring                              `json:"description,omitempty"`HealthCheck        *MagicTransitTunnelHealthcheck      `json:"health_check,omitempty"`Pskstring                              `json:"psk,omitempty"`PskMetadata        *MagicTransitIPsecTunnelPskMetadata `json:"psk_metadata,omitempty"`RemoteIdentities   *RemoteIdentities                   `json:"remote_identities,omitempty"`AllowNullCipherbool                                `json:"allow_null_cipher"`ReplayProtection   *bool                               `json:"replay_protection,omitempty"`}

MagicTransitIPsecTunnel contains information about an IPsec tunnel.

typeMagicTransitIPsecTunnelPskMetadataadded inv0.41.0

type MagicTransitIPsecTunnelPskMetadata struct {LastGeneratedOn *time.Time `json:"last_generated_on,omitempty"`}

MagicTransitIPsecTunnelPskMetadata contains metadata associated with PSK.

typeMagicTransitStaticRouteadded inv0.18.0

type MagicTransitStaticRoute struct {IDstring                       `json:"id,omitempty"`Prefixstring                       `json:"prefix"`CreatedOn   *time.Time                   `json:"created_on,omitempty"`ModifiedOn  *time.Time                   `json:"modified_on,omitempty"`Nexthopstring                       `json:"nexthop"`Priorityint                          `json:"priority,omitempty"`Descriptionstring                       `json:"description,omitempty"`Weightint                          `json:"weight,omitempty"`ScopeMagicTransitStaticRouteScope `json:"scope,omitempty"`}

MagicTransitStaticRoute contains information about a static route.

typeMagicTransitStaticRouteScopeadded inv0.18.0

type MagicTransitStaticRouteScope struct {ColoRegions []string `json:"colo_regions,omitempty"`ColoNames   []string `json:"colo_names,omitempty"`}

MagicTransitStaticRouteScope contains information about a static route's scope.

typeMagicTransitTunnelHealthcheckadded inv0.41.0

type MagicTransitTunnelHealthcheck struct {Enabledbool   `json:"enabled"`Targetstring `json:"target,omitempty"`Typestring `json:"type,omitempty"`Ratestring `json:"rate,omitempty"`Directionstring `json:"direction,omitempty"`}

MagicTransitTunnelHealthcheck contains information about a tunnel health check.

typeManagedHeaderadded inv0.42.0

type ManagedHeader struct {IDstring   `json:"id"`Enabledbool     `json:"enabled"`HasCoflictbool     `json:"has_conflict,omitempty"`ConflictsWith []string `json:"conflicts_with,omitempty"`}

typeManagedHeadersadded inv0.42.0

type ManagedHeaders struct {ManagedRequestHeaders  []ManagedHeader `json:"managed_request_headers"`ManagedResponseHeaders []ManagedHeader `json:"managed_response_headers"`}

typeMisCategorizationParametersadded inv0.45.0

type MisCategorizationParameters struct {AccountIDstringIndicatorTypestring `json:"indicator_type,omitempty"`IPstring `json:"ip,omitempty"`URLstring `json:"url,omitempty"`ContentAdds     []int  `json:"content_adds,omitempty"`ContentRemoves  []int  `json:"content_removes,omitempty"`SecurityAdds    []int  `json:"security_adds,omitempty"`SecurityRemoves []int  `json:"security_removes,omitempty"`}

MisCategorizationParameters represents the parameters for a miscategorization request.

typeNamespaceBindingMapadded inv0.49.0

type NamespaceBindingMap map[string]*NamespaceBindingValue

typeNamespaceBindingValueadded inv0.49.0

type NamespaceBindingValue struct {Valuestring `json:"namespace_id"`}

typeNamespaceOutboundOptionsadded inv0.74.0

type NamespaceOutboundOptions struct {WorkerWorkerReferenceParams []OutboundParamSchema}

typeNotFoundErroradded inv0.36.0

type NotFoundError struct {// contains filtered or unexported fields}

NotFoundError is for HTTP 404 responses.

funcNewNotFoundErroradded inv0.48.0

func NewNotFoundError(e *Error)NotFoundError

func (NotFoundError)Erroradded inv0.36.0

func (eNotFoundError) Error()string

func (NotFoundError)ErrorCodesadded inv0.36.0

func (eNotFoundError) ErrorCodes() []int

func (NotFoundError)ErrorMessagesadded inv0.36.0

func (eNotFoundError) ErrorMessages() []string

func (NotFoundError)Errorsadded inv0.36.0

func (eNotFoundError) Errors() []ResponseInfo

func (NotFoundError)InternalErrorCodeIsadded inv0.48.0

func (eNotFoundError) InternalErrorCodeIs(codeint)bool

func (NotFoundError)RayIDadded inv0.36.0

func (eNotFoundError) RayID()string

func (NotFoundError)Typeadded inv0.36.0

func (eNotFoundError) Type()ErrorType

func (NotFoundError)Unwrapadded inv0.103.0

func (eNotFoundError) Unwrap()error

typeNotificationAlertWithDescriptionadded inv0.19.0

type NotificationAlertWithDescription struct {DisplayNamestring `json:"display_name"`Typestring `json:"type"`Descriptionstring `json:"description"`}

NotificationAlertWithDescription represents the alert/notificationavailable.

typeNotificationAvailableAlertsResponseadded inv0.19.0

type NotificationAvailableAlertsResponse struct {ResponseResultNotificationsGroupedByProduct}

NotificationAvailableAlertsResponse describes the availablealerts/notifications grouped by products.

typeNotificationEligibilityResponseadded inv0.19.0

type NotificationEligibilityResponse struct {ResponseResultNotificationMechanisms}

NotificationEligibilityResponse describes the eligible mechanisms thatcan be configured for a notification.

typeNotificationHistoryadded inv0.28.0

type NotificationHistory struct {IDstring    `json:"id"`Namestring    `json:"name"`Descriptionstring    `json:"description"`AlertBodystring    `json:"alert_body"`AlertTypestring    `json:"alert_type"`Mechanismstring    `json:"mechanism"`MechanismTypestring    `json:"mechanism_type"`Senttime.Time `json:"sent"`}

NotificationHistory describes the historyof notifications sent for an account.

typeNotificationHistoryResponseadded inv0.28.0

type NotificationHistoryResponse struct {ResponseResultInfo `json:"result_info"`Result     []NotificationHistory}

NotificationHistoryResponse describes the notification historyresponse for an account for a specific time period.

typeNotificationMechanismDataadded inv0.19.0

type NotificationMechanismData struct {Namestring `json:"name"`IDstring `json:"id"`}

NotificationMechanismData holds a single public facing mechanism dataintegation.

typeNotificationMechanismIntegrationsadded inv0.19.0

type NotificationMechanismIntegrations []NotificationMechanismData

NotificationMechanismIntegrations is a list of all the integrations of acertain mechanism type e.g. all email integrations.

typeNotificationMechanismMetaDataadded inv0.19.0

type NotificationMechanismMetaData struct {Eligiblebool   `json:"eligible"`Readybool   `json:"ready"`Typestring `json:"type"`}

NotificationMechanismMetaData represents the state of the deliverymechanism.

typeNotificationMechanismsadded inv0.19.0

type NotificationMechanisms struct {EmailNotificationMechanismMetaData `json:"email"`PagerDutyNotificationMechanismMetaData `json:"pagerduty"`WebhooksNotificationMechanismMetaData `json:"webhooks,omitempty"`}

NotificationMechanisms are the different possible delivery mechanisms.

typeNotificationPagerDutyResourceadded inv0.19.0

type NotificationPagerDutyResource struct {IDstring `json:"id"`Namestring `json:"name"`}

NotificationPagerDutyResource describes a PagerDuty integration.

typeNotificationPagerDutyResponseadded inv0.19.0

type NotificationPagerDutyResponse struct {ResponseResultInfoResultNotificationPagerDutyResource}

NotificationPagerDutyResponse describes the PagerDuty integrationretrieved.

typeNotificationPoliciesResponseadded inv0.19.0

type NotificationPoliciesResponse struct {ResponseResultInfoResult []NotificationPolicy}

NotificationPoliciesResponse holds the response for listing allnotification policies for an account.

typeNotificationPolicyadded inv0.19.0

type NotificationPolicy struct {IDstring                                       `json:"id"`Namestring                                       `json:"name"`Descriptionstring                                       `json:"description"`Enabledbool                                         `json:"enabled"`AlertTypestring                                       `json:"alert_type"`Mechanisms  map[string]NotificationMechanismIntegrations `json:"mechanisms"`Createdtime.Time                                    `json:"created"`Modifiedtime.Time                                    `json:"modified"`Conditions  map[string]interface{}                       `json:"conditions"`Filters     map[string][]string                          `json:"filters"`}

NotificationPolicy represents the notification policy created along withthe destinations.

typeNotificationPolicyResponseadded inv0.19.0

type NotificationPolicyResponse struct {ResponseResultNotificationPolicy}

NotificationPolicyResponse holds the response type when a single policyis retrieved.

typeNotificationResourceadded inv0.19.0

type NotificationResource struct {IDstring}

NotificationResource describes the id of an inserted/updated/deletedresource.

typeNotificationUpsertWebhooksadded inv0.19.0

type NotificationUpsertWebhooks struct {Namestring `json:"name"`URLstring `json:"url"`Secretstring `json:"secret"`}

NotificationUpsertWebhooks describes a valid webhook request.

typeNotificationWebhookIntegrationadded inv0.19.0

type NotificationWebhookIntegration struct {IDstring     `json:"id"`Namestring     `json:"name"`Typestring     `json:"type"`URLstring     `json:"url"`CreatedAttime.Time  `json:"created_at"`LastSuccess *time.Time `json:"last_success"`LastFailure *time.Time `json:"last_failure"`}

NotificationWebhookIntegration describes the webhook information alongwith its status.

typeNotificationWebhookResponseadded inv0.19.0

type NotificationWebhookResponse struct {ResponseResultInfoResultNotificationWebhookIntegration}

NotificationWebhookResponse describes a single webhook retrieved.

typeNotificationWebhooksResponseadded inv0.19.0

type NotificationWebhooksResponse struct {ResponseResultInfoResult []NotificationWebhookIntegration}

NotificationWebhooksResponse describes a list of webhooks retrieved.

typeNotificationsGroupedByProductadded inv0.19.0

type NotificationsGroupedByProduct map[string][]NotificationAlertWithDescription

NotificationsGroupedByProduct are grouped by products.

typeOIDCClaimConfigadded inv0.96.0

type OIDCClaimConfig struct {Namestring       `json:"name,omitempty"`SourceSourceConfig `json:"source"`Required *bool        `json:"required,omitempty"`Scopestring       `json:"scope,omitempty"`}

typeObservatoryCountResponseadded inv0.78.0

type ObservatoryCountResponse struct {ResponseResult struct {Countint `json:"count"`} `json:"result"`}

typeObservatoryLighthouseReportadded inv0.78.0

type ObservatoryLighthouseReport struct {PerformanceScoreint    `json:"performanceScore"`Statestring `json:"state"`DeviceTypestring `json:"deviceType"`// TTFB is time to first byteTTFBint `json:"ttfb"`// FCP is first contentful paintFCPint `json:"fcp"`// LCP is largest contentful painLCPint `json:"lcp"`// TTI is time to interactiveTTIint `json:"tti"`// TBT is total blocking timeTBTint `json:"tbt"`// SI is speed indexSIint `json:"si"`// CLS is cumulative layout shiftCLSfloat64          `json:"cls"`Error *lighthouseError `json:"error,omitempty"`}

ObservatoryLighthouseReport describes the web vital metrics result.

typeObservatoryPageadded inv0.78.0

type ObservatoryPage struct {URLstring                `json:"url"`Region            labeledRegion         `json:"region"`ScheduleFrequencystring                `json:"scheduleFrequency"`Tests             []ObservatoryPageTest `json:"tests"`}

ObservatoryPage describes all the tests for a web page.

typeObservatoryPageTestadded inv0.78.0

type ObservatoryPageTest struct {IDstring                      `json:"id"`Date              *time.Time                  `json:"date"`URLstring                      `json:"url"`Region            labeledRegion               `json:"region"`ScheduleFrequency *string                     `json:"scheduleFrequency"`MobileReportObservatoryLighthouseReport `json:"mobileReport"`DesktopReportObservatoryLighthouseReport `json:"desktopReport"`}

ObservatoryPageTest describes a single test for a web page.

typeObservatoryPageTestResponseadded inv0.78.0

type ObservatoryPageTestResponse struct {ResponseResultObservatoryPageTest `json:"result"`}

typeObservatoryPageTestsResponseadded inv0.78.0

type ObservatoryPageTestsResponse struct {ResponseResult     []ObservatoryPageTest `json:"result"`ResultInfo `json:"result_info"`}

typeObservatoryPageTrendadded inv0.78.0

type ObservatoryPageTrend struct {PerformanceScore []*int     `json:"performanceScore"`TTFB             []*int     `json:"ttfb"`FCP              []*int     `json:"fcp"`LCP              []*int     `json:"lcp"`TTI              []*int     `json:"tti"`TBT              []*int     `json:"tbt"`SI               []*int     `json:"si"`CLS              []*float64 `json:"cls"`}

ObservatoryPageTrend describes the web vital metrics trend.

typeObservatoryPageTrendResponseadded inv0.78.0

type ObservatoryPageTrendResponse struct {ResponseResultObservatoryPageTrend `json:"result"`}

typeObservatoryPagesResponseadded inv0.78.0

type ObservatoryPagesResponse struct {ResponseResult []ObservatoryPage `json:"result"`}

ObservatoryPagesResponse is the API response, containing a list of ObservatoryPage.

typeObservatoryScheduleadded inv0.78.0

type ObservatorySchedule struct {URLstring `json:"url"`Regionstring `json:"region"`Frequencystring `json:"frequency"`}

ObservatorySchedule describe a test schedule.

typeObservatoryScheduleResponseadded inv0.78.0

type ObservatoryScheduleResponse struct {ResponseResultObservatorySchedule `json:"result"`}

typeObservatoryScheduledPageTestadded inv0.78.0

type ObservatoryScheduledPageTest struct {ScheduleObservatorySchedule `json:"schedule"`TestObservatoryPageTest `json:"test"`}

typeOperatoradded inv0.41.0

type Operatorstring
const (EqualOperator = "eq"NotEqualOperator = "!eq"LessThanOperator = "lt"LessThanOrEqualOperator = "leq"GreaterThanOperator = "gt"GreaterThanOrEqualOperator = "geq"StartsWithOperator = "startsWith"EndsWithOperator = "endsWith"NotStartsWithOperator = "!startsWith"NotEndsWithOperator = "!endsWith"ContainsOperator = "contains"NotContainsOperator = "!contains"ValueIsInOperator = "in"ValueIsNotInOperator = "!in")

typeOptionadded inv0.7.2

type Option func(*API)error

Option is a functional option for configuring the API client.

funcBaseURLadded inv0.15.0

func BaseURL(baseURLstring)Option

BaseURL allows you to override the default HTTP base URL used for API calls.

funcDebugadded inv0.36.0

func Debug(debugbool)Option

funcHTTPClientadded inv0.7.2

func HTTPClient(client *http.Client)Option

HTTPClient accepts a custom *http.Client for making API calls.

funcHeadersadded inv0.7.2

func Headers(headershttp.Header)Option

Headers allows you to set custom HTTP headers when making API calls (e.g. forsatisfying HTTP proxies, or for debugging).

funcUserAgentadded inv0.9.0

func UserAgent(userAgentstring)Option

UserAgent can be set if you want to send a software name and version for HTTP access logs.It is recommended to set it in order to help future Customer Support diagnosticsand prevent collateral damage by sharing generic User-Agent string with abusive users.E.g. "my-software/1.2.3". By default generic Go User-Agent is used.

funcUsingLoggeradded inv0.8.5

func UsingLogger(loggerLogger)Option

UsingLogger can be set if you want to get log output from this API instanceBy default no log output is emitted.

funcUsingRateLimitadded inv0.8.5

func UsingRateLimit(rpsfloat64)Option

UsingRateLimit applies a non-default rate limit to client API requestsIf not specified the default of 4rps will be applied.

funcUsingRetryPolicyadded inv0.8.5

func UsingRetryPolicy(maxRetriesint, minRetryDelaySecsint, maxRetryDelaySecsint)Option

UsingRetryPolicy applies a non-default number of retries and min/max retry delaysThis will be used when the client exponentially backs off after errored requests.

typeOrderDirectionadded inv0.66.0

type OrderDirectionstring
const (OrderDirectionAscOrderDirection = "asc"OrderDirectionDescOrderDirection = "desc")

typeOriginCACertificate

type OriginCACertificate struct {IDstring    `json:"id"`Certificatestring    `json:"certificate"`Hostnames       []string  `json:"hostnames"`ExpiresOntime.Time `json:"expires_on"`RequestTypestring    `json:"request_type"`RequestValidityint       `json:"requested_validity"`RevokedAttime.Time `json:"revoked_at,omitempty"`CSRstring    `json:"csr"`}

OriginCACertificate represents a Cloudflare-issued certificate.

API reference:https://api.cloudflare.com/#cloudflare-ca

func (*OriginCACertificate)UnmarshalJSON

func (c *OriginCACertificate) UnmarshalJSON(data []byte)error

UnmarshalJSON handles custom parsing from an API response to an OriginCACertificatehttp://choly.ca/post/go-json-marshalling/

typeOriginCACertificateIDadded inv0.7.4

type OriginCACertificateID struct {IDstring `json:"id"`}

OriginCACertificateID represents the ID of the revoked certificate from the Revoke Certificate endpoint.

typeOriginRequestConfigadded inv0.43.0

type OriginRequestConfig struct {// HTTP proxy timeout for establishing a new connectionConnectTimeout *TunnelDuration `json:"connectTimeout,omitempty"`// HTTP proxy timeout for completing a TLS handshakeTLSTimeout *TunnelDuration `json:"tlsTimeout,omitempty"`// HTTP proxy TCP keepalive durationTCPKeepAlive *TunnelDuration `json:"tcpKeepAlive,omitempty"`// HTTP proxy should disable "happy eyeballs" for IPv4/v6 fallbackNoHappyEyeballs *bool `json:"noHappyEyeballs,omitempty"`// HTTP proxy maximum keepalive connection pool sizeKeepAliveConnections *int `json:"keepAliveConnections,omitempty"`// HTTP proxy timeout for closing an idle connectionKeepAliveTimeout *TunnelDuration `json:"keepAliveTimeout,omitempty"`// Sets the HTTP Host header for the local webserver.HTTPHostHeader *string `json:"httpHostHeader,omitempty"`// Hostname on the origin server certificate.OriginServerName *string `json:"originServerName,omitempty"`// Path to the CA for the certificate of your origin.// This option should be used only if your certificate is not signed by Cloudflare.CAPool *string `json:"caPool,omitempty"`// Disables TLS verification of the certificate presented by your origin.// Will allow any certificate from the origin to be accepted.// Note: The connection from your machine to Cloudflare's Edge is still encrypted.NoTLSVerify *bool `json:"noTLSVerify,omitempty"`// Disables chunked transfer encoding.// Useful if you are running a WSGI server.DisableChunkedEncoding *bool `json:"disableChunkedEncoding,omitempty"`// Runs as jump hostBastionMode *bool `json:"bastionMode,omitempty"`// Listen address for the proxy.ProxyAddress *string `json:"proxyAddress,omitempty"`// Listen port for the proxy.ProxyPort *uint `json:"proxyPort,omitempty"`// Valid options are 'socks' or empty.ProxyType *string `json:"proxyType,omitempty"`// IP rules for the proxy serviceIPRules []IngressIPRule `json:"ipRules,omitempty"`// Attempt to connect to origin with HTTP/2Http2Origin *bool `json:"http2Origin,omitempty"`// Access holds all access related configsAccess *AccessConfig `json:"access,omitempty"`}

OriginRequestConfig is a set of optional fields that users may set tocustomize how cloudflared sends requests to origin services. It is used to setup general config that apply to all rules, and also, specific per-ruleconfig.

typeOutboundParamSchemaadded inv0.74.0

type OutboundParamSchema struct {Namestring}

typeOwneradded inv0.7.2

type Owner struct {IDstring `json:"id"`Emailstring `json:"email"`Namestring `json:"name"`OwnerTypestring `json:"type"`}

Owner describes the resource owner.

typePageRuleadded inv0.7.2

type PageRule struct {IDstring           `json:"id,omitempty"`Targets    []PageRuleTarget `json:"targets"`Actions    []PageRuleAction `json:"actions"`Priorityint              `json:"priority"`Statusstring           `json:"status"`ModifiedOntime.Time        `json:"modified_on,omitempty"`CreatedOntime.Time        `json:"created_on,omitempty"`}

PageRule describes a Page Rule.

typePageRuleActionadded inv0.7.2

type PageRuleAction struct {IDstring      `json:"id"`Value interface{} `json:"value"`}

PageRuleAction is the action to take when the target is matched.

Valid IDs are:

always_onlinealways_use_httpsautomatic_https_rewritesbrowser_cache_ttlbrowser_checkbypass_cache_on_cookiecache_by_device_typecache_deception_armorcache_levelcache_key_fieldscache_on_cookiedisable_appsdisable_performancedisable_railgundisable_securityedge_cache_ttlemail_obfuscationexplicit_cache_controlforwarding_urlhost_header_overrideip_geolocationminifymirageopportunistic_encryptionorigin_error_page_pass_thrupolishresolve_overriderespect_strong_etagresponse_bufferingrocket_loadersecurity_levelserver_side_excludesort_query_string_for_cachessltrue_client_ip_headerwaf

typePageRuleDetailResponseadded inv0.7.2

type PageRuleDetailResponse struct {Successbool     `json:"success"`Errors   []string `json:"errors"`Messages []string `json:"messages"`ResultPageRule `json:"result"`}

PageRuleDetailResponse is the API response, containing a single PageRule.

typePageRuleTargetadded inv0.7.2

type PageRuleTarget struct {Targetstring `json:"target"`Constraint struct {Operatorstring `json:"operator"`Valuestring `json:"value"`} `json:"constraint"`}

PageRuleTarget is the target to evaluate on a request.

Currently Target must always be "url" and Operator must be "matches". Valueis the URL pattern to match against.

typePageRulesResponseadded inv0.7.2

type PageRulesResponse struct {Successbool       `json:"success"`Errors   []string   `json:"errors"`Messages []string   `json:"messages"`Result   []PageRule `json:"result"`}

PageRulesResponse is the API response, containing an array of PageRules.

typePageShieldadded inv0.84.0

type PageShield struct {Enabled                        *bool `json:"enabled,omitempty"`UseCloudflareReportingEndpoint *bool `json:"use_cloudflare_reporting_endpoint,omitempty"`UseConnectionURLPath           *bool `json:"use_connection_url_path,omitempty"`}

PageShield represents the page shield object minus any timestamps.

typePageShieldConnectionadded inv0.84.0

type PageShieldConnection struct {AddedAtstring   `json:"added_at"`DomainReportedMalicious *bool    `json:"domain_reported_malicious,omitempty"`FirstPageURLstring   `json:"first_page_url"`FirstSeenAtstring   `json:"first_seen_at"`Hoststring   `json:"host"`IDstring   `json:"id"`LastSeenAtstring   `json:"last_seen_at"`PageURLs                []string `json:"page_urls"`URLstring   `json:"url"`URLContainsCdnCgiPath   *bool    `json:"url_contains_cdn_cgi_path,omitempty"`}

PageShieldConnection represents a page shield connection.

typePageShieldPolicyadded inv0.84.0

type PageShieldPolicy struct {Actionstring `json:"action"`Descriptionstring `json:"description"`Enabled     *bool  `json:"enabled,omitempty"`Expressionstring `json:"expression"`IDstring `json:"id"`Valuestring `json:"value"`}

PageShieldPolicy represents a page shield policy.

typePageShieldScriptadded inv0.84.0

type PageShieldScript struct {AddedAtstring   `json:"added_at"`DomainReportedMalicious *bool    `json:"domain_reported_malicious,omitempty"`FetchedAtstring   `json:"fetched_at"`FirstPageURLstring   `json:"first_page_url"`FirstSeenAtstring   `json:"first_seen_at"`Hashstring   `json:"hash"`Hoststring   `json:"host"`IDstring   `json:"id"`JSIntegrityScoreint      `json:"js_integrity_score"`LastSeenAtstring   `json:"last_seen_at"`PageURLs                []string `json:"page_urls"`URLstring   `json:"url"`URLContainsCdnCgiPath   *bool    `json:"url_contains_cdn_cgi_path,omitempty"`}

PageShieldScript represents a Page Shield script.

typePageShieldScriptResponseadded inv0.84.0

type PageShieldScriptResponse struct {ResultPageShieldScript          `json:"result"`Versions []PageShieldScriptVersion `json:"versions"`}

PageShieldScriptResponse represents the response from the PageShield Script API.

typePageShieldScriptVersionadded inv0.84.0

type PageShieldScriptVersion struct {FetchedAtstring `json:"fetched_at"`Hashstring `json:"hash"`JSIntegrityScoreint    `json:"js_integrity_score"`}

PageShieldScriptVersion represents a Page Shield script version.

typePageShieldScriptsResponseadded inv0.84.0

type PageShieldScriptsResponse struct {Results []PageShieldScript `json:"result"`ResponseResultInfo `json:"result_info"`}

PageShieldScriptsResponse represents the response from the PageShield Script API.

typePageShieldSettingsadded inv0.84.0

type PageShieldSettings struct {PageShieldUpdatedAtstring `json:"updated_at"`}

PageShieldSettings represents the page shield settings for a zone.

typePageShieldSettingsResponseadded inv0.84.0

type PageShieldSettingsResponse struct {PageShieldPageShieldSettings `json:"result"`Response}

PageShieldSettingsResponse represents the response from the page shield settings endpoint.

typePagesDeploymentLogEntryadded inv0.43.0

type PagesDeploymentLogEntry struct {Timestamp *time.Time `json:"ts"`Linestring     `json:"line"`}

PagesDeploymentLogEntry represents a single log entry in a Pages deployment.

typePagesDeploymentLogsadded inv0.43.0

type PagesDeploymentLogs struct {Totalint                       `json:"total"`IncludesContainerLogsbool                      `json:"includes_container_logs"`Data                  []PagesDeploymentLogEntry `json:"data"`}

PagesDeploymentLogs represents the logs for a Pages deployment.

typePagesDeploymentStageLogEntryadded inv0.40.0

type PagesDeploymentStageLogEntry struct {IDint        `json:"id"`Timestamp *time.Time `json:"timestamp"`Messagestring     `json:"message"`}

PagesDeploymentStageLogEntry represents a single log entry in a Pages deployment stage.

typePagesDeploymentStageLogsadded inv0.40.0

type PagesDeploymentStageLogs struct {Namestring                         `json:"name"`StartedOn *time.Time                     `json:"started_on"`EndedOn   *time.Time                     `json:"ended_on"`Statusstring                         `json:"status"`Startint                            `json:"start"`Endint                            `json:"end"`Totalint                            `json:"total"`Data      []PagesDeploymentStageLogEntry `json:"data"`}

PagesDeploymentStageLogs represents the logs for a Pages deployment stage.

typePagesDomainadded inv0.44.0

type PagesDomain struct {IDstring           `json:"id"`Namestring           `json:"name"`Statusstring           `json:"status"`VerificationDataVerificationData `json:"verification_data"`ValidationDataValidationData   `json:"validation_data"`ZoneTagstring           `json:"zone_tag"`CreatedOn        *time.Time       `json:"created_on"`}

PagesDomain represents a pages domain.

typePagesDomainParametersadded inv0.44.0

type PagesDomainParameters struct {AccountIDstring `json:"-"`ProjectNamestring `json:"-"`DomainNamestring `json:"name,omitempty"`}

PagesDomainParameters represents parameters for a pages domain request.

typePagesDomainResponseadded inv0.44.0

type PagesDomainResponse struct {ResponseResultPagesDomain `json:"result,omitempty"`}

PagesDomainResponse represents an API response for a pages domain request.

typePagesDomainsParametersadded inv0.44.0

type PagesDomainsParameters struct {AccountIDstringProjectNamestring}

PagesDomainsParameters represents parameters for a pages domains request.

typePagesDomainsResponseadded inv0.44.0

type PagesDomainsResponse struct {ResponseResult []PagesDomain `json:"result,omitempty"`}

PagesDomainsResponse represents an API response for a pages domains request.

typePagesPreviewDeploymentSettingadded inv0.49.0

type PagesPreviewDeploymentSettingstring
const (PagesPreviewAllBranchesPagesPreviewDeploymentSetting = "all"PagesPreviewNoBranchesPagesPreviewDeploymentSetting = "none"PagesPreviewCustomBranchesPagesPreviewDeploymentSetting = "custom")

typePagesProjectadded inv0.26.0

type PagesProject struct {Namestring                        `json:"name,omitempty"`IDstring                        `json:"id"`CreatedOn           *time.Time                    `json:"created_on"`SubDomainstring                        `json:"subdomain"`Domains             []string                      `json:"domains,omitempty"`Source              *PagesProjectSource           `json:"source,omitempty"`BuildConfigPagesProjectBuildConfig       `json:"build_config"`DeploymentConfigsPagesProjectDeploymentConfigs `json:"deployment_configs"`LatestDeploymentPagesProjectDeployment        `json:"latest_deployment"`CanonicalDeploymentPagesProjectDeployment        `json:"canonical_deployment"`ProductionBranchstring                        `json:"production_branch,omitempty"`}

PagesProject represents a Pages project.

typePagesProjectBuildConfigadded inv0.26.0

type PagesProjectBuildConfig struct {BuildCaching      *bool  `json:"build_caching,omitempty"`BuildCommandstring `json:"build_command"`DestinationDirstring `json:"destination_dir"`RootDirstring `json:"root_dir"`WebAnalyticsTagstring `json:"web_analytics_tag"`WebAnalyticsTokenstring `json:"web_analytics_token"`}

PagesProjectBuildConfig represents the configuration of a Pages project build process.

typePagesProjectDeploymentadded inv0.26.0

type PagesProjectDeployment struct {IDstring                        `json:"id"`ShortIDstring                        `json:"short_id"`ProjectIDstring                        `json:"project_id"`ProjectNamestring                        `json:"project_name"`Environmentstring                        `json:"environment"`URLstring                        `json:"url"`CreatedOn          *time.Time                    `json:"created_on"`ModifiedOn         *time.Time                    `json:"modified_on"`Aliases            []string                      `json:"aliases,omitempty"`LatestStagePagesProjectDeploymentStage   `json:"latest_stage"`EnvVarsEnvironmentVariableMap        `json:"env_vars"`KvNamespacesNamespaceBindingMap           `json:"kv_namespaces,omitempty"`DoNamespacesNamespaceBindingMap           `json:"durable_object_namespaces,omitempty"`D1DatabasesD1BindingMap                  `json:"d1_databases,omitempty"`R2BindingsR2BindingMap                  `json:"r2_buckets,omitempty"`ServiceBindingsServiceBindingMap             `json:"services,omitempty"`Placement          *Placement                    `json:"placement,omitempty"`DeploymentTriggerPagesProjectDeploymentTrigger `json:"deployment_trigger"`Stages             []PagesProjectDeploymentStage `json:"stages"`BuildConfigPagesProjectBuildConfig       `json:"build_config"`SourcePagesProjectSource            `json:"source"`CompatibilityDatestring                        `json:"compatibility_date,omitempty"`CompatibilityFlags []string                      `json:"compatibility_flags,omitempty"`UsageModelUsageModel                    `json:"usage_model,omitempty"`IsSkippedbool                          `json:"is_skipped"`ProductionBranchstring                        `json:"production_branch,omitempty"`}

PagesProjectDeployment represents a deployment to a Pages project.

typePagesProjectDeploymentConfigEnvironmentadded inv0.26.0

type PagesProjectDeploymentConfigEnvironment struct {EnvVarsEnvironmentVariableMap `json:"env_vars,omitempty"`KvNamespacesNamespaceBindingMap    `json:"kv_namespaces,omitempty"`DoNamespacesNamespaceBindingMap    `json:"durable_object_namespaces,omitempty"`D1DatabasesD1BindingMap           `json:"d1_databases,omitempty"`R2BindingsR2BindingMap           `json:"r2_buckets,omitempty"`ServiceBindingsServiceBindingMap      `json:"services,omitempty"`CompatibilityDatestring                 `json:"compatibility_date,omitempty"`CompatibilityFlags               []string               `json:"compatibility_flags,omitempty"`FailOpenbool                   `json:"fail_open"`AlwaysUseLatestCompatibilityDatebool                   `json:"always_use_latest_compatibility_date"`UsageModelUsageModel             `json:"usage_model,omitempty"`Placement                        *Placement             `json:"placement,omitempty"`}

PagesProjectDeploymentConfigEnvironment represents the configuration for preview or production deploys.

typePagesProjectDeploymentConfigsadded inv0.26.0

type PagesProjectDeploymentConfigs struct {PreviewPagesProjectDeploymentConfigEnvironment `json:"preview"`ProductionPagesProjectDeploymentConfigEnvironment `json:"production"`}

PagesProjectDeploymentConfigs represents the configuration for deployments in a Pages project.

typePagesProjectDeploymentStageadded inv0.26.0

type PagesProjectDeploymentStage struct {Namestring     `json:"name"`StartedOn *time.Time `json:"started_on,omitempty"`EndedOn   *time.Time `json:"ended_on,omitempty"`Statusstring     `json:"status"`}

PagesProjectDeploymentStage represents an individual stage in a Pages project deployment.

typePagesProjectDeploymentTriggeradded inv0.26.0

type PagesProjectDeploymentTrigger struct {Typestring                                 `json:"type"`Metadata *PagesProjectDeploymentTriggerMetadata `json:"metadata"`}

PagesProjectDeploymentTrigger represents information about what caused a deployment.

typePagesProjectDeploymentTriggerMetadataadded inv0.26.0

type PagesProjectDeploymentTriggerMetadata struct {Branchstring `json:"branch"`CommitHashstring `json:"commit_hash"`CommitMessagestring `json:"commit_message"`}

PagesProjectDeploymentTriggerMetadata represents additional information about the cause of a deployment.

typePagesProjectSourceadded inv0.26.0

type PagesProjectSource struct {Typestring                    `json:"type"`Config *PagesProjectSourceConfig `json:"config"`}

PagesProjectSource represents the configuration of a Pages project source.

typePagesProjectSourceConfigadded inv0.26.0

type PagesProjectSourceConfig struct {Ownerstring                        `json:"owner"`RepoNamestring                        `json:"repo_name"`ProductionBranchstring                        `json:"production_branch"`PRCommentsEnabledbool                          `json:"pr_comments_enabled"`DeploymentsEnabledbool                          `json:"deployments_enabled"`ProductionDeploymentsEnabledbool                          `json:"production_deployments_enabled"`PreviewDeploymentSettingPagesPreviewDeploymentSetting `json:"preview_deployment_setting"`PreviewBranchIncludes        []string                      `json:"preview_branch_includes"`PreviewBranchExcludes        []string                      `json:"preview_branch_excludes"`}

PagesProjectSourceConfig represents the properties use to configure a Pages project source.

typePaginationOptionsadded inv0.8.5

type PaginationOptions struct {Pageint `json:"page,omitempty" url:"page,omitempty"`PerPageint `json:"per_page,omitempty" url:"per_page,omitempty"`}

PaginationOptions can be passed to a list request to configure pagingThese values will be defaulted if omitted, and PerPage has min/max limits set by resource.

typePatchTeamsListadded inv0.17.0

type PatchTeamsList struct {IDstring          `json:"id"`Append []TeamsListItem `json:"append"`Remove []string        `json:"remove"`}

PatchTeamsList represents a patch request for appending/removing list items.

typePatchTeamsListParamsadded inv0.53.0

type PatchTeamsListParams struct {IDstring          `json:"id"`Append []TeamsListItem `json:"append"`Remove []string        `json:"remove"`}

typePatchWaitingRoomSettingsParamsadded inv0.67.0

type PatchWaitingRoomSettingsParams struct {SearchEngineCrawlerBypass *bool `json:"search_engine_crawler_bypass,omitempty"`}

typePerHostnameAuthenticatedOriginPullsCertificateDetailsadded inv0.12.2

type PerHostnameAuthenticatedOriginPullsCertificateDetails struct {IDstring    `json:"id"`Certificatestring    `json:"certificate"`Issuerstring    `json:"issuer"`Signaturestring    `json:"signature"`SerialNumberstring    `json:"serial_number"`ExpiresOntime.Time `json:"expires_on"`Statusstring    `json:"status"`UploadedOntime.Time `json:"uploaded_on"`}

PerHostnameAuthenticatedOriginPullsCertificateDetails represents the metadata for a Per Hostname AuthenticatedOriginPulls certificate.

typePerHostnameAuthenticatedOriginPullsCertificateParamsadded inv0.12.2

type PerHostnameAuthenticatedOriginPullsCertificateParams struct {Certificatestring `json:"certificate"`PrivateKeystring `json:"private_key"`}

PerHostnameAuthenticatedOriginPullsCertificateParams represents the required data related to the client certificate being uploaded to be used in Per Hostname AuthenticatedOriginPulls.

typePerHostnameAuthenticatedOriginPullsCertificateResponseadded inv0.12.2

type PerHostnameAuthenticatedOriginPullsCertificateResponse struct {ResponseResultPerHostnameAuthenticatedOriginPullsCertificateDetails `json:"result"`}

PerHostnameAuthenticatedOriginPullsCertificateResponse represents the response from endpoints relating to creating and deleting a Per Hostname AuthenticatedOriginPulls certificate.

typePerHostnameAuthenticatedOriginPullsConfigadded inv0.12.2

type PerHostnameAuthenticatedOriginPullsConfig struct {Hostnamestring `json:"hostname"`CertIDstring `json:"cert_id"`Enabled  *bool  `json:"enabled"`}

PerHostnameAuthenticatedOriginPullsConfig represents the config state for Per Hostname AuthenticatedOriginPulls applied on a hostname.

typePerHostnameAuthenticatedOriginPullsConfigParamsadded inv0.13.0

type PerHostnameAuthenticatedOriginPullsConfigParams struct {Config []PerHostnameAuthenticatedOriginPullsConfig `json:"config"`}

PerHostnameAuthenticatedOriginPullsConfigParams represents the expected config param format for Per Hostname AuthenticatedOriginPulls applied on a hostname.

typePerHostnameAuthenticatedOriginPullsDetailsadded inv0.12.2

type PerHostnameAuthenticatedOriginPullsDetails struct {Hostnamestring    `json:"hostname"`CertIDstring    `json:"cert_id"`Enabledbool      `json:"enabled"`Statusstring    `json:"status"`CreatedAttime.Time `json:"created_at"`UpdatedAttime.Time `json:"updated_at"`CertStatusstring    `json:"cert_status"`Issuerstring    `json:"issuer"`Signaturestring    `json:"signature"`SerialNumberstring    `json:"serial_number"`Certificatestring    `json:"certificate"`CertUploadedOntime.Time `json:"cert_uploaded_on"`CertUpdatedAttime.Time `json:"cert_updated_at"`ExpiresOntime.Time `json:"expires_on"`}

PerHostnameAuthenticatedOriginPullsDetails contains metadata about the Per Hostname AuthenticatedOriginPulls configuration on a hostname.

typePerHostnameAuthenticatedOriginPullsDetailsResponseadded inv0.12.2

type PerHostnameAuthenticatedOriginPullsDetailsResponse struct {ResponseResultPerHostnameAuthenticatedOriginPullsDetails `json:"result"`}

PerHostnameAuthenticatedOriginPullsDetailsResponse represents Per Hostname AuthenticatedOriginPulls configuration metadata for a single hostname.

typePerHostnamesAuthenticatedOriginPullsDetailsResponseadded inv0.12.2

type PerHostnamesAuthenticatedOriginPullsDetailsResponse struct {ResponseResult []PerHostnameAuthenticatedOriginPullsDetails `json:"result"`}

PerHostnamesAuthenticatedOriginPullsDetailsResponse represents Per Hostname AuthenticatedOriginPulls configuration metadata for multiple hostnames.

typePerZoneAuthenticatedOriginPullsCertificateDetailsadded inv0.12.2

type PerZoneAuthenticatedOriginPullsCertificateDetails struct {IDstring    `json:"id"`Certificatestring    `json:"certificate"`Issuerstring    `json:"issuer"`Signaturestring    `json:"signature"`ExpiresOntime.Time `json:"expires_on"`Statusstring    `json:"status"`UploadedOntime.Time `json:"uploaded_on"`}

PerZoneAuthenticatedOriginPullsCertificateDetails represents the metadata for a Per Zone AuthenticatedOriginPulls client certificate.

typePerZoneAuthenticatedOriginPullsCertificateParamsadded inv0.12.2

type PerZoneAuthenticatedOriginPullsCertificateParams struct {Certificatestring `json:"certificate"`PrivateKeystring `json:"private_key"`}

PerZoneAuthenticatedOriginPullsCertificateParams represents the required data related to the client certificate being uploaded to be used in Per Zone AuthenticatedOriginPulls.

typePerZoneAuthenticatedOriginPullsCertificateResponseadded inv0.12.2

type PerZoneAuthenticatedOriginPullsCertificateResponse struct {ResponseResultPerZoneAuthenticatedOriginPullsCertificateDetails `json:"result"`}

PerZoneAuthenticatedOriginPullsCertificateResponse represents the response from endpoints relating to creating and deleting a per zone AuthenticatedOriginPulls certificate.

typePerZoneAuthenticatedOriginPullsCertificatesResponseadded inv0.12.2

type PerZoneAuthenticatedOriginPullsCertificatesResponse struct {ResponseResult []PerZoneAuthenticatedOriginPullsCertificateDetails `json:"result"`}

PerZoneAuthenticatedOriginPullsCertificatesResponse represents the response from the per zone AuthenticatedOriginPulls certificate list endpoint.

typePerZoneAuthenticatedOriginPullsSettingsadded inv0.12.2

type PerZoneAuthenticatedOriginPullsSettings struct {Enabledbool `json:"enabled"`}

PerZoneAuthenticatedOriginPullsSettings represents the settings for Per Zone AuthenticatedOriginPulls.

typePerZoneAuthenticatedOriginPullsSettingsResponseadded inv0.12.2

type PerZoneAuthenticatedOriginPullsSettingsResponse struct {ResponseResultPerZoneAuthenticatedOriginPullsSettings `json:"result"`}

PerZoneAuthenticatedOriginPullsSettingsResponse represents the response from the Per Zone AuthenticatedOriginPulls settings endpoint.

typePermissionadded inv0.53.0

type Permission struct {IDstring            `json:"id"`Keystring            `json:"key"`Attributes map[string]string `json:"attributes,omitempty"`// same as Meta in other structs}

typePermissionGroupadded inv0.53.0

type PermissionGroup struct {IDstring            `json:"id"`Namestring            `json:"name"`Meta        map[string]string `json:"meta"`Permissions []Permission      `json:"permissions"`}

typePermissionGroupDetailResponseadded inv0.53.0

type PermissionGroupDetailResponse struct {Successbool            `json:"success"`Errors   []string        `json:"errors"`Messages []string        `json:"messages"`ResultPermissionGroup `json:"result"`}

typePermissionGroupListResponseadded inv0.53.0

type PermissionGroupListResponse struct {Successbool              `json:"success"`Errors   []string          `json:"errors"`Messages []string          `json:"messages"`Result   []PermissionGroup `json:"result"`}

typePhishingScanadded inv0.44.0

type PhishingScan struct {URLstring  `json:"url"`Phishingbool    `json:"phishing"`Verifiedbool    `json:"verified"`Scorefloat64 `json:"score"`Classifierstring  `json:"classifier"`}

PhishingScan represent information about a phishing scan.

typePhishingScanParametersadded inv0.44.0

type PhishingScanParameters struct {AccountIDstring `url:"-"`URLstring `url:"url,omitempty"`Skipbool   `url:"skip,omitempty"`}

PhishingScanParameters represent parameters for a phishing scan request.

typePhishingScanResponseadded inv0.44.0

type PhishingScanResponse struct {ResponseResultPhishingScan `json:"result,omitempty"`}

PhishingScanResponse represent an API response for a phishing scan.

typePlacementadded inv0.68.0

type Placement struct {// Mode is the placement mode for the worker (e.g. "smart").ModePlacementMode `json:"mode"`// Status is the status of the placement (readonly).StatusPlacementStatus `json:"status,omitempty"`}

Placement contains all the worker placement information.

typePlacementFieldsadded inv0.114.0

type PlacementFields struct {// PlacementMode.//// Deprecated: Use Placement.Mode instead.PlacementMode *PlacementMode `json:"placement_mode,omitempty"`// Placement.Placement *Placement `json:"placement,omitempty"`}

PlacementFields contains all the worker placement fields (deprecated and nested).This struct is meant to be embedded, it exists for locality of deprecated and regular fields.

typePlacementModeadded inv0.68.0

type PlacementModestring
const (PlacementModeOffPlacementMode = ""PlacementModeSmartPlacementMode = "smart")

typePlacementStatusadded inv0.114.0

type PlacementStatusstring

typePolicyadded inv0.53.0

type Policy struct {IDstring            `json:"id"`PermissionGroups []PermissionGroup `json:"permission_groups"`ResourceGroups   []ResourceGroup   `json:"resource_groups"`Accessstring            `json:"access"`}

typePolishadded inv0.47.0

type Polishint
const (PolishOff PolishPolishLosslessPolishLossy)

funcPolishFromStringadded inv0.47.0

func PolishFromString(sstring) (*Polish,error)

func (Polish)IntoRefadded inv0.47.0

func (pPolish) IntoRef() *Polish

func (Polish)MarshalJSONadded inv0.47.0

func (pPolish) MarshalJSON() ([]byte,error)

func (Polish)Stringadded inv0.47.0

func (pPolish) String()string

func (*Polish)UnmarshalJSONadded inv0.47.0

func (p *Polish) UnmarshalJSON(data []byte)error

typeProxyProtocoladded inv0.11.0

type ProxyProtocolstring

ProxyProtocol implements json.Unmarshaler in order to support deserializing of the deprecated booleanvalue for `proxy_protocol`.

func (*ProxyProtocol)UnmarshalJSONadded inv0.11.0

func (p *ProxyProtocol) UnmarshalJSON(data []byte)error

UnmarshalJSON handles deserializing of both the deprecated boolean value and the current string valuefor the `proxy_protocol` field.

typePublishZarazConfigParamsadded inv0.86.0

type PublishZarazConfigParams struct {Descriptionstring `json:"description"`}

typePurgeCacheRequestadded inv0.7.2

type PurgeCacheRequest struct {Everythingbool `json:"purge_everything,omitempty"`// Purge by filepath (exact match). Limit of 30Files []string `json:"files,omitempty"`// Purge by Tag (Enterprise only)://https://support.cloudflare.com/hc/en-us/articles/206596608-How-to-Purge-Cache-Using-Cache-Tags-Enterprise-only-Tags []string `json:"tags,omitempty"`// Purge by hostname - e.g. "assets.example.com"Hosts []string `json:"hosts,omitempty"`// Purge by prefix - e.g. "example.com/css"Prefixes []string `json:"prefixes,omitempty"`}

PurgeCacheRequest represents the request format made to the purge endpoint.

typePurgeCacheResponseadded inv0.7.2

type PurgeCacheResponse struct {ResponseResult struct {IDstring `json:"id"`} `json:"result"`}

PurgeCacheResponse represents the response from the purge endpoint.

typeQueryD1DatabaseParamsadded inv0.79.0

type QueryD1DatabaseParams struct {DatabaseIDstring   `json:"-"`SQLstring   `json:"sql"`Parameters []string `json:"params"`}

typeQueryD1Responseadded inv0.79.0

type QueryD1Response struct {Result []D1Result `json:"result"`Response}

typeQueueadded inv0.55.0

type Queue struct {IDstring          `json:"queue_id,omitempty"`Namestring          `json:"queue_name,omitempty"`CreatedOn           *time.Time      `json:"created_on,omitempty"`ModifiedOn          *time.Time      `json:"modified_on,omitempty"`ProducersTotalCountint             `json:"producers_total_count,omitempty"`Producers           []QueueProducer `json:"producers,omitempty"`ConsumersTotalCountint             `json:"consumers_total_count,omitempty"`Consumers           []QueueConsumer `json:"consumers,omitempty"`}

typeQueueConsumeradded inv0.55.0

type QueueConsumer struct {Namestring                `json:"-"`Servicestring                `json:"service,omitempty"`ScriptNamestring                `json:"script_name,omitempty"`Environmentstring                `json:"environment,omitempty"`SettingsQueueConsumerSettings `json:"settings,omitempty"`QueueNamestring                `json:"queue_name,omitempty"`CreatedOn       *time.Time            `json:"created_on,omitempty"`DeadLetterQueuestring                `json:"dead_letter_queue,omitempty"`}

typeQueueConsumerResponseadded inv0.55.0

type QueueConsumerResponse struct {ResponseResultQueueConsumer `json:"result"`}

typeQueueConsumerSettingsadded inv0.55.0

type QueueConsumerSettings struct {BatchSizeint `json:"batch_size,omitempty"`MaxRetiresint `json:"max_retries,omitempty"`MaxWaitTimeint `json:"max_wait_time_ms,omitempty"`}

typeQueueListResponse

type QueueListResponse struct {ResponseResultInfo `json:"result_info"`Result     []Queue `json:"result"`}

typeQueueProduceradded inv0.55.0

type QueueProducer struct {Servicestring `json:"service,omitempty"`Environmentstring `json:"environment,omitempty"`}

typeQueueResponseadded inv0.55.0

type QueueResponse struct {ResponseResultQueue `json:"result"`}

typeR2BindingMapadded inv0.49.0

type R2BindingMap map[string]*R2BindingValue

typeR2BindingValueadded inv0.49.0

type R2BindingValue struct {Namestring `json:"name"`}

typeR2Bucketadded inv0.55.0

type R2Bucket struct {Namestring     `json:"name"`CreationDate *time.Time `json:"creation_date,omitempty"`Locationstring     `json:"location,omitempty"`}

R2Bucket defines a container for objects stored in R2 Storage.

typeR2BucketListResponse

type R2BucketListResponse struct {ResultR2Buckets `json:"result"`Response}

R2BucketListResponse represents the response from the listR2 buckets endpoint.

typeR2BucketResponseadded inv0.68.0

type R2BucketResponse struct {ResultR2Bucket `json:"result"`Response}

typeR2Bucketsadded inv0.55.0

type R2Buckets struct {Buckets []R2Bucket `json:"buckets"`}

R2Buckets represents the map of buckets response fromthe R2 buckets endpoint.

typeRandomSteeringadded inv0.42.0

type RandomSteering struct {DefaultWeightfloat64            `json:"default_weight,omitempty"`PoolWeights   map[string]float64 `json:"pool_weights,omitempty"`}

RandomSteering configures pool weights.

SteeringPolicy="random": A random pool is selected with probabilityproportional to pool weights.

SteeringPolicy="least_outstanding_requests": Use pool weights toscale each pool's outstanding requests.

SteeringPolicy="least_connections": Use pool weights toscale each pool's open connections.

typeRateLimitadded inv0.8.5

type RateLimit struct {IDstring                  `json:"id,omitempty"`Disabledbool                    `json:"disabled,omitempty"`Descriptionstring                  `json:"description,omitempty"`MatchRateLimitTrafficMatcher `json:"match"`Bypass      []RateLimitKeyValue     `json:"bypass,omitempty"`Thresholdint                     `json:"threshold"`Periodint                     `json:"period"`ActionRateLimitAction         `json:"action"`Correlate   *RateLimitCorrelate     `json:"correlate,omitempty"`}

RateLimit is a policy than can be applied to limit traffic within a customer domain.

typeRateLimitActionadded inv0.8.5

type RateLimitAction struct {Modestring                   `json:"mode"`Timeoutint                      `json:"timeout"`Response *RateLimitActionResponse `json:"response"`}

RateLimitAction is the action that will be taken when the rate limit threshold is reached.

typeRateLimitActionResponseadded inv0.8.5

type RateLimitActionResponse struct {ContentTypestring `json:"content_type"`Bodystring `json:"body"`}

RateLimitActionResponse is the response that will be returned when rate limit action is triggered.

typeRateLimitCorrelateadded inv0.9.0

type RateLimitCorrelate struct {Bystring `json:"by"`}

RateLimitCorrelate pertainings to NAT support.

typeRateLimitKeyValueadded inv0.8.5

type RateLimitKeyValue struct {Namestring `json:"name"`Valuestring `json:"value"`}

RateLimitKeyValue is k-v formatted as expected in the rate limit description.

typeRateLimitRequestMatcheradded inv0.8.5

type RateLimitRequestMatcher struct {Methods    []string `json:"methods,omitempty"`Schemes    []string `json:"schemes,omitempty"`URLPatternstring   `json:"url,omitempty"`}

RateLimitRequestMatcher contains the matching rules pertaining to requests.

typeRateLimitResponseMatcheradded inv0.8.5

type RateLimitResponseMatcher struct {Statuses      []int                            `json:"status,omitempty"`OriginTraffic *bool                            `json:"origin_traffic,omitempty"`// api defaults to true so we need an explicit empty valueHeaders       []RateLimitResponseMatcherHeader `json:"headers,omitempty"`}

RateLimitResponseMatcher contains the matching rules pertaining to responses.

typeRateLimitResponseMatcherHeaderadded inv0.9.0

type RateLimitResponseMatcherHeader struct {Namestring `json:"name"`Opstring `json:"op"`Valuestring `json:"value"`}

RateLimitResponseMatcherHeader contains the structure of the originHTTP headers used in request matcher checks.

typeRateLimitTrafficMatcheradded inv0.8.5

type RateLimitTrafficMatcher struct {RequestRateLimitRequestMatcher  `json:"request"`ResponseRateLimitResponseMatcher `json:"response"`}

RateLimitTrafficMatcher contains the rules that will be used to apply a rate limit to traffic.

typeRatelimitErroradded inv0.36.0

type RatelimitError struct {// contains filtered or unexported fields}

RatelimitError is for HTTP 429s where the service is telling the client toslow down.

funcNewRatelimitErroradded inv0.48.0

func NewRatelimitError(e *Error)RatelimitError

func (RatelimitError)Erroradded inv0.36.0

func (eRatelimitError) Error()string

func (RatelimitError)ErrorCodesadded inv0.36.0

func (eRatelimitError) ErrorCodes() []int

func (RatelimitError)ErrorMessagesadded inv0.36.0

func (eRatelimitError) ErrorMessages() []string

func (RatelimitError)Errorsadded inv0.36.0

func (eRatelimitError) Errors() []ResponseInfo

func (RatelimitError)InternalErrorCodeIsadded inv0.48.0

func (eRatelimitError) InternalErrorCodeIs(codeint)bool

func (RatelimitError)RayIDadded inv0.36.0

func (eRatelimitError) RayID()string

func (RatelimitError)Typeadded inv0.36.0

func (RatelimitError)Unwrapadded inv0.103.0

func (eRatelimitError) Unwrap()error

typeRawResponseadded inv0.8.0

type RawResponse struct {ResponseResult     json.RawMessage `json:"result"`ResultInfo *ResultInfo     `json:"result_info,omitempty"`}

RawResponse keeps the result as JSON form.

typeRedirectadded inv0.42.0

type Redirect struct {SourceUrlstring `json:"source_url"`IncludeSubdomains   *bool  `json:"include_subdomains,omitempty"`TargetUrlstring `json:"target_url"`StatusCode          *int   `json:"status_code,omitempty"`PreserveQueryString *bool  `json:"preserve_query_string,omitempty"`SubpathMatching     *bool  `json:"subpath_matching,omitempty"`PreservePathSuffix  *bool  `json:"preserve_path_suffix,omitempty"`}

Redirect represents a redirect item in a List.

typeRefreshTokenOptionsadded inv0.96.0

type RefreshTokenOptions struct {Lifetimestring `json:"lifetime,omitempty"`}

typeRegionadded inv0.66.0

type Region struct {Keystring `json:"key"`Labelstring `json:"label"`}

typeRegionalHostnameadded inv0.66.0

type RegionalHostname struct {Hostnamestring     `json:"hostname"`RegionKeystring     `json:"region_key"`Routingstring     `json:"routing,omitempty"`CreatedOn *time.Time `json:"created_on,omitempty"`}

typeRegionalTieredCacheadded inv0.73.0

type RegionalTieredCache struct {IDstring    `json:"id,omitempty"`ModifiedOntime.Time `json:"modified_on,omitempty"`Valuestring    `json:"value"`}

RegionalTieredCache is the structure of the API object for the regional tiered cachesetting.

typeRegionalTieredCacheDetailsResponseadded inv0.73.0

type RegionalTieredCacheDetailsResponse struct {ResultRegionalTieredCache `json:"result"`Response}

RegionalTieredCacheDetailsResponse is the API response for the regional tiered cachesetting.

typeRegistrantContactadded inv0.9.0

type RegistrantContact struct {IDstring `json:"id"`FirstNamestring `json:"first_name"`LastNamestring `json:"last_name"`Organizationstring `json:"organization"`Addressstring `json:"address"`Address2string `json:"address2"`Citystring `json:"city"`Statestring `json:"state"`Zipstring `json:"zip"`Countrystring `json:"country"`Phonestring `json:"phone"`Emailstring `json:"email"`Faxstring `json:"fax"`}

RegistrantContact is the contact details for the domain registration.

typeRegistrarDomainadded inv0.9.0

type RegistrarDomain struct {IDstring              `json:"id"`Availablebool                `json:"available"`SupportedTLDbool                `json:"supported_tld"`CanRegisterbool                `json:"can_register"`TransferInRegistrarTransferIn `json:"transfer_in"`CurrentRegistrarstring              `json:"current_registrar"`ExpiresAttime.Time           `json:"expires_at"`RegistryStatusesstring              `json:"registry_statuses"`Lockedbool                `json:"locked"`CreatedAttime.Time           `json:"created_at"`UpdatedAttime.Time           `json:"updated_at"`RegistrantContactRegistrantContact   `json:"registrant_contact"`}

RegistrarDomain is the structure of the API response for a newCloudflare Registrar domain.

typeRegistrarDomainConfigurationadded inv0.9.0

type RegistrarDomainConfiguration struct {NameServers []string `json:"name_servers"`Privacybool     `json:"privacy"`Lockedbool     `json:"locked"`AutoRenewbool     `json:"auto_renew"`}

RegistrarDomainConfiguration is the structure for making updates toand existing domain.

typeRegistrarDomainDetailResponseadded inv0.9.0

type RegistrarDomainDetailResponse struct {ResponseResultRegistrarDomain `json:"result"`}

RegistrarDomainDetailResponse is the structure of the detailedresponse from the API for a single domain.

typeRegistrarDomainsDetailResponseadded inv0.9.0

type RegistrarDomainsDetailResponse struct {ResponseResult []RegistrarDomain `json:"result"`}

RegistrarDomainsDetailResponse is the structure of the detailedresponse from the API.

typeRegistrarTransferInadded inv0.9.0

type RegistrarTransferIn struct {UnlockDomainstring `json:"unlock_domain"`DisablePrivacystring `json:"disable_privacy"`EnterAuthCodestring `json:"enter_auth_code"`ApproveTransferstring `json:"approve_transfer"`AcceptFoastring `json:"accept_foa"`CanCancelTransferbool   `json:"can_cancel_transfer"`}

RegistrarTransferIn contains the structure for a domain transfer inrequest.

typeRemoteIdentitiesadded inv0.41.0

type RemoteIdentities struct {HexIDstring `json:"hex_id"`FQDNIDstring `json:"fqdn_id"`UserIDstring `json:"user_id"`}

typeReplaceWaitingRoomRuleParamsadded inv0.53.0

type ReplaceWaitingRoomRuleParams struct {WaitingRoomIDstringRules         []WaitingRoomRule}

typeReqOptionadded inv0.9.0

type ReqOption func(opt *reqOption)

ReqOption is a functional option for configuring API requests.

funcWithPaginationadded inv0.9.0

func WithPagination(optsPaginationOptions)ReqOption

WithPagination configures the pagination for a response.

funcWithZoneFiltersadded inv0.12.0

func WithZoneFilters(zoneName, accountID, statusstring)ReqOption

WithZoneFilters applies a filter based on zone properties.

typeRequestErroradded inv0.36.0

type RequestError struct {// contains filtered or unexported fields}

RequestError is for 4xx errors that we encounter not covered elsewhere(generally bad payloads).

funcNewRequestErroradded inv0.48.0

func NewRequestError(e *Error)RequestError

func (RequestError)Erroradded inv0.36.0

func (eRequestError) Error()string

func (RequestError)ErrorCodesadded inv0.36.0

func (eRequestError) ErrorCodes() []int

func (RequestError)ErrorMessagesadded inv0.36.0

func (eRequestError) ErrorMessages() []string

func (RequestError)Errorsadded inv0.36.0

func (eRequestError) Errors() []ResponseInfo

func (RequestError)InternalErrorCodeIsadded inv0.48.0

func (eRequestError) InternalErrorCodeIs(codeint)bool

func (RequestError)Messagesadded inv0.53.0

func (eRequestError) Messages() []ResponseInfo

func (RequestError)RayIDadded inv0.36.0

func (eRequestError) RayID()string

func (RequestError)Typeadded inv0.36.0

func (eRequestError) Type()ErrorType

func (RequestError)Unwrapadded inv0.103.0

func (eRequestError) Unwrap()error

typeResolvesToRefsadded inv0.44.0

type ResolvesToRefs struct {IDstring `json:"id"`Valuestring `json:"value"`}

ResolvesToRefs what a domain resolves to.

typeResourceContaineradded inv0.45.0

type ResourceContainer struct {LevelRouteLevelIdentifierstringTypeResourceType}

ResourceContainer defines an API resource you wish to target. Should not beused directly, use `UserIdentifier`, `ZoneIdentifier` and `AccountIdentifier`instead.

funcAccountIdentifieradded inv0.45.0

func AccountIdentifier(idstring) *ResourceContainer

AccountIdentifier returns an account level *ResourceContainer.

funcResourceIdentifieradded inv0.45.0

func ResourceIdentifier(idstring) *ResourceContainer

ResourceIdentifier returns a generic *ResourceContainer.

funcUserIdentifieradded inv0.45.0

func UserIdentifier(idstring) *ResourceContainer

UserIdentifier returns a user level *ResourceContainer.

funcZoneIdentifieradded inv0.36.0

func ZoneIdentifier(idstring) *ResourceContainer

ZoneIdentifier returns a zone level *ResourceContainer.

func (*ResourceContainer)URLFragmentadded inv0.63.0

func (rc *ResourceContainer) URLFragment()string

Returns a URL fragment of the endpoint scoped by the container.

For example, a zone identifier would have a fragment like "zones/foobar" whilean account identifier would generate "accounts/foobar".

typeResourceGroupadded inv0.53.0

type ResourceGroup struct {IDstring            `json:"id"`Namestring            `json:"name"`Meta  map[string]string `json:"meta"`ScopeScope             `json:"scope"`}

funcNewResourceGroupadded inv0.53.0

func NewResourceGroup(keystring)ResourceGroup

NewResourceGroup takes a Cloudflare-formatted key (e.g. 'com.cloudflare.api.%s') andreturns a resource group to be used within a Policy to allow access to that resource.

funcNewResourceGroupForAccountadded inv0.53.0

func NewResourceGroupForAccount(accountAccount)ResourceGroup

NewResourceGroupForAccount takes an existing zone and provides a resource groupto be used within a Policy that allows access to that account.

funcNewResourceGroupForZoneadded inv0.53.0

func NewResourceGroupForZone(zoneZone)ResourceGroup

NewResourceGroupForZone takes an existing zone and provides a resource groupto be used within a Policy that allows access to that zone.

typeResourceTypeadded inv0.72.0

type ResourceTypestring

ResourceType holds the type of the resource. This is similar to `RouteLevel`however this is the singular version of `RouteLevel` and isn't suitable foruse in routing.

func (ResourceType)Stringadded inv0.72.0

func (rResourceType) String()string

typeResponseadded inv0.7.2

type Response struct {Successbool           `json:"success"`Errors   []ResponseInfo `json:"errors"`Messages []ResponseInfo `json:"messages"`}

Response is a template. There will also be a result struct. There will be aunique response type for each response, which will include this type.

typeResponseInfoadded inv0.7.2

type ResponseInfo struct {Codeint    `json:"code"`Messagestring `json:"message"`}

ResponseInfo contains a code and message returned by the API as errors orinformational messages inside the response.

typeResultInfoadded inv0.7.2

type ResultInfo struct {Pageint               `json:"page" url:"page,omitempty"`PerPageint               `json:"per_page" url:"per_page,omitempty"`TotalPagesint               `json:"total_pages" url:"-"`Countint               `json:"count" url:"-"`Totalint               `json:"total_count" url:"-"`Cursorstring            `json:"cursor" url:"cursor,omitempty"`CursorsResultInfoCursors `json:"cursors" url:"cursors,omitempty"`}

ResultInfo contains metadata about the Response.

func (ResultInfo)Doneadded inv0.45.0

func (pResultInfo) Done()bool

Done returns true for the last page and false otherwise.

func (ResultInfo)HasMorePagesadded inv0.45.0

func (pResultInfo) HasMorePages()bool

HasMorePages returns whether there is another page of results after thecurrent one.

func (ResultInfo)Nextadded inv0.45.0

func (pResultInfo) Next()ResultInfo

Next advances the page of a paginated API response, but does not fetch thenext page of results.

typeResultInfoCursorsadded inv0.13.0

type ResultInfoCursors struct {Beforestring `json:"before" url:"before,omitempty"`Afterstring `json:"after" url:"after,omitempty"`}

ResultInfoCursors contains information about cursors.

typeRetryPagesDeploymentParamsadded inv0.40.0

type RetryPagesDeploymentParams struct {ProjectNamestringDeploymentIDstring}

typeRetryPolicyadded inv0.8.5

type RetryPolicy struct {MaxRetriesintMinRetryDelaytime.DurationMaxRetryDelaytime.Duration}

RetryPolicy specifies number of retries and min/max retry delaysThis config is used when the client exponentially backs off after errored requests.

typeReverseRecordsadded inv0.44.0

type ReverseRecords struct {FirstSeenstring `json:"first_seen,omitempty"`LastSeenstring `json:"last_seen,omitempty"`Hostnamestring `json:"hostname,omitempty"`}

ReverseRecords represent records for passive DNS.

typeRevokeAccessUserTokensParamsadded inv0.71.0

type RevokeAccessUserTokensParams struct {Emailstring `json:"email"`}

typeRiskLeveladded inv0.95.0

type RiskLevelint
const (Low RiskLevelMediumHigh)

funcRiskLevelFromStringadded inv0.95.0

func RiskLevelFromString(sstring) (*RiskLevel,error)

func (RiskLevel)IntoRefadded inv0.95.0

func (pRiskLevel) IntoRef() *RiskLevel

func (RiskLevel)MarshalJSONadded inv0.95.0

func (pRiskLevel) MarshalJSON() ([]byte,error)

func (RiskLevel)Stringadded inv0.95.0

func (pRiskLevel) String()string

func (*RiskLevel)UnmarshalJSONadded inv0.95.0

func (p *RiskLevel) UnmarshalJSON(data []byte)error

typeRiskScoreIntegrationadded inv0.101.0

type RiskScoreIntegration struct {IDstring     `json:"id,omitempty"`IntegrationTypestring     `json:"integration_type,omitempty"`TenantUrlstring     `json:"tenant_url,omitempty"`ReferenceIDstring     `json:"reference_id,omitempty"`AccountTagstring     `json:"account_tag,omitempty"`WellKnownUrlstring     `json:"well_known_url,omitempty"`Active          *bool      `json:"active,omitempty"`CreatedAt       *time.Time `json:"created_at,omitempty"`}

Represents a Risk Score Sharing Integration.If enabled, Cloudflare will share changes in user risk score with the specified vendor.

typeRiskScoreIntegrationCreateRequestadded inv0.101.0

type RiskScoreIntegrationCreateRequest struct {IntegrationTypestring `json:"integration_type,omitempty"`TenantUrlstring `json:"tenant_url,omitempty"`ReferenceIDstring `json:"reference_id,omitempty"`}

The properties required to create a new risk score integration.

typeRiskScoreIntegrationListResponseadded inv0.101.0

type RiskScoreIntegrationListResponse struct {Result []RiskScoreIntegration `json:"result"`Response}

A list of risk score integrations as returned from the API.

typeRiskScoreIntegrationResponseadded inv0.101.0

type RiskScoreIntegrationResponse struct {ResultRiskScoreIntegration `json:"result"`Response}

A risk score integration as returned from the API.

typeRiskScoreIntegrationUpdateRequestadded inv0.101.0

type RiskScoreIntegrationUpdateRequest struct {IntegrationTypestring `json:"integration_type,omitempty"`TenantUrlstring `json:"tenant_url,omitempty"`ReferenceIDstring `json:"reference_id,omitempty"`Active          *bool  `json:"active,omitempty"`}

The properties required to update a risk score integration.

typeRiskTypesadded inv0.44.0

type RiskTypes struct {IDint    `json:"id"`SuperCategoryIDint    `json:"super_category_id"`Namestring `json:"name"`}

RiskTypes represent risk types for an IP.

typeRollbackPagesDeploymentParamsadded inv0.40.0

type RollbackPagesDeploymentParams struct {ProjectNamestringDeploymentIDstring}

typeRotateTurnstileWidgetParamsadded inv0.66.0

type RotateTurnstileWidgetParams struct {SiteKeystring `json:"-"`InvalidateImmediatelybool   `json:"invalidate_immediately,omitempty"`}

typeRouteLeveladded inv0.45.0

type RouteLevelstring

RouteLevel holds the "level" where the resource resides. Commonly used inrouting configurations or builders.

func (RouteLevel)Stringadded inv0.72.0

func (rRouteLevel) String()string

typeRouteRootadded inv0.13.4

type RouteRootstring

RouteRoot represents the name of the route namespace.

const (// AccountRouteRoot is the accounts route namespace.AccountRouteRootRouteRoot = "accounts"// ZoneRouteRoot is the zones route namespace.ZoneRouteRootRouteRoot = "zones")

typeRulesetadded inv0.19.0

type Ruleset struct {IDstring        `json:"id,omitempty"`Namestring        `json:"name,omitempty"`Descriptionstring        `json:"description,omitempty"`Kindstring        `json:"kind,omitempty"`Version                  *string       `json:"version,omitempty"`LastUpdated              *time.Time    `json:"last_updated,omitempty"`Phasestring        `json:"phase,omitempty"`Rules                    []RulesetRule `json:"rules"`ShareableEntitlementNamestring        `json:"shareable_entitlement_name,omitempty"`}

Ruleset contains the structure of a Ruleset. Using `string` for Kind andPhase is a developer nicety to support downstream clients like Terraform whodon't really have a strong and expansive type system. As always, therecommendation is to use the types provided where possible to avoidsurprises.

typeRulesetActionParameterProductadded inv0.19.0

type RulesetActionParameterProductstring

RulesetActionParameterProduct is the custom type for defining what productscan be used within the action parameters of a ruleset.

typeRulesetActionParametersLogCustomFieldadded inv0.40.0

type RulesetActionParametersLogCustomField struct {Namestring `json:"name,omitempty"`}

RulesetActionParametersLogCustomField wraps an object that is part ofrequest_fields, response_fields or cookie_fields.

typeRulesetKindadded inv0.19.0

type RulesetKindstring

RulesetKind is the custom type for allowed variances of rulesets.

typeRulesetPhaseadded inv0.19.0

type RulesetPhasestring

RulesetPhase is the custom type for defining at what point the ruleset willbe applied in the request pipeline.

typeRulesetRuleadded inv0.19.0

type RulesetRule struct {IDstring                             `json:"id,omitempty"`Version                *string                            `json:"version,omitempty"`Actionstring                             `json:"action"`ActionParameters       *RulesetRuleActionParameters       `json:"action_parameters,omitempty"`Expressionstring                             `json:"expression"`Descriptionstring                             `json:"description,omitempty"`LastUpdated            *time.Time                         `json:"last_updated,omitempty"`Refstring                             `json:"ref,omitempty"`Enabled                *bool                              `json:"enabled,omitempty"`ScoreThresholdint                                `json:"score_threshold,omitempty"`RateLimit              *RulesetRuleRateLimit              `json:"ratelimit,omitempty"`ExposedCredentialCheck *RulesetRuleExposedCredentialCheck `json:"exposed_credential_check,omitempty"`Logging                *RulesetRuleLogging                `json:"logging,omitempty"`}

RulesetRule contains information about a single Ruleset Rule.

typeRulesetRuleActionadded inv0.19.0

type RulesetRuleActionstring

RulesetRuleAction defines a custom type that is used to express allowedvalues for the rule action.

typeRulesetRuleActionParametersadded inv0.19.0

type RulesetRuleActionParameters struct {IDstring                                            `json:"id,omitempty"`Rulesetstring                                            `json:"ruleset,omitempty"`Rulesets                 []string                                          `json:"rulesets,omitempty"`Rules                    map[string][]string                               `json:"rules,omitempty"`Incrementint                                               `json:"increment,omitempty"`URI                      *RulesetRuleActionParametersURI                   `json:"uri,omitempty"`Headers                  map[string]RulesetRuleActionParametersHTTPHeader  `json:"headers,omitempty"`Products                 []string                                          `json:"products,omitempty"`Phases                   []string                                          `json:"phases,omitempty"`Overrides                *RulesetRuleActionParametersOverrides             `json:"overrides,omitempty"`MatchedData              *RulesetRuleActionParametersMatchedData           `json:"matched_data,omitempty"`Version                  *string                                           `json:"version,omitempty"`Response                 *RulesetRuleActionParametersBlockResponse         `json:"response,omitempty"`HostHeaderstring                                            `json:"host_header,omitempty"`Origin                   *RulesetRuleActionParametersOrigin                `json:"origin,omitempty"`SNI                      *RulesetRuleActionParametersSni                   `json:"sni,omitempty"`RequestFields            []RulesetActionParametersLogCustomField           `json:"request_fields,omitempty"`ResponseFields           []RulesetActionParametersLogCustomField           `json:"response_fields,omitempty"`CookieFields             []RulesetActionParametersLogCustomField           `json:"cookie_fields,omitempty"`Cache                    *bool                                             `json:"cache,omitempty"`AdditionalCacheablePorts []int                                             `json:"additional_cacheable_ports,omitempty"`EdgeTTL                  *RulesetRuleActionParametersEdgeTTL               `json:"edge_ttl,omitempty"`BrowserTTL               *RulesetRuleActionParametersBrowserTTL            `json:"browser_ttl,omitempty"`ServeStale               *RulesetRuleActionParametersServeStale            `json:"serve_stale,omitempty"`Contentstring                                            `json:"content,omitempty"`ContentTypestring                                            `json:"content_type,omitempty"`StatusCodeuint16                                            `json:"status_code,omitempty"`RespectStrongETags       *bool                                             `json:"respect_strong_etags,omitempty"`CacheKey                 *RulesetRuleActionParametersCacheKey              `json:"cache_key,omitempty"`OriginCacheControl       *bool                                             `json:"origin_cache_control,omitempty"`OriginErrorPagePassthru  *bool                                             `json:"origin_error_page_passthru,omitempty"`CacheReserve             *RulesetRuleActionParametersCacheReserve          `json:"cache_reserve,omitempty"`FromList                 *RulesetRuleActionParametersFromList              `json:"from_list,omitempty"`FromValue                *RulesetRuleActionParametersFromValue             `json:"from_value,omitempty"`AutomaticHTTPSRewrites   *bool                                             `json:"automatic_https_rewrites,omitempty"`AutoMinify               *RulesetRuleActionParametersAutoMinify            `json:"autominify,omitempty"`BrowserIntegrityCheck    *bool                                             `json:"bic,omitempty"`DisableApps              *bool                                             `json:"disable_apps,omitempty"`DisableZaraz             *bool                                             `json:"disable_zaraz,omitempty"`DisableRailgun           *bool                                             `json:"disable_railgun,omitempty"`DisableRUM               *bool                                             `json:"disable_rum,omitempty"`EmailObfuscation         *bool                                             `json:"email_obfuscation,omitempty"`Fonts                    *bool                                             `json:"fonts,omitempty"`Mirage                   *bool                                             `json:"mirage,omitempty"`OpportunisticEncryption  *bool                                             `json:"opportunistic_encryption,omitempty"`Polish                   *Polish                                           `json:"polish,omitempty"`ReadTimeout              *uint                                             `json:"read_timeout,omitempty"`RocketLoader             *bool                                             `json:"rocket_loader,omitempty"`SecurityLevel            *SecurityLevel                                    `json:"security_level,omitempty"`ServerSideExcludes       *bool                                             `json:"server_side_excludes,omitempty"`SSL                      *SSL                                              `json:"ssl,omitempty"`SXG                      *bool                                             `json:"sxg,omitempty"`HotLinkProtection        *bool                                             `json:"hotlink_protection,omitempty"`Algorithms               []RulesetRuleActionParametersCompressionAlgorithm `json:"algorithms,omitempty"`}

RulesetRuleActionParameters specifies the action parameters for a Rulesetrule.

typeRulesetRuleActionParametersAutoMinifyadded inv0.47.0

type RulesetRuleActionParametersAutoMinify struct {HTMLbool `json:"html"`CSSbool `json:"css"`JSbool `json:"js"`}

typeRulesetRuleActionParametersBlockResponseadded inv0.35.1

type RulesetRuleActionParametersBlockResponse struct {StatusCodeuint16 `json:"status_code"`ContentTypestring `json:"content_type"`Contentstring `json:"content"`}

RulesetRuleActionParametersBlockResponse holds the BlockResponse structfor an action parameter.

typeRulesetRuleActionParametersBrowserTTLadded inv0.42.0

type RulesetRuleActionParametersBrowserTTL struct {Modestring `json:"mode"`Default *uint  `json:"default,omitempty"`}

typeRulesetRuleActionParametersCacheKeyadded inv0.42.0

type RulesetRuleActionParametersCacheKey struct {CacheByDeviceType       *bool                                 `json:"cache_by_device_type,omitempty"`IgnoreQueryStringsOrder *bool                                 `json:"ignore_query_strings_order,omitempty"`CacheDeceptionArmor     *bool                                 `json:"cache_deception_armor,omitempty"`CustomKey               *RulesetRuleActionParametersCustomKey `json:"custom_key,omitempty"`}

typeRulesetRuleActionParametersCacheReserveadded inv0.77.0

type RulesetRuleActionParametersCacheReserve struct {Eligible        *bool `json:"eligible,omitempty"`MinimumFileSize *uint `json:"minimum_file_size,omitempty"`}

typeRulesetRuleActionParametersCategoriesadded inv0.20.0

type RulesetRuleActionParametersCategories struct {Categorystring `json:"category"`Actionstring `json:"action,omitempty"`Enabled  *bool  `json:"enabled,omitempty"`}

typeRulesetRuleActionParametersCompressionAlgorithmadded inv0.65.0

type RulesetRuleActionParametersCompressionAlgorithm struct {Namestring `json:"name"`}

RulesetRuleActionParametersCompressionAlgorithm defines a compressionalgorithm for the compress_response action.

typeRulesetRuleActionParametersCustomKeyadded inv0.42.0

type RulesetRuleActionParametersCustomKey struct {Query  *RulesetRuleActionParametersCustomKeyQuery  `json:"query_string,omitempty"`Header *RulesetRuleActionParametersCustomKeyHeader `json:"header,omitempty"`Cookie *RulesetRuleActionParametersCustomKeyCookie `json:"cookie,omitempty"`User   *RulesetRuleActionParametersCustomKeyUser   `json:"user,omitempty"`Host   *RulesetRuleActionParametersCustomKeyHost   `json:"host,omitempty"`}

typeRulesetRuleActionParametersCustomKeyCookieadded inv0.42.0

type RulesetRuleActionParametersCustomKeyCookieRulesetRuleActionParametersCustomKeyFields

typeRulesetRuleActionParametersCustomKeyFieldsadded inv0.42.0

type RulesetRuleActionParametersCustomKeyFields struct {Include       []string `json:"include,omitempty"`CheckPresence []string `json:"check_presence,omitempty"`}

typeRulesetRuleActionParametersCustomKeyHeaderadded inv0.42.0

type RulesetRuleActionParametersCustomKeyHeader struct {RulesetRuleActionParametersCustomKeyFieldsExcludeOrigin *bool               `json:"exclude_origin,omitempty"`Contains      map[string][]string `json:"contains,omitempty"`}

typeRulesetRuleActionParametersCustomKeyHostadded inv0.42.0

type RulesetRuleActionParametersCustomKeyHost struct {Resolved *bool `json:"resolved,omitempty"`}

typeRulesetRuleActionParametersCustomKeyListadded inv0.42.0

type RulesetRuleActionParametersCustomKeyList struct {List []stringAllbool}

func (RulesetRuleActionParametersCustomKeyList)MarshalJSONadded inv0.42.0

func (*RulesetRuleActionParametersCustomKeyList)UnmarshalJSONadded inv0.42.0

func (s *RulesetRuleActionParametersCustomKeyList) UnmarshalJSON(data []byte)error

typeRulesetRuleActionParametersCustomKeyQueryadded inv0.42.0

type RulesetRuleActionParametersCustomKeyQuery struct {Include *RulesetRuleActionParametersCustomKeyList `json:"include,omitempty"`Exclude *RulesetRuleActionParametersCustomKeyList `json:"exclude,omitempty"`Ignore  *bool                                     `json:"ignore,omitempty"`}

typeRulesetRuleActionParametersCustomKeyUseradded inv0.42.0

type RulesetRuleActionParametersCustomKeyUser struct {DeviceType *bool `json:"device_type,omitempty"`Geo        *bool `json:"geo,omitempty"`Lang       *bool `json:"lang,omitempty"`}

typeRulesetRuleActionParametersEdgeTTLadded inv0.42.0

type RulesetRuleActionParametersEdgeTTL struct {Modestring                                     `json:"mode,omitempty"`Default       *uint                                      `json:"default,omitempty"`StatusCodeTTL []RulesetRuleActionParametersStatusCodeTTL `json:"status_code_ttl,omitempty"`}

typeRulesetRuleActionParametersFromListadded inv0.42.0

type RulesetRuleActionParametersFromList struct {Namestring `json:"name"`Keystring `json:"key"`}

RulesetRuleActionParametersFromList holds the FromList struct foractions which pull data from a list.

typeRulesetRuleActionParametersFromValueadded inv0.45.0

type RulesetRuleActionParametersFromValue struct {StatusCodeuint16                               `json:"status_code,omitempty"`TargetURLRulesetRuleActionParametersTargetURL `json:"target_url"`PreserveQueryString *bool                                `json:"preserve_query_string,omitempty"`}

typeRulesetRuleActionParametersHTTPHeaderadded inv0.19.0

type RulesetRuleActionParametersHTTPHeader struct {Operationstring `json:"operation,omitempty"`Valuestring `json:"value,omitempty"`Expressionstring `json:"expression,omitempty"`}

RulesetRuleActionParametersHTTPHeader is the definition for define actionparameters that involve HTTP headers.

typeRulesetRuleActionParametersHTTPHeaderOperationadded inv0.19.0

type RulesetRuleActionParametersHTTPHeaderOperationstring

RulesetRuleActionParametersHTTPHeaderOperation defines available options forHTTP header operations in actions.

typeRulesetRuleActionParametersMatchedDataadded inv0.22.0

type RulesetRuleActionParametersMatchedData struct {PublicKeystring `json:"public_key,omitempty"`}

RulesetRuleActionParametersMatchedData holds the structure for WAF basedpayload logging.

typeRulesetRuleActionParametersOriginadded inv0.39.0

type RulesetRuleActionParametersOrigin struct {Hoststring `json:"host,omitempty"`Portuint16 `json:"port,omitempty"`}

RulesetRuleActionParametersOrigin is the definition for route actionparameters that involve origin overrides.

typeRulesetRuleActionParametersOverridesadded inv0.20.0

type RulesetRuleActionParametersOverrides struct {Enabled          *bool                                   `json:"enabled,omitempty"`Actionstring                                  `json:"action,omitempty"`SensitivityLevelstring                                  `json:"sensitivity_level,omitempty"`Categories       []RulesetRuleActionParametersCategories `json:"categories,omitempty"`Rules            []RulesetRuleActionParametersRules      `json:"rules,omitempty"`}

typeRulesetRuleActionParametersRulesadded inv0.20.0

type RulesetRuleActionParametersRules struct {IDstring `json:"id"`Actionstring `json:"action,omitempty"`Enabled          *bool  `json:"enabled,omitempty"`ScoreThresholdint    `json:"score_threshold,omitempty"`SensitivityLevelstring `json:"sensitivity_level,omitempty"`}

typeRulesetRuleActionParametersServeStaleadded inv0.42.0

type RulesetRuleActionParametersServeStale struct {DisableStaleWhileUpdating *bool `json:"disable_stale_while_updating,omitempty"`}

typeRulesetRuleActionParametersSniadded inv0.46.0

type RulesetRuleActionParametersSni struct {Valuestring `json:"value"`}

RulesetRuleActionParametersSni is the definition for the route actionparameters that involve SNI overrides.

typeRulesetRuleActionParametersStatusCodeRangeadded inv0.42.0

type RulesetRuleActionParametersStatusCodeRange struct {From *uint `json:"from,omitempty"`To   *uint `json:"to,omitempty"`}

typeRulesetRuleActionParametersStatusCodeTTLadded inv0.42.0

type RulesetRuleActionParametersStatusCodeTTL struct {StatusCodeRange *RulesetRuleActionParametersStatusCodeRange `json:"status_code_range,omitempty"`StatusCodeValue *uint                                       `json:"status_code,omitempty"`Value           *int                                        `json:"value,omitempty"`}

typeRulesetRuleActionParametersTargetURLadded inv0.45.0

type RulesetRuleActionParametersTargetURL struct {Valuestring `json:"value,omitempty"`Expressionstring `json:"expression,omitempty"`}

typeRulesetRuleActionParametersURIadded inv0.19.0

type RulesetRuleActionParametersURI struct {Path   *RulesetRuleActionParametersURIPath  `json:"path,omitempty"`Query  *RulesetRuleActionParametersURIQuery `json:"query,omitempty"`Origin *bool                                `json:"origin,omitempty"`}

RulesetRuleActionParametersURI holds the URI struct for an action parameter.

typeRulesetRuleActionParametersURIPathadded inv0.19.0

type RulesetRuleActionParametersURIPath struct {Valuestring `json:"value,omitempty"`Expressionstring `json:"expression,omitempty"`}

RulesetRuleActionParametersURIPath holds the path specific portion of a URIaction parameter.

typeRulesetRuleActionParametersURIQueryadded inv0.19.0

type RulesetRuleActionParametersURIQuery struct {Value      *string `json:"value,omitempty"`Expressionstring  `json:"expression,omitempty"`}

RulesetRuleActionParametersURIQuery holds the query specific portion of a URIaction parameter.

typeRulesetRuleExposedCredentialCheckadded inv0.27.0

type RulesetRuleExposedCredentialCheck struct {UsernameExpressionstring `json:"username_expression,omitempty"`PasswordExpressionstring `json:"password_expression,omitempty"`}

RulesetRuleExposedCredentialCheck contains the structure of an exposedcredential check Ruleset Rule.

typeRulesetRuleLoggingadded inv0.37.0

type RulesetRuleLogging struct {Enabled *bool `json:"enabled,omitempty"`}

RulesetRuleLogging contains the logging configuration for the rule.

typeRulesetRuleRateLimitadded inv0.22.0

type RulesetRuleRateLimit struct {Characteristics         []string `json:"characteristics,omitempty"`RequestsPerPeriodint      `json:"requests_per_period,omitempty"`ScorePerPeriodint      `json:"score_per_period,omitempty"`ScoreResponseHeaderNamestring   `json:"score_response_header_name,omitempty"`Periodint      `json:"period,omitempty"`MitigationTimeoutint      `json:"mitigation_timeout,omitempty"`CountingExpressionstring   `json:"counting_expression,omitempty"`RequestsToOriginbool     `json:"requests_to_origin,omitempty"`}

RulesetRuleRateLimit contains the structure of a HTTP rate limit Ruleset Rule.

typeSAMLAttributeConfigadded inv0.41.0

type SAMLAttributeConfig struct {Namestring       `json:"name,omitempty"`NameFormatstring       `json:"name_format,omitempty"`FriendlyNamestring       `json:"friendly_name,omitempty"`Requiredbool         `json:"required,omitempty"`SourceSourceConfig `json:"source"`}

typeSSLadded inv0.47.0

type SSLint
const (SSLOff SSLSSLFlexibleSSLFullSSLStrictSSLOriginPull)

funcSSLFromStringadded inv0.47.0

func SSLFromString(sstring) (*SSL,error)

func (SSL)IntoRefadded inv0.47.0

func (pSSL) IntoRef() *SSL

func (SSL)MarshalJSONadded inv0.47.0

func (pSSL) MarshalJSON() ([]byte,error)

func (SSL)Stringadded inv0.47.0

func (pSSL) String()string

func (*SSL)UnmarshalJSONadded inv0.47.0

func (p *SSL) UnmarshalJSON(data []byte)error

typeSSLValidationErroradded inv0.32.0

type SSLValidationError struct {Messagestring `json:"message,omitempty"`}

SSLValidationError represents errors that occurred during SSL validation.

typeSSLValidationRecordadded inv0.32.0

type SSLValidationRecord struct {CnameTargetstring `json:"cname_target,omitempty"`CnameNamestring `json:"cname,omitempty"`TxtNamestring `json:"txt_name,omitempty"`TxtValuestring `json:"txt_value,omitempty"`HTTPUrlstring `json:"http_url,omitempty"`HTTPBodystring `json:"http_body,omitempty"`Emails []string `json:"emails,omitempty"`}

SSLValidationRecord displays Domain Control Validation tokens.

typeSaasApplicationadded inv0.41.0

type SaasApplication struct {// Items common to both SAML and OIDCAppIDstring     `json:"app_id,omitempty"`UpdatedAt *time.Time `json:"updated_at,omitempty"`CreatedAt *time.Time `json:"created_at,omitempty"`PublicKeystring     `json:"public_key,omitempty"`AuthTypestring     `json:"auth_type,omitempty"`// SAML saas appConsumerServiceUrlstring                 `json:"consumer_service_url,omitempty"`SPEntityIDstring                 `json:"sp_entity_id,omitempty"`IDPEntityIDstring                 `json:"idp_entity_id,omitempty"`NameIDFormatstring                 `json:"name_id_format,omitempty"`SSOEndpointstring                 `json:"sso_endpoint,omitempty"`DefaultRelayStatestring                 `json:"default_relay_state,omitempty"`CustomAttributes              *[]SAMLAttributeConfig `json:"custom_attributes"`NameIDTransformJsonatastring                 `json:"name_id_transform_jsonata,omitempty"`SamlAttributeTransformJsonatastring                 `json:"saml_attribute_transform_jsonata"`// OIDC saas appClientIDstring                                     `json:"client_id,omitempty"`ClientSecretstring                                     `json:"client_secret,omitempty"`RedirectURIs                 []string                                   `json:"redirect_uris,omitempty"`GrantTypes                   []string                                   `json:"grant_types,omitempty"`Scopes                       []string                                   `json:"scopes,omitempty"`AppLauncherURLstring                                     `json:"app_launcher_url,omitempty"`GroupFilterRegexstring                                     `json:"group_filter_regex,omitempty"`CustomClaims                 *[]OIDCClaimConfig                         `json:"custom_claims"`AllowPKCEWithoutClientSecret *bool                                      `json:"allow_pkce_without_client_secret,omitempty"`RefreshTokenOptions          *RefreshTokenOptions                       `json:"refresh_token_options,omitempty"`HybridAndImplicitOptions     *AccessApplicationHybridAndImplicitOptions `json:"hybrid_and_implicit_options,omitempty"`AccessTokenLifetimestring                                     `json:"access_token_lifetime,omitempty"`}

typeSaveResponseadded inv0.19.0

type SaveResponse struct {ResponseResultNotificationResource}

SaveResponse is returned when a resource is inserted/updated/deleted.

typeScimAuthenticationadded inv0.112.0

type ScimAuthentication interface {// contains filtered or unexported methods}

typeScopeadded inv0.53.0

type Scope struct {Keystring        `json:"key"`ScopeObjects []ScopeObject `json:"objects"`}

typeScopeObjectadded inv0.53.0

type ScopeObject struct {Keystring `json:"key"`}

typeSecondaryDNSPrimaryadded inv0.15.0

type SecondaryDNSPrimary struct {IDstring `json:"id,omitempty"`IPstring `json:"ip"`Portint    `json:"port"`IxfrEnablebool   `json:"ixfr_enable"`TsigIDstring `json:"tsig_id"`Namestring `json:"name"`}

SecondaryDNSPrimary is the representation of the DNS Primary.

typeSecondaryDNSPrimaryDetailResponseadded inv0.15.0

type SecondaryDNSPrimaryDetailResponse struct {ResponseResultSecondaryDNSPrimary `json:"result"`}

SecondaryDNSPrimaryDetailResponse is the API representation of a singlesecondary DNS primary response.

typeSecondaryDNSPrimaryListResponseadded inv0.15.0

type SecondaryDNSPrimaryListResponse struct {ResponseResult []SecondaryDNSPrimary `json:"result"`}

SecondaryDNSPrimaryListResponse is the API representation of all secondary DNSprimaries.

typeSecondaryDNSTSIGadded inv0.15.0

type SecondaryDNSTSIG struct {IDstring `json:"id,omitempty"`Namestring `json:"name"`Secretstring `json:"secret"`Algostring `json:"algo"`}

SecondaryDNSTSIG contains the structure for a secondary DNS TSIG.

typeSecondaryDNSTSIGDetailResponseadded inv0.15.0

type SecondaryDNSTSIGDetailResponse struct {ResponseResultSecondaryDNSTSIG `json:"result"`}

SecondaryDNSTSIGDetailResponse is the API response for a single secondaryDNS TSIG.

typeSecondaryDNSTSIGListResponseadded inv0.15.0

type SecondaryDNSTSIGListResponse struct {ResponseResult []SecondaryDNSTSIG `json:"result"`}

SecondaryDNSTSIGListResponse is the API response for all secondary DNS TSIGs.

typeSecondaryDNSZoneadded inv0.15.0

type SecondaryDNSZone struct {IDstring    `json:"id,omitempty"`Namestring    `json:"name,omitempty"`Primaries          []string  `json:"primaries,omitempty"`AutoRefreshSecondsint       `json:"auto_refresh_seconds,omitempty"`SoaSerialint       `json:"soa_serial,omitempty"`CreatedTimetime.Time `json:"created_time,omitempty"`CheckedTimetime.Time `json:"checked_time,omitempty"`ModifiedTimetime.Time `json:"modified_time,omitempty"`}

SecondaryDNSZone contains the high level structure of a secondary DNS zone.

typeSecondaryDNSZoneAXFRResponseadded inv0.15.0

type SecondaryDNSZoneAXFRResponse struct {ResponseResultstring `json:"result"`}

SecondaryDNSZoneAXFRResponse is the API response for a single secondaryDNS AXFR response.

typeSecondaryDNSZoneDetailResponseadded inv0.15.0

type SecondaryDNSZoneDetailResponse struct {ResponseResultSecondaryDNSZone `json:"result"`}

SecondaryDNSZoneDetailResponse is the API response for a single secondaryDNS zone.

typeSecurityLeveladded inv0.47.0

type SecurityLevelint
const (SecurityLevelOff SecurityLevelSecurityLevelEssentiallyOffSecurityLevelLowSecurityLevelMediumSecurityLevelHighSecurityLevelHelp)

funcSecurityLevelFromStringadded inv0.47.0

func SecurityLevelFromString(sstring) (*SecurityLevel,error)

func (SecurityLevel)IntoRefadded inv0.47.0

func (pSecurityLevel) IntoRef() *SecurityLevel

func (SecurityLevel)MarshalJSONadded inv0.47.0

func (pSecurityLevel) MarshalJSON() ([]byte,error)

func (SecurityLevel)Stringadded inv0.47.0

func (pSecurityLevel) String()string

func (*SecurityLevel)UnmarshalJSONadded inv0.47.0

func (p *SecurityLevel) UnmarshalJSON(data []byte)error

typeServiceBindingadded inv0.56.0

type ServiceBinding struct {Servicestring `json:"service"`Environmentstring `json:"environment"`}

typeServiceBindingMapadded inv0.56.0

type ServiceBindingMap map[string]*ServiceBinding

typeServiceErroradded inv0.36.0

type ServiceError struct {// contains filtered or unexported fields}

ServiceError is a handler for 5xx errors returned to the client.

funcNewServiceErroradded inv0.48.0

func NewServiceError(e *Error)ServiceError

func (ServiceError)Erroradded inv0.36.0

func (eServiceError) Error()string

func (ServiceError)ErrorCodesadded inv0.36.0

func (eServiceError) ErrorCodes() []int

func (ServiceError)ErrorMessagesadded inv0.36.0

func (eServiceError) ErrorMessages() []string

func (ServiceError)Errorsadded inv0.36.0

func (eServiceError) Errors() []ResponseInfo

func (ServiceError)InternalErrorCodeIsadded inv0.48.0

func (eServiceError) InternalErrorCodeIs(codeint)bool

func (ServiceError)RayIDadded inv0.36.0

func (eServiceError) RayID()string

func (ServiceError)Typeadded inv0.36.0

func (eServiceError) Type()ErrorType

func (ServiceError)Unwrapadded inv0.103.0

func (eServiceError) Unwrap()error

typeServiceModeadded inv0.64.0

type ServiceModestring

typeServiceModeV2added inv0.52.0

type ServiceModeV2 struct {ModeServiceMode `json:"mode,omitempty"`Portint         `json:"port,omitempty"`}

typeSessionAffinityAttributesadded inv0.12.0

type SessionAffinityAttributes struct {SameSitestring   `json:"samesite,omitempty"`Securestring   `json:"secure,omitempty"`DrainDurationint      `json:"drain_duration,omitempty"`ZeroDowntimeFailoverstring   `json:"zero_downtime_failover,omitempty"`Headers              []string `json:"headers,omitempty"`RequireAllHeadersbool     `json:"require_all_headers,omitempty"`}

SessionAffinityAttributes represents additional configuration options for session affinity.

typeSetWorkersSecretParamsadded inv0.57.0

type SetWorkersSecretParams struct {ScriptNamestringSecret     *WorkersPutSecretRequest}

typeSingleScimAuthenticationadded inv0.112.0

type SingleScimAuthentication interface {// contains filtered or unexported methods}

typeSizeOptionsadded inv0.40.0

type SizeOptions struct {Sizeint  `json:"size,omitempty" url:"size,omitempty"`Before *int `json:"before,omitempty" url:"before,omitempty"`After  *int `json:"after,omitempty" url:"after,omitempty"`}

SizeOptions can be passed to a list request to configure size and cursor location.These values will be defaulted if omitted.

This should be swapped to ResultInfoCursors once the types are corrected.

typeSnippetadded inv0.108.0

type Snippet struct {CreatedOn   *time.Time `json:"created_on"`ModifiedOn  *time.Time `json:"modified_on"`SnippetNamestring     `json:"snippet_name"`}

typeSnippetFileadded inv0.108.0

type SnippetFile struct {FileNamestring `json:"file_name"`Contentstring `json:"content"`}

typeSnippetMetadataadded inv0.108.0

type SnippetMetadata struct {MainModulestring `json:"main_module"`}

typeSnippetRequestadded inv0.108.0

type SnippetRequest struct {SnippetNamestring        `json:"snippet_name"`MainFilestring        `json:"main_file"`Files       []SnippetFile `json:"files"`}

typeSnippetResponseadded inv0.109.0

type SnippetResponse struct {ResponseResult *Snippet `json:"result"`}

typeSnippetRuleadded inv0.108.0

type SnippetRule struct {IDstring `json:"id"`Enabled     *bool  `json:"enabled,omitempty"`Expressionstring `json:"expression"`SnippetNamestring `json:"snippet_name"`Descriptionstring `json:"description"`}

typeSnippetRulesRequestadded inv0.111.0

type SnippetRulesRequest struct {Rules []SnippetRule `json:"rules"`}

typeSnippetsResponseadded inv0.108.0

type SnippetsResponse struct {ResponseResult []Snippet `json:"result"`}

typeSnippetsRulesResponseadded inv0.108.0

type SnippetsRulesResponse struct {ResponseResult []SnippetRule `json:"result"`}

typeSourceConfigadded inv0.41.0

type SourceConfig struct {Namestring            `json:"name,omitempty"`NameByIDP map[string]string `json:"name_by_idp,omitempty"`}

typeSpectrumApplicationadded inv0.9.0

type SpectrumApplication struct {DNSSpectrumApplicationDNS         `json:"dns,omitempty"`OriginDirect     []string                       `json:"origin_direct,omitempty"`IDstring                         `json:"id,omitempty"`Protocolstring                         `json:"protocol,omitempty"`TrafficTypestring                         `json:"traffic_type,omitempty"`TLSstring                         `json:"tls,omitempty"`ProxyProtocolProxyProtocol                  `json:"proxy_protocol,omitempty"`ModifiedOn       *time.Time                     `json:"modified_on,omitempty"`OriginDNS        *SpectrumApplicationOriginDNS  `json:"origin_dns,omitempty"`OriginPort       *SpectrumApplicationOriginPort `json:"origin_port,omitempty"`CreatedOn        *time.Time                     `json:"created_on,omitempty"`EdgeIPs          *SpectrumApplicationEdgeIPs    `json:"edge_ips,omitempty"`ArgoSmartRoutingbool                           `json:"argo_smart_routing,omitempty"`IPv4bool                           `json:"ipv4,omitempty"`IPFirewallbool                           `json:"ip_firewall,omitempty"`}

SpectrumApplication defines a single Spectrum Application.

func (*SpectrumApplication)UnmarshalJSONadded inv0.11.0

func (a *SpectrumApplication) UnmarshalJSON(data []byte)error

UnmarshalJSON handles setting the `ProxyProtocol` field based on the value of the deprecated `spp` field.

typeSpectrumApplicationConnectivityadded inv0.11.5

type SpectrumApplicationConnectivitystring

SpectrumApplicationConnectivity specifies IP address type on the edge configuration.

const (// SpectrumConnectivityAll specifies IPv4/6 edge IP.SpectrumConnectivityAllSpectrumApplicationConnectivity = "all"// SpectrumConnectivityIPv4 specifies IPv4 edge IP.SpectrumConnectivityIPv4SpectrumApplicationConnectivity = "ipv4"// SpectrumConnectivityIPv6 specifies IPv6 edge IP.SpectrumConnectivityIPv6SpectrumApplicationConnectivity = "ipv6"// SpectrumConnectivityStatic specifies static edge IP configuration.SpectrumConnectivityStaticSpectrumApplicationConnectivity = "static")

func (SpectrumApplicationConnectivity)Dynamicadded inv0.11.5

Dynamic checks if address family is specified as dynamic config.

func (SpectrumApplicationConnectivity)Staticadded inv0.11.5

Static checks if address family is specified as static config.

func (SpectrumApplicationConnectivity)Stringadded inv0.11.5

func (*SpectrumApplicationConnectivity)UnmarshalJSONadded inv0.11.5

func (c *SpectrumApplicationConnectivity) UnmarshalJSON(b []byte)error

UnmarshalJSON function for SpectrumApplicationConnectivity enum.

typeSpectrumApplicationDNSadded inv0.9.0

type SpectrumApplicationDNS struct {Typestring `json:"type"`Namestring `json:"name"`}

SpectrumApplicationDNS holds the external DNS configuration for a SpectrumApplication.

typeSpectrumApplicationDetailResponseadded inv0.9.0

type SpectrumApplicationDetailResponse struct {ResponseResultSpectrumApplication `json:"result"`}

SpectrumApplicationDetailResponse is the structure of the detailed responsefrom the API.

typeSpectrumApplicationEdgeIPsadded inv0.11.5

type SpectrumApplicationEdgeIPs struct {TypeSpectrumApplicationEdgeType      `json:"type"`Connectivity *SpectrumApplicationConnectivity `json:"connectivity,omitempty"`IPs          []net.IP                         `json:"ips,omitempty"`}

SpectrumApplicationEdgeIPs represents configuration for Bring-Your-Own-IPhttps://developers.cloudflare.com/spectrum/getting-started/byoip/

typeSpectrumApplicationEdgeTypeadded inv0.11.5

type SpectrumApplicationEdgeTypestring

SpectrumApplicationEdgeType for possible Edge configurations.

const (// SpectrumEdgeTypeDynamic IP config.SpectrumEdgeTypeDynamicSpectrumApplicationEdgeType = "dynamic"// SpectrumEdgeTypeStatic IP config.SpectrumEdgeTypeStaticSpectrumApplicationEdgeType = "static")

func (SpectrumApplicationEdgeType)Stringadded inv0.11.5

func (*SpectrumApplicationEdgeType)UnmarshalJSONadded inv0.11.5

func (t *SpectrumApplicationEdgeType) UnmarshalJSON(b []byte)error

UnmarshalJSON function for SpectrumApplicationEdgeType enum.

typeSpectrumApplicationOriginDNSadded inv0.9.0

type SpectrumApplicationOriginDNS struct {Namestring `json:"name"`}

SpectrumApplicationOriginDNS holds the origin DNS configuration for a SpectrumApplication.

typeSpectrumApplicationOriginPortadded inv0.13.0

type SpectrumApplicationOriginPort struct {Port, Start, Enduint16}

SpectrumApplicationOriginPort defines a union of a single port or range of ports.

func (*SpectrumApplicationOriginPort)MarshalJSONadded inv0.13.0

func (p *SpectrumApplicationOriginPort) MarshalJSON() ([]byte,error)

MarshalJSON converts a single port or port range to a suitable byte slice.

func (*SpectrumApplicationOriginPort)UnmarshalJSONadded inv0.13.0

func (p *SpectrumApplicationOriginPort) UnmarshalJSON(b []byte)error

UnmarshalJSON converts a byte slice into a single port or port range.

typeSpectrumApplicationsDetailResponseadded inv0.9.0

type SpectrumApplicationsDetailResponse struct {ResponseResult []SpectrumApplication `json:"result"`}

SpectrumApplicationsDetailResponse is the structure of the detailed responsefrom the API.

typeSplitTunneladded inv0.25.0

type SplitTunnel struct {Addressstring `json:"address,omitempty"`Hoststring `json:"host,omitempty"`Descriptionstring `json:"description,omitempty"`}

SplitTunnel represents the individual tunnel struct.

typeSplitTunnelResponseadded inv0.25.0

type SplitTunnelResponse struct {ResponseResult []SplitTunnel `json:"result"`}

SplitTunnelResponse represents the response from the get splittunnel endpoints.

typeStartWorkersTailResponseadded inv0.47.0

type StartWorkersTailResponse struct {ResponseResultWorkersTail}

typeStorageKeyadded inv0.9.0

type StorageKey struct {Namestring      `json:"name"`Expirationint         `json:"expiration"`Metadata   interface{} `json:"metadata"`}

StorageKey is a key name used to identify a storage value.

typeStreamAccessRuleadded inv0.44.0

type StreamAccessRule struct {Typestring   `json:"type"`Country []string `json:"country,omitempty"`Actionstring   `json:"action"`IP      []string `json:"ip,omitempty"`}

StreamAccessRule represents the accessRules when creating a signed URL.

typeStreamCreateVideoParametersadded inv0.44.0

type StreamCreateVideoParameters struct {AccountIDstringMaxDurationSecondsint                     `json:"maxDurationSeconds,omitempty"`Expiry                *time.Time              `json:"expiry,omitempty"`Creatorstring                  `json:"creator,omitempty"`ThumbnailTimestampPctfloat64                 `json:"thumbnailTimestampPct,omitempty"`AllowedOrigins        []string                `json:"allowedOrigins,omitempty"`RequireSignedURLsbool                    `json:"requireSignedURLs,omitempty"`WatermarkUploadVideoURLWatermark `json:"watermark,omitempty"`Meta                  map[string]interface{}  `json:"meta,omitempty"`ScheduledDeletion     *time.Time              `json:"scheduledDeletion,omitempty"`}

StreamCreateVideoParameters are parameters used when creating a video.

typeStreamInitiateTUSUploadParametersadded inv0.77.0

type StreamInitiateTUSUploadParameters struct {DirectUserUploadbool               `url:"direct_user,omitempty"`TusResumableTusProtocolVersion `url:"-"`UploadLengthint64              `url:"-"`UploadCreatorstring             `url:"-"`MetadataTUSUploadMetadata  `url:"-"`}

typeStreamInitiateTUSUploadResponseadded inv0.77.0

type StreamInitiateTUSUploadResponse struct {ResponseHeadershttp.Header}

typeStreamListParametersadded inv0.44.0

type StreamListParameters struct {AccountIDstringVideoIDstringAfter         *time.Time `url:"after,omitempty"`Before        *time.Time `url:"before,omitempty"`Creatorstring     `url:"creator,omitempty"`IncludeCountsbool       `url:"include_counts,omitempty"`Searchstring     `url:"search,omitempty"`Limitint        `url:"limit,omitempty"`Ascbool       `url:"asc,omitempty"`Statusstring     `url:"status,omitempty"`}

StreamListParameters represents parameters used when listing stream videos.

typeStreamListResponse

type StreamListResponse struct {ResponseResult []StreamVideo `json:"result,omitempty"`Totalstring        `json:"total,omitempty"`Rangestring        `json:"range,omitempty"`}

StreamListResponse represents the API response from a StreamListRequest.

typeStreamParametersadded inv0.44.0

type StreamParameters struct {AccountIDstringVideoIDstring}

StreamParameters are the basic parameters needed.

typeStreamSignedURLParametersadded inv0.44.0

type StreamSignedURLParameters struct {AccountIDstringVideoIDstringIDstring             `json:"id,omitempty"`PEMstring             `json:"pem,omitempty"`EXPint                `json:"exp,omitempty"`NBFint                `json:"nbf,omitempty"`Downloadablebool               `json:"downloadable,omitempty"`AccessRules  []StreamAccessRule `json:"accessRules,omitempty"`}

StreamSignedURLParameters represent parameters used when creating a signed URL.

typeStreamSignedURLResponseadded inv0.44.0

type StreamSignedURLResponse struct {ResponseResult struct {Tokenstring `json:"token,omitempty"`}}

StreamSignedURLResponse represents an API response for a signed URL.

typeStreamUploadFileParametersadded inv0.44.0

type StreamUploadFileParameters struct {AccountIDstringVideoIDstringFilePathstringScheduledDeletion *time.Time}

StreamUploadFileParameters are parameters needed for file upload of a video.

typeStreamUploadFromURLParametersadded inv0.44.0

type StreamUploadFromURLParameters struct {AccountIDstringVideoIDstringURLstring                  `json:"url"`Creatorstring                  `json:"creator,omitempty"`ThumbnailTimestampPctfloat64                 `json:"thumbnailTimestampPct,omitempty"`AllowedOrigins        []string                `json:"allowedOrigins,omitempty"`RequireSignedURLsbool                    `json:"requireSignedURLs,omitempty"`WatermarkUploadVideoURLWatermark `json:"watermark,omitempty"`Meta                  map[string]interface{}  `json:"meta,omitempty"`ScheduledDeletion     *time.Time              `json:"scheduledDeletion,omitempty"`}

StreamUploadFromURLParameters are the parameters used when uploading a video from URL.

typeStreamVideoadded inv0.44.0

type StreamVideo struct {AllowedOrigins        []string                 `json:"allowedOrigins,omitempty"`Created               *time.Time               `json:"created,omitempty"`Durationfloat64                  `json:"duration,omitempty"`InputStreamVideoInput         `json:"input,omitempty"`MaxDurationSecondsint                      `json:"maxDurationSeconds,omitempty"`Meta                  map[string]interface{}   `json:"meta,omitempty"`Modified              *time.Time               `json:"modified,omitempty"`UploadExpiry          *time.Time               `json:"uploadExpiry,omitempty"`PlaybackStreamVideoPlayback      `json:"playback,omitempty"`Previewstring                   `json:"preview,omitempty"`ReadyToStreambool                     `json:"readyToStream,omitempty"`RequireSignedURLsbool                     `json:"requireSignedURLs,omitempty"`Sizeint                      `json:"size,omitempty"`StatusStreamVideoStatus        `json:"status,omitempty"`Thumbnailstring                   `json:"thumbnail,omitempty"`ThumbnailTimestampPctfloat64                  `json:"thumbnailTimestampPct,omitempty"`UIDstring                   `json:"uid,omitempty"`Creatorstring                   `json:"creator,omitempty"`LiveInputstring                   `json:"liveInput,omitempty"`Uploaded              *time.Time               `json:"uploaded,omitempty"`ScheduledDeletion     *time.Time               `json:"scheduledDeletion,omitempty"`WatermarkStreamVideoWatermark     `json:"watermark,omitempty"`NFTStreamVideoNFTParameters `json:"nft,omitempty"`}

StreamVideo represents a stream video.

typeStreamVideoCreateadded inv0.44.0

type StreamVideoCreate struct {UploadURLstring               `json:"uploadURL,omitempty"`UIDstring               `json:"uid,omitempty"`WatermarkStreamVideoWatermark `json:"watermark,omitempty"`ScheduledDeletion *time.Time           `json:"scheduledDeletion,omitempty"`}

StreamVideoCreate represents parameters returned after creating a video.

typeStreamVideoCreateResponseadded inv0.44.0

type StreamVideoCreateResponse struct {ResponseResultStreamVideoCreate `json:"result,omitempty"`}

StreamVideoCreateResponse represents an API response of creating a stream video.

typeStreamVideoInputadded inv0.44.0

type StreamVideoInput struct {Heightint `json:"height,omitempty"`Widthint `json:"width,omitempty"`}

StreamVideoInput represents the video input values of a stream video.

typeStreamVideoNFTParametersadded inv0.44.0

type StreamVideoNFTParameters struct {AccountIDstringVideoIDstringContractstring `json:"contract,omitempty"`Tokenint    `json:"token,omitempty"`}

StreamVideoNFTParameters represents a NFT for a stream video.

typeStreamVideoPlaybackadded inv0.44.0

type StreamVideoPlayback struct {HLSstring `json:"hls,omitempty"`Dashstring `json:"dash,omitempty"`}

StreamVideoPlayback represents the playback URLs for a video.

typeStreamVideoResponseadded inv0.44.0

type StreamVideoResponse struct {ResponseResultStreamVideo `json:"result,omitempty"`}

StreamVideoResponse represents an API response of a stream video.

typeStreamVideoStatusadded inv0.44.0

type StreamVideoStatus struct {Statestring `json:"state,omitempty"`PctCompletestring `json:"pctComplete,omitempty"`ErrorReasonCodestring `json:"errorReasonCode,omitempty"`ErrorReasonTextstring `json:"errorReasonText,omitempty"`}

StreamVideoStatus represents the status of a stream video.

typeStreamVideoWatermarkadded inv0.44.0

type StreamVideoWatermark struct {UIDstring     `json:"uid,omitempty"`Sizeint        `json:"size,omitempty"`Heightint        `json:"height,omitempty"`Widthint        `json:"width,omitempty"`Created        *time.Time `json:"created,omitempty"`DownloadedFromstring     `json:"downloadedFrom,omitempty"`Namestring     `json:"name,omitempty"`Opacityfloat64    `json:"opacity,omitempty"`Paddingfloat64    `json:"padding,omitempty"`Scalefloat64    `json:"scale,omitempty"`Positionstring     `json:"position,omitempty"`}

StreamVideoWatermark represents a watermark for a stream video.

typeTUSUploadMetadataadded inv0.77.0

type TUSUploadMetadata struct {Namestring     `json:"name,omitempty"`MaxDurationSecondsint        `json:"maxDurationSeconds,omitempty"`RequireSignedURLsbool       `json:"requiresignedurls,omitempty"`AllowedOriginsstring     `json:"allowedorigins,omitempty"`ThumbnailTimestampPctfloat64    `json:"thumbnailtimestamppct,omitempty"`ScheduledDeletion     *time.Time `json:"scheduledDeletion,omitempty"`Expiry                *time.Time `json:"expiry,omitempty"`Watermarkstring     `json:"watermark,omitempty"`}

func (TUSUploadMetadata)ToTUSCsvadded inv0.77.0

func (tTUSUploadMetadata) ToTUSCsv() (string,error)

typeTeamsAccountadded inv0.21.0

type TeamsAccount struct {GatewayTagstring `json:"gateway_tag"`// Internal teams IDProviderNamestring `json:"provider_name"`// Auth providerIDstring `json:"id"`// cloudflare account IDTenantAccountIDstring `json:"tenant_account_id,omitempty"`// cloudflare Tenant account ID, if a tenant accountTenantIDstring `json:"tenant_id,omitempty"`// cloudflare Tenant ID, if a tenant account id}

typeTeamsAccountConnectivitySettingsResponseadded inv0.97.0

type TeamsAccountConnectivitySettingsResponse struct {ResponseResultTeamsConnectivitySettings `json:"result"`}

typeTeamsAccountLoggingConfigurationadded inv0.30.0

type TeamsAccountLoggingConfiguration struct {LogAllbool `json:"log_all"`LogBlocksbool `json:"log_blocks"`}

typeTeamsAccountResponseadded inv0.21.0

type TeamsAccountResponse struct {ResponseResultTeamsAccount `json:"result"`}

TeamsAccountResponse is the API response, containing information on teamsaccount.

typeTeamsAccountSettingsadded inv0.21.0

type TeamsAccountSettings struct {Antivirus             *TeamsAntivirus             `json:"antivirus,omitempty"`TLSDecrypt            *TeamsTLSDecrypt            `json:"tls_decrypt,omitempty"`ActivityLog           *TeamsActivityLog           `json:"activity_log,omitempty"`BlockPage             *TeamsBlockPage             `json:"block_page,omitempty"`BrowserIsolation      *BrowserIsolation           `json:"browser_isolation,omitempty"`FIPS                  *TeamsFIPS                  `json:"fips,omitempty"`ProtocolDetection     *TeamsProtocolDetection     `json:"protocol_detection,omitempty"`BodyScanning          *TeamsBodyScanning          `json:"body_scanning,omitempty"`ExtendedEmailMatching *TeamsExtendedEmailMatching `json:"extended_email_matching,omitempty"`CustomCertificate     *TeamsCustomCertificate     `json:"custom_certificate,omitempty"`Certificate           *TeamsCertificateSetting    `json:"certificate,omitempty"`Sandbox               *TeamsSandboxAccountSetting `json:"sandbox,omitempty"`}

typeTeamsActivityLogadded inv0.21.0

type TeamsActivityLog struct {Enabledbool `json:"enabled"`}

typeTeamsAntivirusadded inv0.21.0

type TeamsAntivirus struct {EnabledDownloadPhasebool                       `json:"enabled_download_phase"`EnabledUploadPhasebool                       `json:"enabled_upload_phase"`FailClosedbool                       `json:"fail_closed"`NotificationSettings *TeamsNotificationSettings `json:"notification_settings"`}

typeTeamsBISOAdminControlSettingsadded inv0.21.0

type TeamsBISOAdminControlSettings struct {DisablePrintingbool                                    `json:"dp"`DisableCopyPastebool                                    `json:"dcp"`DisableDownloadbool                                    `json:"dd"`DisableUploadbool                                    `json:"du"`DisableKeyboardbool                                    `json:"dk"`DisableClipboardRedirectionbool                                    `json:"dcr"`CopyTeamsTeamsBISOAdminControlSettingsValue `json:"copy"`DownloadTeamsTeamsBISOAdminControlSettingsValue `json:"download"`KeyboardTeamsTeamsBISOAdminControlSettingsValue `json:"keyboard"`PasteTeamsTeamsBISOAdminControlSettingsValue `json:"paste"`PrintingTeamsTeamsBISOAdminControlSettingsValue `json:"printing"`UploadTeamsTeamsBISOAdminControlSettingsValue `json:"upload"`VersionTeamsBISOAdminControlSettingsVersion    `json:"version"`}

typeTeamsBISOAdminControlSettingsVersionadded inv0.115.0

type TeamsBISOAdminControlSettingsVersionstring
const (TeamsBISOAdminControlSettingsV1TeamsBISOAdminControlSettingsVersion = "v1"TeamsBISOAdminControlSettingsV2TeamsBISOAdminControlSettingsVersion = "v2")

typeTeamsBlockPageadded inv0.21.0

type TeamsBlockPage struct {Enabled         *bool  `json:"enabled,omitempty"`FooterTextstring `json:"footer_text,omitempty"`HeaderTextstring `json:"header_text,omitempty"`LogoPathstring `json:"logo_path,omitempty"`BackgroundColorstring `json:"background_color,omitempty"`Namestring `json:"name,omitempty"`MailtoAddressstring `json:"mailto_address,omitempty"`MailtoSubjectstring `json:"mailto_subject,omitempty"`SuppressFooter  *bool  `json:"suppress_footer,omitempty"`}

typeTeamsBodyScanningadded inv0.80.0

type TeamsBodyScanning struct {InspectionModeTeamsInspectionMode `json:"inspection_mode,omitempty"`}

typeTeamsCertificateadded inv0.99.0

type TeamsCertificate struct {InUse         *bool      `json:"in_use"`IDstring     `json:"id"`BindingStatusstring     `json:"binding_status"`QsPackIdstring     `json:"qs_pack_id"`Typestring     `json:"type"`UpdatedAt     *time.Time `json:"updated_at"`UploadedOn    *time.Time `json:"uploaded_on"`CreatedAt     *time.Time `json:"created_at"`ExpiresOn     *time.Time `json:"expires_on"`}

typeTeamsCertificateCreateRequestadded inv0.100.0

type TeamsCertificateCreateRequest struct {ValidityPeriodDaysint `json:"validity_period_days,omitempty"`}

typeTeamsCertificateResponseadded inv0.100.0

type TeamsCertificateResponse struct {ResponseResultTeamsCertificate `json:"result"`}

TeamsCertificateResponse is the API response, containing a single certificate.

typeTeamsCertificateSettingadded inv0.100.0

type TeamsCertificateSetting struct {IDstring `json:"id"`}

typeTeamsCertificatesResponseadded inv0.100.0

type TeamsCertificatesResponse struct {ResponseResult []TeamsCertificate `json:"result"`}

TeamsCertificatesResponse is the API response, containing an array of certificates.

typeTeamsCheckSessionSettingsadded inv0.31.0

type TeamsCheckSessionSettings struct {Enforcebool     `json:"enforce"`DurationDuration `json:"duration"`}

typeTeamsConfigResponseadded inv0.21.0

type TeamsConfigResponse struct {ResponseResultTeamsConfiguration `json:"result"`}

TeamsConfigResponse is the API response, containing information on teamsaccount config.

typeTeamsConfigurationadded inv0.21.0

type TeamsConfiguration struct {SettingsTeamsAccountSettings `json:"settings"`CreatedAttime.Time            `json:"created_at,omitempty"`UpdatedAttime.Time            `json:"updated_at,omitempty"`}

TeamsConfiguration data model.

typeTeamsConnectivitySettingsadded inv0.97.0

type TeamsConnectivitySettings struct {ICMPProxyEnabled   *bool `json:"icmp_proxy_enabled"`OfframpWARPEnabled *bool `json:"offramp_warp_enabled"`}

typeTeamsCustomCertificateadded inv0.94.0

type TeamsCustomCertificate struct {Enabled       *bool      `json:"enabled,omitempty"`IDstring     `json:"id,omitempty"`BindingStatusstring     `json:"binding_status,omitempty"`QsPackIdstring     `json:"qs_pack_id,omitempty"`UpdatedAt     *time.Time `json:"updated_at,omitempty"`}

typeTeamsDeviceDetailadded inv0.32.0

type TeamsDeviceDetail struct {ResponseResultTeamsDeviceListItem `json:"result"`}

typeTeamsDeviceListItemadded inv0.32.0

type TeamsDeviceListItem struct {UserUserItem `json:"user,omitempty"`IDstring   `json:"id,omitempty"`Keystring   `json:"key,omitempty"`DeviceTypestring   `json:"device_type,omitempty"`Namestring   `json:"name,omitempty"`Modelstring   `json:"model,omitempty"`Manufacturerstring   `json:"manufacturer,omitempty"`Deletedbool     `json:"deleted,omitempty"`Versionstring   `json:"version,omitempty"`SerialNumberstring   `json:"serial_number,omitempty"`OSVersionstring   `json:"os_version,omitempty"`OSDistroNamestring   `json:"os_distro_name,omitempty"`OsDistroRevisionstring   `json:"os_distro_revision,omitempty"`OSVersionExtrastring   `json:"os_version_extra,omitempty"`MacAddressstring   `json:"mac_address,omitempty"`IPstring   `json:"ip,omitempty"`Createdstring   `json:"created,omitempty"`Updatedstring   `json:"updated,omitempty"`LastSeenstring   `json:"last_seen,omitempty"`RevokedAtstring   `json:"revoked_at,omitempty"`}

typeTeamsDeviceSettingsadded inv0.31.0

type TeamsDeviceSettings struct {GatewayProxyEnabledbool  `json:"gateway_proxy_enabled"`GatewayProxyUDPEnabledbool  `json:"gateway_udp_proxy_enabled"`RootCertificateInstallationEnabledbool  `json:"root_certificate_installation_enabled"`UseZTVirtualIP                     *bool `json:"use_zt_virtual_ip"`DisableForTimeint32 `json:"disable_for_time"`}

typeTeamsDeviceSettingsResponseadded inv0.31.0

type TeamsDeviceSettingsResponse struct {ResponseResultTeamsDeviceSettings `json:"result"`}

typeTeamsDevicesListadded inv0.32.0

type TeamsDevicesList struct {ResponseResult []TeamsDeviceListItem `json:"result"`}

typeTeamsDlpPayloadLogSettingsadded inv0.62.0

type TeamsDlpPayloadLogSettings struct {Enabledbool `json:"enabled"`}

typeTeamsDnsResolverAddressadded inv0.81.0

type TeamsDnsResolverAddress struct {IPstring `json:"ip"`Port                       *int   `json:"port,omitempty"`VnetIDstring `json:"vnet_id,omitempty"`RouteThroughPrivateNetwork *bool  `json:"route_through_private_network,omitempty"`}

typeTeamsDnsResolverAddressV4added inv0.81.0

type TeamsDnsResolverAddressV4 struct {TeamsDnsResolverAddress}

typeTeamsDnsResolverAddressV6added inv0.81.0

type TeamsDnsResolverAddressV6 struct {TeamsDnsResolverAddress}

typeTeamsDnsResolverSettingsadded inv0.81.0

type TeamsDnsResolverSettings struct {V4Resolvers []TeamsDnsResolverAddressV4 `json:"ipv4,omitempty"`V6Resolvers []TeamsDnsResolverAddressV6 `json:"ipv6,omitempty"`}

typeTeamsExtendedEmailMatchingadded inv0.87.0

type TeamsExtendedEmailMatching struct {Enabled *bool `json:"enabled,omitempty"`}

typeTeamsFIPSadded inv0.28.0

type TeamsFIPS struct {TLSbool `json:"tls"`}

typeTeamsFilterTypeadded inv0.21.0

type TeamsFilterTypestring
const (HttpFilterTeamsFilterType = "http"DnsFilterTeamsFilterType = "dns"L4FilterTeamsFilterType = "l4"EgressFilterTeamsFilterType = "egress"DnsResolverFilterTeamsFilterType = "dns_resolver")

typeTeamsForensicCopySettingsadded inv0.112.0

type TeamsForensicCopySettings struct {Enabledbool `json:"enabled"`}

typeTeamsGatewayActionadded inv0.21.0

type TeamsGatewayActionstring
const (AllowTeamsGatewayAction = "allow"// dns|http|l4BlockTeamsGatewayAction = "block"// dns|http|l4SafeSearchTeamsGatewayAction = "safesearch"// dnsYTRestrictedTeamsGatewayAction = "ytrestricted"// dnsOnTeamsGatewayAction = "on"// httpOffTeamsGatewayAction = "off"// httpScanTeamsGatewayAction = "scan"// httpNoScanTeamsGatewayAction = "noscan"// httpIsolateTeamsGatewayAction = "isolate"// httpNoIsolateTeamsGatewayAction = "noisolate"// httpOverrideTeamsGatewayAction = "override"// httpL4OverrideTeamsGatewayAction = "l4_override"// l4EgressTeamsGatewayAction = "egress"// egressAuditSSHTeamsGatewayAction = "audit_ssh"// l4ResolveTeamsGatewayAction = "resolve"// resolve)

typeTeamsGatewayUntrustedCertActionadded inv0.62.0

type TeamsGatewayUntrustedCertActionstring
const (UntrustedCertPassthroughTeamsGatewayUntrustedCertAction = "pass_through"UntrustedCertBlockTeamsGatewayUntrustedCertAction = "block"UntrustedCertErrorTeamsGatewayUntrustedCertAction = "error")

typeTeamsInspectionModeadded inv0.80.0

type TeamsInspectionMode =string
const (TeamsShallowInspectionModeTeamsInspectionMode = "shallow"TeamsDeepInspectionModeTeamsInspectionMode = "deep")

typeTeamsL4OverrideSettingsadded inv0.21.0

type TeamsL4OverrideSettings struct {IPstring `json:"ip,omitempty"`Portint    `json:"port,omitempty"`}

TeamsL4OverrideSettings used in l4 filter type rule with action set to override.

typeTeamsListadded inv0.17.0

type TeamsList struct {IDstring          `json:"id,omitempty"`Namestring          `json:"name"`Typestring          `json:"type"`Descriptionstring          `json:"description,omitempty"`Items       []TeamsListItem `json:"items,omitempty"`Countuint64          `json:"count,omitempty"`CreatedAt   *time.Time      `json:"created_at,omitempty"`UpdatedAt   *time.Time      `json:"updated_at,omitempty"`}

TeamsList represents a Teams List.

typeTeamsListDetailResponseadded inv0.17.0

type TeamsListDetailResponse struct {ResponseResultTeamsList `json:"result"`}

TeamsListDetailResponse is the API response, containing a singleteams list.

typeTeamsListItemadded inv0.17.0

type TeamsListItem struct {Valuestring     `json:"value"`Descriptionstring     `json:"description,omitempty"`CreatedAt   *time.Time `json:"created_at,omitempty"`}

TeamsListItem represents a single list item.

typeTeamsListItemsListResponseadded inv0.17.0

type TeamsListItemsListResponse struct {Result []TeamsListItem `json:"result"`ResponseResultInfo `json:"result_info"`}

TeamsListItemsListResponse represents the response from the listteams list items endpoint.

typeTeamsListListResponseadded inv0.17.0

type TeamsListListResponse struct {Result []TeamsList `json:"result"`ResponseResultInfo `json:"result_info"`}

TeamsListListResponse represents the response from the listteams lists endpoint.

typeTeamsLocationadded inv0.21.0

type TeamsLocation struct {IDstring                  `json:"id"`Namestring                  `json:"name"`Networks                  []TeamsLocationNetwork  `json:"networks"`Ipstring                  `json:"ip,omitempty"`Subdomainstring                  `json:"doh_subdomain"`AnonymizedLogsEnabledbool                    `json:"anonymized_logs_enabled"`IPv4Destinationstring                  `json:"ipv4_destination,omitempty"`IPv4DestinationBackupstring                  `json:"ipv4_destination_backup,omitempty"`DNSDestinationIPsID       *string                 `json:"dns_destination_ips_id,omitempty"`DNSDestinationIPv6BlockID *string                 `json:"dns_destination_ipv6_block_id,omitempty"`ClientDefaultbool                    `json:"client_default"`ECSSupport                *bool                   `json:"ecs_support,omitempty"`Endpoints                 *TeamsLocationEndpoints `json:"endpoints,omitempty"`CreatedAt                 *time.Time              `json:"created_at,omitempty"`UpdatedAt                 *time.Time              `json:"updated_at,omitempty"`}

typeTeamsLocationDetailResponseadded inv0.21.0

type TeamsLocationDetailResponse struct {ResponseResultTeamsLocation `json:"result"`}

typeTeamsLocationDohEndpointFieldsadded inv0.112.0

type TeamsLocationDohEndpointFields struct {RequireTokenbool `json:"require_token"`TeamsLocationEndpointFields}

typeTeamsLocationDotEndpointFieldsadded inv0.112.0

type TeamsLocationDotEndpointFields struct {RequireTokenbool `json:"require_token"`TeamsLocationEndpointFields}

typeTeamsLocationEndpointFieldsadded inv0.112.0

type TeamsLocationEndpointFields struct {Enabledbool                   `json:"enabled"`AuthenticationEnabledUIHelperbool                   `json:"authentication_enabled,omitempty"`Networks                      []TeamsLocationNetwork `json:"networks,omitempty"`}

typeTeamsLocationEndpointsadded inv0.112.0

type TeamsLocationEndpoints struct {IPv4EndpointTeamsLocationIPv4EndpointFields `json:"ipv4"`IPv6EndpointTeamsLocationIPv6EndpointFields `json:"ipv6"`DotEndpointTeamsLocationDotEndpointFields  `json:"dot"`DohEndpointTeamsLocationDohEndpointFields  `json:"doh"`}

typeTeamsLocationIPv4EndpointFieldsadded inv0.112.0

type TeamsLocationIPv4EndpointFields struct {Enabledbool `json:"enabled"`AuthenticationEnabledbool `json:"authentication_enabled,omitempty"`}

typeTeamsLocationIPv6EndpointFieldsadded inv0.112.0

type TeamsLocationIPv6EndpointFields struct {TeamsLocationEndpointFields}

typeTeamsLocationNetworkadded inv0.21.0

type TeamsLocationNetwork struct {IDstring `json:"id"`Networkstring `json:"network"`}

typeTeamsLocationsListResponseadded inv0.21.0

type TeamsLocationsListResponse struct {ResponseResultInfo `json:"result_info"`Result     []TeamsLocation `json:"result"`}

typeTeamsLoggingSettingsadded inv0.30.0

type TeamsLoggingSettings struct {LoggingSettingsByRuleType map[TeamsRuleType]TeamsAccountLoggingConfiguration `json:"settings_by_rule_type"`RedactPii                 *bool                                              `json:"redact_pii,omitempty"`}

typeTeamsLoggingSettingsResponseadded inv0.30.0

type TeamsLoggingSettingsResponse struct {ResponseResultTeamsLoggingSettings `json:"result"`}

typeTeamsNotificationSettingsadded inv0.84.0

type TeamsNotificationSettings struct {Enabled    *bool  `json:"enabled,omitempty"`Messagestring `json:"msg"`SupportURLstring `json:"support_url"`}

typeTeamsProtocolDetectionadded inv0.74.0

type TeamsProtocolDetection struct {Enabledbool `json:"enabled"`}

typeTeamsProxyEndpointadded inv0.35.0

type TeamsProxyEndpoint struct {IDstring     `json:"id"`Namestring     `json:"name"`IPs       []string   `json:"ips"`Subdomainstring     `json:"subdomain"`CreatedAt *time.Time `json:"created_at,omitempty"`UpdatedAt *time.Time `json:"updated_at,omitempty"`}

typeTeamsProxyEndpointDetailResponseadded inv0.35.0

type TeamsProxyEndpointDetailResponse struct {ResponseResultTeamsProxyEndpoint `json:"result"`}

typeTeamsProxyEndpointListResponseadded inv0.35.0

type TeamsProxyEndpointListResponse struct {ResponseResultInfo `json:"result_info"`Result     []TeamsProxyEndpoint `json:"result"`}

typeTeamsQuarantineadded inv0.112.0

type TeamsQuarantine struct {FileTypes []FileType `json:"file_types"`}

typeTeamsResolveDnsInternallyFallbackStrategyadded inv0.114.0

type TeamsResolveDnsInternallyFallbackStrategystring

typeTeamsResolveDnsInternallySettingsadded inv0.114.0

type TeamsResolveDnsInternallySettings struct {ViewIDstring                                    `json:"view_id"`FallbackTeamsResolveDnsInternallyFallbackStrategy `json:"fallback"`}

typeTeamsRuleadded inv0.21.0

type TeamsRule struct {IDstring               `json:"id,omitempty"`CreatedAt     *time.Time           `json:"created_at,omitempty"`UpdatedAt     *time.Time           `json:"updated_at,omitempty"`DeletedAt     *time.Time           `json:"deleted_at,omitempty"`Namestring               `json:"name"`Descriptionstring               `json:"description"`Precedenceuint64               `json:"precedence"`Enabledbool                 `json:"enabled"`ActionTeamsGatewayAction   `json:"action"`Filters       []TeamsFilterType    `json:"filters"`Trafficstring               `json:"traffic"`Identitystring               `json:"identity"`DevicePosturestring               `json:"device_posture"`Versionuint64               `json:"version"`RuleSettingsTeamsRuleSettings    `json:"rule_settings,omitempty"`Schedule      *TeamsRuleSchedule   `json:"schedule,omitempty"`// only available at DNS rulesExpiration    *TeamsRuleExpiration `json:"expiration,omitempty"`// only available at DNS rules}

TeamsRule represents an Teams wirefilter rule.

typeTeamsRuleExpirationadded inv0.112.0

type TeamsRuleExpiration struct {ExpiresAt *time.Time `json:"expires_at"`Duration  *uint64    `json:"duration,omitempty"`// read onlyExpiredbool       `json:"expired"`// read only}

typeTeamsRulePatchRequestadded inv0.21.0

type TeamsRulePatchRequest struct {IDstring             `json:"id"`Namestring             `json:"name"`Descriptionstring             `json:"description"`Precedenceuint64             `json:"precedence"`Enabledbool               `json:"enabled"`ActionTeamsGatewayAction `json:"action"`RuleSettingsTeamsRuleSettings  `json:"rule_settings,omitempty"`}

TeamsRulePatchRequest is used to patch an existing rule.

typeTeamsRuleResponseadded inv0.21.0

type TeamsRuleResponse struct {ResponseResultTeamsRule `json:"result"`}

TeamsRuleResponse is the API response, containing a single rule.

typeTeamsRuleScheduleadded inv0.112.0

type TeamsRuleSchedule struct {MondayTeamsScheduleTimes `json:"mon,omitempty"`TuesdayTeamsScheduleTimes `json:"tue,omitempty"`WednesdayTeamsScheduleTimes `json:"wed,omitempty"`ThursdayTeamsScheduleTimes `json:"thu,omitempty"`FridayTeamsScheduleTimes `json:"fri,omitempty"`SaturdayTeamsScheduleTimes `json:"sat,omitempty"`SundayTeamsScheduleTimes `json:"sun,omitempty"`TimeZonestring             `json:"time_zone,omitempty"`// default to user TZ based on the user IP location, fall backs to colo TZ}

typeTeamsRuleSettingsadded inv0.21.0

type TeamsRuleSettings struct {// list of ipv4 or ipv6 ips to override with, when action is set to dns overrideOverrideIPs []string `json:"override_ips"`// show this string at block page caused by this ruleBlockReasonstring `json:"block_reason"`// host name to override with when action is set to dns override. Can not be used with OverrideIPsOverrideHoststring `json:"override_host"`// settings for browser isolation actionsBISOAdminControls *TeamsBISOAdminControlSettings `json:"biso_admin_controls"`// settings for l4(network) level overridesL4Override *TeamsL4OverrideSettings `json:"l4override"`// settings for adding headers to http requestsAddHeadershttp.Header `json:"add_headers"`// settings for session check in allow actionCheckSession *TeamsCheckSessionSettings `json:"check_session"`// Enable block page on rules with action blockBlockPageEnabledbool `json:"block_page_enabled"`// whether to disable dnssec validation for allow actionInsecureDisableDNSSECValidationbool `json:"insecure_disable_dnssec_validation"`// settings for rules with egress actionEgressSettings *EgressSettings `json:"egress"`// DLP payload logging configurationPayloadLog *TeamsDlpPayloadLogSettings `json:"payload_log"`//AuditSsh SettingsAuditSSH *AuditSSHRuleSettings `json:"audit_ssh"`// Turns on ip category based filter on dns if the rule contains dns category checksIPCategoriesbool `json:"ip_categories"`// Turns on for explicitly ignoring cname domain category matchesIgnoreCNAMECategoryMatches *bool `json:"ignore_cname_category_matches"`// Allow parent MSP accounts to enable bypass their children's rules. Do not set them for non MSP accounts.AllowChildBypass *bool `json:"allow_child_bypass,omitempty"`// Allow child MSP accounts to bypass their parent's rules. Do not set them for non MSP accounts.BypassParentRule *bool `json:"bypass_parent_rule,omitempty"`// Action taken when an untrusted origin certificate error occurs in a http allow ruleUntrustedCertSettings *UntrustedCertSettings `json:"untrusted_cert"`// Specifies that a resolver policy should use Cloudflare's DNS Resolver.ResolveDnsThroughCloudflare *bool `json:"resolve_dns_through_cloudflare,omitempty"`// Resolver policy settings.DnsResolverSettings *TeamsDnsResolverSettings `json:"dns_resolvers,omitempty"`ResolveDnsInternallySettings *TeamsResolveDnsInternallySettings `json:"resolve_dns_internally,omitempty"`NotificationSettings *TeamsNotificationSettings `json:"notification_settings"`Quarantine           *TeamsQuarantine           `json:"quarantine,omitempty"`ForensicCopySettings *TeamsForensicCopySettings `json:"forensic_copy,omitempty"`}

typeTeamsRuleTypeadded inv0.30.0

type TeamsRuleType =string
const (TeamsHttpRuleTypeTeamsRuleType = "http"TeamsDnsRuleTypeTeamsRuleType = "dns"TeamsL4RuleTypeTeamsRuleType = "l4")

typeTeamsRulesResponseadded inv0.21.0

type TeamsRulesResponse struct {ResponseResult []TeamsRule `json:"result"`}

TeamsRuleResponse is the API response, containing an array of rules.

typeTeamsSandboxAccountSettingadded inv0.112.0

type TeamsSandboxAccountSetting struct {Enabled        *bool  `db:"enabled" json:"enabled" validate:"required"`FallbackActionstring `db:"fallback_action" json:"fallback_action" validate:"omitempty,oneof=allow block"`}

typeTeamsScheduleTimesadded inv0.112.0

type TeamsScheduleTimesstring

format HH:MM,HH:MM,....,HH:MM

typeTeamsTLSDecryptadded inv0.21.0

type TeamsTLSDecrypt struct {Enabledbool `json:"enabled"`}

typeTeamsTeamsBISOAdminControlSettingsValueadded inv0.115.0

type TeamsTeamsBISOAdminControlSettingsValuestring
const (TeamsBISOAdminControlEnabledTeamsTeamsBISOAdminControlSettingsValue = "enabled"TeamsBISOAdminControlDisabledTeamsTeamsBISOAdminControlSettingsValue = "disabled"TeamsBISOAdminControlRemoteOnlyTeamsTeamsBISOAdminControlSettingsValue = "remote_only")

typeTieredCacheadded inv0.57.1

type TieredCache struct {TypeTieredCacheTypeLastModifiedtime.Time}

typeTieredCacheTypeadded inv0.57.1

type TieredCacheTypeint
const (TieredCacheOffTieredCacheType = 0TieredCacheGenericTieredCacheType = 1TieredCacheSmartTieredCacheType = 2)

func (TieredCacheType)Stringadded inv0.57.1

func (eTieredCacheType) String()string

typeTimeRangeadded inv0.40.0

type TimeRange struct {Sincestring `json:"since,omitempty" url:"since,omitempty"`Beforestring `json:"before,omitempty" url:"before,omitempty"`}

TimeRange is an object for filtering the alert history based on timestamp.

typeTotalTLSadded inv0.53.0

type TotalTLS struct {Enabled              *bool  `json:"enabled,omitempty"`CertificateAuthoritystring `json:"certificate_authority,omitempty"`ValidityDaysint    `json:"validity_days,omitempty"`}

typeTotalTLSResponseadded inv0.53.0

type TotalTLSResponse struct {ResponseResultTotalTLS `json:"result"`}

typeTunneladded inv0.39.0

type Tunnel struct {IDstring             `json:"id,omitempty"`Namestring             `json:"name,omitempty"`Secretstring             `json:"tunnel_secret,omitempty"`CreatedAt      *time.Time         `json:"created_at,omitempty"`DeletedAt      *time.Time         `json:"deleted_at,omitempty"`Connections    []TunnelConnection `json:"connections,omitempty"`ConnsActiveAt  *time.Time         `json:"conns_active_at,omitempty"`ConnInactiveAt *time.Time         `json:"conns_inactive_at,omitempty"`TunnelTypestring             `json:"tun_type,omitempty"`Statusstring             `json:"status,omitempty"`RemoteConfigbool               `json:"remote_config,omitempty"`}

Tunnel is the struct definition of a tunnel.

typeTunnelConfigurationadded inv0.43.0

type TunnelConfiguration struct {Ingress       []UnvalidatedIngressRule `json:"ingress,omitempty"`WarpRouting   *WarpRoutingConfig       `json:"warp-routing,omitempty"`OriginRequestOriginRequestConfig      `json:"originRequest,omitempty"`}

typeTunnelConfigurationParamsadded inv0.43.0

type TunnelConfigurationParams struct {TunnelIDstring              `json:"-"`ConfigTunnelConfiguration `json:"config,omitempty"`}

typeTunnelConfigurationResponseadded inv0.43.0

type TunnelConfigurationResponse struct {ResultTunnelConfigurationResult `json:"result"`Response}

TunnelConfigurationResponse is used for representing the API response payloadfor a single tunnel.

typeTunnelConfigurationResultadded inv0.43.0

type TunnelConfigurationResult struct {TunnelIDstring              `json:"tunnel_id,omitempty"`ConfigTunnelConfiguration `json:"config,omitempty"`Versionint                 `json:"version,omitempty"`}

typeTunnelConnectionadded inv0.39.0

type TunnelConnection struct {ColoNamestring `json:"colo_name"`IDstring `json:"id"`IsPendingReconnectbool   `json:"is_pending_reconnect"`ClientIDstring `json:"client_id"`ClientVersionstring `json:"client_version"`OpenedAtstring `json:"opened_at"`OriginIPstring `json:"origin_ip"`}

TunnelConnection represents the connections associated with a tunnel.

typeTunnelConnectionResponseadded inv0.45.0

type TunnelConnectionResponse struct {Result []Connection `json:"result"`Response}

TunnelConnectionResponse is used for representing the API response payload forconnections of a single tunnel.

typeTunnelCreateParamsadded inv0.39.0

type TunnelCreateParams struct {Namestring `json:"name,omitempty"`Secretstring `json:"tunnel_secret,omitempty"`ConfigSrcstring `json:"config_src,omitempty"`}

typeTunnelDetailResponseadded inv0.39.0

type TunnelDetailResponse struct {ResultTunnel `json:"result"`Response}

TunnelDetailResponse is used for representing the API response payload fora single tunnel.

typeTunnelDurationadded inv0.70.0

type TunnelDuration struct {time.Duration}

A TunnelDuration is a Duration that has custom serialization for JSON.JSON in Javascript assumes that int fields are 32 bits and Duration fieldsare deserialized assuming that numbers are in nanoseconds, which in 32bitintegers limits to just 2 seconds. This type assumes that whenserializing/deserializing from JSON, that the number is in seconds, while itmaintains the YAML serde assumptions.

func (TunnelDuration)MarshalJSONadded inv0.70.0

func (sTunnelDuration) MarshalJSON() ([]byte,error)

func (*TunnelDuration)UnmarshalJSONadded inv0.70.0

func (s *TunnelDuration) UnmarshalJSON(data []byte)error

typeTunnelListParamsadded inv0.39.0

type TunnelListParams struct {Namestring     `url:"name,omitempty"`UUIDstring     `url:"uuid,omitempty"`// the tunnel IDIsDeleted     *bool      `url:"is_deleted,omitempty"`ExistedAt     *time.Time `url:"existed_at,omitempty"`IncludePrefixstring     `url:"include_prefix,omitempty"`ExcludePrefixstring     `url:"exclude_prefix,omitempty"`ResultInfo}

typeTunnelRouteadded inv0.36.0

type TunnelRoute struct {Networkstring     `json:"network"`TunnelIDstring     `json:"tunnel_id"`TunnelNamestring     `json:"tunnel_name"`Commentstring     `json:"comment"`CreatedAt        *time.Time `json:"created_at"`DeletedAt        *time.Time `json:"deleted_at"`VirtualNetworkIDstring     `json:"virtual_network_id"`}

TunnelRoute is the full record for a route.

typeTunnelRoutesCreateParamsadded inv0.36.0

type TunnelRoutesCreateParams struct {Networkstring `json:"-"`TunnelIDstring `json:"tunnel_id"`Commentstring `json:"comment,omitempty"`VirtualNetworkIDstring `json:"virtual_network_id,omitempty"`}

typeTunnelRoutesDeleteParamsadded inv0.36.0

type TunnelRoutesDeleteParams struct {Networkstring `url:"-"`VirtualNetworkIDstring `url:"virtual_network_id,omitempty"`}

typeTunnelRoutesForIPParamsadded inv0.36.0

type TunnelRoutesForIPParams struct {Networkstring `url:"-"`VirtualNetworkIDstring `url:"virtual_network_id,omitempty"`}

typeTunnelRoutesListParamsadded inv0.36.0

type TunnelRoutesListParams struct {TunnelIDstring     `url:"tunnel_id,omitempty"`Commentstring     `url:"comment,omitempty"`IsDeleted        *bool      `url:"is_deleted,omitempty"`NetworkSubsetstring     `url:"network_subset,omitempty"`NetworkSupersetstring     `url:"network_superset,omitempty"`ExistedAt        *time.Time `url:"existed_at,omitempty"`VirtualNetworkIDstring     `url:"virtual_network_id,omitempty"`PaginationOptions}

typeTunnelRoutesUpdateParamsadded inv0.36.0

type TunnelRoutesUpdateParams struct {Networkstring `json:"network"`TunnelIDstring `json:"tunnel_id"`Commentstring `json:"comment,omitempty"`VirtualNetworkIDstring `json:"virtual_network_id,omitempty"`}

typeTunnelTokenResponseadded inv0.40.0

type TunnelTokenResponse struct {Resultstring `json:"result"`Response}

TunnelTokenResponse is the API response for a tunnel token.

typeTunnelUpdateParamsadded inv0.39.0

type TunnelUpdateParams struct {Namestring `json:"name,omitempty"`Secretstring `json:"tunnel_secret,omitempty"`}

typeTunnelVirtualNetworkadded inv0.41.0

type TunnelVirtualNetwork struct {IDstring     `json:"id"`Namestring     `json:"name"`IsDefaultNetworkbool       `json:"is_default_network"`Commentstring     `json:"comment"`CreatedAt        *time.Time `json:"created_at"`DeletedAt        *time.Time `json:"deleted_at"`}

TunnelVirtualNetwork is segregation of Tunnel IP Routes via VirtualizedNetworks to handle overlapping private IPs in your origins.

typeTunnelVirtualNetworkCreateParamsadded inv0.41.0

type TunnelVirtualNetworkCreateParams struct {Namestring `json:"name"`Commentstring `json:"comment"`IsDefaultbool   `json:"is_default"`}

typeTunnelVirtualNetworkUpdateParamsadded inv0.41.0

type TunnelVirtualNetworkUpdateParams struct {VnetIDstring `json:"-"`Namestring `json:"name,omitempty"`Commentstring `json:"comment,omitempty"`IsDefaultNetwork *bool  `json:"is_default_network,omitempty"`}

typeTunnelVirtualNetworksListParamsadded inv0.41.0

type TunnelVirtualNetworksListParams struct {IDstring `url:"id,omitempty"`Namestring `url:"name,omitempty"`IsDefault *bool  `url:"is_default,omitempty"`IsDeleted *bool  `url:"is_deleted,omitempty"`PaginationOptions}

typeTunnelsDetailResponseadded inv0.39.0

type TunnelsDetailResponse struct {Result []Tunnel `json:"result"`ResponseResultInfo `json:"result_info"`}

TunnelsDetailResponse is used for representing the API response payload formultiple tunnels.

typeTurnstileWidgetadded inv0.66.0

type TurnstileWidget struct {SiteKeystring     `json:"sitekey,omitempty"`Secretstring     `json:"secret,omitempty"`CreatedOn    *time.Time `json:"created_on,omitempty"`ModifiedOn   *time.Time `json:"modified_on,omitempty"`Namestring     `json:"name,omitempty"`Domains      []string   `json:"domains,omitempty"`Modestring     `json:"mode,omitempty"`BotFightModebool       `json:"bot_fight_mode,omitempty"`Regionstring     `json:"region,omitempty"`OffLabelbool       `json:"offlabel,omitempty"`}

typeTurnstileWidgetResponseadded inv0.66.0

type TurnstileWidgetResponse struct {ResponseResultTurnstileWidget `json:"result"`}

typeTusProtocolVersionadded inv0.77.0

type TusProtocolVersionstring
const (TusProtocolVersion1_0_0TusProtocolVersion = "1.0.0")

typeURLNormalizationSettingsadded inv0.49.0

type URLNormalizationSettings struct {Typestring `json:"type"`Scopestring `json:"scope"`}

typeURLNormalizationSettingsResponseadded inv0.49.0

type URLNormalizationSettingsResponse struct {ResultURLNormalizationSettings `json:"result"`Response}

typeURLNormalizationSettingsUpdateParamsadded inv0.49.0

type URLNormalizationSettingsUpdateParams struct {Typestring `json:"type"`Scopestring `json:"scope"`}

typeUniversalSSLCertificatePackValidationMethodSettingadded inv0.20.0

type UniversalSSLCertificatePackValidationMethodSetting struct {ValidationMethodstring `json:"validation_method"`}

typeUniversalSSLSettingadded inv0.9.0

type UniversalSSLSetting struct {Enabledbool `json:"enabled"`}

UniversalSSLSetting represents a universal ssl setting's properties.

typeUniversalSSLVerificationDetailsadded inv0.10.0

type UniversalSSLVerificationDetails struct {CertificateStatusstring                `json:"certificate_status"`VerificationTypestring                `json:"verification_type"`ValidationMethodstring                `json:"validation_method"`CertPackUUIDstring                `json:"cert_pack_uuid"`VerificationStatusbool                  `json:"verification_status"`BrandCheckbool                  `json:"brand_check"`VerificationInfo   []SSLValidationRecord `json:"verification_info"`}

UniversalSSLVerificationDetails represents a universal ssl verification's properties.

typeUnsafeBindingadded inv0.74.0

type UnsafeBinding map[string]interface{}

UnsafeBinding is for experimental or deprecated bindings, and allows specifying any binding type or property.

Example
pretty := func(meta workerBindingMeta) string {buf := bytes.NewBufferString("")encoder := json.NewEncoder(buf)encoder.SetIndent("", "  ")if err := encoder.Encode(meta); err != nil {fmt.Println("error:", err)}return buf.String()}binding_a := WorkerServiceBinding{Service: "foo",}meta_a, _, _ := binding_a.serialize("my_binding")meta_a_json := pretty(meta_a)fmt.Println(meta_a_json)binding_b := UnsafeBinding{"type":    "service","service": "foo",}meta_b, _, _ := binding_b.serialize("my_binding")meta_b_json := pretty(meta_b)fmt.Println(meta_b_json)fmt.Println(meta_a_json == meta_b_json)
Output:{  "name": "my_binding",  "service": "foo",  "type": "service"}{  "name": "my_binding",  "service": "foo",  "type": "service"}true

func (UnsafeBinding)Typeadded inv0.74.0

Type returns the type of the binding.

typeUntrustedCertSettingsadded inv0.62.0

type UntrustedCertSettings struct {ActionTeamsGatewayUntrustedCertAction `json:"action"`}

typeUnvalidatedIngressRuleadded inv0.43.0

type UnvalidatedIngressRule struct {Hostnamestring               `json:"hostname,omitempty"`Pathstring               `json:"path,omitempty"`Servicestring               `json:"service,omitempty"`OriginRequest *OriginRequestConfig `json:"originRequest,omitempty"`}

typeUpdateAPIShieldDiscoveryOperationadded inv0.79.0

type UpdateAPIShieldDiscoveryOperation struct {// State is the state to set on the operationStateAPIShieldDiscoveryState `json:"state" url:"-"`}

UpdateAPIShieldDiscoveryOperation represents the state to set on a discovery operation.

typeUpdateAPIShieldDiscoveryOperationParamsadded inv0.79.0

type UpdateAPIShieldDiscoveryOperationParams struct {// OperationID is the ID, formatted as UUID, of the operation to be updatedOperationIDstring                  `json:"-" url:"-"`StateAPIShieldDiscoveryState `json:"state" url:"-"`}

UpdateAPIShieldDiscoveryOperationParams represents the parameters to pass to patch a discovery operation

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/discovery/subresources/operations/methods/edit/

typeUpdateAPIShieldDiscoveryOperationsParamsadded inv0.79.0

type UpdateAPIShieldDiscoveryOperationsParams map[string]UpdateAPIShieldDiscoveryOperation

UpdateAPIShieldDiscoveryOperationsParams maps discovery operation IDs to PatchAPIShieldDiscoveryOperation structs

Example:

UpdateAPIShieldDiscoveryOperations{"99522293-a505-45e5-bbad-bbc339f5dc40": PatchAPIShieldDiscoveryOperation{ State: "review" },}

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/discovery/subresources/operations/methods/bulk_edit/

typeUpdateAPIShieldOperationSchemaValidationSettingsadded inv0.80.0

type UpdateAPIShieldOperationSchemaValidationSettings map[string]APIShieldOperationSchemaValidationSettings

UpdateAPIShieldOperationSchemaValidationSettings maps operation IDs to APIShieldOperationSchemaValidationSettings

This can be used to bulk update operations in one call

Example:

UpdateAPIShieldOperationSchemaValidationSettings{"99522293-a505-45e5-bbad-bbc339f5dc40": APIShieldOperationSchemaValidationSettings{ MitigationAction: nil },}

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/operations/subresources/schema_validation/methods/edit/

typeUpdateAPIShieldOperationSchemaValidationSettingsResponseadded inv0.80.0

type UpdateAPIShieldOperationSchemaValidationSettingsResponse struct {ResultUpdateAPIShieldOperationSchemaValidationSettings `json:"result"`Response}

UpdateAPIShieldOperationSchemaValidationSettingsResponse represents the response from the PATCH api_gateway/operations/schema_validation endpoint.

typeUpdateAPIShieldParamsadded inv0.49.0

type UpdateAPIShieldParams struct {AuthIdCharacteristics []AuthIdCharacteristics `json:"auth_id_characteristics"`}

typeUpdateAPIShieldSchemaParamsadded inv0.79.0

type UpdateAPIShieldSchemaParams struct {// SchemaID is the schema to be patchedSchemaIDstring `json:"-" url:"-"`// ValidationEnabled controls if schema is used for validationValidationEnabled *bool `json:"validation_enabled" url:"-"`}

UpdateAPIShieldSchemaParams represents the parameters to pass to patch certain fields on an existing schema

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/user_schemas/methods/edit/

typeUpdateAPIShieldSchemaValidationSettingsParamsadded inv0.80.0

type UpdateAPIShieldSchemaValidationSettingsParams struct {// DefaultMitigationAction is the mitigation to apply when there is no operation-level// mitigation action defined//// passing a `nil` value will have no effect on this settingDefaultMitigationAction *string `json:"validation_default_mitigation_action" url:"-"`// OverrideMitigationAction when set, will apply to all requests regardless of// zone-level/operation-level setting//// passing a `nil` value will have no effect on this settingOverrideMitigationAction *string `json:"validation_override_mitigation_action" url:"-"`}

UpdateAPIShieldSchemaValidationSettingsParams represents the parameters to pass to update certain fieldson schema validation settings on the zone

API documentation:https://developers.cloudflare.com/api/resources/api_gateway/subresources/settings/subresources/schema_validation/methods/edit/

typeUpdateAccessApplicationParamsadded inv0.71.0

type UpdateAccessApplicationParams struct {IDstring                               `json:"id,omitempty"`AllowedIdps              []string                             `json:"allowed_idps,omitempty"`AppLauncherVisible       *bool                                `json:"app_launcher_visible,omitempty"`AUDstring                               `json:"aud,omitempty"`AutoRedirectToIdentity   *bool                                `json:"auto_redirect_to_identity,omitempty"`CorsHeaders              *AccessApplicationCorsHeaders        `json:"cors_headers,omitempty"`CustomDenyMessagestring                               `json:"custom_deny_message,omitempty"`CustomDenyURLstring                               `json:"custom_deny_url,omitempty"`CustomNonIdentityDenyURLstring                               `json:"custom_non_identity_deny_url,omitempty"`Domainstring                               `json:"domain"`DomainTypeAccessDestinationType                `json:"domain_type,omitempty"`EnableBindingCookie      *bool                                `json:"enable_binding_cookie,omitempty"`GatewayRules             []AccessApplicationGatewayRule       `json:"gateway_rules,omitempty"`HttpOnlyCookieAttribute  *bool                                `json:"http_only_cookie_attribute,omitempty"`LogoURLstring                               `json:"logo_url,omitempty"`Namestring                               `json:"name"`PathCookieAttribute      *bool                                `json:"path_cookie_attribute,omitempty"`PrivateAddressstring                               `json:"private_address"`SaasApplication          *SaasApplication                     `json:"saas_app,omitempty"`SameSiteCookieAttributestring                               `json:"same_site_cookie_attribute,omitempty"`Destinations             []AccessDestination                  `json:"destinations"`ServiceAuth401Redirect   *bool                                `json:"service_auth_401_redirect,omitempty"`SessionDurationstring                               `json:"session_duration,omitempty"`SkipInterstitial         *bool                                `json:"skip_interstitial,omitempty"`TypeAccessApplicationType                `json:"type,omitempty"`AllowAuthenticateViaWarp *bool                                `json:"allow_authenticate_via_warp,omitempty"`OptionsPreflightBypass   *bool                                `json:"options_preflight_bypass,omitempty"`CustomPages              []string                             `json:"custom_pages,omitempty"`Tags                     []string                             `json:"tags,omitempty"`SCIMConfig               *AccessApplicationSCIMConfig         `json:"scim_config,omitempty"`TargetContexts           *[]AccessInfrastructureTargetContext `json:"target_criteria,omitempty"`// List of policy ids to link to this application in ascending order of precedence.// Can reference reusable policies and policies specific to this application.// If this field is not provided, the existing policies will not be modified.Policies *[]string `json:"policies,omitempty"`AccessAppLauncherCustomization}

typeUpdateAccessCustomPageParamsadded inv0.74.0

type UpdateAccessCustomPageParams struct {CustomHTMLstring               `json:"custom_html,omitempty"`Namestring               `json:"name,omitempty"`TypeAccessCustomPageType `json:"type,omitempty"`UIDstring               `json:"uid,omitempty"`}

typeUpdateAccessGroupParamsadded inv0.71.0

type UpdateAccessGroupParams struct {IDstring `json:"id,omitempty"`Namestring `json:"name"`// The include group works like an OR logical operator. The user must// satisfy one of the rules.Include []interface{} `json:"include"`// The exclude group works like a NOT logical operator. The user must// not satisfy all the rules in exclude.Exclude []interface{} `json:"exclude"`// The require group works like a AND logical operator. The user must// satisfy all the rules in require.Require []interface{} `json:"require"`}

typeUpdateAccessIdentityProviderParamsadded inv0.71.0

type UpdateAccessIdentityProviderParams struct {IDstring                                  `json:"-"`Namestring                                  `json:"name"`Typestring                                  `json:"type"`ConfigAccessIdentityProviderConfiguration     `json:"config"`ScimConfigAccessIdentityProviderScimConfiguration `json:"scim_config"`}

typeUpdateAccessMutualTLSCertificateParamsadded inv0.71.0

type UpdateAccessMutualTLSCertificateParams struct {IDstring    `json:"-"`ExpiresOntime.Time `json:"expires_on,omitempty"`Namestring    `json:"name,omitempty"`Fingerprintstring    `json:"fingerprint,omitempty"`Certificatestring    `json:"certificate,omitempty"`AssociatedHostnames []string  `json:"associated_hostnames,omitempty"`}

typeUpdateAccessMutualTLSHostnameSettingsParamsadded inv0.90.0

type UpdateAccessMutualTLSHostnameSettingsParams struct {Settings []AccessMutualTLSHostnameSettings `json:"settings,omitempty"`}

typeUpdateAccessOrganizationParamsadded inv0.71.0

type UpdateAccessOrganizationParams struct {Namestring                        `json:"name"`AuthDomainstring                        `json:"auth_domain"`LoginDesignAccessOrganizationLoginDesign `json:"login_design"`IsUIReadOnly                   *bool                         `json:"is_ui_read_only,omitempty"`UIReadOnlyToggleReasonstring                        `json:"ui_read_only_toggle_reason,omitempty"`UserSeatExpirationInactiveTimestring                        `json:"user_seat_expiration_inactive_time,omitempty"`AutoRedirectToIdentity         *bool                         `json:"auto_redirect_to_identity,omitempty"`SessionDuration                *string                       `json:"session_duration,omitempty"`CustomPagesAccessOrganizationCustomPages `json:"custom_pages,omitempty"`WarpAuthSessionDuration        *string                       `json:"warp_auth_session_duration,omitempty"`AllowAuthenticateViaWarp       *bool                         `json:"allow_authenticate_via_warp,omitempty"`}

typeUpdateAccessPolicyParamsadded inv0.72.0

type UpdateAccessPolicyParams struct {// ApplicationID is the application ID that owns the existing policy.// Pass an empty value if the existing policy is reusable.ApplicationIDstring `json:"-"`PolicyIDstring `json:"-"`// Precedence is the order in which the policy is executed in an Access application.// As a general rule, lower numbers take precedence over higher numbers.// This field is ignored when updating a reusable policy.Precedenceint    `json:"precedence"`Decisionstring `json:"decision"`Namestring `json:"name"`IsolationRequired             *bool                                `json:"isolation_required,omitempty"`SessionDuration               *string                              `json:"session_duration,omitempty"`PurposeJustificationRequired  *bool                                `json:"purpose_justification_required,omitempty"`PurposeJustificationPrompt    *string                              `json:"purpose_justification_prompt,omitempty"`ApprovalRequired              *bool                                `json:"approval_required,omitempty"`ApprovalGroups                []AccessApprovalGroup                `json:"approval_groups"`InfrastructureConnectionRules *AccessInfrastructureConnectionRules `json:"connection_rules,omitempty"`// The include policy works like an OR logical operator. The user must// satisfy one of the rules.Include []interface{} `json:"include"`// The exclude policy works like a NOT logical operator. The user must// not satisfy all the rules in exclude.Exclude []interface{} `json:"exclude"`// The require policy works like a AND logical operator. The user must// satisfy all the rules in require.Require []interface{} `json:"require"`}

typeUpdateAccessServiceTokenParamsadded inv0.71.0

type UpdateAccessServiceTokenParams struct {Namestring `json:"name"`UUIDstring `json:"-"`Durationstring `json:"duration,omitempty"`}

typeUpdateAccessUserSeatParamsadded inv0.81.0

type UpdateAccessUserSeatParams struct {SeatUIDstring `json:"seat_uid,omitempty"`AccessSeat  *bool  `json:"access_seat"`GatewaySeat *bool  `json:"gateway_seat"`}

UpdateAccessUserSeatParams represents the update payload for access seats.

typeUpdateAccessUserSeatResponseadded inv0.81.0

type UpdateAccessUserSeatResponse struct {ResponseResult     []AccessUpdateAccessUserSeatResult `json:"result"`ResultInfo `json:"result_info"`}

AccessUserSeatResponse represents the response from the access user seat endpoints.

typeUpdateAccessUsersSeatsParamsadded inv0.87.0

type UpdateAccessUsersSeatsParams []struct {SeatUIDstring `json:"seat_uid,omitempty"`AccessSeat  *bool  `json:"access_seat"`GatewaySeat *bool  `json:"gateway_seat"`}

UpdateAccessUsersSeatsParams represents the update payload for multiple access seats.

typeUpdateAddressMapParamsadded inv0.63.0

type UpdateAddressMapParams struct {IDstring  `json:"-"`Description *string `json:"description,omitempty"`Enabled     *bool   `json:"enabled,omitempty"`DefaultSNI  *string `json:"default_sni,omitempty"`}

UpdateAddressMapParams contains information about an address map to be updated.

typeUpdateAuditSSHSettingsParamsadded inv0.79.0

type UpdateAuditSSHSettingsParams struct {PublicKeystring `json:"public_key"`}

typeUpdateBotManagementParamsadded inv0.75.0

type UpdateBotManagementParams struct {EnableJS                     *bool   `json:"enable_js,omitempty"`FightMode                    *bool   `json:"fight_mode,omitempty"`SBFMDefinitelyAutomated      *string `json:"sbfm_definitely_automated,omitempty"`SBFMLikelyAutomated          *string `json:"sbfm_likely_automated,omitempty"`SBFMVerifiedBots             *string `json:"sbfm_verified_bots,omitempty"`SBFMStaticResourceProtection *bool   `json:"sbfm_static_resource_protection,omitempty"`OptimizeWordpress            *bool   `json:"optimize_wordpress,omitempty"`SuppressSessionScore         *bool   `json:"suppress_session_score,omitempty"`AutoUpdateModel              *bool   `json:"auto_update_model,omitempty"`AIBotsProtection             *string `json:"ai_bots_protection,omitempty"`}

typeUpdateCacheReserveParamsadded inv0.68.0

type UpdateCacheReserveParams struct {Valuestring `json:"value"`}

typeUpdateCertificateAuthoritiesHostnameAssociationsParamsadded inv0.112.0

type UpdateCertificateAuthoritiesHostnameAssociationsParams struct {Hostnames         []HostnameAssociation `json:"hostnames,omitempty"`MTLSCertificateIDstring                `json:"mtls_certificate_id,omitempty"`}

typeUpdateCustomNameserverZoneMetadataParamsadded inv0.70.0

type UpdateCustomNameserverZoneMetadataParams struct {NSSetint  `json:"ns_set"`Enabledbool `json:"enabled"`}

typeUpdateDLPDatasetParamsadded inv0.87.0

type UpdateDLPDatasetParams struct {DatasetIDstringDescription *string `json:"description,omitempty"`// nil to leave descrption as-isName        *string `json:"name,omitempty"`// nil to leave name as-is}

typeUpdateDLPDatasetResponseadded inv0.87.0

type UpdateDLPDatasetResponse struct {ResultDLPDataset `json:"result"`Response}

typeUpdateDLPProfileParamsadded inv0.53.0

type UpdateDLPProfileParams struct {ProfileIDstringProfileDLPProfileTypestring}

typeUpdateDNSFirewallClusterParamsadded inv0.70.0

type UpdateDNSFirewallClusterParams struct {ClusterIDstring   `json:"-"`Namestring   `json:"name"`UpstreamIPs          []string `json:"upstream_ips"`DNSFirewallIPs       []string `json:"dns_firewall_ips,omitempty"`MinimumCacheTTLuint     `json:"minimum_cache_ttl,omitempty"`MaximumCacheTTLuint     `json:"maximum_cache_ttl,omitempty"`DeprecateAnyRequestsbool     `json:"deprecate_any_requests"`}

typeUpdateDNSRecordParamsadded inv0.58.0

type UpdateDNSRecordParams struct {Typestring            `json:"type,omitempty"`Namestring            `json:"name,omitempty"`Contentstring            `json:"content,omitempty"`Data     interface{}       `json:"data,omitempty"`// data for: SRV, LOCIDstring            `json:"-"`Priority *uint16           `json:"priority,omitempty"`TTLint               `json:"ttl,omitempty"`Proxied  *bool             `json:"proxied,omitempty"`Comment  *string           `json:"comment,omitempty"`// nil will keep the current comment, while StringPtr("") will empty itTags     []string          `json:"tags"`SettingsDNSRecordSettings `json:"settings,omitempty"`}

typeUpdateDataLocalizationRegionalHostnameParamsadded inv0.66.0

type UpdateDataLocalizationRegionalHostnameParams struct {Hostnamestring `json:"-"`RegionKeystring `json:"region_key"`}

typeUpdateDefaultDeviceSettingsPolicyParamsadded inv0.81.0

type UpdateDefaultDeviceSettingsPolicyParams struct {DisableAutoFallback *bool          `json:"disable_auto_fallback,omitempty"`CaptivePortal       *int           `json:"captive_portal,omitempty"`AllowModeSwitch     *bool          `json:"allow_mode_switch,omitempty"`SwitchLocked        *bool          `json:"switch_locked,omitempty"`AllowUpdates        *bool          `json:"allow_updates,omitempty"`AutoConnect         *int           `json:"auto_connect,omitempty"`AllowedToLeave      *bool          `json:"allowed_to_leave,omitempty"`SupportURL          *string        `json:"support_url,omitempty"`ServiceModeV2       *ServiceModeV2 `json:"service_mode_v2,omitempty"`Precedence          *int           `json:"precedence,omitempty"`Name                *string        `json:"name,omitempty"`Match               *string        `json:"match,omitempty"`Enabled             *bool          `json:"enabled,omitempty"`ExcludeOfficeIps    *bool          `json:"exclude_office_ips"`Description         *string        `json:"description,omitempty"`LANAllowMinutes     *uint          `json:"lan_allow_minutes,omitempty"`LANAllowSubnetSize  *uint          `json:"lan_allow_subnet_size,omitempty"`TunnelProtocol      *string        `json:"tunnel_protocol,omitempty"`}

typeUpdateDeviceClientCertificatesParamsadded inv0.81.0

type UpdateDeviceClientCertificatesParams struct {Enabled *bool `json:"enabled"`}

typeUpdateDeviceDexTestParamsadded inv0.62.0

type UpdateDeviceDexTestParams struct {TestIDstring             `json:"test_id,omitempty"`Namestring             `json:"name"`Descriptionstring             `json:"description,omitempty"`Intervalstring             `json:"interval"`Enabledbool               `json:"enabled"`Data        *DeviceDexTestData `json:"data"`}

typeUpdateDeviceManagedNetworkParamsadded inv0.57.0

type UpdateDeviceManagedNetworkParams struct {NetworkIDstring  `json:"network_id,omitempty"`Typestring  `json:"type"`Namestring  `json:"name"`Config    *Config `json:"config"`}

typeUpdateDeviceSettingsPolicyParamsadded inv0.81.0

type UpdateDeviceSettingsPolicyParams struct {PolicyID            *string        `json:"-"`DisableAutoFallback *bool          `json:"disable_auto_fallback,omitempty"`CaptivePortal       *int           `json:"captive_portal,omitempty"`AllowModeSwitch     *bool          `json:"allow_mode_switch,omitempty"`SwitchLocked        *bool          `json:"switch_locked,omitempty"`AllowUpdates        *bool          `json:"allow_updates,omitempty"`AutoConnect         *int           `json:"auto_connect,omitempty"`AllowedToLeave      *bool          `json:"allowed_to_leave,omitempty"`SupportURL          *string        `json:"support_url,omitempty"`ServiceModeV2       *ServiceModeV2 `json:"service_mode_v2,omitempty"`Precedence          *int           `json:"precedence,omitempty"`Name                *string        `json:"name,omitempty"`Match               *string        `json:"match,omitempty"`Enabled             *bool          `json:"enabled,omitempty"`ExcludeOfficeIps    *bool          `json:"exclude_office_ips"`Description         *string        `json:"description,omitempty"`LANAllowMinutes     *uint          `json:"lan_allow_minutes,omitempty"`LANAllowSubnetSize  *uint          `json:"lan_allow_subnet_size,omitempty"`TunnelProtocol      *string        `json:"tunnel_protocol,omitempty"`}

typeUpdateEmailRoutingRuleParametersadded inv0.47.0

type UpdateEmailRoutingRuleParameters struct {Matchers []EmailRoutingRuleMatcher `json:"matchers,omitempty"`Actions  []EmailRoutingRuleAction  `json:"actions,omitempty"`Namestring                    `json:"name,omitempty"`Enabled  *bool                     `json:"enabled,omitempty"`Priorityint                       `json:"priority,omitempty"`RuleIDstring}

typeUpdateEntrypointRulesetParamsadded inv0.73.0

type UpdateEntrypointRulesetParams struct {Phasestring        `json:"-"`Descriptionstring        `json:"description,omitempty"`Rules       []RulesetRule `json:"rules"`}

typeUpdateHostnameTLSSettingCiphersParamsadded inv0.75.0

type UpdateHostnameTLSSettingCiphersParams struct {HostnamestringValue    []string `json:"value"`}

UpdateHostnameTLSSettingCiphersParams represents the data related to the per-hostname ciphers tls setting being updated.

typeUpdateHostnameTLSSettingParamsadded inv0.75.0

type UpdateHostnameTLSSettingParams struct {SettingstringHostnamestringValuestring `json:"value"`}

UpdateHostnameTLSSettingParams represents the data related to the per-hostname tls setting being updated.

typeUpdateHyperdriveConfigParamsadded inv0.88.0

type UpdateHyperdriveConfigParams struct {HyperdriveIDstring                            `json:"-"`Namestring                            `json:"name"`OriginHyperdriveConfigOriginWithSecrets `json:"origin"`CachingHyperdriveConfigCaching           `json:"caching,omitempty"`}

typeUpdateImageParamsadded inv0.71.0

type UpdateImageParams struct {IDstring                 `json:"-"`RequireSignedURLsbool                   `json:"requireSignedURLs"`Metadata          map[string]interface{} `json:"metadata,omitempty"`}

UpdateImageParams is the data required for an UpdateImage request.

typeUpdateImagesVariantParamsadded inv0.88.0

type UpdateImagesVariantParams struct {IDstring                `json:"-"`NeverRequireSignedURLs *bool                 `json:"neverRequireSignedURLs,omitempty"`OptionsImagesVariantsOptions `json:"options,omitempty"`}

typeUpdateInfrastructureAccessTargetParamsadded inv0.105.0

type UpdateInfrastructureAccessTargetParams struct {IDstring                           `json:"-"`ModifyParamsInfrastructureAccessTargetParams `json:"modify_params"`}

typeUpdateLoadBalancerMonitorParamsadded inv0.51.0

type UpdateLoadBalancerMonitorParams struct {LoadBalancerMonitorLoadBalancerMonitor}

typeUpdateLoadBalancerParamsadded inv0.51.0

type UpdateLoadBalancerParams struct {LoadBalancerLoadBalancer}

typeUpdateLoadBalancerPoolParamsadded inv0.51.0

type UpdateLoadBalancerPoolParams struct {LoadBalancerLoadBalancerPool}

typeUpdateLogpushJobParamsadded inv0.72.0

type UpdateLogpushJobParams struct {IDint                   `json:"-"`Datasetstring                `json:"dataset"`Enabledbool                  `json:"enabled"`Kindstring                `json:"kind,omitempty"`Namestring                `json:"name"`LogpullOptionsstring                `json:"logpull_options,omitempty"`OutputOptions            *LogpushOutputOptions `json:"output_options,omitempty"`DestinationConfstring                `json:"destination_conf"`OwnershipChallengestring                `json:"ownership_challenge,omitempty"`LastComplete             *time.Time            `json:"last_complete,omitempty"`LastError                *time.Time            `json:"last_error,omitempty"`ErrorMessagestring                `json:"error_message,omitempty"`Frequencystring                `json:"frequency,omitempty"`Filter                   *LogpushJobFilters    `json:"filter,omitempty"`MaxUploadBytesint                   `json:"max_upload_bytes,omitempty"`MaxUploadRecordsint                   `json:"max_upload_records,omitempty"`MaxUploadIntervalSecondsint                   `json:"max_upload_interval_seconds,omitempty"`}

func (UpdateLogpushJobParams)MarshalJSONadded inv0.72.0

func (fUpdateLogpushJobParams) MarshalJSON() ([]byte,error)

func (*UpdateLogpushJobParams)UnmarshalJSONadded inv0.72.0

func (f *UpdateLogpushJobParams) UnmarshalJSON(data []byte)error

Custom Unmarshaller for UpdateLogpushJobParams filter key.

typeUpdateMagicFirewallRulesetRequestadded inv0.13.7

type UpdateMagicFirewallRulesetRequest struct {Descriptionstring                     `json:"description"`Rules       []MagicFirewallRulesetRule `json:"rules"`}

UpdateMagicFirewallRulesetRequest contains data for a Magic Firewall ruleset update.

typeUpdateMagicFirewallRulesetResponseadded inv0.13.7

type UpdateMagicFirewallRulesetResponse struct {ResponseResultMagicFirewallRuleset `json:"result"`}

UpdateMagicFirewallRulesetResponse contains response data when updating an existing Magic Firewall ruleset.

typeUpdateMagicTransitGRETunnelResponseadded inv0.32.0

type UpdateMagicTransitGRETunnelResponse struct {ResponseResult struct {Modifiedbool                  `json:"modified"`ModifiedGRETunnelMagicTransitGRETunnel `json:"modified_gre_tunnel"`} `json:"result"`}

UpdateMagicTransitGRETunnelResponse contains a response after updating a GRE Tunnel.

typeUpdateMagicTransitIPsecTunnelResponseadded inv0.31.0

type UpdateMagicTransitIPsecTunnelResponse struct {ResponseResult struct {Modifiedbool                    `json:"modified"`ModifiedIPsecTunnelMagicTransitIPsecTunnel `json:"modified_ipsec_tunnel"`} `json:"result"`}

UpdateMagicTransitIPsecTunnelResponse contains a response after updating an IPsec Tunnel.

typeUpdateMagicTransitStaticRouteResponseadded inv0.18.0

type UpdateMagicTransitStaticRouteResponse struct {ResponseResult struct {Modifiedbool                    `json:"modified"`ModifiedRouteMagicTransitStaticRoute `json:"modified_route"`} `json:"result"`}

UpdateMagicTransitStaticRouteResponse contains a static route update response.

typeUpdateManagedHeadersParamsadded inv0.42.0

type UpdateManagedHeadersParams struct {ManagedHeaders}

typeUpdatePageShieldPolicyParamsadded inv0.84.0

type UpdatePageShieldPolicyParams struct {Actionstring `json:"action"`Descriptionstring `json:"description"`Enabled     *bool  `json:"enabled,omitempty"`Expressionstring `json:"expression"`IDstring `json:"id"`Valuestring `json:"value"`}

typeUpdatePageShieldSettingsParamsadded inv0.84.0

type UpdatePageShieldSettingsParams struct {Enabled                        *bool `json:"enabled,omitempty"`UseCloudflareReportingEndpoint *bool `json:"use_cloudflare_reporting_endpoint,omitempty"`UseConnectionURLPath           *bool `json:"use_connection_url_path,omitempty"`}

typeUpdatePagesProjectParamsadded inv0.73.0

type UpdatePagesProjectParams struct {// `ID` is used for addressing the resource via the UI or a stable// anchor whereas `Name` is used for updating the value.IDstring                        `json:"-"`Namestring                        `json:"name,omitempty"`SubDomainstring                        `json:"subdomain"`Domains             []string                      `json:"domains,omitempty"`Source              *PagesProjectSource           `json:"source,omitempty"`BuildConfigPagesProjectBuildConfig       `json:"build_config"`DeploymentConfigsPagesProjectDeploymentConfigs `json:"deployment_configs"`LatestDeploymentPagesProjectDeployment        `json:"latest_deployment"`CanonicalDeploymentPagesProjectDeployment        `json:"canonical_deployment"`ProductionBranchstring                        `json:"production_branch,omitempty"`}

typeUpdateQueueConsumerParamsadded inv0.55.0

type UpdateQueueConsumerParams struct {QueueNamestring `json:"-"`ConsumerQueueConsumer}

typeUpdateQueueParamsadded inv0.55.0

type UpdateQueueParams struct {Namestring `json:"-"`UpdatedNamestring `json:"queue_name,omitempty"`}

typeUpdateRegionalTieredCacheParamsadded inv0.73.0

type UpdateRegionalTieredCacheParams struct {Valuestring `json:"value"`}

typeUpdateRulesetParamsadded inv0.73.0

type UpdateRulesetParams struct {IDstring        `json:"-"`Descriptionstring        `json:"description"`Rules       []RulesetRule `json:"rules"`}

typeUpdateRulesetRequestadded inv0.19.0

type UpdateRulesetRequest struct {Descriptionstring        `json:"description"`Rules       []RulesetRule `json:"rules"`}

UpdateRulesetRequest is the representation of a Ruleset update.

typeUpdateRulesetResponseadded inv0.19.0

type UpdateRulesetResponse struct {ResponseResultRuleset `json:"result"`}

UpdateRulesetResponse contains response data when updating an existingRuleset.

typeUpdateTeamsListParamsadded inv0.53.0

type UpdateTeamsListParams struct {IDstring          `json:"id,omitempty"`Namestring          `json:"name"`Typestring          `json:"type"`Descriptionstring          `json:"description,omitempty"`Items       []TeamsListItem `json:"items,omitempty"`Countuint64          `json:"count,omitempty"`CreatedAt   *time.Time      `json:"created_at,omitempty"`UpdatedAt   *time.Time      `json:"updated_at,omitempty"`}

typeUpdateTurnstileWidgetParamsadded inv0.66.0

type UpdateTurnstileWidgetParams struct {SiteKeystring    `json:"-"`Name         *string   `json:"name,omitempty"`Domains      *[]string `json:"domains,omitempty"`Mode         *string   `json:"mode,omitempty"`BotFightMode *bool     `json:"bot_fight_mode,omitempty"`OffLabel     *bool     `json:"offlabel,omitempty"`}

typeUpdateWaitingRoomRuleParamsadded inv0.53.0

type UpdateWaitingRoomRuleParams struct {WaitingRoomIDstringRuleWaitingRoomRule}

typeUpdateWaitingRoomSettingsParamsadded inv0.67.0

type UpdateWaitingRoomSettingsParams struct {SearchEngineCrawlerBypass *bool `json:"search_engine_crawler_bypass,omitempty"`}

typeUpdateWebAnalyticsRuleParamsadded inv0.75.0

type UpdateWebAnalyticsRuleParams struct {RulesetIDstringRuleIDstringRuleCreateWebAnalyticsRule}

typeUpdateWebAnalyticsSiteParamsadded inv0.75.0

type UpdateWebAnalyticsSiteParams struct {SiteTagstring `json:"-"`// Host is the host to measure traffic for.Hoststring `json:"host,omitempty"`// ZoneTag is the zone tag to measure traffic for.ZoneTagstring `json:"zone_tag,omitempty"`// AutoInstall defines whether Cloudflare will inject the JS snippet automatically for orange-clouded sites.AutoInstall *bool `json:"auto_install"`}

typeUpdateWorkerCronTriggersParamsadded inv0.57.0

type UpdateWorkerCronTriggersParams struct {ScriptNamestringCrons      []WorkerCronTrigger}

typeUpdateWorkerRouteParamsadded inv0.57.0

type UpdateWorkerRouteParams struct {IDstring `json:"id,omitempty"`Patternstring `json:"pattern"`Scriptstring `json:"script,omitempty"`}

typeUpdateWorkersKVNamespaceParamsadded inv0.55.0

type UpdateWorkersKVNamespaceParams struct {NamespaceIDstring `json:"-"`Titlestring `json:"title"`}

typeUpdateWorkersScriptContentParamsadded inv0.76.0

type UpdateWorkersScriptContentParams struct {ScriptNamestringScriptstring// DispatchNamespaceName uploads the worker to a WFP dispatch namespace if providedDispatchNamespaceName *string// Module changes the Content-Type header to specify the script is an// ES Module syntax script.Modulebool}

typeUpdateWorkersScriptSettingsParamsadded inv0.76.0

type UpdateWorkersScriptSettingsParams struct {ScriptNamestring// Logpush opts the worker into Workers Logpush logging. A nil value leaves// the current setting unchanged.//// Documentation:https://developers.cloudflare.com/workers/platform/logpush/Logpush *bool// TailConsumers specifies a list of Workers that will consume the logs of// the attached Worker.// Documentation:https://developers.cloudflare.com/workers/platform/tail-workers/TailConsumers *[]WorkersTailConsumer// Bindings should be a map where the keys are the binding name, and the// values are the binding contentBindings map[string]WorkerBinding// CompatibilityDate is a date in the form yyyy-mm-dd,// which will be used to determine which version of the Workers runtime is used.//https://developers.cloudflare.com/workers/platform/compatibility-dates/CompatibilityDatestring// CompatibilityFlags are the names of features of the Workers runtime to be enabled or disabled,// usually used together with CompatibilityDate.//https://developers.cloudflare.com/workers/platform/compatibility-dates/#compatibility-flagsCompatibilityFlags []stringPlacement *Placement}

typeUpdateZarazConfigParamsadded inv0.86.0

type UpdateZarazConfigParams struct {DebugKeystring                   `json:"debugKey"`Tools         map[string]ZarazTool     `json:"tools"`Triggers      map[string]ZarazTrigger  `json:"triggers"`ZarazVersionint64                    `json:"zarazVersion"`ConsentZarazConsent             `json:"consent,omitempty"`DataLayer     *bool                    `json:"dataLayer,omitempty"`Dlp           []any                    `json:"dlp,omitempty"`HistoryChange *bool                    `json:"historyChange,omitempty"`SettingsZarazConfigSettings      `json:"settings,omitempty"`Variables     map[string]ZarazVariable `json:"variables,omitempty"`}

typeUpdateZarazWorkflowParamsadded inv0.86.0

type UpdateZarazWorkflowParams struct {Workflowstring `json:"workflow"`}

typeUpdateZoneSettingParamsadded inv0.64.0

type UpdateZoneSettingParams struct {Namestring      `json:"-"`PathPrefixstring      `json:"-"`Value      interface{} `json:"value"`}

typeUploadDLPDatasetVersionParamsadded inv0.87.0

type UploadDLPDatasetVersionParams struct {DatasetIDstringVersionintBody      interface{}}

typeUploadDLPDatasetVersionResponseadded inv0.87.0

type UploadDLPDatasetVersionResponse struct {ResultDLPDataset `json:"result"`Response}

typeUploadImageParamsadded inv0.71.0

type UploadImageParams struct {Fileio.ReadCloserURLstringNamestringRequireSignedURLsboolMetadata          map[string]interface{}}

UploadImageParams is the data required for an Image Upload request.

typeUploadVideoURLWatermarkadded inv0.44.0

type UploadVideoURLWatermark struct {UIDstring `json:"uid,omitempty"`}

UploadVideoURLWatermark represents UID of an existing watermark.

typeUsageModeladded inv0.56.0

type UsageModelstring
const (BundledUsageModel = "bundled"UnboundUsageModel = "unbound"StandardUsageModel = "standard")

typeUseradded inv0.7.2

type User struct {IDstring     `json:"id,omitempty"`Emailstring     `json:"email,omitempty"`FirstNamestring     `json:"first_name,omitempty"`LastNamestring     `json:"last_name,omitempty"`Usernamestring     `json:"username,omitempty"`Telephonestring     `json:"telephone,omitempty"`Countrystring     `json:"country,omitempty"`Zipcodestring     `json:"zipcode,omitempty"`CreatedOn  *time.Time `json:"created_on,omitempty"`ModifiedOn *time.Time `json:"modified_on,omitempty"`APIKeystring     `json:"api_key,omitempty"`TwoFAbool       `json:"two_factor_authentication_enabled,omitempty"`Betas      []string   `json:"betas,omitempty"`Accounts   []Account  `json:"organizations,omitempty"`}

User describes a user account.

typeUserAgentRuleadded inv0.8.0

type UserAgentRule struct {IDstring              `json:"id"`Descriptionstring              `json:"description"`Modestring              `json:"mode"`ConfigurationUserAgentRuleConfig `json:"configuration"`Pausedbool                `json:"paused"`}

UserAgentRule represents a User-Agent Block. These rules can be used tochallenge, block or whitelist specific User-Agents for a given zone.

typeUserAgentRuleConfigadded inv0.8.0

type UserAgentRuleConfigZoneLockdownConfig

UserAgentRuleConfig represents a Zone Lockdown config, which comprisesa Target ("ip" or "ip_range") and a Value (an IP address or IP+mask,respectively.)

typeUserAgentRuleListResponseadded inv0.8.0

type UserAgentRuleListResponse struct {Result []UserAgentRule `json:"result"`ResponseResultInfo `json:"result_info"`}

UserAgentRuleListResponse represents a response from the List Zone Lockdown endpoint.

typeUserAgentRuleResponseadded inv0.8.0

type UserAgentRuleResponse struct {ResultUserAgentRule `json:"result"`ResponseResultInfo `json:"result_info"`}

UserAgentRuleResponse represents a response from the Zone Lockdown endpoint.

typeUserBillingHistoryadded inv0.43.0

type UserBillingHistory struct {IDstring                 `json:"id,omitempty"`Typestring                 `json:"type,omitempty"`Actionstring                 `json:"action,omitempty"`Descriptionstring                 `json:"description,omitempty"`OccurredAt  *time.Time             `json:"occurred_at,omitempty"`Amountfloat32                `json:"amount,omitempty"`Currencystring                 `json:"currency,omitempty"`Zone        userBillingHistoryZone `json:"zone"`}

typeUserBillingHistoryResponseadded inv0.43.0

type UserBillingHistoryResponse struct {ResponseResult     []UserBillingHistory `json:"result"`ResultInfoResultInfo           `json:"result_info"`}

typeUserBillingOptionsadded inv0.43.0

type UserBillingOptions struct {PaginationOptionsOrderstring     `url:"order,omitempty"`Typestring     `url:"type,omitempty"`OccurredAt *time.Time `url:"occurred_at,omitempty"`Actionstring     `url:"action,omitempty"`}

typeUserBillingProfileadded inv0.7.3

type UserBillingProfile struct {IDstring     `json:"id,omitempty"`FirstNamestring     `json:"first_name,omitempty"`LastNamestring     `json:"last_name,omitempty"`Addressstring     `json:"address,omitempty"`Address2string     `json:"address2,omitempty"`Companystring     `json:"company,omitempty"`Citystring     `json:"city,omitempty"`Statestring     `json:"state,omitempty"`ZipCodestring     `json:"zipcode,omitempty"`Countrystring     `json:"country,omitempty"`Telephonestring     `json:"telephone,omitempty"`CardNumberstring     `json:"card_number,omitempty"`CardExpiryYearint        `json:"card_expiry_year,omitempty"`CardExpiryMonthint        `json:"card_expiry_month,omitempty"`VATstring     `json:"vat,omitempty"`CreatedOn       *time.Time `json:"created_on,omitempty"`EditedOn        *time.Time `json:"edited_on,omitempty"`}

UserBillingProfile contains Billing Profile information.

typeUserItemadded inv0.32.0

type UserItem struct {IDstring `json:"id,omitempty"`Namestring `json:"name,omitempty"`Emailstring `json:"email,omitempty"`}

typeUserResponseadded inv0.7.2

type UserResponse struct {ResponseResultUser `json:"result"`}

UserResponse wraps a response containing User accounts.

typeValidateLogpushOwnershipChallengeParamsadded inv0.72.0

type ValidateLogpushOwnershipChallengeParams struct {DestinationConfstring `json:"destination_conf"`OwnershipChallengestring `json:"ownership_challenge"`}

typeValidationDataadded inv0.44.0

type ValidationData struct {Statusstring `json:"status"`Methodstring `json:"method"`}

ValidationData represents validation data for a domain.

typeVerificationDataadded inv0.44.0

type VerificationData struct {Statusstring `json:"status"`}

VerificationData represents verification data for a domain.

typeWAFGroupadded inv0.10.0

type WAFGroup struct {IDstring   `json:"id"`Namestring   `json:"name"`Descriptionstring   `json:"description"`RulesCountint      `json:"rules_count"`ModifiedRulesCountint      `json:"modified_rules_count"`PackageIDstring   `json:"package_id"`Modestring   `json:"mode"`AllowedModes       []string `json:"allowed_modes"`}

WAFGroup represents a WAF rule group.

typeWAFGroupResponseadded inv0.10.1

type WAFGroupResponse struct {ResponseResultWAFGroup   `json:"result"`ResultInfoResultInfo `json:"result_info"`}

WAFGroupResponse represents the response from the WAF group endpoint.

typeWAFGroupsResponseadded inv0.10.0

type WAFGroupsResponse struct {ResponseResult     []WAFGroup `json:"result"`ResultInfoResultInfo `json:"result_info"`}

WAFGroupsResponse represents the response from the WAF groups endpoint.

typeWAFOverrideadded inv0.11.1

type WAFOverride struct {IDstring            `json:"id,omitempty"`Descriptionstring            `json:"description"`URLs          []string          `json:"urls"`Priorityint               `json:"priority"`Groups        map[string]string `json:"groups"`RewriteAction map[string]string `json:"rewrite_action"`Rules         map[string]string `json:"rules"`Pausedbool              `json:"paused"`}

WAFOverride represents a WAF override.

typeWAFOverrideResponseadded inv0.11.1

type WAFOverrideResponse struct {ResponseResultWAFOverride `json:"result"`ResultInfoResultInfo  `json:"result_info"`}

WAFOverrideResponse represents the response form the WAF override endpoint.

typeWAFOverridesResponseadded inv0.11.1

type WAFOverridesResponse struct {ResponseResult     []WAFOverride `json:"result"`ResultInfoResultInfo    `json:"result_info"`}

WAFOverridesResponse represents the response form the WAF overrides endpoint.

typeWAFPackageadded inv0.7.2

type WAFPackage struct {IDstring `json:"id"`Namestring `json:"name"`Descriptionstring `json:"description"`ZoneIDstring `json:"zone_id"`DetectionModestring `json:"detection_mode"`Sensitivitystring `json:"sensitivity"`ActionModestring `json:"action_mode"`}

WAFPackage represents a WAF package configuration.

typeWAFPackageOptionsadded inv0.10.0

type WAFPackageOptions struct {Sensitivitystring `json:"sensitivity,omitempty"`ActionModestring `json:"action_mode,omitempty"`}

WAFPackageOptions represents options to edit a WAF package.

typeWAFPackageResponseadded inv0.10.0

type WAFPackageResponse struct {ResponseResultWAFPackage `json:"result"`ResultInfoResultInfo `json:"result_info"`}

WAFPackageResponse represents the response from the WAF package endpoint.

typeWAFPackagesResponseadded inv0.7.2

type WAFPackagesResponse struct {ResponseResult     []WAFPackage `json:"result"`ResultInfoResultInfo   `json:"result_info"`}

WAFPackagesResponse represents the response from the WAF packages endpoint.

typeWAFRuleadded inv0.7.2

type WAFRule struct {IDstring `json:"id"`Descriptionstring `json:"description"`Prioritystring `json:"priority"`PackageIDstring `json:"package_id"`Group       struct {IDstring `json:"id"`Namestring `json:"name"`} `json:"group"`Modestring   `json:"mode"`DefaultModestring   `json:"default_mode"`AllowedModes []string `json:"allowed_modes"`}

WAFRule represents a WAF rule.

typeWAFRuleOptionsadded inv0.9.0

type WAFRuleOptions struct {Modestring `json:"mode"`}

WAFRuleOptions is a subset of WAFRule, for editable options.

typeWAFRuleResponseadded inv0.9.0

type WAFRuleResponse struct {ResponseResultWAFRule    `json:"result"`ResultInfoResultInfo `json:"result_info"`}

WAFRuleResponse represents the response from the WAF rule endpoint.

typeWAFRulesResponseadded inv0.7.2

type WAFRulesResponse struct {ResponseResult     []WAFRule  `json:"result"`ResultInfoResultInfo `json:"result_info"`}

WAFRulesResponse represents the response from the WAF rules endpoint.

typeWHOISadded inv0.44.0

type WHOIS struct {Domainstring   `json:"domain,omitempty"`CreatedDatestring   `json:"created_date,omitempty"`UpdatedDatestring   `json:"updated_date,omitempty"`Registrantstring   `json:"registrant,omitempty"`RegistrantOrgstring   `json:"registrant_org,omitempty"`RegistrantCountrystring   `json:"registrant_country,omitempty"`RegistrantEmailstring   `json:"registrant_email,omitempty"`Registrarstring   `json:"registrar,omitempty"`Nameservers       []string `json:"nameservers,omitempty"`}

WHOIS represents whois information.

typeWHOISParametersadded inv0.44.0

type WHOISParameters struct {AccountIDstring `url:"-"`Domainstring `url:"domain"`}

WHOISParameters represents parameters for a who is request.

typeWHOISResponseadded inv0.44.0

type WHOISResponse struct {ResponseResultWHOIS `json:"result,omitempty"`}

WHOISResponse represents an API response for a whois request.

typeWaitingRoomadded inv0.17.0

type WaitingRoom struct {CreatedOntime.Time                    `json:"created_on,omitempty"`ModifiedOntime.Time                    `json:"modified_on,omitempty"`Pathstring                       `json:"path"`Namestring                       `json:"name"`Descriptionstring                       `json:"description,omitempty"`QueueingMethodstring                       `json:"queueing_method,omitempty"`CustomPageHTMLstring                       `json:"custom_page_html,omitempty"`DefaultTemplateLanguagestring                       `json:"default_template_language,omitempty"`Hoststring                       `json:"host"`IDstring                       `json:"id,omitempty"`NewUsersPerMinuteint                          `json:"new_users_per_minute"`TotalActiveUsersint                          `json:"total_active_users"`SessionDurationint                          `json:"session_duration"`QueueAllbool                         `json:"queue_all"`DisableSessionRenewalbool                         `json:"disable_session_renewal"`Suspendedbool                         `json:"suspended"`JsonResponseEnabledbool                         `json:"json_response_enabled"`NextEventPrequeueStartTime *time.Time                   `json:"next_event_prequeue_start_time,omitempty"`NextEventStartTime         *time.Time                   `json:"next_event_start_time,omitempty"`CookieSuffixstring                       `json:"cookie_suffix"`AdditionalRoutes           []*WaitingRoomRoute          `json:"additional_routes,omitempty"`QueueingStatusCodeint                          `json:"queueing_status_code"`EnabledOriginCommands      []string                     `json:"enabled_origin_commands,omitempty"`CookieAttributes           *WaitingRoomCookieAttributes `json:"cookie_attributes,omitempty"`TurnstileModestring                       `json:"turnstile_mode,omitempty"`TurnstileActionstring                       `json:"turnstile_action,omitempty"`}

WaitingRoom describes a WaitingRoom object.

typeWaitingRoomCookieAttributesadded inv0.108.0

type WaitingRoomCookieAttributes struct {Samesitestring `json:"samesite"`Securestring `json:"secure"`}

WaitingRoomCookieAttributes describes a WaitingRoomCookieAttributes object.

typeWaitingRoomDetailResponseadded inv0.17.0

type WaitingRoomDetailResponse struct {ResponseResultWaitingRoom `json:"result"`}

WaitingRoomDetailResponse is the API response, containing a single WaitingRoom.

typeWaitingRoomEventadded inv0.33.0

type WaitingRoomEvent struct {EventEndTimetime.Time  `json:"event_end_time"`CreatedOntime.Time  `json:"created_on,omitempty"`ModifiedOntime.Time  `json:"modified_on,omitempty"`PrequeueStartTime     *time.Time `json:"prequeue_start_time,omitempty"`EventStartTimetime.Time  `json:"event_start_time"`Namestring     `json:"name"`Descriptionstring     `json:"description,omitempty"`QueueingMethodstring     `json:"queueing_method,omitempty"`IDstring     `json:"id,omitempty"`CustomPageHTMLstring     `json:"custom_page_html,omitempty"`NewUsersPerMinuteint        `json:"new_users_per_minute,omitempty"`TotalActiveUsersint        `json:"total_active_users,omitempty"`SessionDurationint        `json:"session_duration,omitempty"`DisableSessionRenewal *bool      `json:"disable_session_renewal,omitempty"`Suspendedbool       `json:"suspended"`ShuffleAtEventStartbool       `json:"shuffle_at_event_start"`TurnstileModestring     `json:"turnstile_mode,omitempty"`TurnstileActionstring     `json:"turnstile_action,omitempty"`}

WaitingRoomEvent describes a WaitingRoomEvent object.

typeWaitingRoomEventDetailResponseadded inv0.33.0

type WaitingRoomEventDetailResponse struct {ResponseResultWaitingRoomEvent `json:"result"`}

WaitingRoomEventDetailResponse is the API response, containing a single WaitingRoomEvent.

typeWaitingRoomEventsResponseadded inv0.33.0

type WaitingRoomEventsResponse struct {ResponseResult []WaitingRoomEvent `json:"result"`}

WaitingRoomEventsResponse is the API response, containing an array of WaitingRoomEvents.

typeWaitingRoomPagePreviewCustomHTMLadded inv0.34.0

type WaitingRoomPagePreviewCustomHTML struct {CustomHTMLstring `json:"custom_html"`}

WaitingRoomPagePreviewCustomHTML describes a WaitingRoomPagePreviewCustomHTML object.

typeWaitingRoomPagePreviewResponseadded inv0.34.0

type WaitingRoomPagePreviewResponse struct {ResponseResultWaitingRoomPagePreviewURL `json:"result"`}

WaitingRoomPagePreviewResponse is the API response, containing the URL to a custom waiting room preview.

typeWaitingRoomPagePreviewURLadded inv0.34.0

type WaitingRoomPagePreviewURL struct {PreviewURLstring `json:"preview_url"`}

WaitingRoomPagePreviewURL describes a WaitingRoomPagePreviewURL object.

typeWaitingRoomRouteadded inv0.70.0

type WaitingRoomRoute struct {Hoststring `json:"host"`Pathstring `json:"path"`}

WaitingRoomRoute describes a WaitingRoomRoute object.

typeWaitingRoomRuleadded inv0.53.0

type WaitingRoomRule struct {IDstring     `json:"id,omitempty"`Versionstring     `json:"version,omitempty"`Actionstring     `json:"action"`Expressionstring     `json:"expression"`Descriptionstring     `json:"description"`LastUpdated *time.Time `json:"last_updated,omitempty"`Enabled     *bool      `json:"enabled"`}

typeWaitingRoomRulesResponseadded inv0.53.0

type WaitingRoomRulesResponse struct {ResponseResult []WaitingRoomRule `json:"result"`}

WaitingRoomRulesResponse is the API response, containing an array of WaitingRoomRule.

typeWaitingRoomSettingsadded inv0.67.0

type WaitingRoomSettings struct {// Whether to allow verified search engine crawlers to bypass all waiting rooms on this zoneSearchEngineCrawlerBypassbool `json:"search_engine_crawler_bypass"`}

WaitingRoomSettings describes zone-level waiting room settings.

typeWaitingRoomSettingsResponseadded inv0.67.0

type WaitingRoomSettingsResponse struct {ResponseResultWaitingRoomSettings `json:"result"`}

WaitingRoomSettingsResponse is the API response, containing zone-level Waiting Room settings.

typeWaitingRoomStatusadded inv0.33.0

type WaitingRoomStatus struct {Statusstring `json:"status"`EventIDstring `json:"event_id"`EstimatedQueuedUsersint    `json:"estimated_queued_users"`EstimatedTotalActiveUsersint    `json:"estimated_total_active_users"`MaxEstimatedTimeMinutesint    `json:"max_estimated_time_minutes"`}

WaitingRoomStatus describes the status of a waiting room.

typeWaitingRoomStatusResponseadded inv0.33.0

type WaitingRoomStatusResponse struct {ResponseResultWaitingRoomStatus `json:"result"`}

WaitingRoomStatusResponse is the API response, containing the status of a waiting room.

typeWaitingRoomsResponseadded inv0.17.0

type WaitingRoomsResponse struct {ResponseResult []WaitingRoom `json:"result"`}

WaitingRoomsResponse is the API response, containing an array of WaitingRooms.

typeWarpRoutingConfigadded inv0.43.0

type WarpRoutingConfig struct {Enabledbool `json:"enabled,omitempty"`}

typeWeb3Hostnameadded inv0.45.0

type Web3Hostname struct {IDstring     `json:"id,omitempty"`Namestring     `json:"name,omitempty"`Descriptionstring     `json:"description,omitempty"`Statusstring     `json:"status,omitempty"`Targetstring     `json:"target,omitempty"`Dnslinkstring     `json:"dnslink,omitempty"`CreatedOn   *time.Time `json:"created_on,omitempty"`ModifiedOn  *time.Time `json:"modified_on,omitempty"`}

Web3Hostname represents a web3 hostname.

typeWeb3HostnameCreateParametersadded inv0.45.0

type Web3HostnameCreateParameters struct {ZoneIDstringNamestring `json:"name,omitempty"`Targetstring `json:"target,omitempty"`Descriptionstring `json:"description,omitempty"`DNSLinkstring `json:"dnslink,omitempty"`}

Web3HostnameCreateParameters represents the parameters for creating a web3 hostname.

typeWeb3HostnameDeleteResponse

type Web3HostnameDeleteResponse struct {ResponseResultWeb3HostnameDeleteResult `json:"result,omitempty"`}

Web3HostnameDeleteResponse represents the API response body for deleting a web3 hostname.

typeWeb3HostnameDeleteResultadded inv0.45.0

type Web3HostnameDeleteResult struct {IDstring `json:"id,omitempty"`}

Web3HostnameDeleteResult represents the result of deleting a web3 hostname.

typeWeb3HostnameDetailsParametersadded inv0.45.0

type Web3HostnameDetailsParameters struct {ZoneIDstringIdentifierstring}

Web3HostnameDetailsParameters represents the parameters for getting a single web3 hostname.

typeWeb3HostnameListParametersadded inv0.45.0

type Web3HostnameListParameters struct {ZoneIDstring}

Web3HostnameListParameters represents the parameters for listing web3 hostnames.

typeWeb3HostnameListResponse

type Web3HostnameListResponse struct {ResponseResult []Web3Hostname `json:"result"`}

Web3HostnameListResponse represents the API response body for listing web3 hostnames.

typeWeb3HostnameResponseadded inv0.45.0

type Web3HostnameResponse struct {ResponseResultWeb3Hostname `json:"result,omitempty"`}

Web3HostnameResponse represents an API response body for a web3 hostname.

typeWeb3HostnameUpdateParametersadded inv0.45.0

type Web3HostnameUpdateParameters struct {ZoneIDstringIdentifierstringDescriptionstring `json:"description,omitempty"`DNSLinkstring `json:"dnslink,omitempty"`}

Web3HostnameUpdateParameters represents the parameters for editing a web3 hostname.

typeWebAnalyticsIDResponseadded inv0.75.0

type WebAnalyticsIDResponse struct {ResponseResult struct {IDstring `json:"id"`} `json:"result"`}

WebAnalyticsIDResponse is the API response, containing a single ID.

typeWebAnalyticsRuleadded inv0.75.0

type WebAnalyticsRule struct {IDstring   `json:"id,omitempty"`Hoststring   `json:"host"`Paths []string `json:"paths"`// Inclusive defines whether the rule includes or excludes the matched traffic from being measured in web analytics.Inclusivebool       `json:"inclusive"`Created   *time.Time `json:"created,omitempty"`// IsPaused defines whether the rule is paused (inactive) or not.IsPausedbool `json:"is_paused"`Priorityint  `json:"priority,omitempty"`}

WebAnalyticsRule describes a Web Analytics Rule object.

typeWebAnalyticsRuleResponseadded inv0.75.0

type WebAnalyticsRuleResponse struct {ResponseResultWebAnalyticsRule `json:"result"`}

WebAnalyticsRuleResponse is the API response, containing a single WebAnalyticsRule.

typeWebAnalyticsRulesResponseadded inv0.75.0

type WebAnalyticsRulesResponse struct {ResponseResultWebAnalyticsRulesetRules `json:"result"`}

WebAnalyticsRulesResponse is the API response, containing a WebAnalyticsRuleset and array of WebAnalyticsRule.

typeWebAnalyticsRulesetadded inv0.75.0

type WebAnalyticsRuleset struct {IDstring `json:"id"`ZoneTagstring `json:"zone_tag"`ZoneNamestring `json:"zone_name"`Enabledbool   `json:"enabled"`}

WebAnalyticsRuleset describes a Web Analytics Ruleset object.

typeWebAnalyticsRulesetRulesadded inv0.75.0

type WebAnalyticsRulesetRules struct {RulesetWebAnalyticsRuleset `json:"ruleset"`Rules   []WebAnalyticsRule  `json:"rules"`}

typeWebAnalyticsSiteadded inv0.75.0

type WebAnalyticsSite struct {SiteTagstring     `json:"site_tag"`SiteTokenstring     `json:"site_token"`Created   *time.Time `json:"created,omitempty"`// Snippet is an encoded JS script to insert into your site HTML.Snippetstring `json:"snippet"`// AutoInstall defines whether Cloudflare will inject the JS snippet automatically for orange-clouded sites.AutoInstallbool                `json:"auto_install"`RulesetWebAnalyticsRuleset `json:"ruleset"`Rules       []WebAnalyticsRule  `json:"rules"`}

WebAnalyticsSite describes a Web Analytics Site object.

typeWebAnalyticsSiteResponseadded inv0.75.0

type WebAnalyticsSiteResponse struct {ResponseResultWebAnalyticsSite `json:"result"`}

WebAnalyticsSiteResponse is the API response, containing a single WebAnalyticsSite.

typeWebAnalyticsSiteTagResponseadded inv0.75.0

type WebAnalyticsSiteTagResponse struct {ResponseResult struct {SiteTagstring `json:"site_tag"`} `json:"result"`}

WebAnalyticsSiteTagResponse is the API response, containing a single ID.

typeWebAnalyticsSitesResponseadded inv0.75.0

type WebAnalyticsSitesResponse struct {ResponseResultInfoResultInfo         `json:"result_info"`Result     []WebAnalyticsSite `json:"result"`}

WebAnalyticsSitesResponse is the API response, containing an array of WebAnalyticsSite.

typeWorkerAnalyticsEngineBindingadded inv0.56.0

type WorkerAnalyticsEngineBinding struct {Datasetstring}

WorkerAnalyticsEngineBinding is a binding to an Analytics Engine dataset.

func (WorkerAnalyticsEngineBinding)Typeadded inv0.56.0

Type returns the type of the binding.

typeWorkerBindingadded inv0.10.7

type WorkerBinding interface {Type()WorkerBindingType// contains filtered or unexported methods}

WorkerBinding is the generic interface implemented by all ofthe various binding types.

typeWorkerBindingListItemadded inv0.10.7

type WorkerBindingListItem struct {Namestring `json:"name"`BindingWorkerBinding}

WorkerBindingListItem a struct representing an individual binding in a list of bindings.

typeWorkerBindingListResponseadded inv0.10.7

type WorkerBindingListResponse struct {ResponseBindingList []WorkerBindingListItem}

WorkerBindingListResponse wrapper struct for API response to worker binding list API call.

typeWorkerBindingTypeadded inv0.10.7

type WorkerBindingTypestring

WorkerBindingType represents a particular type of binding.

const (// WorkerDurableObjectBindingType is the type for Durable Object bindings.WorkerDurableObjectBindingTypeWorkerBindingType = "durable_object_namespace"// WorkerInheritBindingType is the type for inherited bindings.WorkerInheritBindingTypeWorkerBindingType = "inherit"// WorkerKvNamespaceBindingType is the type for KV Namespace bindings.WorkerKvNamespaceBindingTypeWorkerBindingType = "kv_namespace"// WorkerWebAssemblyBindingType is the type for Web Assembly module bindings.WorkerWebAssemblyBindingTypeWorkerBindingType = "wasm_module"// WorkerSecretTextBindingType is the type for secret text bindings.WorkerSecretTextBindingTypeWorkerBindingType = "secret_text"// WorkerPlainTextBindingType is the type for plain text bindings.WorkerPlainTextBindingTypeWorkerBindingType = "plain_text"// WorkerServiceBindingType is the type for service bindings.WorkerServiceBindingTypeWorkerBindingType = "service"// WorkerR2BucketBindingType is the type for R2 bucket bindings.WorkerR2BucketBindingTypeWorkerBindingType = "r2_bucket"// WorkerAnalyticsEngineBindingType is the type for Analytics Engine dataset bindings.WorkerAnalyticsEngineBindingTypeWorkerBindingType = "analytics_engine"// WorkerQueueBindingType is the type for queue bindings.WorkerQueueBindingTypeWorkerBindingType = "queue"// DispatchNamespaceBindingType is the type for WFP namespace bindings.DispatchNamespaceBindingTypeWorkerBindingType = "dispatch_namespace"// WorkerD1DataseBindingType is for D1 databases.WorkerD1DataseBindingTypeWorkerBindingType = "d1"// WorkerHyperdriveBindingType is for Hyperdrive config bindings.WorkerHyperdriveBindingTypeWorkerBindingType = "hyperdrive")

func (WorkerBindingType)Stringadded inv0.10.7

func (bWorkerBindingType) String()string

typeWorkerCronTriggeradded inv0.13.8

type WorkerCronTrigger struct {Cronstring     `json:"cron"`CreatedOn  *time.Time `json:"created_on,omitempty"`ModifiedOn *time.Time `json:"modified_on,omitempty"`}

WorkerCronTrigger holds an individual cron schedule for a worker.

typeWorkerCronTriggerResponseadded inv0.13.8

type WorkerCronTriggerResponse struct {ResponseResultWorkerCronTriggerSchedules `json:"result"`}

WorkerCronTriggerResponse represents the response from the Worker cron triggerAPI endpoint.

typeWorkerCronTriggerSchedulesadded inv0.13.8

type WorkerCronTriggerSchedules struct {Schedules []WorkerCronTrigger `json:"schedules"`}

WorkerCronTriggerSchedules contains the schedule of Worker cron triggers.

typeWorkerD1DatabaseBindingadded inv0.83.0

type WorkerD1DatabaseBinding struct {DatabaseIDstring}

WorkerD1DatabaseBinding is a binding to a D1 instance.

func (WorkerD1DatabaseBinding)Typeadded inv0.83.0

Type returns the type of the binding.

typeWorkerDurableObjectBindingadded inv0.43.0

type WorkerDurableObjectBinding struct {ClassNamestringScriptNamestring}

WorkerDurableObjectBinding is a binding to a Workers Durable Object.

https://api.cloudflare.com/#durable-objects-namespace-properties

func (WorkerDurableObjectBinding)Typeadded inv0.43.0

Type returns the type of the binding.

typeWorkerHyperdriveBindingadded inv0.102.0

type WorkerHyperdriveBinding struct {BindingstringConfigIDstring}

WorkerHyperdriveBinding is a binding to a Hyperdrive config.

func (WorkerHyperdriveBinding)Typeadded inv0.102.0

Type returns the type of the binding.

typeWorkerInheritBindingadded inv0.10.7

type WorkerInheritBinding struct {// Optional parameter that allows for renaming a binding without changing// its contents. If `OldName` is empty, the binding name will not be changed.OldNamestring}

WorkerInheritBinding will just persist whatever binding content was previously uploaded.

func (WorkerInheritBinding)Typeadded inv0.10.7

Type returns the type of the binding.

typeWorkerKvNamespaceBindingadded inv0.10.7

type WorkerKvNamespaceBinding struct {NamespaceIDstring}

WorkerKvNamespaceBinding is a binding to a Workers KV Namespace.

https://developers.cloudflare.com/workers/archive/api/resource-bindings/kv-namespaces/

func (WorkerKvNamespaceBinding)Typeadded inv0.10.7

Type returns the type of the binding.

typeWorkerListResponseadded inv0.9.0

type WorkerListResponse struct {ResponseResultInfoWorkerList []WorkerMetaData `json:"result"`}

WorkerListResponse wrapper struct for API response to worker script list API call.

typeWorkerMetaDataadded inv0.9.0

type WorkerMetaData struct {IDstring                 `json:"id,omitempty"`ETAGstring                 `json:"etag,omitempty"`Sizeint                    `json:"size,omitempty"`CreatedOntime.Time              `json:"created_on,omitempty"`ModifiedOntime.Time              `json:"modified_on,omitempty"`Logpush          *bool                  `json:"logpush,omitempty"`TailConsumers    *[]WorkersTailConsumer `json:"tail_consumers,omitempty"`LastDeployedFrom *string                `json:"last_deployed_from,omitempty"`DeploymentId     *string                `json:"deployment_id,omitempty"`PlacementFieldsPipelineHash *string `json:"pipeline_hash,omitempty"`}

WorkerMetaData contains worker script information such as size, creation & modification dates.

typeWorkerPlainTextBindingadded inv0.12.0

type WorkerPlainTextBinding struct {Textstring}

WorkerPlainTextBinding is a binding to plain text.

https://developers.cloudflare.com/workers/tooling/api/scripts/#add-a-plain-text-binding

func (WorkerPlainTextBinding)Typeadded inv0.12.0

Type returns the type of the binding.

typeWorkerQueueBindingadded inv0.59.0

type WorkerQueueBinding struct {BindingstringQueuestring}

WorkerQueueBinding is a binding to a Workers Queue.

https://developers.cloudflare.com/workers/platform/bindings/#queue-bindings

func (WorkerQueueBinding)Typeadded inv0.59.0

Type returns the type of the binding.

typeWorkerR2BucketBindingadded inv0.44.0

type WorkerR2BucketBinding struct {BucketNamestring}

WorkerR2BucketBinding is a binding to an R2 bucket.

func (WorkerR2BucketBinding)Typeadded inv0.44.0

Type returns the type of the binding.

typeWorkerReferenceadded inv0.74.0

type WorkerReference struct {ServicestringEnvironment *string}

typeWorkerRequestParamsadded inv0.9.0

type WorkerRequestParams struct {ZoneIDstringScriptNamestring}

WorkerRequestParams provides parameters for worker requests for both enterprise and standard requests.

typeWorkerRouteadded inv0.9.0

type WorkerRoute struct {IDstring `json:"id,omitempty"`Patternstring `json:"pattern"`ScriptNamestring `json:"script,omitempty"`}

WorkerRoute is used to map traffic matching a URL pattern to a workers

API reference:https://api.cloudflare.com/#worker-routes-properties

typeWorkerRouteResponseadded inv0.9.0

type WorkerRouteResponse struct {ResponseWorkerRoute `json:"result"`}

WorkerRouteResponse embeds Response struct and a single WorkerRoute.

typeWorkerRoutesResponseadded inv0.9.0

type WorkerRoutesResponse struct {ResponseRoutes []WorkerRoute `json:"result"`}

WorkerRoutesResponse embeds Response struct and slice of WorkerRoutes.

typeWorkerScriptadded inv0.9.0

type WorkerScript struct {WorkerMetaDataScriptstring `json:"script"`UsageModelstring `json:"usage_model,omitempty"`}

WorkerScript Cloudflare Worker struct with metadata.

typeWorkerScriptParamsadded inv0.10.7

type WorkerScriptParams struct {ScriptNamestring// Module changes the Content-Type header to specify the script is an// ES Module syntax script.Modulebool// Bindings should be a map where the keys are the binding name, and the// values are the binding contentBindings map[string]WorkerBinding}

WorkerScriptParams provides a worker script and the associated bindings.

typeWorkerScriptResponseadded inv0.9.0

type WorkerScriptResponse struct {ResponseModuleboolWorkerScript `json:"result"`}

WorkerScriptResponse wrapper struct for API response to worker script calls.

typeWorkerScriptSettingsResponseadded inv0.76.0

type WorkerScriptSettingsResponse struct {ResponseWorkerMetaData}

WorkerScriptSettingsResponse wrapper struct for API response to worker script settings calls.

typeWorkerSecretTextBindingadded inv0.12.0

type WorkerSecretTextBinding struct {Textstring}

WorkerSecretTextBinding is a binding to secret text.

https://developers.cloudflare.com/workers/tooling/api/scripts/#add-a-secret-text-binding

func (WorkerSecretTextBinding)Typeadded inv0.12.0

Type returns the type of the binding.

typeWorkerServiceBindingadded inv0.43.0

type WorkerServiceBinding struct {ServicestringEnvironment *string}

func (WorkerServiceBinding)Typeadded inv0.43.0

typeWorkerWebAssemblyBindingadded inv0.10.7

type WorkerWebAssemblyBinding struct {Moduleio.Reader}

WorkerWebAssemblyBinding is a binding to a WebAssembly module.

https://developers.cloudflare.com/workers/archive/api/resource-bindings/webassembly-modules/

func (WorkerWebAssemblyBinding)Typeadded inv0.10.7

Type returns the type of the binding.

typeWorkersAccountSettingsadded inv0.47.0

type WorkersAccountSettings struct {DefaultUsageModelstring `json:"default_usage_model,omitempty"`GreenComputebool   `json:"green_compute,omitempty"`}

typeWorkersAccountSettingsParametersadded inv0.47.0

type WorkersAccountSettingsParameters struct{}

typeWorkersAccountSettingsResponseadded inv0.47.0

type WorkersAccountSettingsResponse struct {ResponseResultWorkersAccountSettings}

typeWorkersDomainadded inv0.55.0

type WorkersDomain struct {IDstring `json:"id,omitempty"`ZoneIDstring `json:"zone_id,omitempty"`ZoneNamestring `json:"zone_name,omitempty"`Hostnamestring `json:"hostname,omitempty"`Servicestring `json:"service,omitempty"`Environmentstring `json:"environment,omitempty"`}

typeWorkersDomainListResponseadded inv0.55.0

type WorkersDomainListResponse struct {ResponseResult []WorkersDomain `json:"result"`}

typeWorkersDomainResponseadded inv0.55.0

type WorkersDomainResponse struct {ResponseResultWorkersDomain `json:"result"`}

typeWorkersForPlatformsDispatchNamespaceadded inv0.90.0

type WorkersForPlatformsDispatchNamespace struct {NamespaceIdstring     `json:"namespace_id"`NamespaceNamestring     `json:"namespace_name"`CreatedOn     *time.Time `json:"created_on,omitempty"`CreatedBystring     `json:"created_by"`ModifiedOn    *time.Time `json:"modified_on,omitempty"`ModifiedBystring     `json:"modified_by"`}

typeWorkersKVNamespaceadded inv0.9.0

type WorkersKVNamespace struct {IDstring `json:"id"`Titlestring `json:"title"`}

WorkersKVNamespace contains the unique identifier and title of a storage namespace.

typeWorkersKVNamespaceResponseadded inv0.9.0

type WorkersKVNamespaceResponse struct {ResponseResultWorkersKVNamespace `json:"result"`}

WorkersKVNamespaceResponse is the response received when creating storage namespaces.

typeWorkersKVPairadded inv0.10.7

type WorkersKVPair struct {Keystring      `json:"key"`Valuestring      `json:"value"`Expirationint         `json:"expiration,omitempty"`ExpirationTTLint         `json:"expiration_ttl,omitempty"`Metadata      interface{} `json:"metadata,omitempty"`Base64bool        `json:"base64,omitempty"`}

WorkersKVPair is used in an array in the request to the bulk KV api.

typeWorkersListSecretsResponseadded inv0.13.1

type WorkersListSecretsResponse struct {ResponseResult []WorkersSecret `json:"result"`}

WorkersListSecretsResponse is the response received when listing secrets.

typeWorkersPutSecretRequestadded inv0.13.1

type WorkersPutSecretRequest struct {Namestring            `json:"name"`Textstring            `json:"text"`TypeWorkerBindingType `json:"type"`}

WorkersPutSecretRequest provides parameters for creating and updating secrets.

typeWorkersPutSecretResponseadded inv0.13.1

type WorkersPutSecretResponse struct {ResponseResultWorkersSecret `json:"result"`}

WorkersPutSecretResponse is the response received when creating or updating a secret.

typeWorkersSecretadded inv0.13.1

type WorkersSecret struct {Namestring `json:"name"`Typestring `json:"secret_text"`}

WorkersSecret contains the name and type of the secret.

typeWorkersSubdomainadded inv0.47.0

type WorkersSubdomain struct {Namestring `json:"name,omitempty"`}

typeWorkersSubdomainResponseadded inv0.47.0

type WorkersSubdomainResponse struct {ResponseResultWorkersSubdomain}

typeWorkersTailadded inv0.47.0

type WorkersTail struct {IDstring     `json:"id"`URLstring     `json:"url"`ExpiresAt *time.Time `json:"expires_at"`}

typeWorkersTailConsumeradded inv0.71.0

type WorkersTailConsumer struct {Servicestring  `json:"service"`Environment *string `json:"environment,omitempty"`Namespace   *string `json:"namespace,omitempty"`}

typeWriteWorkersKVEntriesParamsadded inv0.55.0

type WriteWorkersKVEntriesParams struct {NamespaceIDstringKVs         []*WorkersKVPair}

typeWriteWorkersKVEntryParamsadded inv0.55.0

type WriteWorkersKVEntryParams struct {NamespaceIDstringKeystringValue       []byte}

typeZarazActionadded inv0.89.0

type ZarazAction struct {BlockingTriggers []string       `json:"blockingTriggers"`FiringTriggers   []string       `json:"firingTriggers"`Data             map[string]any `json:"data"`ActionTypestring         `json:"actionType,omitempty"`}

typeZarazButtonTextTranslationsadded inv0.86.0

type ZarazButtonTextTranslations struct {AcceptAll        map[string]string `json:"accept_all"`RejectAll        map[string]string `json:"reject_all"`ConfirmMyChoices map[string]string `json:"confirm_my_choices"`}

typeZarazConfigadded inv0.86.0

type ZarazConfig struct {DebugKeystring                   `json:"debugKey"`Tools         map[string]ZarazTool     `json:"tools"`Triggers      map[string]ZarazTrigger  `json:"triggers"`ZarazVersionint64                    `json:"zarazVersion"`ConsentZarazConsent             `json:"consent,omitempty"`DataLayer     *bool                    `json:"dataLayer,omitempty"`Dlp           []any                    `json:"dlp,omitempty"`HistoryChange *bool                    `json:"historyChange,omitempty"`SettingsZarazConfigSettings      `json:"settings,omitempty"`Variables     map[string]ZarazVariable `json:"variables,omitempty"`}

typeZarazConfigHistoryListResponseadded inv0.86.0

type ZarazConfigHistoryListResponse struct {Result []ZarazHistoryRecord `json:"result"`ResponseResultInfo `json:"result_info"`}

typeZarazConfigResponseadded inv0.86.0

type ZarazConfigResponse struct {ResultZarazConfig `json:"result"`Response}

typeZarazConfigSettingsadded inv0.86.0

type ZarazConfigSettings struct {AutoInjectScript    *bool       `json:"autoInjectScript"`InjectIframes       *bool       `json:"injectIframes,omitempty"`Ecommerce           *bool       `json:"ecommerce,omitempty"`HideQueryParams     *bool       `json:"hideQueryParams,omitempty"`HideIpAddress       *bool       `json:"hideIPAddress,omitempty"`HideUserAgent       *bool       `json:"hideUserAgent,omitempty"`HideExternalReferer *bool       `json:"hideExternalReferer,omitempty"`CookieDomainstring      `json:"cookieDomain,omitempty"`InitPathstring      `json:"initPath,omitempty"`ScriptPathstring      `json:"scriptPath,omitempty"`TrackPathstring      `json:"trackPath,omitempty"`EventsApiPathstring      `json:"eventsApiPath,omitempty"`McRootPathstring      `json:"mcRootPath,omitempty"`ContextEnricherZarazWorker `json:"contextEnricher,omitempty"`}

typeZarazConsentadded inv0.86.0

type ZarazConsent struct {Enabled                               *bool                                   `json:"enabled"`ButtonTextTranslationsZarazButtonTextTranslations             `json:"buttonTextTranslations,omitempty"`CompanyEmailstring                                  `json:"companyEmail,omitempty"`CompanyNamestring                                  `json:"companyName,omitempty"`CompanyStreetAddressstring                                  `json:"companyStreetAddress,omitempty"`ConsentModalIntroHTMLstring                                  `json:"consentModalIntroHTML,omitempty"`ConsentModalIntroHTMLWithTranslations map[string]string                       `json:"consentModalIntroHTMLWithTranslations,omitempty"`CookieNamestring                                  `json:"cookieName,omitempty"`CustomCSSstring                                  `json:"customCSS,omitempty"`CustomIntroDisclaimerDismissed        *bool                                   `json:"customIntroDisclaimerDismissed,omitempty"`DefaultLanguagestring                                  `json:"defaultLanguage,omitempty"`HideModal                             *bool                                   `json:"hideModal,omitempty"`Purposes                              map[string]ZarazPurpose                 `json:"purposes,omitempty"`PurposesWithTranslations              map[string]ZarazPurposeWithTranslations `json:"purposesWithTranslations,omitempty"`}

typeZarazHistoryRecordadded inv0.86.0

type ZarazHistoryRecord struct {IDint64      `json:"id,omitempty"`UserIDstring     `json:"userId,omitempty"`Descriptionstring     `json:"description,omitempty"`CreatedAt   *time.Time `json:"createdAt,omitempty"`UpdatedAt   *time.Time `json:"updatedAt,omitempty"`}

typeZarazLoadRuleOpadded inv0.86.0

type ZarazLoadRuleOpstring

typeZarazNeoEventdeprecatedadded inv0.86.0

type ZarazNeoEvent struct {BlockingTriggers []string       `json:"blockingTriggers"`FiringTriggers   []string       `json:"firingTriggers"`Data             map[string]any `json:"data"`ActionTypestring         `json:"actionType,omitempty"`}

Deprecated: To be removed pending migration of existing configs.

typeZarazPublishResponseadded inv0.86.0

type ZarazPublishResponse struct {Resultstring `json:"result"`Response}

typeZarazPurposeadded inv0.86.0

type ZarazPurpose struct {Namestring `json:"name"`Descriptionstring `json:"description"`}

typeZarazPurposeWithTranslationsadded inv0.86.0

type ZarazPurposeWithTranslations struct {Name        map[string]string `json:"name"`Description map[string]string `json:"description"`Orderint               `json:"order"`}

typeZarazRuleSettingsadded inv0.86.0

type ZarazRuleSettings struct {TypeZarazSelectorType `json:"type,omitempty"`Selectorstring            `json:"selector,omitempty"`WaitForTagsint               `json:"waitForTags,omitempty"`Intervalint               `json:"interval,omitempty"`Limitint               `json:"limit,omitempty"`Validate    *bool             `json:"validate,omitempty"`Variablestring            `json:"variable,omitempty"`Matchstring            `json:"match,omitempty"`Positionsstring            `json:"positions,omitempty"`OpZarazLoadRuleOp   `json:"op,omitempty"`Valuestring            `json:"value,omitempty"`}

typeZarazRuleTypeadded inv0.86.0

type ZarazRuleTypestring
const (ZarazClickListenerZarazRuleType = "clickListener"ZarazTimerZarazRuleType = "timer"ZarazFormSubmissionZarazRuleType = "formSubmission"ZarazVariableMatchZarazRuleType = "variableMatch"ZarazScrollDepthZarazRuleType = "scrollDepth"ZarazElementVisibilityZarazRuleType = "elementVisibility"ZarazClientEvalZarazRuleType = "clientEval")

typeZarazSelectorTypeadded inv0.86.0

type ZarazSelectorTypestring
const (ZarazXPathZarazSelectorType = "xpath"ZarazCSSZarazSelectorType = "css")

typeZarazTooladded inv0.86.0

type ZarazTool struct {BlockingTriggers []string               `json:"blockingTriggers"`Enabled          *bool                  `json:"enabled"`DefaultFields    map[string]any         `json:"defaultFields"`Namestring                 `json:"name"`NeoEvents        []ZarazNeoEvent        `json:"neoEvents"`Actions          map[string]ZarazAction `json:"actions"`TypeZarazToolType          `json:"type"`DefaultPurposestring                 `json:"defaultPurpose,omitempty"`Librarystring                 `json:"library,omitempty"`Componentstring                 `json:"component,omitempty"`Permissions      []string               `json:"permissions"`Settings         map[string]any         `json:"settings"`WorkerZarazWorker            `json:"worker,omitempty"`}

typeZarazToolTypeadded inv0.86.0

type ZarazToolTypestring
const (ZarazToolLibraryZarazToolType = "library"ZarazToolComponentZarazToolType = "component"ZarazToolCustomMcZarazToolType = "custom-mc")

typeZarazTriggeradded inv0.86.0

type ZarazTrigger struct {Namestring             `json:"name"`Descriptionstring             `json:"description,omitempty"`LoadRules    []ZarazTriggerRule `json:"loadRules"`ExcludeRules []ZarazTriggerRule `json:"excludeRules"`ClientRules  []any              `json:"clientRules,omitempty"`// what is this?SystemZarazTriggerSystem `json:"system,omitempty"`}

typeZarazTriggerRuleadded inv0.86.0

type ZarazTriggerRule struct {Idstring            `json:"id"`Matchstring            `json:"match,omitempty"`OpZarazLoadRuleOp   `json:"op,omitempty"`Valuestring            `json:"value,omitempty"`ActionZarazRuleType     `json:"action"`SettingsZarazRuleSettings `json:"settings"`}

typeZarazTriggerSystemadded inv0.86.0

type ZarazTriggerSystemstring
const ZarazPageloadZarazTriggerSystem = "pageload"

typeZarazVariableadded inv0.86.0

type ZarazVariable struct {Namestring            `json:"name"`TypeZarazVariableType `json:"type"`Value interface{}       `json:"value"`}

typeZarazVariableTypeadded inv0.86.0

type ZarazVariableTypestring
const (ZarazVarStringZarazVariableType = "string"ZarazVarSecretZarazVariableType = "secret"ZarazVarWorkerZarazVariableType = "worker")

typeZarazWorkeradded inv0.86.0

type ZarazWorker struct {EscapedWorkerNamestring `json:"escapedWorkerName"`WorkerTagstring `json:"workerTag"`MutableIdstring `json:"mutableId,omitempty"`}

typeZarazWorkflowResponseadded inv0.86.0

type ZarazWorkflowResponse struct {Resultstring `json:"result"`Response}

typeZoneadded inv0.7.2

type Zone struct {IDstring `json:"id"`Namestring `json:"name"`// DevMode contains the time in seconds until development expires (if// positive) or since it expired (if negative). It will be 0 if never used.DevModeint       `json:"development_mode"`OriginalNS        []string  `json:"original_name_servers"`OriginalRegistrarstring    `json:"original_registrar"`OriginalDNSHoststring    `json:"original_dnshost"`CreatedOntime.Time `json:"created_on"`ModifiedOntime.Time `json:"modified_on"`NameServers       []string  `json:"name_servers"`OwnerOwner     `json:"owner"`Permissions       []string  `json:"permissions"`PlanZonePlan  `json:"plan"`PlanPendingZonePlan  `json:"plan_pending,omitempty"`Statusstring    `json:"status"`Pausedbool      `json:"paused"`Typestring    `json:"type"`Host              struct {NamestringWebsitestring} `json:"host"`VanityNS        []string `json:"vanity_name_servers"`Betas           []string `json:"betas"`DeactReasonstring   `json:"deactivation_reason"`MetaZoneMeta `json:"meta"`AccountAccount  `json:"account"`VerificationKeystring   `json:"verification_key"`}

Zone describes a Cloudflare zone.

typeZoneAnalyticsadded inv0.7.2

type ZoneAnalytics struct {Sincetime.Time `json:"since"`Untiltime.Time `json:"until"`Requests struct {Allint            `json:"all"`Cachedint            `json:"cached"`Uncachedint            `json:"uncached"`ContentType map[string]int `json:"content_type"`Country     map[string]int `json:"country"`SSL         struct {Encryptedint `json:"encrypted"`Unencryptedint `json:"unencrypted"`} `json:"ssl"`HTTPStatus map[string]int `json:"http_status"`} `json:"requests"`Bandwidth struct {Allint            `json:"all"`Cachedint            `json:"cached"`Uncachedint            `json:"uncached"`ContentType map[string]int `json:"content_type"`Country     map[string]int `json:"country"`SSL         struct {Encryptedint `json:"encrypted"`Unencryptedint `json:"unencrypted"`} `json:"ssl"`} `json:"bandwidth"`Threats struct {Allint            `json:"all"`Country map[string]int `json:"country"`Type    map[string]int `json:"type"`} `json:"threats"`Pageviews struct {Allint            `json:"all"`SearchEngines map[string]int `json:"search_engines"`} `json:"pageviews"`Uniques struct {Allint `json:"all"`}}

ZoneAnalytics contains analytics data for a zone.

typeZoneAnalyticsColocationadded inv0.7.2

type ZoneAnalyticsColocation struct {ColocationIDstring          `json:"colo_id"`Timeseries   []ZoneAnalytics `json:"timeseries"`}

ZoneAnalyticsColocation contains analytics data by datacenter.

typeZoneAnalyticsDataadded inv0.7.2

type ZoneAnalyticsData struct {TotalsZoneAnalytics   `json:"totals"`Timeseries []ZoneAnalytics `json:"timeseries"`}

ZoneAnalyticsData contains totals and timeseries analytics data for a zone.

typeZoneAnalyticsOptionsadded inv0.7.2

type ZoneAnalyticsOptions struct {Since      *time.TimeUntil      *time.TimeContinuous *bool}

ZoneAnalyticsOptions represents the optional parameters in Zone Analyticsendpoint requests.

typeZoneCacheVariantsadded inv0.32.0

type ZoneCacheVariants struct {ModifiedOntime.Time               `json:"modified_on"`ValueZoneCacheVariantsValues `json:"value"`}

typeZoneCacheVariantsValuesadded inv0.32.0

type ZoneCacheVariantsValues struct {Avif []string `json:"avif,omitempty"`Bmp  []string `json:"bmp,omitempty"`Gif  []string `json:"gif,omitempty"`Jpeg []string `json:"jpeg,omitempty"`Jpg  []string `json:"jpg,omitempty"`Jpg2 []string `json:"jpg2,omitempty"`Jp2  []string `json:"jp2,omitempty"`Png  []string `json:"png,omitempty"`Tiff []string `json:"tiff,omitempty"`Tif  []string `json:"tif,omitempty"`Webp []string `json:"webp,omitempty"`}

typeZoneCustomSSLadded inv0.7.2

type ZoneCustomSSL struct {IDstring                        `json:"id"`Hosts           []string                      `json:"hosts"`Issuerstring                        `json:"issuer"`Signaturestring                        `json:"signature"`Statusstring                        `json:"status"`BundleMethodstring                        `json:"bundle_method"`GeoRestrictions *ZoneCustomSSLGeoRestrictions `json:"geo_restrictions,omitempty"`ZoneIDstring                        `json:"zone_id"`UploadedOntime.Time                     `json:"uploaded_on"`ModifiedOntime.Time                     `json:"modified_on"`ExpiresOntime.Time                     `json:"expires_on"`Priorityint                           `json:"priority"`KeylessServerKeylessSSL                    `json:"keyless_server"`}

ZoneCustomSSL represents custom SSL certificate metadata.

typeZoneCustomSSLGeoRestrictionsadded inv0.9.4

type ZoneCustomSSLGeoRestrictions struct {Labelstring `json:"label"`}

ZoneCustomSSLGeoRestrictions represents the parameter to create or updategeographic restrictions on a custom ssl certificate.

typeZoneCustomSSLOptionsadded inv0.7.2

type ZoneCustomSSLOptions struct {Certificatestring                        `json:"certificate"`PrivateKeystring                        `json:"private_key"`BundleMethodstring                        `json:"bundle_method,omitempty"`GeoRestrictions *ZoneCustomSSLGeoRestrictions `json:"geo_restrictions,omitempty"`Typestring                        `json:"type,omitempty"`}

ZoneCustomSSLOptions represents the parameters to create or update an existingcustom SSL configuration.

typeZoneCustomSSLPriorityadded inv0.7.2

type ZoneCustomSSLPriority struct {IDstring `json:"ID"`Priorityint    `json:"priority"`}

ZoneCustomSSLPriority represents a certificate's ID and priority. It is asubset of ZoneCustomSSL used for patch requests.

typeZoneDNSSECadded inv0.13.5

type ZoneDNSSEC struct {Statusstring    `json:"status"`Flagsint       `json:"flags"`Algorithmstring    `json:"algorithm"`KeyTypestring    `json:"key_type"`DigestTypestring    `json:"digest_type"`DigestAlgorithmstring    `json:"digest_algorithm"`Digeststring    `json:"digest"`DSstring    `json:"ds"`KeyTagint       `json:"key_tag"`PublicKeystring    `json:"public_key"`ModifiedOntime.Time `json:"modified_on"`}

ZoneDNSSEC represents the response from the Zone DNSSEC Setting result.

typeZoneDNSSECDeleteResponseadded inv0.13.5

type ZoneDNSSECDeleteResponse struct {ResponseResultstring `json:"result"`}

ZoneDNSSECDeleteResponse represents the response from the Zone DNSSEC Delete request.

typeZoneDNSSECResponseadded inv0.13.5

type ZoneDNSSECResponse struct {ResponseResultZoneDNSSEC `json:"result"`}

ZoneDNSSECResponse represents the response from the Zone DNSSEC Setting.

typeZoneDNSSECUpdateOptionsadded inv0.13.5

type ZoneDNSSECUpdateOptions struct {Statusstring `json:"status"`}

ZoneDNSSECUpdateOptions represents the options for DNSSEC update.

typeZoneHoldadded inv0.75.0

type ZoneHold struct {Hold              *bool      `json:"hold,omitempty"`IncludeSubdomains *bool      `json:"include_subdomains,omitempty"`HoldAfter         *time.Time `json:"hold_after,omitempty"`}

Retrieve whether the zone is subject to a zone hold, and metadata about thehold.

typeZoneHoldResponseadded inv0.75.0

type ZoneHoldResponse struct {ResultZoneHold `json:"result"`ResponseResultInfo `json:"result_info"`}

ZoneHoldResponse represents a response from the Zone Hold endpoint.

typeZoneIDadded inv0.7.2

type ZoneID struct {IDstring `json:"id"`}

ZoneID contains only the zone ID.

typeZoneIDResponseadded inv0.7.2

type ZoneIDResponse struct {ResponseResultZoneID `json:"result"`}

ZoneIDResponse represents the response from the Zone endpoint, containing only a zone ID.

typeZoneLockdownadded inv0.8.0

type ZoneLockdown struct {IDstring               `json:"id"`Descriptionstring               `json:"description"`URLs           []string             `json:"urls"`Configurations []ZoneLockdownConfig `json:"configurations"`Pausedbool                 `json:"paused"`Priorityint                  `json:"priority,omitempty"`CreatedOn      *time.Time           `json:"created_on,omitempty"`ModifiedOn     *time.Time           `json:"modified_on,omitempty"`}

ZoneLockdown represents a Zone Lockdown rule. A rule only permits access tothe provided URL pattern(s) from the given IP address(es) or subnet(s).

typeZoneLockdownConfigadded inv0.8.0

type ZoneLockdownConfig struct {Targetstring `json:"target"`Valuestring `json:"value"`}

ZoneLockdownConfig represents a Zone Lockdown config, which comprisesa Target ("ip" or "ip_range") and a Value (an IP address or IP+mask,respectively.)

typeZoneLockdownCreateParamsadded inv0.47.0

type ZoneLockdownCreateParams struct {Descriptionstring               `json:"description"`URLs           []string             `json:"urls"`Configurations []ZoneLockdownConfig `json:"configurations"`Pausedbool                 `json:"paused"`Priorityint                  `json:"priority,omitempty"`}

ZoneLockdownCreateParams contains required and optional paramsfor creating a zone lockdown.

typeZoneLockdownListResponseadded inv0.8.0

type ZoneLockdownListResponse struct {Result []ZoneLockdown `json:"result"`ResponseResultInfo `json:"result_info"`}

ZoneLockdownListResponse represents a response from the List Zone Lockdownendpoint.

typeZoneLockdownResponseadded inv0.8.0

type ZoneLockdownResponse struct {ResultZoneLockdown `json:"result"`ResponseResultInfo `json:"result_info"`}

ZoneLockdownResponse represents a response from the Zone Lockdown endpoint.

typeZoneLockdownUpdateParamsadded inv0.47.0

type ZoneLockdownUpdateParams struct {IDstring               `json:"id"`Descriptionstring               `json:"description"`URLs           []string             `json:"urls"`Configurations []ZoneLockdownConfig `json:"configurations"`Pausedbool                 `json:"paused"`Priorityint                  `json:"priority,omitempty"`}

ZoneLockdownUpdateParams contains required and optional paramsfor updating a zone lockdown.

typeZoneMetaadded inv0.7.2

type ZoneMeta struct {// custom_certificate_quota is broken - sometimes it's a string, sometimes a number!// CustCertQuota     int    `json:"custom_certificate_quota"`PageRuleQuotaint  `json:"page_rule_quota"`WildcardProxiablebool `json:"wildcard_proxiable"`PhishingDetectedbool `json:"phishing_detected"`}

ZoneMeta describes metadata about a zone.

typeZoneOptionsadded inv0.7.2

type ZoneOptions struct {Paused   *bool     `json:"paused,omitempty"`VanityNS []string  `json:"vanity_name_servers,omitempty"`Plan     *ZonePlan `json:"plan,omitempty"`Typestring    `json:"type,omitempty"`}

ZoneOptions is a subset of Zone, for editable options.

typeZonePlanadded inv0.7.2

type ZonePlan struct {ZonePlanCommonLegacyIDstring `json:"legacy_id"`IsSubscribedbool   `json:"is_subscribed"`CanSubscribebool   `json:"can_subscribe"`LegacyDiscountbool   `json:"legacy_discount"`ExternallyManagedbool   `json:"externally_managed"`}

ZonePlan contains the plan information for a zone.

typeZonePlanCommonadded inv0.9.0

type ZonePlanCommon struct {IDstring `json:"id"`Namestring `json:"name,omitempty"`Priceint    `json:"price,omitempty"`Currencystring `json:"currency,omitempty"`Frequencystring `json:"frequency,omitempty"`}

ZonePlanCommon contains fields used by various Plan endpoints.

typeZoneRatePlanadded inv0.7.4

type ZoneRatePlan struct {ZonePlanCommonComponents []zoneRatePlanComponents `json:"components,omitempty"`}

ZoneRatePlan contains the plan information for a zone.

typeZoneRatePlanResponseadded inv0.7.4

type ZoneRatePlanResponse struct {ResponseResultZoneRatePlan `json:"result"`}

ZoneRatePlanResponse represents the response from the Plan Details endpoint.

typeZoneResponseadded inv0.7.2

type ZoneResponse struct {ResponseResultZone `json:"result"`}

ZoneResponse represents the response from the Zone endpoint containing a single zone.

typeZoneSSLSettingadded inv0.7.4

type ZoneSSLSetting struct {IDstring `json:"id"`Editablebool   `json:"editable"`ModifiedOnstring `json:"modified_on"`Valuestring `json:"value"`CertificateStatusstring `json:"certificate_status"`}

ZoneSSLSetting contains ssl setting for a zone.

typeZoneSSLSettingResponseadded inv0.7.4

type ZoneSSLSettingResponse struct {ResponseResultZoneSSLSetting `json:"result"`}

ZoneSSLSettingResponse represents the response from the Zone SSL Setting

typeZoneSettingadded inv0.7.2

type ZoneSetting struct {IDstring      `json:"id"`Editablebool        `json:"editable"`ModifiedOnstring      `json:"modified_on,omitempty"`Value             interface{} `json:"value"`TimeRemainingint         `json:"time_remaining"`NextScheduledScanstring      `json:"next_scheduled_scan,omitempty"`}

ZoneSetting contains settings for a zone.

typeZoneSettingResponseadded inv0.7.2

type ZoneSettingResponse struct {ResponseResult []ZoneSetting `json:"result"`}

ZoneSettingResponse represents the response from the Zone Setting endpoint.

typeZoneSettingSingleResponseadded inv0.10.2

type ZoneSettingSingleResponse struct {ResponseResultZoneSetting `json:"result"`}

ZoneSettingSingleResponse represents the response from the Zone Setting endpoint for the specified setting.

typeZonesResponseadded inv0.7.2

type ZonesResponse struct {ResponseResult     []Zone `json:"result"`ResultInfo `json:"result_info"`}

ZonesResponse represents the response from the Zone endpoint containing an array of zones.

Source Files

View all Source files

Directories

PathSynopsis
cmd
internal
toolsModule

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp