fastly

package
v6.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 23 Imported by: 55

Documentation

Overview

API reference: https://developer.fastly.com/reference/api/vcl-services/rate-limiter/ NB: ERL is an optional feature that must be enabled before use

Index

Examples

Constants

View Source
const (
	CreateBatchOperation BatchOperation = "create"
	UpdateBatchOperation BatchOperation = "update"
	UpsertBatchOperation BatchOperation = "upsert"
	DeleteBatchOperation BatchOperation = "delete"

	// Represents the maximum number of operations that can be sent within a single batch request.
	// This is currently not documented in the API.
	BatchModifyMaximumOperations = 1000

	// Represents the maximum number of items that can be placed within an Edge Dictionary.
	MaximumDictionarySize = 10000

	// Represents the maximum number of entries that can be placed within an ACL.
	MaximumACLSize = 10000
)
View Source
const (
	S3RedundancyStandard                 S3Redundancy = "standard"
	S3RedundancyIntelligentTiering       S3Redundancy = "intelligent_tiering"
	S3RedundancyStandardIA               S3Redundancy = "standard_ia"
	S3RedundancyOneZoneIA                S3Redundancy = "onezone_ia"
	S3RedundancyGlacierInstantRetrieval  S3Redundancy = "glacier_ir"
	S3RedundancyGlacierFlexibleRetrieval S3Redundancy = "glacier"
	S3RedundancyGlacierDeepArchive       S3Redundancy = "deep_archive"
	S3RedundancyReduced                  S3Redundancy = "reduced_redundancy"

	S3ServerSideEncryptionAES S3ServerSideEncryption = "AES256"
	S3ServerSideEncryptionKMS S3ServerSideEncryption = "aws:kms"

	S3AccessControlListPrivate                S3AccessControlList = "private"
	S3AccessControlListPublicRead             S3AccessControlList = "public-read"
	S3AccessControlListPublicReadWrite        S3AccessControlList = "public-read-write"
	S3AccessControlListAWSExecRead            S3AccessControlList = "aws-exec-read"
	S3AccessControlListAuthenticatedRead      S3AccessControlList = "authenticated-read"
	S3AccessControlListBucketOwnerRead        S3AccessControlList = "bucket-owner-read"
	S3AccessControlListBucketOwnerFullControl S3AccessControlList = "bucket-owner-full-control"
)
View Source
const (
	// WAFRuleExclusionTypeRule is the type of WAF rule exclusions that excludes rules from the WAF based on certain conditions.
	WAFRuleExclusionTypeRule = "rule"
	// WAFRuleExclusionTypeWAF is the type of WAF rule exclusions that excludes WAF based on certain conditions.
	WAFRuleExclusionTypeWAF = "waf"
)
View Source
const (
	// WAFPaginationPageSize is used as the default pagination page size by the WAF related requests.
	WAFPaginationPageSize = 100

	// WAFBatchModifyMaximumOperations is used as the default batch maximum operations.
	WAFBatchModifyMaximumOperations = 500

	// WAFVersionDeploymentStatusPending is the string value representing pending state for last_deployment_status for a WAF version.
	WAFVersionDeploymentStatusPending = "pending"

	// WAFVersionDeploymentStatusInProgress is the string value representing in-progress state for last_deployment_status for a WAF version.
	WAFVersionDeploymentStatusInProgress = "in progress"

	// WAFVersionDeploymentStatusCompleted is the string value representing completed state for last_deployment_status for a WAF versions.
	WAFVersionDeploymentStatusCompleted = "completed"

	// WAFVersionDeploymentStatusFailed is the string value representing failed state for last_deployment_status for a WAF versions.
	WAFVersionDeploymentStatusFailed = "failed"
)
View Source
const APIKeyEnvVar = "FASTLY_API_KEY"

APIKeyEnvVar is the name of the environment variable where the Fastly API key should be read from.

View Source
const APIKeyHeader = "Fastly-Key"

APIKeyHeader is the name of the header that contains the Fastly API key.

View Source
const DefaultEndpoint = "https://api.fastly.com"

DefaultEndpoint is the default endpoint for Fastly. Since Fastly does not support an on-premise solution, this is likely to always be the default.

View Source
const DefaultRealtimeStatsEndpoint = "https://rt.fastly.com"

DefaultRealtimeStatsEndpoint is the realtime stats endpoint for Fastly.

View Source
const EndpointEnvVar = "FASTLY_API_URL"

EndpointEnvVar is the name of an environment variable that can be used to change the URL of API requests.

View Source
const RealtimeStatsEndpointEnvVar = "FASTLY_RTS_URL"

RealtimeStatsEndpointEnvVar is the name of an environment variable that can be used to change the URL of realtime stats requests.

Variables

View Source
var ErrCommonNameNotInDomains = NewFieldError("CommonName").Message("CommonName must be in Domains")

ErrCommonNameNotInDomains is an error that is returned when an input struct requires that the domain in "CommonName" is also in "Domains"

View Source
var ErrManagedLoggingEnabled = errors.New("managed logging already enabled")

ErrManagedLoggingEnabled is an error that indicates that managed logging was already enabled for a service.

View Source
var ErrMaxExceededEntries = NewFieldError("Entries").Message(batchModifyMaxExceeded)

ErrMaxExceededEntries is an error that is returned when an input struct specifies an "Entries" key value exceeding the maximum allowed.

View Source
var ErrMaxExceededItems = NewFieldError("Items").Message(batchModifyMaxExceeded)

ErrMaxExceededItems is an error that is returned when an input struct specifies an "Items" key value exceeding the maximum allowed.

View Source
var ErrMaxExceededRules = NewFieldError("Rules").Message(batchModifyMaxExceeded)

ErrMaxExceededRules is an error that is returned when an input struct specifies an "Rules" key value exceeding the maximum allowed.

View Source
var ErrMissingACLID = NewFieldError("ACLID")

ErrMissingACLID is an error that is returned when an input struct requires a "ACLID" key, but one was not set.

View Source
var ErrMissingAddress = NewFieldError("Address")

ErrMissingAddress is an error that is returned when an input struct requires a "Address" key, but one was not set.

View Source
var ErrMissingBackend = NewFieldError("Backend")

ErrMissingBackend is an error that is returned when an input struct requires a "Backend" key, but one was not set.

View Source
var ErrMissingCertBlob = NewFieldError("CertBlob")

ErrMissingCertBlob is an error that is returned when an input struct requires a "CertBlob" key, but one was not set.

View Source
var ErrMissingContent = NewFieldError("Content")

ErrMissingContent is an error that is returned when an input struct requires a "Content" key, but one was not set.

View Source
var ErrMissingCustomerID = NewFieldError("CustomerID")

ErrMissingCustomerID is an error that is returned when an input struct requires a "CustomerID" key, but one was not set.

View Source
var ErrMissingDictionaryID = NewFieldError("DictionaryID")

ErrMissingDictionaryID is an error that is returned when an input struct requires a "DictionaryID" key, but one was not set.

View Source
var ErrMissingDirector = NewFieldError("Director")

ErrMissingDirector is an error that is returned when an input struct requires a "Director" key, but one was not set.

View Source
var ErrMissingEventID = NewFieldError("EventID")

ErrMissingEventID is an error that is returned when an input struct requires a "EventID" key, but one was not set.

View Source
var ErrMissingFrom = NewFieldError("From")

ErrMissingFrom is an error that is returned when an input struct requires a "From" key, but one was not set.

View Source
var ErrMissingID = NewFieldError("ID")

ErrMissingID is an error that is returned when an input struct requires a "ID" key, but one was not set.

View Source
var ErrMissingIP = NewFieldError("IP")

ErrMissingIP is an error that is returned when an input struct requires a "IP" key, but one was not set.

View Source
var ErrMissingIntermediatesBlob = NewFieldError("IntermediatesBlob")

ErrMissingIntermediatesBlob is an error that is returned when an input struct requires a "IntermediatesBlob" key, but one was not set.

View Source
var ErrMissingItemKey = NewFieldError("ItemKey")

ErrMissingItemKey is an error that is returned when an input struct requires a "ItemKey" key, but one was not set.

View Source
var ErrMissingKey = NewFieldError("Key")

ErrMissingKey is an error that is returned when an input struct requires a "Key" key, but one was not set.

View Source
var ErrMissingKeys = NewFieldError("Keys")

ErrMissingKeys is an error that is returned when an input struct requires a "Keys" key, but one was not set.

View Source
var ErrMissingKind = NewFieldError("Kind")

ErrMissingKind is an error that is returned when an input struct requires a "Kind" key, but one was not set.

View Source
var ErrMissingLogin = NewFieldError("Login")

ErrMissingLogin is an error that is returned when an input struct requires a "Login" key, but one was not set.

View Source
var ErrMissingMonth = NewFieldError("Month")

ErrMissingMonth is an error that is returned when an input struct requires a "Month" key, but one was not set.

View Source
var ErrMissingName = NewFieldError("Name")

ErrMissingName is an error that is returned when an input struct requires a "Name" key, but one was not set.

View Source
var ErrMissingNameValue = NewFieldError("Name").Message("service name can't be an empty value")

ErrMissingNameValue is an error that is returned when an input struct requires a "Name" key, but one was not set.

View Source
var ErrMissingNewName = NewFieldError("NewName")

ErrMissingNewName is an error that is returned when an input struct requires a "NewName" key, but one was not set.

View Source
var ErrMissingNumber = NewFieldError("Number")

ErrMissingNumber is an error that is returned when an input struct requires a "Number" key, but one was not set.

View Source
var ErrMissingOptionalNameComment = NewFieldError("Name, Comment").Message("at least one of the available 'optional' fields is required")

ErrMissingOptionalNameComment is an error that is returned when an input struct requires either a "Name" or "Comment" key, but one was not set.

View Source
var ErrMissingPermissions = NewFieldError("Permissions")

ErrMissingPermissions is an error that is returned when an input struct requires a "Permissions" key, but one was not set

View Source
var ErrMissingPoolID = NewFieldError("PoolID")

ErrMissingPoolID is an error that is returned when an input struct requires a "PoolID" key, but one was not set.

View Source
var ErrMissingSecret = NewFieldError("Secret")

ErrMissingSecret is an error that is returned when an input struct requires a "Secret" key, but one was not set.

View Source
var ErrMissingServer = NewFieldError("Server")

ErrMissingServer is an error that is returned when an input struct requires a "Server" key, but one was not set.

View Source
var ErrMissingServerSideEncryptionKMSKeyID = NewFieldError("ServerSideEncryptionKMSKeyID")

ErrMissingServerSideEncryptionKMSKeyID is an error that is returned when an input struct requires a "ServerSideEncryptionKMSKeyID" key, but one was not set.

View Source
var ErrMissingServiceAuthorizationsService = NewFieldError("Service").Message("SAService requires an ID")

ErrMissingServiceAuthorizationsService is an error that is returned when an input struct requires a "Service" key of type SAService, but one was not set or was misconfigured.

View Source
var ErrMissingServiceAuthorizationsUser = NewFieldError("User").Message("SAUser requires an ID")

ErrMissingServiceAuthorizationsUser is an error that is returned when an input struct requires a "User" key of type SAUser, but one was not set or was misconfigured.

View Source
var ErrMissingServiceID = NewFieldError("ServiceID")

ErrMissingServiceID is an error that is returned when an input struct requires a "ServiceID" key, but one was not set.

View Source
var ErrMissingServiceVersion = NewFieldError("ServiceVersion")

ErrMissingServiceVersion is an error that is returned when an input struct requires a "ServiceVersion" key, but one was not set.

View Source
var ErrMissingTLSCertificate = NewFieldError("TLSCertificate")

ErrMissingTLSCertificate is an error that is returned when an input struct requires a "TLSCertificate" key, but one was not set.

View Source
var ErrMissingTLSConfiguration = NewFieldError("TLSConfiguration")

ErrMissingTLSConfiguration is an error that is returned when an input struct requires a "TLSConfiguration" key, but one was not set.

View Source
var ErrMissingTLSDomain = NewFieldError("TLSDomain")

ErrMissingTLSDomain is an error that is returned when an input struct requires a "TLSDomain" key, but one was not set.

View Source
var ErrMissingTo = NewFieldError("To")

ErrMissingTo is an error that is returned when an input struct requires a "To" key, but one was not set.

View Source
var ErrMissingToken = NewFieldError("Token")

ErrMissingToken is an error that is returned when an input struct requires a "Token" key, but one was not set.

View Source
var ErrMissingTokenID = errors.New("missing required field 'TokenID'")

ErrMissingTokenID is an error that is returned when an input struct requires a "TokenID" key, but one was not set.

View Source
var ErrMissingTokensValue = NewFieldError("Tokens").Message("expect at least one token")

ErrMissingTokensValue is an error that is returned when an input struct requires a "Tokens" key, but there needs to be at least one token entry.

View Source
var ErrMissingType = NewFieldError("Type")

ErrMissingType is an error that is returned when an input struct requires a "Type" key, but one was not set.

View Source
var ErrMissingURL = NewFieldError("URL")

ErrMissingURL is an error that is returned when an input struct requires a "URL" key, but one was not set.

View Source
var ErrMissingUserID = NewFieldError("UserID")

ErrMissingUserID is an error that is returned when an input struct requires a "UserID" key, but one was not set

View Source
var ErrMissingWAFActiveRule = NewFieldError("Rules").Message("expect at least one WAFActiveRule")

ErrMissingWAFActiveRule is an error that is returned when an input struct requires a "Rules" key, but there needs to be at least one WAFActiveRule entry.

View Source
var ErrMissingWAFID = NewFieldError("WAFID")

ErrMissingWAFID is an error that is returned when an input struct requires a "WAFID" key, but one was not set.

View Source
var ErrMissingWAFRuleExclusion = NewFieldError("WAFRuleExclusion")

ErrMissingWAFRuleExclusion is an error that is returned when an input struct requires a "WAFRuleExclusion" key, but one was not set.

View Source
var ErrMissingWAFRuleExclusionNumber = NewFieldError("WAFRuleExclusionNumber")

ErrMissingWAFRuleExclusionNumber is an error that is returned when an input struct requires a "WAFRuleExclusionNumber" key, but one was not set.

View Source
var ErrMissingWAFVersionID = NewFieldError("WAFVersionID")

ErrMissingWAFVersionID is an error that is returned when an input struct requires a "WAFVersionID" key, but one was not set.

View Source
var ErrMissingWAFVersionNumber = NewFieldError("WAFVersionNumber")

ErrMissingWAFVersionNumber is an error that is returned when an input struct requires a "WAFVersionNumber" key, but one was not set.

View Source
var ErrMissingYear = NewFieldError("Year")

ErrMissingYear is an error that is returned when an input struct requires a "Year" key, but one was not set.

View Source
var ErrNotImplemented = errors.New("not implemented")

ErrNotImplemented is a generic error indicating that something is not yet implemented.

View Source
var ErrNotOK = errors.New("not ok")

ErrNotOK is a generic error indicating that something is not okay.

View Source
var ErrStatusNotOk = errors.New("unexpected 'status' field in API response body")

ErrStatusNotOk is an error that indicates the response body returned by the Fastly API was not `{"status": "ok"}`

View Source
var ErrTokenEmpty = NewFieldError("Token").Message(emptyTokenInvalid)

ErrTokenEmpty is an error that is returned when an input struct specifies an "Token" key value which the user has set to an empty string.

View Source
var ProjectURL = "github.com/fastly/go-fastly"

ProjectURL is the url for this library.

View Source
var ProjectVersion = "6.8.0"

ProjectVersion is the version of this library.

View Source
var UserAgent = fmt.Sprintf("FastlyGo/%s (+%s; %s)",
	ProjectVersion, ProjectURL, runtime.Version())

UserAgent is the user agent for this particular client.

View Source
var WAFActiveRuleType = reflect.TypeOf(new(WAFActiveRule))

WAFActiveRuleType is used for reflection because JSONAPI wants to know what it's decoding into.

View Source
var WAFRuleExclusionType = reflect.TypeOf(new(WAFRuleExclusion))

WAFRuleExclusionType is used for reflection because JSONAPI wants to know what it's decoding into.

View Source
var WAFRuleType = reflect.TypeOf(new(WAFRule))

WAFRuleType is used for reflection because JSONAPI wants to know what it's decoding into.

View Source
var WAFVersionType = reflect.TypeOf(new(WAFVersion))

WAFVersionType is used for reflection because JSONAPI wants to know what it's decoding into.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper that returns a pointer to the bool value passed in.

func Int

func Int(v int) *int

Int is a helper that returns a pointer to the int value passed in.

func MakePackagePath

func MakePackagePath(ServiceID string, ServiceVersion int) (string, error)

MakePackagePath ensures we create the correct REST path for referencing packages in the API.

func NullString

func NullString(v string) *string

NullString is a helper that returns a pointer to the string value passed in or nil if the string is empty.

NOTE: historically this has only been utilized by https://github.com/fastly/terraform-provider-fastly

func String

func String(v string) *string

String is a helper that returns a pointer to the string value passed in.

func Uint

func Uint(v uint) *uint

Uint is a helper that returns a pointer to the uint value passed in.

func Uint8

func Uint8(v uint8) *uint8

Uint8 is a helper that returns a pointer to the uint8 value passed in.

Types

type ACL

type ACL struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name      string     `mapstructure:"name"`
	ID        string     `mapstructure:"id"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

type ACLEntry

type ACLEntry struct {
	ServiceID string `mapstructure:"service_id"`
	ACLID     string `mapstructure:"acl_id"`

	ID        string     `mapstructure:"id"`
	IP        string     `mapstructure:"ip"`
	Subnet    *int       `mapstructure:"subnet"`
	Negated   bool       `mapstructure:"negated"`
	Comment   string     `mapstructure:"comment"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

type ACLsByName

type ACLsByName []*ACL

ACLsByName is a sortable list of ACLs.

func (ACLsByName) Len

func (s ACLsByName) Len() int

Len, Swap, and Less implement the sortable interface.

func (ACLsByName) Less

func (s ACLsByName) Less(i, j int) bool

func (ACLsByName) Swap

func (s ACLsByName) Swap(i, j int)

type ActivateVCLInput

type ActivateVCLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the VCL to mark as main (required).
	Name string
}

ActivateVCLInput is used as input to the ActivateVCL function.

type ActivateVersionInput

type ActivateVersionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ActivateVersionInput is the input to the ActivateVersion function.

type Backend

type Backend struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name                string     `mapstructure:"name"`
	Comment             string     `mapstructure:"comment"`
	Address             string     `mapstructure:"address"`
	Port                uint       `mapstructure:"port"`
	OverrideHost        string     `mapstructure:"override_host"`
	ConnectTimeout      uint       `mapstructure:"connect_timeout"`
	MaxConn             uint       `mapstructure:"max_conn"`
	ErrorThreshold      uint       `mapstructure:"error_threshold"`
	FirstByteTimeout    uint       `mapstructure:"first_byte_timeout"`
	BetweenBytesTimeout uint       `mapstructure:"between_bytes_timeout"`
	AutoLoadbalance     bool       `mapstructure:"auto_loadbalance"`
	Weight              uint       `mapstructure:"weight"`
	RequestCondition    string     `mapstructure:"request_condition"`
	HealthCheck         string     `mapstructure:"healthcheck"`
	Hostname            string     `mapstructure:"hostname"`
	Shield              string     `mapstructure:"shield"`
	UseSSL              bool       `mapstructure:"use_ssl"`
	SSLCheckCert        bool       `mapstructure:"ssl_check_cert"`
	SSLCACert           string     `mapstructure:"ssl_ca_cert"`
	SSLClientCert       string     `mapstructure:"ssl_client_cert"`
	SSLClientKey        string     `mapstructure:"ssl_client_key"`
	SSLHostname         string     `mapstructure:"ssl_hostname"`
	SSLCertHostname     string     `mapstructure:"ssl_cert_hostname"`
	SSLSNIHostname      string     `mapstructure:"ssl_sni_hostname"`
	MinTLSVersion       string     `mapstructure:"min_tls_version"`
	MaxTLSVersion       string     `mapstructure:"max_tls_version"`
	SSLCiphers          string     `mapstructure:"ssl_ciphers"`
	CreatedAt           *time.Time `mapstructure:"created_at"`
	UpdatedAt           *time.Time `mapstructure:"updated_at"`
	DeletedAt           *time.Time `mapstructure:"deleted_at"`
}

Backend represents a backend response from the Fastly API.

type BatchACLEntry

type BatchACLEntry struct {
	Operation BatchOperation `json:"op"`
	ID        *string        `json:"id,omitempty"`
	IP        *string        `json:"ip,omitempty"`
	Subnet    *int           `json:"subnet,omitempty"`
	Negated   *Compatibool   `json:"negated,omitempty"`
	Comment   *string        `json:"comment,omitempty"`
}

type BatchDeleteTokensInput

type BatchDeleteTokensInput struct {
	Tokens []*BatchToken
}

BatchDeleteTokensInput is used as input to BatchDeleteTokens.

type BatchDictionaryItem

type BatchDictionaryItem struct {
	Operation BatchOperation `json:"op"`
	ItemKey   string         `json:"item_key"`
	ItemValue string         `json:"item_value"`
}

type BatchModificationWAFActiveRulesInput

type BatchModificationWAFActiveRulesInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// The list of WAF active rules (ModSecID, Status and Revision are required for upsert, ModSecID is required for delete).
	Rules []*WAFActiveRule
	// The batch operation to be performed (allowed operations are upsert and delete).
	OP BatchOperation
}

BatchModificationWAFActiveRulesInput is used for active rules batch modifications.

type BatchModifyACLEntriesInput

type BatchModifyACLEntriesInput struct {
	ServiceID string `json:"-"`
	ACLID     string `json:"-"`

	Entries []*BatchACLEntry `json:"entries"`
}

type BatchModifyDictionaryItemsInput

type BatchModifyDictionaryItemsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string `json:"-"`

	// DictionaryID is the ID of the dictionary to modify items for (required).
	DictionaryID string `json:"-"`

	Items []*BatchDictionaryItem `json:"items"`
}

type BatchOperation

type BatchOperation string

type BatchToken

type BatchToken struct {
	ID string `jsonapi:"primary,token,omitempty"`
}

BatchToken represents the JSONAPI data to be sent to the API. Reference: https://github.com/google/jsonapi#primary

type BigQuery

type BigQuery struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Format            string     `mapstructure:"format"`
	User              string     `mapstructure:"user"`
	ProjectID         string     `mapstructure:"project_id"`
	Dataset           string     `mapstructure:"dataset"`
	Table             string     `mapstructure:"table"`
	Template          string     `mapstructure:"template_suffix"`
	SecretKey         string     `mapstructure:"secret_key"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	FormatVersion     uint       `mapstructure:"format_version"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

BigQuery represents a BigQuery response from the Fastly API.

type Billing

type Billing struct {
	InvoiceID string         `mapstructure:"invoice_id"`
	StartTime *time.Time     `mapstructure:"start_time"`
	EndTime   *time.Time     `mapstructure:"end_time"`
	Status    *BillingStatus `mapstructure:"status"`
	Total     *BillingTotal  `mapstructure:"total"`
}

Billing is the top-level representation of a billing response from the Fastly API.

type BillingExtra

type BillingExtra struct {
	Name      string  `mapstructure:"name"`
	Setup     float64 `mapstructure:"setup"`
	Recurring float64 `mapstructure:"recurring"`
}

BillingExtra is a representation of extras (such as SSL addons) from the Fastly API.

type BillingStatus

type BillingStatus struct {
	InvoiceID string     `mapstructure:"invoice_id"`
	Status    string     `mapstructure:"status"`
	SentAt    *time.Time `mapstructure:"sent_at"`
}

BillingStatus is a representation of the status of the bill from the Fastly API.

type BillingTotal

type BillingTotal struct {
	PlanName           string          `mapstructure:"plan_name"`
	PlanCode           string          `mapstructure:"plan_code"`
	PlanMinimum        string          `mapstructure:"plan_minimum"`
	Bandwidth          float64         `mapstructure:"bandwidth"`
	BandwidthCost      float64         `mapstructure:"bandwidth_cost"`
	Requests           uint64          `mapstructure:"requests"`
	RequestsCost       float64         `mapstructure:"requests_cost"`
	IncurredCost       float64         `mapstructure:"incurred_cost"`
	Overage            float64         `mapstructure:"overage"`
	Extras             []*BillingExtra `mapstructure:"extras"`
	ExtrasCost         float64         `mapstructure:"extras_cost"`
	CostBeforeDiscount float64         `mapstructure:"cost_before_discount"`
	Discount           float64         `mapstructure:"discount"`
	Cost               float64         `mapstructure:"cost"`
	Terms              string          `mapstructure:"terms"`
}

BillingTotal is a representation of the status of the usage for this bill from the Fastly API.

type BlobStorage

type BlobStorage struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Path              string     `mapstructure:"path"`
	AccountName       string     `mapstructure:"account_name"`
	Container         string     `mapstructure:"container"`
	SASToken          string     `mapstructure:"sas_token"`
	Period            uint       `mapstructure:"period"`
	TimestampFormat   string     `mapstructure:"timestamp_format"`
	CompressionCodec  string     `mapstructure:"compression_codec"`
	GzipLevel         uint8      `mapstructure:"gzip_level"`
	PublicKey         string     `mapstructure:"public_key"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	MessageType       string     `mapstructure:"message_type"`
	Placement         string     `mapstructure:"placement"`
	ResponseCondition string     `mapstructure:"response_condition"`
	FileMaxBytes      uint       `mapstructure:"file_max_bytes"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

BlobStorage represents a blob storage response from the Fastly API.

type BulkCertificate

type BulkCertificate struct {
	ID             string              `jsonapi:"primary,tls_bulk_certificate"`
	Configurations []*TLSConfiguration `jsonapi:"relation,tls_configurations,tls_configuration"`
	Domains        []*TLSDomain        `jsonapi:"relation,tls_domains,tls_domain"`
	NotAfter       *time.Time          `jsonapi:"attr,not_after,iso8601"`
	NotBefore      *time.Time          `jsonapi:"attr,not_before,iso8601"`
	CreatedAt      *time.Time          `jsonapi:"attr,created_at,iso8601"`
	UpdatedAt      *time.Time          `jsonapi:"attr,updated_at,iso8601"`
	Replace        bool                `jsonapi:"attr,replace"`
}

BulkCertificate represents a bulk certificate.

type CacheSetting

type CacheSetting struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name           string             `mapstructure:"name"`
	Action         CacheSettingAction `mapstructure:"action"`
	TTL            uint               `mapstructure:"ttl"`
	StaleTTL       uint               `mapstructure:"stale_ttl"`
	CacheCondition string             `mapstructure:"cache_condition"`
	CreatedAt      *time.Time         `mapstructure:"created_at"`
	UpdatedAt      *time.Time         `mapstructure:"updated_at"`
	DeletedAt      *time.Time         `mapstructure:"deleted_at"`
}

CacheSetting represents a response from Fastly's API for cache settings.

type CacheSettingAction

type CacheSettingAction string

CacheSettingAction is the type of cache action.

const (
	// CacheSettingActionCache sets the cache to cache.
	CacheSettingActionCache CacheSettingAction = "cache"

	// CacheSettingActionPass sets the cache to pass through.
	CacheSettingActionPass CacheSettingAction = "pass"

	// CacheSettingActionRestart sets the cache to restart the request.
	CacheSettingActionRestart CacheSettingAction = "restart"
)

type Client

type Client struct {
	// Address is the address of Fastly's API endpoint.
	Address string

	// HTTPClient is the HTTP client to use. If one is not provided, a default
	// client will be used.
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Client is the main entrypoint to the Fastly golang API library.

func DefaultClient

func DefaultClient() *Client

DefaultClient instantiates a new Fastly API client. This function requires the environment variable `FASTLY_API_KEY` is set and contains a valid API key to authenticate with Fastly.

func NewClient

func NewClient(key string) (*Client, error)

NewClient creates a new API client with the given key and the default API endpoint. Because Fastly allows some requests without an API key, this function will not error if the API token is not supplied. Attempts to make a request that requires an API key will return a 403 response.

func NewClientForEndpoint

func NewClientForEndpoint(key string, endpoint string) (*Client, error)

NewClientForEndpoint creates a new API client with the given key and API endpoint. Because Fastly allows some requests without an API key, this function will not error if the API token is not supplied. Attempts to make a request that requires an API key will return a 403 response.

func (*Client) ActivateVCL

func (c *Client) ActivateVCL(i *ActivateVCLInput) (*VCL, error)

ActivateVCL creates a new Fastly VCL.

func (*Client) ActivateVersion

func (c *Client) ActivateVersion(i *ActivateVersionInput) (*Version, error)

ActivateVersion activates the given version.

func (*Client) AllDatacenters

func (c *Client) AllDatacenters() (datacenters []Datacenter, err error)

AllDatacenters returns the lists of datacenters for Fastly's network.

func (*Client) AllIPs

func (c *Client) AllIPs() (v4, v6 IPAddrs, err error)

AllIPs returns the lists of public IPv4 and IPv6 addresses for Fastly's network.

func (*Client) BatchDeleteTokens

func (c *Client) BatchDeleteTokens(i *BatchDeleteTokensInput) error

BatchDeleteTokens revokes multiple tokens.

func (*Client) BatchModificationWAFActiveRules

func (c *Client) BatchModificationWAFActiveRules(i *BatchModificationWAFActiveRulesInput) ([]*WAFActiveRule, error)

BatchModificationWAFActiveRules is a generic function for creating or deleting WAF active rules in batches. Upsert and delete are the only operations allowed.

func (*Client) BatchModifyACLEntries

func (c *Client) BatchModifyACLEntries(i *BatchModifyACLEntriesInput) error

func (*Client) BatchModifyDictionaryItems

func (c *Client) BatchModifyDictionaryItems(i *BatchModifyDictionaryItemsInput) error

func (*Client) CloneVersion

func (c *Client) CloneVersion(i *CloneVersionInput) (*Version, error)

CloneVersion creates a clone of the version with and returns a new configuration version with all the same configuration options, but an incremented number.

func (*Client) CloneWAFVersion

func (c *Client) CloneWAFVersion(i *CloneWAFVersionInput) (*WAFVersion, error)

CloneWAFVersion clones a specific WAF version.

func (*Client) CreateACL

func (c *Client) CreateACL(i *CreateACLInput) (*ACL, error)

func (*Client) CreateACLEntry

func (c *Client) CreateACLEntry(i *CreateACLEntryInput) (*ACLEntry, error)

CreateACLEntry creates and returns a new ACL entry.

func (*Client) CreateBackend

func (c *Client) CreateBackend(i *CreateBackendInput) (*Backend, error)

CreateBackend creates a new Fastly backend.

func (*Client) CreateBigQuery

func (c *Client) CreateBigQuery(i *CreateBigQueryInput) (*BigQuery, error)

CreateBigQuery creates a new Fastly BigQuery.

func (*Client) CreateBlobStorage

func (c *Client) CreateBlobStorage(i *CreateBlobStorageInput) (*BlobStorage, error)

CreateBlobStorage creates a new Fastly blob storage.

func (*Client) CreateBulkCertificate

func (c *Client) CreateBulkCertificate(i *CreateBulkCertificateInput) (*BulkCertificate, error)

CreateBulkCertificate create a TLS private key.

func (*Client) CreateCacheSetting

func (c *Client) CreateCacheSetting(i *CreateCacheSettingInput) (*CacheSetting, error)

CreateCacheSetting creates a new Fastly cache setting.

func (*Client) CreateCloudfiles

func (c *Client) CreateCloudfiles(i *CreateCloudfilesInput) (*Cloudfiles, error)

CreateCloudfiles creates a new Fastly Cloudfiles.

func (*Client) CreateCondition

func (c *Client) CreateCondition(i *CreateConditionInput) (*Condition, error)

CreateCondition creates a new Fastly condition.

func (*Client) CreateCustomTLSCertificate

func (c *Client) CreateCustomTLSCertificate(i *CreateCustomTLSCertificateInput) (*CustomTLSCertificate, error)

CreateCustomTLSCertificate creates a custom TLS certificate.

func (*Client) CreateDatadog

func (c *Client) CreateDatadog(i *CreateDatadogInput) (*Datadog, error)

CreateDatadog creates a new Datadog logging endpoint on a Fastly service version.

func (*Client) CreateDictionary

func (c *Client) CreateDictionary(i *CreateDictionaryInput) (*Dictionary, error)

CreateDictionary creates a new Fastly dictionary.

func (*Client) CreateDictionaryItem

func (c *Client) CreateDictionaryItem(i *CreateDictionaryItemInput) (*DictionaryItem, error)

CreateDictionaryItem creates a new Fastly dictionary item.

func (*Client) CreateDictionaryItems

func (c *Client) CreateDictionaryItems(i []CreateDictionaryItemInput) ([]DictionaryItem, error)

CreateDictionaryItems creates new Fastly dictionary items from a slice.

func (*Client) CreateDigitalOcean

func (c *Client) CreateDigitalOcean(i *CreateDigitalOceanInput) (*DigitalOcean, error)

CreateDigitalOcean creates a new Fastly DigitalOcean.

func (*Client) CreateDirector

func (c *Client) CreateDirector(i *CreateDirectorInput) (*Director, error)

CreateDirector creates a new Fastly director.

func (*Client) CreateDirectorBackend

func (c *Client) CreateDirectorBackend(i *CreateDirectorBackendInput) (*DirectorBackend, error)

CreateDirectorBackend creates a new Fastly backend.

func (*Client) CreateDomain

func (c *Client) CreateDomain(i *CreateDomainInput) (*Domain, error)

CreateDomain creates a new domain with the given information.

func (*Client) CreateERL added in v6.3.0

func (c *Client) CreateERL(i *CreateERLInput) (*ERL, error)

CreateERL returns a new ERL.

func (*Client) CreateElasticsearch

func (c *Client) CreateElasticsearch(i *CreateElasticsearchInput) (*Elasticsearch, error)

CreateElasticsearch creates a new Fastly Elasticsearch logging endpoint.

func (*Client) CreateEmptyWAFVersion

func (c *Client) CreateEmptyWAFVersion(i *CreateEmptyWAFVersionInput) (*WAFVersion, error)

CreateEmptyWAFVersion creates an empty WAF version,

which means a version without rules and all config options set to their default values.

func (*Client) CreateFTP

func (c *Client) CreateFTP(i *CreateFTPInput) (*FTP, error)

CreateFTP creates a new Fastly FTP.

func (*Client) CreateGCS

func (c *Client) CreateGCS(i *CreateGCSInput) (*GCS, error)

CreateGCS creates a new Fastly GCS.

func (*Client) CreateGzip

func (c *Client) CreateGzip(i *CreateGzipInput) (*Gzip, error)

CreateGzip creates a new Fastly Gzip.

func (*Client) CreateHTTPS

func (c *Client) CreateHTTPS(i *CreateHTTPSInput) (*HTTPS, error)

CreateHTTPS creates a new Fastly HTTPS logging endpoint.

func (*Client) CreateHeader

func (c *Client) CreateHeader(i *CreateHeaderInput) (*Header, error)

CreateHeader creates a new Fastly header.

func (*Client) CreateHealthCheck

func (c *Client) CreateHealthCheck(i *CreateHealthCheckInput) (*HealthCheck, error)

CreateHealthCheck creates a new Fastly health check.

func (*Client) CreateHeroku

func (c *Client) CreateHeroku(i *CreateHerokuInput) (*Heroku, error)

CreateHeroku creates a new Fastly heroku.

func (*Client) CreateHoneycomb

func (c *Client) CreateHoneycomb(i *CreateHoneycombInput) (*Honeycomb, error)

CreateHoneycomb creates a new Fastly honeycomb.

func (*Client) CreateKafka

func (c *Client) CreateKafka(i *CreateKafkaInput) (*Kafka, error)

CreateKafka creates a new Fastly kafka.

func (*Client) CreateKinesis

func (c *Client) CreateKinesis(i *CreateKinesisInput) (*Kinesis, error)

CreateKinesis creates a new Fastly Kinesis.

func (*Client) CreateLogentries

func (c *Client) CreateLogentries(i *CreateLogentriesInput) (*Logentries, error)

CreateLogentries creates a new Fastly logentries.

func (*Client) CreateLoggly

func (c *Client) CreateLoggly(i *CreateLogglyInput) (*Loggly, error)

CreateLoggly creates a new Fastly loggly.

func (*Client) CreateLogshuttle

func (c *Client) CreateLogshuttle(i *CreateLogshuttleInput) (*Logshuttle, error)

CreateLogshuttle creates a new Fastly logshuttle.

func (*Client) CreateManagedLogging

func (c *Client) CreateManagedLogging(i *CreateManagedLoggingInput) (*ManagedLogging, error)

CreateManagedLogging enables managed logging for a service.

func (*Client) CreateNewRelic

func (c *Client) CreateNewRelic(i *CreateNewRelicInput) (*NewRelic, error)

CreateNewRelic creates a new Fastly newrelic.

func (*Client) CreateObjectStore added in v6.6.0

func (c *Client) CreateObjectStore(i *CreateObjectStoreInput) (*ObjectStore, error)

CreateObjectStore create a new object store.

func (*Client) CreateOpenstack

func (c *Client) CreateOpenstack(i *CreateOpenstackInput) (*Openstack, error)

CreateOpenstack creates a new Fastly Openstack.

func (*Client) CreatePapertrail

func (c *Client) CreatePapertrail(i *CreatePapertrailInput) (*Papertrail, error)

CreatePapertrail creates a new Fastly papertrail.

func (*Client) CreatePool

func (c *Client) CreatePool(i *CreatePoolInput) (*Pool, error)

CreatePool creates a pool for a particular service and version.

func (*Client) CreatePrivateKey

func (c *Client) CreatePrivateKey(i *CreatePrivateKeyInput) (*PrivateKey, error)

CreatePrivateKey create a TLS private key.

func (*Client) CreatePubsub

func (c *Client) CreatePubsub(i *CreatePubsubInput) (*Pubsub, error)

CreatePubsub creates a new Fastly Pubsub.

func (*Client) CreateRequestSetting

func (c *Client) CreateRequestSetting(i *CreateRequestSettingInput) (*RequestSetting, error)

CreateRequestSetting creates a new Fastly request settings.

func (*Client) CreateResponseObject

func (c *Client) CreateResponseObject(i *CreateResponseObjectInput) (*ResponseObject, error)

CreateResponseObject creates a new Fastly response object.

func (*Client) CreateS3

func (c *Client) CreateS3(i *CreateS3Input) (*S3, error)

CreateS3 creates a new Fastly S3.

func (*Client) CreateSFTP

func (c *Client) CreateSFTP(i *CreateSFTPInput) (*SFTP, error)

CreateSFTP creates a new Fastly SFTP.

func (*Client) CreateScalyr

func (c *Client) CreateScalyr(i *CreateScalyrInput) (*Scalyr, error)

CreateScalyr creates a new Fastly scalyr.

func (*Client) CreateSecret added in v6.7.0

func (c *Client) CreateSecret(i *CreateSecretInput) (*Secret, error)

CreateSecret creates a new Secret within a Secret Store.

func (*Client) CreateSecretStore added in v6.7.0

func (c *Client) CreateSecretStore(i *CreateSecretStoreInput) (*SecretStore, error)

CreateSecretStore creates a new Secret Store.

func (*Client) CreateServer

func (c *Client) CreateServer(i *CreateServerInput) (*Server, error)

CreateServer creates a single server for a particular service and pool. Servers are versionless resources that are associated with a Pool.

func (*Client) CreateService

func (c *Client) CreateService(i *CreateServiceInput) (*Service, error)

CreateService creates a new service with the given information.

func (*Client) CreateServiceAuthorization added in v6.4.0

func (c *Client) CreateServiceAuthorization(i *CreateServiceAuthorizationInput) (*ServiceAuthorization, error)

CreateServiceAuthorization creates a new service authorization granting granular service and user permissions.

func (*Client) CreateSnippet

func (c *Client) CreateSnippet(i *CreateSnippetInput) (*Snippet, error)

CreateSnippet creates a new snippet or dynamic snippet on a unlocked version

func (*Client) CreateSplunk

func (c *Client) CreateSplunk(i *CreateSplunkInput) (*Splunk, error)

CreateSplunk creates a new Fastly splunk.

func (*Client) CreateSumologic

func (c *Client) CreateSumologic(i *CreateSumologicInput) (*Sumologic, error)

CreateSumologic creates a new Fastly sumologic.

func (*Client) CreateSyslog

func (c *Client) CreateSyslog(i *CreateSyslogInput) (*Syslog, error)

CreateSyslog creates a new Fastly syslog.

func (*Client) CreateTLSActivation

func (c *Client) CreateTLSActivation(i *CreateTLSActivationInput) (*TLSActivation, error)

CreateTLSActivation enable TLS for a domain using a custom certificate.

func (*Client) CreateTLSSubscription

func (c *Client) CreateTLSSubscription(i *CreateTLSSubscriptionInput) (*TLSSubscription, error)

func (*Client) CreateToken

func (c *Client) CreateToken(i *CreateTokenInput) (*Token, error)

CreateToken creates a new API token with the given information.

func (*Client) CreateUser

func (c *Client) CreateUser(i *CreateUserInput) (*User, error)

CreateUser creates a new API token with the given information.

func (*Client) CreateVCL

func (c *Client) CreateVCL(i *CreateVCLInput) (*VCL, error)

CreateVCL creates a new Fastly VCL.

func (*Client) CreateVersion

func (c *Client) CreateVersion(i *CreateVersionInput) (*Version, error)

CreateVersion constructs a new version. Note that `CloneVersion` is preferred in almost all scenarios, since `Create()` creates a _blank_ configuration where `Clone()` builds off of an existing configuration.

func (*Client) CreateWAF

func (c *Client) CreateWAF(i *CreateWAFInput) (*WAF, error)

CreateWAF creates a new Fastly WAF.

func (*Client) CreateWAFActiveRules

func (c *Client) CreateWAFActiveRules(i *CreateWAFActiveRulesInput) ([]*WAFActiveRule, error)

CreateWAFActiveRules adds rules to a particular WAF.

func (*Client) CreateWAFRuleExclusion

func (c *Client) CreateWAFRuleExclusion(i *CreateWAFRuleExclusionInput) (*WAFRuleExclusion, error)

CreateWAFRuleExclusion used to create a particular WAF rule exclusion.

func (*Client) DeactivateVersion

func (c *Client) DeactivateVersion(i *DeactivateVersionInput) (*Version, error)

DeactivateVersion deactivates the given version.

func (*Client) Delete

func (c *Client) Delete(p string, ro *RequestOptions) (*http.Response, error)

Delete issues an HTTP DELETE request.

func (*Client) DeleteACL

func (c *Client) DeleteACL(i *DeleteACLInput) error

DeleteACL deletes the given ACL version.

func (*Client) DeleteACLEntry

func (c *Client) DeleteACLEntry(i *DeleteACLEntryInput) error

DeleteACLEntry deletes an entry from an ACL based on its ID

func (*Client) DeleteBackend

func (c *Client) DeleteBackend(i *DeleteBackendInput) error

DeleteBackend deletes the given backend version.

func (*Client) DeleteBigQuery

func (c *Client) DeleteBigQuery(i *DeleteBigQueryInput) error

DeleteBigQuery deletes the given BigQuery version.

func (*Client) DeleteBlobStorage

func (c *Client) DeleteBlobStorage(i *DeleteBlobStorageInput) error

DeleteBlobStorage deletes the given blob storage version.

func (*Client) DeleteBulkCertificate

func (c *Client) DeleteBulkCertificate(i *DeleteBulkCertificateInput) error

DeleteBulkCertificate destroy a certificate. This disables TLS for all domains listed as SAN entries.

func (*Client) DeleteCacheSetting

func (c *Client) DeleteCacheSetting(i *DeleteCacheSettingInput) error

DeleteCacheSetting deletes the given cache setting version.

func (*Client) DeleteCloudfiles

func (c *Client) DeleteCloudfiles(i *DeleteCloudfilesInput) error

DeleteCloudfiles deletes the given Cloudfiles version.

func (*Client) DeleteCondition

func (c *Client) DeleteCondition(i *DeleteConditionInput) error

DeleteCondition deletes the given condition version.

func (*Client) DeleteCustomTLSCertificate

func (c *Client) DeleteCustomTLSCertificate(i *DeleteCustomTLSCertificateInput) error

DeleteCustomTLSCertificate destroy a certificate. This disables TLS for all domains listed as SAN entries.

func (*Client) DeleteDatadog

func (c *Client) DeleteDatadog(i *DeleteDatadogInput) error

DeleteDatadog deletes a Datadog logging endpoint on a Fastly service version.

func (*Client) DeleteDictionary

func (c *Client) DeleteDictionary(i *DeleteDictionaryInput) error

DeleteDictionary deletes the given dictionary version.

func (*Client) DeleteDictionaryItem

func (c *Client) DeleteDictionaryItem(i *DeleteDictionaryItemInput) error

DeleteDictionaryItem deletes the given dictionary item.

func (*Client) DeleteDigitalOcean

func (c *Client) DeleteDigitalOcean(i *DeleteDigitalOceanInput) error

DeleteDigitalOcean deletes the given DigitalOcean version.

func (*Client) DeleteDirector

func (c *Client) DeleteDirector(i *DeleteDirectorInput) error

DeleteDirector deletes the given director version.

func (*Client) DeleteDirectorBackend

func (c *Client) DeleteDirectorBackend(i *DeleteDirectorBackendInput) error

DeleteDirectorBackend deletes the given backend version.

func (*Client) DeleteDomain

func (c *Client) DeleteDomain(i *DeleteDomainInput) error

DeleteDomain removes a single domain by the given name.

func (*Client) DeleteERL added in v6.3.0

func (c *Client) DeleteERL(i *DeleteERLInput) error

DeleteERL deletes the specified ERL.

func (*Client) DeleteElasticsearch

func (c *Client) DeleteElasticsearch(i *DeleteElasticsearchInput) error

func (*Client) DeleteFTP

func (c *Client) DeleteFTP(i *DeleteFTPInput) error

DeleteFTP deletes the given FTP version.

func (*Client) DeleteGCS

func (c *Client) DeleteGCS(i *DeleteGCSInput) error

DeleteGCS deletes the given GCS version.

func (*Client) DeleteGzip

func (c *Client) DeleteGzip(i *DeleteGzipInput) error

DeleteGzip deletes the given Gzip version.

func (*Client) DeleteHTTPS

func (c *Client) DeleteHTTPS(i *DeleteHTTPSInput) error

func (*Client) DeleteHeader

func (c *Client) DeleteHeader(i *DeleteHeaderInput) error

DeleteHeader deletes the given header version.

func (*Client) DeleteHealthCheck

func (c *Client) DeleteHealthCheck(i *DeleteHealthCheckInput) error

DeleteHealthCheck deletes the given health check.

func (*Client) DeleteHeroku

func (c *Client) DeleteHeroku(i *DeleteHerokuInput) error

DeleteHeroku deletes the given heroku version.

func (*Client) DeleteHoneycomb

func (c *Client) DeleteHoneycomb(i *DeleteHoneycombInput) error

DeleteHoneycomb deletes the given honeycomb version.

func (*Client) DeleteJSONAPI

func (c *Client) DeleteJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

DeleteJSONAPI issues an HTTP DELETE request with the given interface json-encoded.

func (*Client) DeleteJSONAPIBulk

func (c *Client) DeleteJSONAPIBulk(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

DeleteJSONAPIBulk issues an HTTP DELETE request with the given interface json-encoded and bulk requests.

func (*Client) DeleteKafka

func (c *Client) DeleteKafka(i *DeleteKafkaInput) error

DeleteKafka deletes the given kafka version.

func (*Client) DeleteKinesis

func (c *Client) DeleteKinesis(i *DeleteKinesisInput) error

DeleteKinesis deletes the given Kinesis version.

func (*Client) DeleteLogentries

func (c *Client) DeleteLogentries(i *DeleteLogentriesInput) error

DeleteLogentries deletes the given logentries version.

func (*Client) DeleteLoggly

func (c *Client) DeleteLoggly(i *DeleteLogglyInput) error

DeleteLoggly deletes the given loggly version.

func (*Client) DeleteLogshuttle

func (c *Client) DeleteLogshuttle(i *DeleteLogshuttleInput) error

DeleteLogshuttle deletes the given logshuttle version.

func (*Client) DeleteManagedLogging

func (c *Client) DeleteManagedLogging(i *DeleteManagedLoggingInput) error

DeleteManagedLogging disables managed logging for a service

func (*Client) DeleteNewRelic

func (c *Client) DeleteNewRelic(i *DeleteNewRelicInput) error

DeleteNewRelic deletes the given newrelic version.

func (*Client) DeleteObjectStore added in v6.6.0

func (c *Client) DeleteObjectStore(i *DeleteObjectStoreInput) error

DeleteObjectStore deletes the given object store.

func (*Client) DeleteObjectStoreKey added in v6.6.0

func (c *Client) DeleteObjectStoreKey(i *DeleteObjectStoreKeyInput) error

DeleteObjectStoreKey deletes a key from an object store.

func (*Client) DeleteOpenstack

func (c *Client) DeleteOpenstack(i *DeleteOpenstackInput) error

DeleteOpenstack deletes the given Openstack version.

func (*Client) DeletePapertrail

func (c *Client) DeletePapertrail(i *DeletePapertrailInput) error

DeletePapertrail deletes the given papertrail version.

func (*Client) DeletePool

func (c *Client) DeletePool(i *DeletePoolInput) error

DeletePool deletes a specific pool for a particular service and version.

func (*Client) DeletePrivateKey

func (c *Client) DeletePrivateKey(i *DeletePrivateKeyInput) error

DeletePrivateKey destroy a TLS private key. Only private keys not already matched to any certificates can be deleted.

func (*Client) DeletePubsub

func (c *Client) DeletePubsub(i *DeletePubsubInput) error

DeletePubsub deletes the given Pubsub version.

func (*Client) DeleteRequestSetting

func (c *Client) DeleteRequestSetting(i *DeleteRequestSettingInput) error

DeleteRequestSetting deletes the given request settings version.

func (*Client) DeleteResponseObject

func (c *Client) DeleteResponseObject(i *DeleteResponseObjectInput) error

DeleteResponseObject deletes the given response object version.

func (*Client) DeleteS3

func (c *Client) DeleteS3(i *DeleteS3Input) error

DeleteS3 deletes the given S3 version.

func (*Client) DeleteSFTP

func (c *Client) DeleteSFTP(i *DeleteSFTPInput) error

DeleteSFTP deletes the given SFTP version.

func (*Client) DeleteScalyr

func (c *Client) DeleteScalyr(i *DeleteScalyrInput) error

DeleteScalyr deletes the given scalyr version.

func (*Client) DeleteSecret added in v6.7.0

func (c *Client) DeleteSecret(i *DeleteSecretInput) error

DeleteSecret deletes the given Secret.

func (*Client) DeleteSecretStore added in v6.7.0

func (c *Client) DeleteSecretStore(i *DeleteSecretStoreInput) error

DeleteSecretStore deletes the given Secret Store and associated Secrets.

func (*Client) DeleteServer

func (c *Client) DeleteServer(i *DeleteServerInput) error

DeleteServer deletes a single server for a particular service and pool.

func (*Client) DeleteService

func (c *Client) DeleteService(i *DeleteServiceInput) error

DeleteService updates the service with the given input.

func (*Client) DeleteServiceAuthorization added in v6.4.0

func (c *Client) DeleteServiceAuthorization(i *DeleteServiceAuthorizationInput) error

DeleteServiceAuthorization deletes an existing service authorization using the ID.

func (*Client) DeleteSnippet

func (c *Client) DeleteSnippet(i *DeleteSnippetInput) error

func (*Client) DeleteSplunk

func (c *Client) DeleteSplunk(i *DeleteSplunkInput) error

DeleteSplunk deletes the given splunk version.

func (*Client) DeleteSumologic

func (c *Client) DeleteSumologic(i *DeleteSumologicInput) error

DeleteSumologic deletes the given sumologic version.

func (*Client) DeleteSyslog

func (c *Client) DeleteSyslog(i *DeleteSyslogInput) error

DeleteSyslog deletes the given syslog version.

func (*Client) DeleteTLSActivation

func (c *Client) DeleteTLSActivation(i *DeleteTLSActivationInput) error

DeleteTLSActivation destroy a certificate.

func (*Client) DeleteTLSSubscription

func (c *Client) DeleteTLSSubscription(i *DeleteTLSSubscriptionInput) error

func (*Client) DeleteToken

func (c *Client) DeleteToken(i *DeleteTokenInput) error

DeleteToken revokes a specific token by its ID.

func (*Client) DeleteTokenSelf

func (c *Client) DeleteTokenSelf() error

DeleteTokenSelf revokes the token used to authorise the request.

func (*Client) DeleteUser

func (c *Client) DeleteUser(i *DeleteUserInput) error

DeleteUser revokes a specific token by its ID.

func (*Client) DeleteVCL

func (c *Client) DeleteVCL(i *DeleteVCLInput) error

DeleteVCL deletes the given VCL version.

func (*Client) DeleteWAF

func (c *Client) DeleteWAF(i *DeleteWAFInput) error

DeleteWAF deletes a given WAF from its service.

func (*Client) DeleteWAFActiveRules

func (c *Client) DeleteWAFActiveRules(i *DeleteWAFActiveRulesInput) error

DeleteWAFActiveRules removes rules from a particular WAF.

func (*Client) DeleteWAFRuleExclusion

func (c *Client) DeleteWAFRuleExclusion(i *DeleteWAFRuleExclusionInput) error

DeleteWAFExclusions removes rules from a particular WAF.

func (*Client) DeployWAFVersion

func (c *Client) DeployWAFVersion(i *DeployWAFVersionInput) error

DeployWAFVersion deploys a specific WAF version.

func (*Client) EdgeCheck

func (c *Client) EdgeCheck(i *EdgeCheckInput) ([]*EdgeCheck, error)

EdgeCheck queries the edge cache for all of Fastly's servers for the given URL.

func (*Client) Get

func (c *Client) Get(p string, ro *RequestOptions) (*http.Response, error)

Get issues an HTTP GET request.

func (*Client) GetACL

func (c *Client) GetACL(i *GetACLInput) (*ACL, error)

GetACL gets the ACL configuration with the given parameters.

func (*Client) GetACLEntry

func (c *Client) GetACLEntry(i *GetACLEntryInput) (*ACLEntry, error)

GetACLEntry returns a single ACL entry based on its ID.

func (*Client) GetAPIEvent

func (c *Client) GetAPIEvent(i *GetAPIEventInput) (*Event, error)

GetAPIEvent gets a specific event

func (*Client) GetAPIEvents

GetAPIEvents lists all the events for a particular customer

func (*Client) GetBackend

func (c *Client) GetBackend(i *GetBackendInput) (*Backend, error)

GetBackend gets the backend configuration with the given parameters.

func (*Client) GetBigQuery

func (c *Client) GetBigQuery(i *GetBigQueryInput) (*BigQuery, error)

GetBigQuery gets the BigQuery configuration with the given parameters.

func (*Client) GetBilling

func (c *Client) GetBilling(i *GetBillingInput) (*Billing, error)

GetBilling returns the billing information for the current account.

func (*Client) GetBlobStorage

func (c *Client) GetBlobStorage(i *GetBlobStorageInput) (*BlobStorage, error)

GetBlobStorage gets the blob storage configuration with the given parameters.

func (*Client) GetBulkCertificate

func (c *Client) GetBulkCertificate(i *GetBulkCertificateInput) (*BulkCertificate, error)

GetBulkCertificate retrieve a single certificate.

func (*Client) GetCacheSetting

func (c *Client) GetCacheSetting(i *GetCacheSettingInput) (*CacheSetting, error)

GetCacheSetting gets the cache setting configuration with the given parameters.

func (*Client) GetCloudfiles

func (c *Client) GetCloudfiles(i *GetCloudfilesInput) (*Cloudfiles, error)

GetCloudfiles gets the Cloudfiles configuration with the given parameters.

func (*Client) GetCondition

func (c *Client) GetCondition(i *GetConditionInput) (*Condition, error)

GetCondition gets the condition configuration with the given parameters.

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser() (*User, error)

GetCurrentUser retrieves the user information for the authenticated user.

func (*Client) GetCustomTLSCertificate

func (c *Client) GetCustomTLSCertificate(i *GetCustomTLSCertificateInput) (*CustomTLSCertificate, error)

func (*Client) GetCustomTLSConfiguration

func (c *Client) GetCustomTLSConfiguration(i *GetCustomTLSConfigurationInput) (*CustomTLSConfiguration, error)

GetCustomTLSConfiguration returns a single TLS configuration.

func (*Client) GetDatadog

func (c *Client) GetDatadog(i *GetDatadogInput) (*Datadog, error)

GetDatadog gets the Datadog configuration with the given parameters.

func (*Client) GetDictionary

func (c *Client) GetDictionary(i *GetDictionaryInput) (*Dictionary, error)

GetDictionary gets the dictionary configuration with the given parameters.

func (*Client) GetDictionaryInfo

func (c *Client) GetDictionaryInfo(i *GetDictionaryInfoInput) (*DictionaryInfo, error)

GetDictionaryInfo gets the dictionary metadata with the given parameters.

func (*Client) GetDictionaryItem

func (c *Client) GetDictionaryItem(i *GetDictionaryItemInput) (*DictionaryItem, error)

GetDictionaryItem gets the dictionary item with the given parameters.

func (*Client) GetDiff

func (c *Client) GetDiff(i *GetDiffInput) (*Diff, error)

GetDiff returns the diff of the given versions.

func (*Client) GetDigitalOcean

func (c *Client) GetDigitalOcean(i *GetDigitalOceanInput) (*DigitalOcean, error)

GetDigitalOcean gets the DigitalOcean configuration with the given parameters.

func (*Client) GetDirector

func (c *Client) GetDirector(i *GetDirectorInput) (*Director, error)

GetDirector gets the director configuration with the given parameters.

func (*Client) GetDirectorBackend

func (c *Client) GetDirectorBackend(i *GetDirectorBackendInput) (*DirectorBackend, error)

GetDirectorBackend gets the backend configuration with the given parameters.

func (*Client) GetDomain

func (c *Client) GetDomain(i *GetDomainInput) (*Domain, error)

GetDomain retrieves information about the given domain name.

func (*Client) GetDynamicSnippet

func (c *Client) GetDynamicSnippet(i *GetDynamicSnippetInput) (*DynamicSnippet, error)

GetDynamicSnippet gets the Snippet configuration with the given parameters. This will show the current content associated with a Dynamic Snippet.

func (*Client) GetERL added in v6.3.0

func (c *Client) GetERL(i *GetERLInput) (*ERL, error)

GetERL returns the specified ERL.

func (*Client) GetElasticsearch

func (c *Client) GetElasticsearch(i *GetElasticsearchInput) (*Elasticsearch, error)

func (*Client) GetFTP

func (c *Client) GetFTP(i *GetFTPInput) (*FTP, error)

GetFTP gets the FTP configuration with the given parameters.

func (*Client) GetGCS

func (c *Client) GetGCS(i *GetGCSInput) (*GCS, error)

GetGCS gets the GCS configuration with the given parameters.

func (*Client) GetGeneratedVCL

func (c *Client) GetGeneratedVCL(i *GetGeneratedVCLInput) (*VCL, error)

GetGeneratedVCL gets the VCL configuration with the given parameters.

func (*Client) GetGzip

func (c *Client) GetGzip(i *GetGzipInput) (*Gzip, error)

GetGzip gets the Gzip configuration with the given parameters.

func (*Client) GetHTTPS

func (c *Client) GetHTTPS(i *GetHTTPSInput) (*HTTPS, error)

func (*Client) GetHeader

func (c *Client) GetHeader(i *GetHeaderInput) (*Header, error)

GetHeader gets the header configuration with the given parameters.

func (*Client) GetHealthCheck

func (c *Client) GetHealthCheck(i *GetHealthCheckInput) (*HealthCheck, error)

GetHealthCheck gets the health check configuration with the given parameters.

func (*Client) GetHeroku

func (c *Client) GetHeroku(i *GetHerokuInput) (*Heroku, error)

GetHeroku gets the heroku configuration with the given parameters.

func (*Client) GetHoneycomb

func (c *Client) GetHoneycomb(i *GetHoneycombInput) (*Honeycomb, error)

GetHoneycomb gets the honeycomb configuration with the given parameters.

func (*Client) GetKafka

func (c *Client) GetKafka(i *GetKafkaInput) (*Kafka, error)

GetKafka gets the kafka configuration with the given parameters.

func (*Client) GetKinesis

func (c *Client) GetKinesis(i *GetKinesisInput) (*Kinesis, error)

GetKinesis gets the Kinesis configuration with the given parameters.

func (*Client) GetLogentries

func (c *Client) GetLogentries(i *GetLogentriesInput) (*Logentries, error)

GetLogentries gets the logentries configuration with the given parameters.

func (*Client) GetLoggly

func (c *Client) GetLoggly(i *GetLogglyInput) (*Loggly, error)

GetLoggly gets the loggly configuration with the given parameters.

func (*Client) GetLogshuttle

func (c *Client) GetLogshuttle(i *GetLogshuttleInput) (*Logshuttle, error)

GetLogshuttle gets the logshuttle configuration with the given parameters.

func (*Client) GetNewRelic

func (c *Client) GetNewRelic(i *GetNewRelicInput) (*NewRelic, error)

GetNewRelic gets the newrelic configuration with the given parameters.

func (*Client) GetObjectStore added in v6.6.0

func (c *Client) GetObjectStore(i *GetObjectStoreInput) (*ObjectStore, error)

GetObjectStore fetches information about the given object store.

func (*Client) GetObjectStoreKey added in v6.6.0

func (c *Client) GetObjectStoreKey(i *GetObjectStoreKeyInput) (string, error)

GetObjectStoreKey returns the value associated with a key in an object store.

func (*Client) GetOpenstack

func (c *Client) GetOpenstack(i *GetOpenstackInput) (*Openstack, error)

GetOpenstack gets the Openstack configuration with the given parameters.

func (*Client) GetOriginMetricsForService added in v6.2.0

func (c *Client) GetOriginMetricsForService(i *GetOriginMetricsInput) (*OriginInspector, error)

GetOriginMetricsForService returns stats data based on GetOriginMetricsInput

func (*Client) GetOriginMetricsForServiceJSON added in v6.2.0

func (c *Client) GetOriginMetricsForServiceJSON(i *GetOriginMetricsInput, dst interface{}) error

GetOriginMetricsForServiceJSON fetches Origin Inspector metrics for a single service and decodes the response directly to the JSON struct dst.

func (*Client) GetPackage

func (c *Client) GetPackage(i *GetPackageInput) (*Package, error)

GetPackage retrieves package information for the given service and version.

func (*Client) GetPapertrail

func (c *Client) GetPapertrail(i *GetPapertrailInput) (*Papertrail, error)

GetPapertrail gets the papertrail configuration with the given parameters.

func (*Client) GetPool

func (c *Client) GetPool(i *GetPoolInput) (*Pool, error)

GetPool gets a single pool for a particular service and version.

func (*Client) GetPrivateKey

func (c *Client) GetPrivateKey(i *GetPrivateKeyInput) (*PrivateKey, error)

GetPrivateKey show a TLS private key.

func (*Client) GetPubsub

func (c *Client) GetPubsub(i *GetPubsubInput) (*Pubsub, error)

GetPubsub gets the Pubsub configuration with the given parameters.

func (*Client) GetRegions

func (c *Client) GetRegions() (*RegionsResponse, error)

GetRegions returns a list of Fastly regions

func (*Client) GetRequestSetting

func (c *Client) GetRequestSetting(i *GetRequestSettingInput) (*RequestSetting, error)

GetRequestSetting gets the request settings configuration with the given parameters.

func (*Client) GetResponseObject

func (c *Client) GetResponseObject(i *GetResponseObjectInput) (*ResponseObject, error)

GetResponseObject gets the response object configuration with the given parameters.

func (*Client) GetS3

func (c *Client) GetS3(i *GetS3Input) (*S3, error)

GetS3 gets the S3 configuration with the given parameters.

func (*Client) GetSFTP

func (c *Client) GetSFTP(i *GetSFTPInput) (*SFTP, error)

GetSFTP gets the SFTP configuration with the given parameters.

func (*Client) GetScalyr

func (c *Client) GetScalyr(i *GetScalyrInput) (*Scalyr, error)

GetScalyr gets the scalyr configuration with the given parameters.

func (*Client) GetSecret added in v6.7.0

func (c *Client) GetSecret(i *GetSecretInput) (*Secret, error)

GetSecret returns a single Secret from a given Secret Store.

func (*Client) GetSecretStore added in v6.7.0

func (c *Client) GetSecretStore(i *GetSecretStoreInput) (*SecretStore, error)

GetSecretStore gets a single Secret Store.

func (*Client) GetServer

func (c *Client) GetServer(i *GetServerInput) (*Server, error)

GetServer gets a single server for a particular service and pool.

func (*Client) GetService

func (c *Client) GetService(i *GetServiceInput) (*Service, error)

GetService retrieves the service information for the service with the given id. If no service exists for the given id, the API returns a 400 response (not a 404).

func (*Client) GetServiceAuthorization added in v6.4.0

func (c *Client) GetServiceAuthorization(i *GetServiceAuthorizationInput) (*ServiceAuthorization, error)

GetServiceAuthorization retrieves an existing service authorization using its ID.

func (*Client) GetServiceDetails

func (c *Client) GetServiceDetails(i *GetServiceInput) (*ServiceDetail, error)

GetService retrieves the details for the service with the given id. If no service exists for the given id, the API returns a 400 response (not a 404).

func (*Client) GetSettings

func (c *Client) GetSettings(i *GetSettingsInput) (*Settings, error)

GetSettings gets the backend configuration with the given parameters.

func (*Client) GetSnippet

func (c *Client) GetSnippet(i *GetSnippetInput) (*Snippet, error)

GetSnippet gets the Snippet configuration with the given parameters. Dynamic Snippets will not show content due to them being versionless, use GetDynamicSnippet to see content.

func (*Client) GetSplunk

func (c *Client) GetSplunk(i *GetSplunkInput) (*Splunk, error)

GetSplunk gets the splunk configuration with the given parameters.

func (*Client) GetStats

func (c *Client) GetStats(i *GetStatsInput) (*StatsResponse, error)

GetStats returns stats data based on GetStatsInput

func (*Client) GetStatsField

func (c *Client) GetStatsField(i *GetStatsInput) (*StatsFieldResponse, error)

GetStatsField returns stats field data based on GetStatsInput

func (*Client) GetStatsJSON

func (c *Client) GetStatsJSON(i *GetStatsInput, dst interface{}) error

GetStatsJSON fetches stats and decodes the response directly to the JSON struct dst.

func (*Client) GetSumologic

func (c *Client) GetSumologic(i *GetSumologicInput) (*Sumologic, error)

GetSumologic gets the sumologic configuration with the given parameters.

func (*Client) GetSyslog

func (c *Client) GetSyslog(i *GetSyslogInput) (*Syslog, error)

GetSyslog gets the syslog configuration with the given parameters.

func (*Client) GetTLSActivation

func (c *Client) GetTLSActivation(i *GetTLSActivationInput) (*TLSActivation, error)

GetTLSActivation retrieve a single activation.

func (*Client) GetTLSSubscription

func (c *Client) GetTLSSubscription(i *GetTLSSubscriptionInput) (*TLSSubscription, error)

func (*Client) GetTokenSelf

func (c *Client) GetTokenSelf() (*Token, error)

GetTokenSelf retrieves the token information for the the access_token used used to authenticate the request. Returns a 401 if the token has expired and a 403 for invalid access token.

func (*Client) GetUsage

func (c *Client) GetUsage(i *GetUsageInput) (*UsageResponse, error)

GetUsage returns usage information aggregated across all Fastly services and grouped by region.

func (*Client) GetUsageByService

func (c *Client) GetUsageByService(i *GetUsageInput) (*UsageByServiceResponse, error)

GetUsageByService returns usage information aggregated by service and grouped by service and region.

func (*Client) GetUser

func (c *Client) GetUser(i *GetUserInput) (*User, error)

GetUser retrieves the user information for the user with the given id. If no user exists for the given id, the API returns a 404 response.

func (*Client) GetVCL

func (c *Client) GetVCL(i *GetVCLInput) (*VCL, error)

GetVCL gets the VCL configuration with the given parameters.

func (*Client) GetVersion

func (c *Client) GetVersion(i *GetVersionInput) (*Version, error)

GetVersion fetches a version with the given information.

func (*Client) GetWAF

func (c *Client) GetWAF(i *GetWAFInput) (*WAF, error)

GetWAF gets details for given WAF

func (*Client) GetWAFVersion

func (c *Client) GetWAFVersion(i *GetWAFVersionInput) (*WAFVersion, error)

GetWAFVersion gets details for given WAF version.

func (*Client) Head

func (c *Client) Head(p string, ro *RequestOptions) (*http.Response, error)

Head issues an HTTP HEAD request.

func (*Client) IPs

func (c *Client) IPs() (IPAddrs, error)

IPs returns the list of public IPv4 addresses for Fastly's network.

func (*Client) IPsV6

func (c *Client) IPsV6() (IPAddrs, error)

IPsV6 returns the list of public IPv6 addresses for Fastly's network.

func (*Client) InsertObjectStoreKey added in v6.6.0

func (c *Client) InsertObjectStoreKey(i *InsertObjectStoreKeyInput) error

InsertObjectStoreKey inserts a key/value pair into an object store.

func (*Client) LatestVersion

func (c *Client) LatestVersion(i *LatestVersionInput) (*Version, error)

LatestVersion fetches the latest version. If there are no versions, this function will return nil (but not an error).

func (*Client) ListACLEntries

func (c *Client) ListACLEntries(i *ListACLEntriesInput) ([]*ACLEntry, error)

ListACLEntries return a list of entries for an ACL

func (*Client) ListACLs

func (c *Client) ListACLs(i *ListACLsInput) ([]*ACL, error)

ListACLs returns the list of ACLs for the configuration version.

func (*Client) ListAllWAFActiveRules

func (c *Client) ListAllWAFActiveRules(i *ListAllWAFActiveRulesInput) (*WAFActiveRuleResponse, error)

ListAllWAFActiveRules returns the complete list of WAF active rules for a given WAF ID. It iterates through all existing pages to ensure all WAF active rules are returned at once.

func (*Client) ListAllWAFRuleExclusions

func (c *Client) ListAllWAFRuleExclusions(i *ListAllWAFRuleExclusionsInput) (*WAFRuleExclusionResponse, error)

ListAllWAFRuleExclusions returns the complete list of WAF rule exclusions for a given WAF ID. It iterates through all existing pages to ensure all WAF rule exclusions are returned at once.

func (*Client) ListAllWAFRules

func (c *Client) ListAllWAFRules(i *ListAllWAFRulesInput) (*WAFRuleResponse, error)

ListAllWAFRules returns the complete list of WAF rules for the given filters. It iterates through all existing pages to ensure all WAF rules are returned at once.

func (*Client) ListAllWAFVersions

func (c *Client) ListAllWAFVersions(i *ListAllWAFVersionsInput) (*WAFVersionResponse, error)

ListAllWAFVersions returns the complete list of WAF versions for a given WAF ID. It iterates through all existing pages to ensure all WAF versions are returned at once.

func (*Client) ListBackends

func (c *Client) ListBackends(i *ListBackendsInput) ([]*Backend, error)

ListBackends returns the list of backends for the configuration version.

func (*Client) ListBigQueries

func (c *Client) ListBigQueries(i *ListBigQueriesInput) ([]*BigQuery, error)

ListBigQueries returns the list of BigQueries for the configuration version.

func (*Client) ListBlobStorages

func (c *Client) ListBlobStorages(i *ListBlobStoragesInput) ([]*BlobStorage, error)

ListBlobStorages returns the list of blob storages for the configuration version.

func (*Client) ListBulkCertificates

func (c *Client) ListBulkCertificates(i *ListBulkCertificatesInput) ([]*BulkCertificate, error)

ListBulkCertificates list all certificates.

func (*Client) ListCacheSettings

func (c *Client) ListCacheSettings(i *ListCacheSettingsInput) ([]*CacheSetting, error)

ListCacheSettings returns the list of cache settings for the configuration version.

func (*Client) ListCloudfiles

func (c *Client) ListCloudfiles(i *ListCloudfilesInput) ([]*Cloudfiles, error)

ListCloudfiles returns the list of Cloudfiles for the configuration version.

func (*Client) ListConditions

func (c *Client) ListConditions(i *ListConditionsInput) ([]*Condition, error)

ListConditions returns the list of conditions for the configuration version.

func (*Client) ListCustomTLSCertificates

func (c *Client) ListCustomTLSCertificates(i *ListCustomTLSCertificatesInput) ([]*CustomTLSCertificate, error)

ListCustomTLSCertificates list all certificates.

func (*Client) ListCustomTLSConfigurations

func (c *Client) ListCustomTLSConfigurations(i *ListCustomTLSConfigurationsInput) ([]*CustomTLSConfiguration, error)

ListCustomTLSConfigurations list all TLS configurations.

func (*Client) ListCustomerTokens

func (c *Client) ListCustomerTokens(i *ListCustomerTokensInput) ([]*Token, error)

ListCustomerTokens returns the full list of tokens belonging to a specific customer.

func (*Client) ListCustomerUsers

func (c *Client) ListCustomerUsers(i *ListCustomerUsersInput) ([]*User, error)

ListCustomerUsers returns the full list of users belonging to a specific customer.

func (*Client) ListDatadog

func (c *Client) ListDatadog(i *ListDatadogInput) ([]*Datadog, error)

ListDatadog returns the list of Datadog for the configuration version.

func (*Client) ListDictionaries

func (c *Client) ListDictionaries(i *ListDictionariesInput) ([]*Dictionary, error)

ListDictionaries returns the list of dictionaries for the configuration version.

func (*Client) ListDictionaryItems

func (c *Client) ListDictionaryItems(i *ListDictionaryItemsInput) ([]*DictionaryItem, error)

ListDictionaryItems returns a list of items for a dictionary

func (*Client) ListDigitalOceans

func (c *Client) ListDigitalOceans(i *ListDigitalOceansInput) ([]*DigitalOcean, error)

ListDigitalOceans returns the list of DigitalOceans for the configuration version.

func (*Client) ListDirectors

func (c *Client) ListDirectors(i *ListDirectorsInput) ([]*Director, error)

ListDirectors returns the list of directors for the configuration version.

func (*Client) ListDomains

func (c *Client) ListDomains(i *ListDomainsInput) ([]*Domain, error)

ListDomains returns the list of domains for this Service.

func (*Client) ListERLs added in v6.3.0

func (c *Client) ListERLs(i *ListERLsInput) ([]*ERL, error)

ListERLs returns the list of ERLs for the specified service version.

func (*Client) ListElasticsearch

func (c *Client) ListElasticsearch(i *ListElasticsearchInput) ([]*Elasticsearch, error)

ListElasticsearch returns the list of Elasticsearch logs for the configuration version.

func (*Client) ListFTPs

func (c *Client) ListFTPs(i *ListFTPsInput) ([]*FTP, error)

ListFTPs returns the list of ftps for the configuration version.

func (*Client) ListGCSs

func (c *Client) ListGCSs(i *ListGCSsInput) ([]*GCS, error)

ListGCSs returns the list of gcses for the configuration version.

func (*Client) ListGzips

func (c *Client) ListGzips(i *ListGzipsInput) ([]*Gzip, error)

ListGzips returns the list of gzips for the configuration version.

func (*Client) ListHTTPS

func (c *Client) ListHTTPS(i *ListHTTPSInput) ([]*HTTPS, error)

ListHTTPS returns the list of HTTPS logs for the configuration version.

func (*Client) ListHeaders

func (c *Client) ListHeaders(i *ListHeadersInput) ([]*Header, error)

ListHeaders returns the list of headers for the configuration version.

func (*Client) ListHealthChecks

func (c *Client) ListHealthChecks(i *ListHealthChecksInput) ([]*HealthCheck, error)

ListHealthChecks returns the list of health checks for the configuration version.

func (*Client) ListHerokus

func (c *Client) ListHerokus(i *ListHerokusInput) ([]*Heroku, error)

ListHerokus returns the list of herokus for the configuration version.

func (*Client) ListHoneycombs

func (c *Client) ListHoneycombs(i *ListHoneycombsInput) ([]*Honeycomb, error)

ListHoneycombs returns the list of honeycombs for the configuration version.

func (*Client) ListKafkas

func (c *Client) ListKafkas(i *ListKafkasInput) ([]*Kafka, error)

ListKafkas returns the list of kafkas for the configuration version.

func (*Client) ListKinesis

func (c *Client) ListKinesis(i *ListKinesisInput) ([]*Kinesis, error)

ListKinesis returns the list of Kinesis for the configuration version.

func (*Client) ListLogentries

func (c *Client) ListLogentries(i *ListLogentriesInput) ([]*Logentries, error)

ListLogentries returns the list of logentries for the configuration version.

func (*Client) ListLoggly

func (c *Client) ListLoggly(i *ListLogglyInput) ([]*Loggly, error)

ListLoggly returns the list of loggly for the configuration version.

func (*Client) ListLogshuttles

func (c *Client) ListLogshuttles(i *ListLogshuttlesInput) ([]*Logshuttle, error)

ListLogshuttles returns the list of logshuttles for the configuration version.

func (*Client) ListNewRelic

func (c *Client) ListNewRelic(i *ListNewRelicInput) ([]*NewRelic, error)

ListNewRelic returns the list of newrelic for the configuration version.

func (*Client) ListObjectStoreKeys added in v6.6.0

func (c *Client) ListObjectStoreKeys(i *ListObjectStoreKeysInput) (*ListObjectStoreKeysResponse, error)

ListObjectStoreKeys lists the keys for the given object store.

func (*Client) ListObjectStores added in v6.6.0

func (c *Client) ListObjectStores(i *ListObjectStoresInput) (*ListObjectStoresResponse, error)

ListObjectStores lists the object stores for the current customer.

func (*Client) ListOpenstack

func (c *Client) ListOpenstack(i *ListOpenstackInput) ([]*Openstack, error)

ListOpenstack returns the list of Openstack for the configuration version.

func (*Client) ListPapertrails

func (c *Client) ListPapertrails(i *ListPapertrailsInput) ([]*Papertrail, error)

ListPapertrails returns the list of papertrails for the configuration version.

func (*Client) ListPools

func (c *Client) ListPools(i *ListPoolsInput) ([]*Pool, error)

ListPools lists all pools for a particular service and version.

func (*Client) ListPrivateKeys

func (c *Client) ListPrivateKeys(i *ListPrivateKeysInput) ([]*PrivateKey, error)

ListPrivateKeys list all TLS private keys.

func (*Client) ListPubsubs

func (c *Client) ListPubsubs(i *ListPubsubsInput) ([]*Pubsub, error)

ListPubsubs returns the list of pubsubs for the configuration version.

func (*Client) ListRequestSettings

func (c *Client) ListRequestSettings(i *ListRequestSettingsInput) ([]*RequestSetting, error)

ListRequestSettings returns the list of request settings for the configuration version.

func (*Client) ListResponseObjects

func (c *Client) ListResponseObjects(i *ListResponseObjectsInput) ([]*ResponseObject, error)

ListResponseObjects returns the list of response objects for the configuration version.

func (*Client) ListS3s

func (c *Client) ListS3s(i *ListS3sInput) ([]*S3, error)

ListS3s returns the list of S3s for the configuration version.

func (*Client) ListSFTPs

func (c *Client) ListSFTPs(i *ListSFTPsInput) ([]*SFTP, error)

ListSFTPs returns the list of sftps for the configuration version.

func (*Client) ListScalyrs

func (c *Client) ListScalyrs(i *ListScalyrsInput) ([]*Scalyr, error)

ListScalyrs returns the list of scalyrs for the configuration version.

func (*Client) ListSecretStores added in v6.7.0

func (c *Client) ListSecretStores(i *ListSecretStoresInput) (*SecretStores, error)

ListSecretStores returns a paginated list of Secret Stores. The returned next cursor, if non-blank, can be used as input to a subsequent request for the next page of results.

func (*Client) ListSecrets added in v6.7.0

func (c *Client) ListSecrets(i *ListSecretsInput) (*Secrets, error)

ListSecrets returns a list of Secrets for the given Secret Store. The returned next cursor, if non-blank, can be used as input to a subsequent request for the next page of results.

func (*Client) ListServers

func (c *Client) ListServers(i *ListServersInput) ([]*Server, error)

ListServers lists all servers for a particular service and pool.

func (*Client) ListServiceAuthorizations added in v6.4.1

func (c *Client) ListServiceAuthorizations(i *ListServiceAuthorizationsInput) (*SAResponse, error)

ListServiceAuthorizations returns the list of wafs for the configuration version.

func (*Client) ListServiceDomains

func (c *Client) ListServiceDomains(i *ListServiceDomainInput) (ServiceDomainsList, error)

ListServiceDomains lists all domains associated with a given service

func (*Client) ListServices

func (c *Client) ListServices(i *ListServicesInput) ([]*Service, error)

ListServices returns the full list of services for the current account.

func (*Client) ListSnippets

func (c *Client) ListSnippets(i *ListSnippetsInput) ([]*Snippet, error)

ListSnippets returns the list of Snippets for the configuration version. Content is not displayed for Dynmanic Snippets due to them being versionless, use the GetDynamicSnippet function to show current content.

func (*Client) ListSplunks

func (c *Client) ListSplunks(i *ListSplunksInput) ([]*Splunk, error)

ListSplunks returns the list of splunks for the configuration version.

func (*Client) ListSumologics

func (c *Client) ListSumologics(i *ListSumologicsInput) ([]*Sumologic, error)

ListSumologics returns the list of sumologics for the configuration version.

func (*Client) ListSyslogs

func (c *Client) ListSyslogs(i *ListSyslogsInput) ([]*Syslog, error)

ListSyslogs returns the list of syslogs for the configuration version.

func (*Client) ListTLSActivations

func (c *Client) ListTLSActivations(i *ListTLSActivationsInput) ([]*TLSActivation, error)

ListTLSActivations list all activations.

func (*Client) ListTLSDomains

func (c *Client) ListTLSDomains(i *ListTLSDomainsInput) ([]*TLSDomain, error)

ListTLSDomains retrieves a page of TLS domains.

func (*Client) ListTLSSubscriptions

func (c *Client) ListTLSSubscriptions(i *ListTLSSubscriptionsInput) ([]*TLSSubscription, error)

ListTLSSubscriptions lists all managed TLS subscriptions

func (*Client) ListTokens

func (c *Client) ListTokens() ([]*Token, error)

ListTokens returns the full list of tokens belonging to the currently authenticated user.

func (*Client) ListVCLs

func (c *Client) ListVCLs(i *ListVCLsInput) ([]*VCL, error)

ListVCLs returns the list of VCLs for the configuration version.

func (*Client) ListVersions

func (c *Client) ListVersions(i *ListVersionsInput) ([]*Version, error)

ListVersions returns the full list of all versions of the given service.

func (*Client) ListWAFActiveRules

func (c *Client) ListWAFActiveRules(i *ListWAFActiveRulesInput) (*WAFActiveRuleResponse, error)

ListWAFActiveRules returns the list of active rules for a given WAF ID.

func (*Client) ListWAFRuleExclusions

func (c *Client) ListWAFRuleExclusions(i *ListWAFRuleExclusionsInput) (*WAFRuleExclusionResponse, error)

ListWAFRuleExclusions returns the list of exclusions for a given WAF ID.

func (*Client) ListWAFRules

func (c *Client) ListWAFRules(i *ListWAFRulesInput) (*WAFRuleResponse, error)

ListWAFRules returns the list of VAF versions for a given WAF ID.

func (*Client) ListWAFVersions

func (c *Client) ListWAFVersions(i *ListWAFVersionsInput) (*WAFVersionResponse, error)

ListWAFVersions returns the list of VAF versions for a given WAF ID.

func (*Client) ListWAFs

func (c *Client) ListWAFs(i *ListWAFsInput) (*WAFResponse, error)

ListWAFs returns the list of wafs for the configuration version.

func (*Client) LockVersion

func (c *Client) LockVersion(i *LockVersionInput) (*Version, error)

LockVersion locks the specified version.

func (*Client) LockWAFVersion

func (c *Client) LockWAFVersion(i *LockWAFVersionInput) (*WAFVersion, error)

LockWAFVersion locks a specific WAF version.

func (*Client) NewListACLEntriesPaginator

func (c *Client) NewListACLEntriesPaginator(i *ListACLEntriesInput) PaginatorACLEntries

NewListACLEntriesPaginator returns a new paginator

Example
package main

import (
	"fmt"
	"log"

	"github.com/fastly/go-fastly/v6/fastly"
)

func main() {
	client, err := fastly.NewClient("your_api_token")
	if err != nil {
		log.Fatal(err)
	}

	paginator := client.NewListACLEntriesPaginator(
		&fastly.ListACLEntriesInput{
			ServiceID: "your_service_id",
			ACLID:     "your_acl_id",
			PerPage:   50,
		},
	)

	var es []*fastly.ACLEntry
	for paginator.HasNext() {
		data, err := paginator.GetNext()
		if err != nil {
			break
		}
		es = append(es, data...)
	}

	fmt.Printf("retrieved %d ACL entries\n", len(es))
}
Output:

func (*Client) NewListDictionaryItemsPaginator

func (c *Client) NewListDictionaryItemsPaginator(i *ListDictionaryItemsInput) PaginatorDictionaryItems

NewListDictionaryItemsPaginator returns a new paginator

Example
package main

import (
	"fmt"
	"log"

	"github.com/fastly/go-fastly/v6/fastly"
)

func main() {
	client, err := fastly.NewClient("your_api_token")
	if err != nil {
		log.Fatal(err)
	}

	paginator := client.NewListDictionaryItemsPaginator(
		&fastly.ListDictionaryItemsInput{
			ServiceID:    "your_service_id",
			DictionaryID: "your_dictionary_id",
			PerPage:      50,
		},
	)

	var ds []*fastly.DictionaryItem
	for paginator.HasNext() {
		data, err := paginator.GetNext()
		if err != nil {
			break
		}
		ds = append(ds, data...)
	}

	fmt.Printf("retrieved %d Dictionary items\n", len(ds))
}
Output:

func (*Client) NewListObjectStoreKeysPaginator added in v6.6.0

func (c *Client) NewListObjectStoreKeysPaginator(i *ListObjectStoreKeysInput) *ListObjectsStoreKeysPaginator

NewListObjectStoreKeysPaginator returns a new paginator for the provided LitObjectStoreKeysInput.

func (*Client) NewListObjectStoresPaginator added in v6.6.0

func (c *Client) NewListObjectStoresPaginator(i *ListObjectStoresInput) *ListObjectStoresPaginator

NewListObjectStoresPaginator creates a new paginator for the given ListObjectStoresInput.

func (*Client) NewListServicesPaginator

func (c *Client) NewListServicesPaginator(i *ListServicesInput) PaginatorServices

NewListServicesPaginator returns a new paginator

Example
package main

import (
	"fmt"
	"log"

	"github.com/fastly/go-fastly/v6/fastly"
)

func main() {
	client, err := fastly.NewClient("your_api_token")
	if err != nil {
		log.Fatal(err)
	}

	paginator := client.NewListServicesPaginator(
		&fastly.ListServicesInput{
			PerPage: 50,
		},
	)

	var ss []*fastly.Service
	for paginator.HasNext() {
		data, err := paginator.GetNext()
		if err != nil {
			break
		}
		ss = append(ss, data...)
	}

	fmt.Printf("retrieved %d services\n", len(ss))
}
Output:

func (*Client) Patch

func (c *Client) Patch(p string, ro *RequestOptions) (*http.Response, error)

Patch issues an HTTP PATCH request.

func (*Client) PatchForm

func (c *Client) PatchForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PatchForm issues an HTTP PUT request with the given interface form-encoded.

func (*Client) PatchJSON

func (c *Client) PatchJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PatchJSON issues an HTTP PUT request with the given interface json-encoded.

func (*Client) PatchJSONAPI

func (c *Client) PatchJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PatchJSONAPI issues an HTTP PUT request with the given interface json-encoded.

func (*Client) Post

func (c *Client) Post(p string, ro *RequestOptions) (*http.Response, error)

Post issues an HTTP POST request.

func (*Client) PostForm

func (c *Client) PostForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PostForm issues an HTTP POST request with the given interface form-encoded.

func (*Client) PostJSON

func (c *Client) PostJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PostJSON issues an HTTP POST request with the given interface json-encoded.

func (*Client) PostJSONAPI

func (c *Client) PostJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PostJSONAPI issues an HTTP POST request with the given interface json-encoded.

func (*Client) PostJSONAPIBulk

func (c *Client) PostJSONAPIBulk(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PostJSONAPIBulk issues an HTTP POST request with the given interface json-encoded and bulk requests.

func (*Client) Purge

func (c *Client) Purge(i *PurgeInput) (*Purge, error)

Purge instantly purges an individual URL.

func (*Client) PurgeAll

func (c *Client) PurgeAll(i *PurgeAllInput) (*Purge, error)

PurgeAll instantly purges everything from a service.

func (*Client) PurgeKey

func (c *Client) PurgeKey(i *PurgeKeyInput) (*Purge, error)

PurgeKey instantly purges a particular service of items tagged with a key.

func (*Client) PurgeKeys

func (c *Client) PurgeKeys(i *PurgeKeysInput) (map[string]string, error)

PurgeKeys instantly purges a particular service of items tagged with a key.

func (*Client) Put

func (c *Client) Put(p string, ro *RequestOptions) (*http.Response, error)

Put issues an HTTP PUT request.

func (*Client) PutForm

func (c *Client) PutForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PutForm issues an HTTP PUT request with the given interface form-encoded.

func (*Client) PutFormFile

func (c *Client) PutFormFile(urlPath string, filePath string, fieldName string, ro *RequestOptions) (*http.Response, error)

PutFormFile issues an HTTP PUT request (multipart/form-encoded) to put a file to an endpoint.

func (*Client) PutJSON

func (c *Client) PutJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PutJSON issues an HTTP PUT request with the given interface json-encoded.

func (*Client) PutJSONAPI

func (c *Client) PutJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error)

PutJSONAPI issues an HTTP PUT request with the given interface json-encoded.

func (*Client) RateLimitRemaining added in v6.1.0

func (c *Client) RateLimitRemaining() int

RateLimitRemaining returns the number of non-read requests left before rate limiting causes a 429 Too Many Requests error.

Example
package main

import (
	"fmt"
	"log"

	"github.com/fastly/go-fastly/v6/fastly"
)

func main() {
	token := "your_api_token"
	sid := "your_service_id"
	dictName := "your_dict_name"

	c, err := fastly.NewClient(token)
	if err != nil {
		log.Fatal(err)
	}

	v, err := c.LatestVersion(&fastly.LatestVersionInput{ServiceID: sid})
	if err != nil {
		log.Fatal(err)
	}

	dict, err := c.GetDictionary(&fastly.GetDictionaryInput{
		ServiceID:      sid,
		ServiceVersion: v.Number,
		Name:           dictName,
	})
	if err != nil {
		log.Fatal(err)
	}

	_, err = c.CreateDictionaryItem(&fastly.CreateDictionaryItemInput{
		ServiceID:    sid,
		DictionaryID: dict.ID,
		ItemKey:      "test-dictionary-item",
		ItemValue:    "value",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("Writes remaining before '429 Too Many Requests': %d\n", c.RateLimitRemaining())
	fmt.Printf("Next rate limit reset expected at %v\n", c.RateLimitReset())

	for i := 1; i < 10; i++ {
		_, err := c.UpdateDictionaryItem(&fastly.UpdateDictionaryItemInput{
			ServiceID:    sid,
			DictionaryID: dict.ID,
			ItemKey:      "test-dictionary-item",
			ItemValue:    fmt.Sprintf("value%d", i),
		})
		if err != nil {
			log.Fatal(err)
		}
		fmt.Printf("Writes remaining before '429 Too Many Requests': %d\n", c.RateLimitRemaining())
		fmt.Printf("Next rate limit reset expected at %v\n", c.RateLimitReset())
	}
}
Output:

func (*Client) RateLimitReset added in v6.1.0

func (c *Client) RateLimitReset() time.Time

RateLimitReset returns the next time the rate limiter's counter will be reset.

func (*Client) RawRequest

func (c *Client) RawRequest(verb, p string, ro *RequestOptions) (*http.Request, error)

RawRequest accepts a verb, URL, and RequestOptions struct and returns the constructed http.Request and any errors that occurred

func (*Client) Request

func (c *Client) Request(verb, p string, ro *RequestOptions) (*http.Response, error)

Request makes an HTTP request against the HTTPClient using the given verb, Path, and request options.

func (*Client) RequestForm

func (c *Client) RequestForm(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)

RequestForm makes an HTTP request with the given interface being encoded as form data.

func (*Client) RequestFormFile

func (c *Client) RequestFormFile(verb, urlPath string, filePath string, fieldName string, ro *RequestOptions) (*http.Response, error)

RequestFormFile makes an HTTP request to upload a file to an endpoint.

func (*Client) RequestJSON

func (c *Client) RequestJSON(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)

func (*Client) RequestJSONAPI

func (c *Client) RequestJSONAPI(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)

func (*Client) RequestJSONAPIBulk

func (c *Client) RequestJSONAPIBulk(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error)

func (*Client) ResetUserPassword

func (c *Client) ResetUserPassword(i *ResetUserPasswordInput) error

ResetUserPassword revokes a specific token by its ID.

func (*Client) SearchService

func (c *Client) SearchService(i *SearchServiceInput) (*Service, error)

SearchService gets a specific service by name. If no service exists by that name, the API returns a 400 response (not a 404).

func (*Client) SimpleGet

func (c *Client) SimpleGet(target string) (*http.Response, error)

SimpleGet combines the RawRequest and Request methods, but doesn't add any parameters or change any encoding in the URL passed to it. It's mostly for calling the URLs given to us directly from Fastly without mangling them.

func (*Client) UpdateACL

func (c *Client) UpdateACL(i *UpdateACLInput) (*ACL, error)

UpdateACL updates the name of the ACL with the given parameters.

func (*Client) UpdateACLEntry

func (c *Client) UpdateACLEntry(i *UpdateACLEntryInput) (*ACLEntry, error)

UpdateACLEntry updates an ACL entry

func (*Client) UpdateBackend

func (c *Client) UpdateBackend(i *UpdateBackendInput) (*Backend, error)

UpdateBackend updates a specific backend.

func (*Client) UpdateBigQuery

func (c *Client) UpdateBigQuery(i *UpdateBigQueryInput) (*BigQuery, error)

UpdateBigQuery updates a specific BigQuery.

func (*Client) UpdateBlobStorage

func (c *Client) UpdateBlobStorage(i *UpdateBlobStorageInput) (*BlobStorage, error)

UpdateBlobStorage updates a specific blob storage.

func (*Client) UpdateBulkCertificate

func (c *Client) UpdateBulkCertificate(i *UpdateBulkCertificateInput) (*BulkCertificate, error)

UpdateBulkCertificate replace a certificate with a newly reissued certificate. By using this endpoint, the original certificate will cease to be used for future TLS handshakes. Thus, only SAN entries that appear in the replacement certificate will become TLS enabled. Any SAN entries that are missing in the replacement certificate will become disabled.

func (*Client) UpdateCacheSetting

func (c *Client) UpdateCacheSetting(i *UpdateCacheSettingInput) (*CacheSetting, error)

UpdateCacheSetting updates a specific cache setting.

func (*Client) UpdateCloudfiles

func (c *Client) UpdateCloudfiles(i *UpdateCloudfilesInput) (*Cloudfiles, error)

UpdateCloudfiles updates a specific Cloudfiles.

func (*Client) UpdateCondition

func (c *Client) UpdateCondition(i *UpdateConditionInput) (*Condition, error)

UpdateCondition updates a specific condition.

func (*Client) UpdateCustomTLSCertificate

func (c *Client) UpdateCustomTLSCertificate(i *UpdateCustomTLSCertificateInput) (*CustomTLSCertificate, error)

UpdateCustomTLSCertificate replace a certificate with a newly reissued certificate. By using this endpoint, the original certificate will cease to be used for future TLS handshakes. Thus, only SAN entries that appear in the replacement certificate will become TLS enabled. Any SAN entries that are missing in the replacement certificate will become disabled.

func (*Client) UpdateCustomTLSConfiguration

func (c *Client) UpdateCustomTLSConfiguration(i *UpdateCustomTLSConfigurationInput) (*CustomTLSConfiguration, error)

UpdateCustomTLSConfiguration can only be used to change the name of the configuration

func (*Client) UpdateDatadog

func (c *Client) UpdateDatadog(i *UpdateDatadogInput) (*Datadog, error)

UpdateDatadog updates a Datadog logging endpoint on a Fastly service version.

func (*Client) UpdateDictionary

func (c *Client) UpdateDictionary(i *UpdateDictionaryInput) (*Dictionary, error)

UpdateDictionary updates a specific dictionary.

func (*Client) UpdateDictionaryItem

func (c *Client) UpdateDictionaryItem(i *UpdateDictionaryItemInput) (*DictionaryItem, error)

UpdateDictionaryItem updates a specific dictionary item.

func (*Client) UpdateDigitalOcean

func (c *Client) UpdateDigitalOcean(i *UpdateDigitalOceanInput) (*DigitalOcean, error)

UpdateDigitalOcean updates a specific DigitalOcean.

func (*Client) UpdateDirector

func (c *Client) UpdateDirector(i *UpdateDirectorInput) (*Director, error)

UpdateDirector updates a specific director.

func (*Client) UpdateDomain

func (c *Client) UpdateDomain(i *UpdateDomainInput) (*Domain, error)

UpdateDomain updates a single domain for the current service. The only allowed parameters are `Name` and `Comment`.

func (*Client) UpdateDynamicSnippet

func (c *Client) UpdateDynamicSnippet(i *UpdateDynamicSnippetInput) (*DynamicSnippet, error)

UpdateDynamicSnippet replaces the content of a Dynamic Snippet

func (*Client) UpdateERL added in v6.3.0

func (c *Client) UpdateERL(i *UpdateERLInput) (*ERL, error)

UpdateERLInput updates the specified ERL.

func (*Client) UpdateElasticsearch

func (c *Client) UpdateElasticsearch(i *UpdateElasticsearchInput) (*Elasticsearch, error)

func (*Client) UpdateFTP

func (c *Client) UpdateFTP(i *UpdateFTPInput) (*FTP, error)

UpdateFTP updates a specific FTP.

func (*Client) UpdateGCS

func (c *Client) UpdateGCS(i *UpdateGCSInput) (*GCS, error)

UpdateGCS updates a specific GCS.

func (*Client) UpdateGzip

func (c *Client) UpdateGzip(i *UpdateGzipInput) (*Gzip, error)

UpdateGzip updates a specific Gzip.

func (*Client) UpdateHTTPS

func (c *Client) UpdateHTTPS(i *UpdateHTTPSInput) (*HTTPS, error)

func (*Client) UpdateHeader

func (c *Client) UpdateHeader(i *UpdateHeaderInput) (*Header, error)

UpdateHeader updates a specific header.

func (*Client) UpdateHealthCheck

func (c *Client) UpdateHealthCheck(i *UpdateHealthCheckInput) (*HealthCheck, error)

UpdateHealthCheck updates a specific health check.

func (*Client) UpdateHeroku

func (c *Client) UpdateHeroku(i *UpdateHerokuInput) (*Heroku, error)

UpdateHeroku updates a specific heroku.

func (*Client) UpdateHoneycomb

func (c *Client) UpdateHoneycomb(i *UpdateHoneycombInput) (*Honeycomb, error)

UpdateHoneycomb updates a specific honeycomb.

func (*Client) UpdateKafka

func (c *Client) UpdateKafka(i *UpdateKafkaInput) (*Kafka, error)

UpdateKafka updates a specific kafka.

func (*Client) UpdateKinesis

func (c *Client) UpdateKinesis(i *UpdateKinesisInput) (*Kinesis, error)

UpdateKinesis updates a specific Kinesis.

func (*Client) UpdateLogentries

func (c *Client) UpdateLogentries(i *UpdateLogentriesInput) (*Logentries, error)

UpdateLogentries updates a specific logentries.

func (*Client) UpdateLoggly

func (c *Client) UpdateLoggly(i *UpdateLogglyInput) (*Loggly, error)

UpdateLoggly updates a specific loggly.

func (*Client) UpdateLogshuttle

func (c *Client) UpdateLogshuttle(i *UpdateLogshuttleInput) (*Logshuttle, error)

UpdateLogshuttle updates a specific logshuttle.

func (*Client) UpdateNewRelic

func (c *Client) UpdateNewRelic(i *UpdateNewRelicInput) (*NewRelic, error)

UpdateNewRelic updates a specific newrelic.

func (*Client) UpdateOpenstack

func (c *Client) UpdateOpenstack(i *UpdateOpenstackInput) (*Openstack, error)

UpdateOpenstack updates a specific Openstack.

func (*Client) UpdatePackage

func (c *Client) UpdatePackage(i *UpdatePackageInput) (*Package, error)

UpdatePackage updates a package for a specific version.

func (*Client) UpdatePapertrail

func (c *Client) UpdatePapertrail(i *UpdatePapertrailInput) (*Papertrail, error)

UpdatePapertrail updates a specific papertrail.

func (*Client) UpdatePool

func (c *Client) UpdatePool(i *UpdatePoolInput) (*Pool, error)

UpdatePool updates a specufic pool for a particular service and version.

func (*Client) UpdatePubsub

func (c *Client) UpdatePubsub(i *UpdatePubsubInput) (*Pubsub, error)

UpdatePubsub updates a specific Pubsub.

func (*Client) UpdateRequestSetting

func (c *Client) UpdateRequestSetting(i *UpdateRequestSettingInput) (*RequestSetting, error)

UpdateRequestSetting updates a specific request settings.

func (*Client) UpdateResponseObject

func (c *Client) UpdateResponseObject(i *UpdateResponseObjectInput) (*ResponseObject, error)

UpdateResponseObject updates a specific response object.

func (*Client) UpdateS3

func (c *Client) UpdateS3(i *UpdateS3Input) (*S3, error)

UpdateS3 updates a specific S3.

func (*Client) UpdateSFTP

func (c *Client) UpdateSFTP(i *UpdateSFTPInput) (*SFTP, error)

UpdateSFTP updates a specific SFTP.

func (*Client) UpdateScalyr

func (c *Client) UpdateScalyr(i *UpdateScalyrInput) (*Scalyr, error)

UpdateScalyr updates a specific scalyr.

func (*Client) UpdateServer

func (c *Client) UpdateServer(i *UpdateServerInput) (*Server, error)

UpdateServer updates a single server for a particular service and pool.

func (*Client) UpdateService

func (c *Client) UpdateService(i *UpdateServiceInput) (*Service, error)

UpdateService updates the service with the given input.

func (*Client) UpdateServiceAuthorization added in v6.4.0

func (c *Client) UpdateServiceAuthorization(i *UpdateServiceAuthorizationInput) (*ServiceAuthorization, error)

UpdateServiceAuthorization updates an exisitng service authorization. The ID must be known.

func (*Client) UpdateSettings

func (c *Client) UpdateSettings(i *UpdateSettingsInput) (*Settings, error)

UpdateSettings updates a specific backend.

func (*Client) UpdateSnippet

func (c *Client) UpdateSnippet(i *UpdateSnippetInput) (*Snippet, error)

UpdateSnippet updates a snippet on a unlocked version

func (*Client) UpdateSplunk

func (c *Client) UpdateSplunk(i *UpdateSplunkInput) (*Splunk, error)

UpdateSplunk updates a specific splunk.

func (*Client) UpdateSumologic

func (c *Client) UpdateSumologic(i *UpdateSumologicInput) (*Sumologic, error)

UpdateSumologic updates a specific sumologic.

func (*Client) UpdateSyslog

func (c *Client) UpdateSyslog(i *UpdateSyslogInput) (*Syslog, error)

UpdateSyslog updates a specific syslog.

func (*Client) UpdateTLSActivation

func (c *Client) UpdateTLSActivation(i *UpdateTLSActivationInput) (*TLSActivation, error)

UpdateTLSActivation updates the certificate used to terminate TLS traffic for the domain associated with this TLS activation.

func (*Client) UpdateTLSSubscription

func (c *Client) UpdateTLSSubscription(i *UpdateTLSSubscriptionInput) (*TLSSubscription, error)

UpdateTLSSubscription updates an existing TLS Subscription (Limited Availability). TLS Subscriptions can only be updated in an "issued" state, and when Force=true.

func (*Client) UpdateUser

func (c *Client) UpdateUser(i *UpdateUserInput) (*User, error)

UpdateUser updates the user with the given input.

func (*Client) UpdateVCL

func (c *Client) UpdateVCL(i *UpdateVCLInput) (*VCL, error)

UpdateVCL creates a new Fastly VCL.

func (*Client) UpdateVersion

func (c *Client) UpdateVersion(i *UpdateVersionInput) (*Version, error)

UpdateVersion updates the given version

func (*Client) UpdateWAF

func (c *Client) UpdateWAF(i *UpdateWAFInput) (*WAF, error)

UpdateWAF updates a specific WAF.

func (*Client) UpdateWAFRuleExclusion

func (c *Client) UpdateWAFRuleExclusion(i *UpdateWAFRuleExclusionInput) (*WAFRuleExclusion, error)

UpdateWAFRuleExclusion used to update a particular WAF rule exclusion.

func (*Client) UpdateWAFVersion

func (c *Client) UpdateWAFVersion(i *UpdateWAFVersionInput) (*WAFVersion, error)

UpdateWAFVersion updates a specific WAF version.

func (*Client) ValidateAllDomains

func (c *Client) ValidateAllDomains(i *ValidateAllDomainsInput) (results []*DomainValidationResult, err error)

ValidateAllDomains validates the given domain.

func (*Client) ValidateDomain

func (c *Client) ValidateDomain(i *ValidateDomainInput) (*DomainValidationResult, error)

ValidateDomain validates the given domain.

func (*Client) ValidateVersion

func (c *Client) ValidateVersion(i *ValidateVersionInput) (bool, string, error)

ValidateVersion validates if the given version is okay.

type CloneVersionInput

type CloneVersionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

CloneVersionInput is the input to the CloneVersion function.

type CloneWAFVersionInput

type CloneWAFVersionInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
}

CloneWAFVersionInput used as input for cloning a WAF version.

type Cloudfiles

type Cloudfiles struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	User              string     `mapstructure:"user"`
	AccessKey         string     `mapstructure:"access_key"`
	BucketName        string     `mapstructure:"bucket_name"`
	Path              string     `mapstructure:"path"`
	Region            string     `mapstructure:"region"`
	Placement         string     `mapstructure:"placement"`
	Period            uint       `mapstructure:"period"`
	GzipLevel         uint8      `mapstructure:"gzip_level"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	MessageType       string     `mapstructure:"message_type"`
	TimestampFormat   string     `mapstructure:"timestamp_format"`
	PublicKey         string     `mapstructure:"public_key"`
	CompressionCodec  string     `mapstructure:"compression_codec"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Cloudfiles represents a Cloudfiles response from the Fastly API.

type Compatibool

type Compatibool bool

Compatibool is a boolean value that marshalls to 0/1 instead of true/false for compatibility with Fastly's API.

func CBool

func CBool(b bool) *Compatibool

Helper function to get a pointer to bool

func (Compatibool) EncodeValues

func (b Compatibool) EncodeValues(key string, v *url.Values) error

EncodeValues implements github.com/google/go-querystring/query#Encoder interface.

func (Compatibool) MarshalText

func (b Compatibool) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*Compatibool) UnmarshalText

func (b *Compatibool) UnmarshalText(t []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

type Condition

type Condition struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name      string     `mapstructure:"name"`
	Comment   string     `mapstructure:"comment"`
	Statement string     `mapstructure:"statement"`
	Type      string     `mapstructure:"type"`
	Priority  int        `mapstructure:"priority"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

Condition represents a condition response from the Fastly API.

type Coordinates

type Coordinates struct {
	Latitude   float64 `mapstructure:"latitude"`
	Longtitude float64 `mapstructure:"longitude"`
	X          float64 `mapstructure:"x"`
	Y          float64 `mapstructure:"y"`
}

Coordinates represent the location of a datacenter.

type CreateACLEntryInput

type CreateACLEntryInput struct {
	// Required fields
	ServiceID string
	ACLID     string
	IP        string `url:"ip"`

	// Optional fields
	Subnet  int         `url:"subnet,omitempty"`
	Negated Compatibool `url:"negated,omitempty"`
	Comment string      `url:"comment,omitempty"`
}

CreateACLEntryInput the input parameter to CreateACLEntry function.

type CreateACLInput

type CreateACLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the ACL to create (required)
	Name string `url:"name"`
}

CreateACLInput is used as input to the CreateACL function.

type CreateBackendInput

type CreateBackendInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name                string      `url:"name,omitempty"`
	Comment             string      `url:"comment,omitempty"`
	Address             string      `url:"address,omitempty"`
	Port                *uint       `url:"port,omitempty"`
	OverrideHost        string      `url:"override_host,omitempty"`
	ConnectTimeout      *uint       `url:"connect_timeout,omitempty"`
	MaxConn             *uint       `url:"max_conn,omitempty"`
	ErrorThreshold      *uint       `url:"error_threshold,omitempty"`
	FirstByteTimeout    *uint       `url:"first_byte_timeout,omitempty"`
	BetweenBytesTimeout *uint       `url:"between_bytes_timeout,omitempty"`
	AutoLoadbalance     Compatibool `url:"auto_loadbalance,omitempty"`
	Weight              *uint       `url:"weight,omitempty"`
	RequestCondition    string      `url:"request_condition,omitempty"`
	HealthCheck         string      `url:"healthcheck,omitempty"`
	Shield              string      `url:"shield,omitempty"`
	UseSSL              Compatibool `url:"use_ssl,omitempty"`
	// NOTE: Fastly API sets "ssl_check_cert" to true as its default value
	// if this parameter is not present in the request.
	// Removing omitempty from this particular field so that we can still
	// create a new backend with "ssl_check_cert: false" set.
	SSLCheckCert    Compatibool `url:"ssl_check_cert"`
	SSLCACert       string      `url:"ssl_ca_cert,omitempty"`
	SSLClientCert   string      `url:"ssl_client_cert,omitempty"`
	SSLClientKey    string      `url:"ssl_client_key,omitempty"`
	SSLHostname     string      `url:"ssl_hostname,omitempty"`
	SSLCertHostname string      `url:"ssl_cert_hostname,omitempty"`
	SSLSNIHostname  string      `url:"ssl_sni_hostname,omitempty"`
	MinTLSVersion   string      `url:"min_tls_version,omitempty"`
	MaxTLSVersion   string      `url:"max_tls_version,omitempty"`
	SSLCiphers      string      `url:"ssl_ciphers,omitempty"`
}

CreateBackendInput is used as input to the CreateBackend function.

type CreateBigQueryInput

type CreateBigQueryInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	ProjectID         string `url:"project_id,omitempty"`
	Dataset           string `url:"dataset,omitempty"`
	Table             string `url:"table,omitempty"`
	Template          string `url:"template_suffix,omitempty"`
	User              string `url:"user,omitempty"`
	SecretKey         string `url:"secret_key,omitempty"`
	Format            string `url:"format,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
}

CreateBigQueryInput is used as input to the CreateBigQuery function.

type CreateBlobStorageInput

type CreateBlobStorageInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Path              string `url:"path,omitempty"`
	AccountName       string `url:"account_name,omitempty"`
	Container         string `url:"container,omitempty"`
	SASToken          string `url:"sas_token,omitempty"`
	Period            uint   `url:"period,omitempty"`
	TimestampFormat   string `url:"timestamp_format,omitempty"`
	CompressionCodec  string `url:"compression_codec,omitempty"`
	GzipLevel         uint8  `url:"gzip_level,omitempty"`
	PublicKey         string `url:"public_key,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	MessageType       string `url:"message_type,omitempty"`
	Placement         string `url:"placement,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	FileMaxBytes      uint   `url:"file_max_bytes,omitempty"`
}

CreateBlobStorageInput is used as input to the CreateBlobStorage function.

type CreateBulkCertificateInput

type CreateBulkCertificateInput struct {
	CertBlob          string              `jsonapi:"attr,cert_blob"`
	IntermediatesBlob string              `jsonapi:"attr,intermediates_blob"`
	AllowUntrusted    bool                `jsonapi:"attr,allow_untrusted_root,omitempty"`
	Configurations    []*TLSConfiguration `jsonapi:"relation,tls_configurations,tls_configuration"`
}

CreateBulkCertificateInput is used as input to the CreateBulkCertificate function.

type CreateCacheSettingInput

type CreateCacheSettingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name           string             `url:"name,omitempty"`
	Action         CacheSettingAction `url:"action,omitempty"`
	TTL            uint               `url:"ttl,omitempty"`
	StaleTTL       uint               `url:"stale_ttl,omitempty"`
	CacheCondition string             `url:"cache_condition,omitempty"`
}

CreateCacheSettingInput is used as input to the CreateCacheSetting function.

type CreateCloudfilesInput

type CreateCloudfilesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	User              string `url:"user,omitempty"`
	AccessKey         string `url:"access_key,omitempty"`
	BucketName        string `url:"bucket_name,omitempty"`
	Path              string `url:"path,omitempty"`
	Region            string `url:"region,omitempty"`
	Placement         string `url:"placement,omitempty"`
	Period            uint   `url:"period,omitempty"`
	GzipLevel         uint8  `url:"gzip_level,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	MessageType       string `url:"message_type,omitempty"`
	TimestampFormat   string `url:"timestamp_format,omitempty"`
	PublicKey         string `url:"public_key,omitempty"`
	CompressionCodec  string `url:"compression_codec,omitempty"`
}

CreateCloudfilesInput is used as input to the CreateCloudfiles function.

type CreateConditionInput

type CreateConditionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name      string `url:"name,omitempty"`
	Statement string `url:"statement,omitempty"`
	Type      string `url:"type,omitempty"`
	Priority  *int   `url:"priority,omitempty"`
}

CreateConditionInput is used as input to the CreateCondition function.

type CreateCustomTLSCertificateInput

type CreateCustomTLSCertificateInput struct {
	ID       string `jsonapi:"primary,tls_certificate"` // ID value does not need to be set.
	CertBlob string `jsonapi:"attr,cert_blob"`
	Name     string `jsonapi:"attr,name,omitempty"`
}

CreateCustomTLSCertificateInput is used as input to the CreateCustomTLSCertificate function.

type CreateDatadogInput

type CreateDatadogInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Token             string `url:"token,omitempty"`
	Region            string `url:"region,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateDatadogInput is used as input to the CreateDatadog function.

type CreateDictionaryInput

type CreateDictionaryInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name      string      `url:"name,omitempty"`
	WriteOnly Compatibool `url:"write_only,omitempty"`
}

CreateDictionaryInput is used as input to the CreateDictionary function.

type CreateDictionaryItemInput

type CreateDictionaryItemInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// DictionaryID is the ID of the dictionary to retrieve items for (required).
	DictionaryID string

	ItemKey   string `url:"item_key,omitempty"`
	ItemValue string `url:"item_value,omitempty"`
}

CreateDictionaryItemInput is used as input to the CreateDictionaryItem function.

type CreateDigitalOceanInput

type CreateDigitalOceanInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	BucketName        string `url:"bucket_name,omitempty"`
	Domain            string `url:"domain,omitempty"`
	AccessKey         string `url:"access_key,omitempty"`
	SecretKey         string `url:"secret_key,omitempty"`
	Path              string `url:"path,omitempty"`
	Period            uint   `url:"period,omitempty"`
	GzipLevel         uint8  `url:"gzip_level,omitempty"`
	Format            string `url:"format,omitempty"`
	MessageType       string `url:"message_type,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	TimestampFormat   string `url:"timestamp_format,omitempty"`
	Placement         string `url:"placement,omitempty"`
	PublicKey         string `url:"public_key,omitempty"`
	CompressionCodec  string `url:"compression_codec,omitempty"`
}

CreateDigitalOceanInput is used as input to the CreateDigitalOcean function.

type CreateDirectorBackendInput

type CreateDirectorBackendInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Director is the name of the director (required).
	Director string

	// Backend is the name of the backend (required).
	Backend string
}

CreateDirectorBackendInput is used as input to the CreateDirectorBackend function.

type CreateDirectorInput

type CreateDirectorInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name     string       `url:"name,omitempty"`
	Comment  string       `url:"comment,omitempty"`
	Shield   string       `url:"shield,omitempty"`
	Quorum   *uint        `url:"quorum,omitempty"`
	Type     DirectorType `url:"type,omitempty"`
	Retries  *uint        `url:"retries,omitempty"`
	Capacity *uint        `url:"capacity,omitempty"`
}

CreateDirectorInput is used as input to the CreateDirector function.

type CreateDomainInput

type CreateDomainInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the domain that the service will respond to (required).
	Name string `url:"name"`

	// Comment is a personal, freeform descriptive note.
	Comment string `url:"comment,omitempty"`
}

CreateDomainInput is used as input to the CreateDomain function.

type CreateERLInput added in v6.3.0

type CreateERLInput struct {
	Action             ERLAction        `url:"action"`
	ClientKey          []string         `url:"client_key,brackets"`
	HttpMethods        []string         `url:"http_methods,brackets"`
	Name               string           `url:"name"`
	PenaltyBoxDuration int              `url:"penalty_box_duration"`
	Response           *ERLResponseType `url:"response,omitempty"`
	RpsLimit           int              `url:"rps_limit"`
	ServiceID          string           `url:"-"`
	ServiceVersion     int              `url:"-"`
	WindowSize         ERLWindowSize    `url:"window_size"`
}

CreateERLInput is used as input to the CreateERL function.

type CreateElasticsearchInput

type CreateElasticsearchInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Format            string `url:"format,omitempty"`
	Index             string `url:"index,omitempty"`
	URL               string `url:"url,omitempty"`
	Pipeline          string `url:"pipeline,omitempty"`
	User              string `url:"user,omitempty"`
	Password          string `url:"password,omitempty"`
	RequestMaxEntries uint   `url:"request_max_entries,omitempty"`
	RequestMaxBytes   uint   `url:"request_max_bytes,omitempty"`
	Placement         string `url:"placement,omitempty"`
	TLSCACert         string `url:"tls_ca_cert,omitempty"`
	TLSClientCert     string `url:"tls_client_cert,omitempty"`
	TLSClientKey      string `url:"tls_client_key,omitempty"`
	TLSHostname       string `url:"tls_hostname,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
}

CreateElasticsearchInput is used as input to the CreateElasticsearch function.

type CreateEmptyWAFVersionInput

type CreateEmptyWAFVersionInput struct {
	// The Web Application Firewall's ID.
	WAFID string
}

CreateEmptyWAFVersionInput used as input for creating an empty WAF version.

type CreateFTPInput

type CreateFTPInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Address           string `url:"address,omitempty"`
	Port              uint   `url:"port,omitempty"`
	Username          string `url:"user,omitempty"`
	Password          string `url:"password,omitempty"`
	PublicKey         string `url:"public_key,omitempty"`
	Path              string `url:"path,omitempty"`
	Period            uint   `url:"period,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	CompressionCodec  string `url:"compression_codec,omitempty"`
	GzipLevel         uint8  `url:"gzip_level,omitempty"`
	Format            string `url:"format,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	MessageType       string `url:"message_type,omitempty"`
	TimestampFormat   string `url:"timestamp_format,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateFTPInput is used as input to the CreateFTP function.

type CreateGCSInput

type CreateGCSInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Bucket            string `url:"bucket_name,omitempty"`
	User              string `url:"user,omitempty"`
	AccountName       string `url:"account_name,omitempty"`
	SecretKey         string `url:"secret_key,omitempty"`
	Path              string `url:"path,omitempty"`
	Period            uint   `url:"period,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	CompressionCodec  string `url:"compression_codec,omitempty"`
	GzipLevel         uint8  `url:"gzip_level,omitempty"`
	Format            string `url:"format,omitempty"`
	MessageType       string `url:"message_type,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	TimestampFormat   string `url:"timestamp_format,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateGCSInput is used as input to the CreateGCS function.

type CreateGzipInput

type CreateGzipInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name           string `url:"name,omitempty"`
	ContentTypes   string `url:"content_types,omitempty"`
	Extensions     string `url:"extensions,omitempty"`
	CacheCondition string `url:"cache_condition,omitempty"`
}

CreateGzipInput is used as input to the CreateGzip function.

type CreateHTTPSInput

type CreateHTTPSInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Format            string `url:"format,omitempty"`
	URL               string `url:"url,omitempty"`
	RequestMaxEntries uint   `url:"request_max_entries,omitempty"`
	RequestMaxBytes   uint   `url:"request_max_bytes,omitempty"`
	ContentType       string `url:"content_type,omitempty"`
	HeaderName        string `url:"header_name,omitempty"`
	HeaderValue       string `url:"header_value,omitempty"`
	Method            string `url:"method,omitempty"`
	JSONFormat        string `url:"json_format,omitempty"`
	Placement         string `url:"placement,omitempty"`
	TLSCACert         string `url:"tls_ca_cert,omitempty"`
	TLSClientCert     string `url:"tls_client_cert,omitempty"`
	TLSClientKey      string `url:"tls_client_key,omitempty"`
	TLSHostname       string `url:"tls_hostname,omitempty"`
	MessageType       string `url:"message_type,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
}

CreateHTTPSInput is used as input to the CreateHTTPS function.

type CreateHeaderInput

type CreateHeaderInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string       `url:"name,omitempty"`
	Action            HeaderAction `url:"action,omitempty"`
	IgnoreIfSet       Compatibool  `url:"ignore_if_set,omitempty"`
	Type              HeaderType   `url:"type,omitempty"`
	Destination       string       `url:"dst,omitempty"`
	Source            string       `url:"src,omitempty"`
	Regex             string       `url:"regex,omitempty"`
	Substitution      string       `url:"substitution,omitempty"`
	Priority          *uint        `url:"priority,omitempty"`
	RequestCondition  string       `url:"request_condition,omitempty"`
	CacheCondition    string       `url:"cache_condition,omitempty"`
	ResponseCondition string       `url:"response_condition,omitempty"`
}

CreateHeaderInput is used as input to the CreateHeader function.

type CreateHealthCheckInput

type CreateHealthCheckInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name             string   `url:"name,omitempty"`
	Comment          string   `url:"comment,omitempty"`
	Method           string   `url:"method,omitempty"`
	Headers          []string `url:"headers,omitempty"`
	Host             string   `url:"host,omitempty"`
	Path             string   `url:"path,omitempty"`
	HTTPVersion      string   `url:"http_version,omitempty"`
	Timeout          *uint    `url:"timeout,omitempty"`
	CheckInterval    *uint    `url:"check_interval,omitempty"`
	ExpectedResponse *uint    `url:"expected_response,omitempty"`
	Window           *uint    `url:"window,omitempty"`
	Threshold        *uint    `url:"threshold,omitempty"`
	Initial          *uint    `url:"initial,omitempty"`
}

CreateHealthCheckInput is used as input to the CreateHealthCheck function.

type CreateHerokuInput

type CreateHerokuInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	URL               string `url:"url,omitempty"`
	Token             string `url:"token,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateHerokuInput is used as input to the CreateHeroku function.

type CreateHoneycombInput

type CreateHoneycombInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	Dataset           string `url:"dataset,omitempty"`
	Token             string `url:"token,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateHoneycombInput is used as input to the CreateHoneycomb function.

type CreateKafkaInput

type CreateKafkaInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string      `url:"name,omitempty"`
	Brokers           string      `url:"brokers,omitempty"`
	Topic             string      `url:"topic,omitempty"`
	RequiredACKs      string      `url:"required_acks,omitempty"`
	UseTLS            Compatibool `url:"use_tls,omitempty"`
	CompressionCodec  string      `url:"compression_codec,omitempty"`
	Format            string      `url:"format,omitempty"`
	FormatVersion     uint        `url:"format_version,omitempty"`
	ResponseCondition string      `url:"response_condition,omitempty"`
	Placement         string      `url:"placement,omitempty"`
	TLSCACert         string      `url:"tls_ca_cert,omitempty"`
	TLSHostname       string      `url:"tls_hostname,omitempty"`
	TLSClientCert     string      `url:"tls_client_cert,omitempty"`
	TLSClientKey      string      `url:"tls_client_key,omitempty"`
	ParseLogKeyvals   Compatibool `url:"parse_log_keyvals,omitempty"`
	RequestMaxBytes   uint        `url:"request_max_bytes,omitempty"`
	AuthMethod        string      `url:"auth_method,omitempty"`
	User              string      `url:"user,omitempty"`
	Password          string      `url:"password,omitempty"`
}

CreateKafkaInput is used as input to the CreateKafka function.

type CreateKinesisInput

type CreateKinesisInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	StreamName        string `url:"topic,omitempty"`
	Region            string `url:"region,omitempty"`
	AccessKey         string `url:"access_key,omitempty"`
	SecretKey         string `url:"secret_key,omitempty"`
	IAMRole           string `url:"iam_role,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateKinesisInput is used as input to the CreateKinesis function.

type CreateLogentriesInput

type CreateLogentriesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string      `url:"name,omitempty"`
	Port              uint        `url:"port,omitempty"`
	UseTLS            Compatibool `url:"use_tls,omitempty"`
	Token             string      `url:"token,omitempty"`
	Format            string      `url:"format,omitempty"`
	FormatVersion     uint        `url:"format_version,omitempty"`
	ResponseCondition string      `url:"response_condition,omitempty"`
	Region            string      `url:"region,omitempty"`
	Placement         string      `url:"placement,omitempty"`
}

CreateLogentriesInput is used as input to the CreateLogentries function.

type CreateLogglyInput

type CreateLogglyInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Token             string `url:"token,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateLogglyInput is used as input to the CreateLoggly function.

type CreateLogshuttleInput

type CreateLogshuttleInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	URL               string `url:"url,omitempty"`
	Token             string `url:"token,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateLogshuttleInput is used as input to the CreateLogshuttle function.

type CreateManagedLoggingInput

type CreateManagedLoggingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string
	// Kind is the kind of managed logging we are creating (required).
	Kind ManagedLoggingKind
}

CreateManagedLoggingInput is used as input to the CreateManagedLogging function.

type CreateNewRelicInput

type CreateNewRelicInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Token             string `url:"token,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
	Region            string `url:"region,omitempty"`
}

CreateNewRelicInput is used as input to the CreateNewRelic function.

type CreateObjectStoreInput added in v6.6.0

type CreateObjectStoreInput struct {
	// Name is the name of the store to create (required).
	Name string `json:"name"`
}

CreateObjectStoreInput is used as an input to the CreateObjectStore function.

type CreateOpenstackInput

type CreateOpenstackInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	User              string `url:"user,omitempty"`
	AccessKey         string `url:"access_key,omitempty"`
	BucketName        string `url:"bucket_name,omitempty"`
	URL               string `url:"url,omitempty"`
	Path              string `url:"path,omitempty"`
	Placement         string `url:"placement,omitempty"`
	Period            uint   `url:"period,omitempty"`
	CompressionCodec  string `url:"compression_codec,omitempty"`
	GzipLevel         uint8  `url:"gzip_level,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	MessageType       string `url:"message_type,omitempty"`
	TimestampFormat   string `url:"timestamp_format,omitempty"`
	PublicKey         string `url:"public_key,omitempty"`
}

CreateOpenstackInput is used as input to the CreateOpenstack function.

type CreatePapertrailInput

type CreatePapertrailInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string     `url:"name,omitempty"`
	Address           string     `url:"address,omitempty"`
	Port              uint       `url:"port,omitempty"`
	FormatVersion     uint       `url:"format_version,omitempty"`
	Format            string     `url:"format,omitempty"`
	ResponseCondition string     `url:"response_condition,omitempty"`
	CreatedAt         *time.Time `url:"created_at,omitempty"`
	UpdatedAt         *time.Time `url:"updated_at,omitempty"`
	DeletedAt         *time.Time `url:"deleted_at,omitempty"`
	Placement         string     `url:"placement,omitempty"`
}

CreatePapertrailInput is used as input to the CreatePapertrail function.

type CreatePoolInput

type CreatePoolInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the pool to create (required).
	Name string `url:"name"`

	// Optional fields.
	Comment          string      `url:"comment,omitempty"`
	Shield           string      `url:"shield,omitempty"`
	RequestCondition string      `url:"request_condition,omitempty"`
	MaxConnDefault   uint        `url:"max_conn_default,omitempty"`
	ConnectTimeout   uint        `url:"connect_timeout,omitempty"`
	FirstByteTimeout uint        `url:"first_byte_timeout,omitempty"`
	Quorum           uint        `url:"quorum,omitempty"`
	UseTLS           Compatibool `url:"use_tls,omitempty"`
	TLSCACert        string      `url:"tls_ca_cert,omitempty"`
	TLSCiphers       string      `url:"tls_ciphers,omitempty"`
	TLSClientKey     string      `url:"tls_client_key,omitempty"`
	TLSClientCert    string      `url:"tls_client_cert,omitempty"`
	TLSSNIHostname   string      `url:"tls_sni_hostname,omitempty"`
	TLSCheckCert     Compatibool `url:"tls_check_cert,omitempty"`
	TLSCertHostname  string      `url:"tls_cert_hostname,omitempty"`
	MinTLSVersion    string      `url:"min_tls_version,omitempty"`
	MaxTLSVersion    string      `url:"max_tls_version,omitempty"`
	Healthcheck      string      `url:"healthcheck,omitempty"`
	Type             PoolType    `url:"type,omitempty"`
	OverrideHost     string      `url:"override_host,omitempty"`
}

CreatePoolInput is used as input to the CreatePool function.

type CreatePrivateKeyInput

type CreatePrivateKeyInput struct {
	Key  string `jsonapi:"attr,key,omitempty"`
	Name string `jsonapi:"attr,name,omitempty"`
}

CreatePrivateKeyInput is used as input to the CreatePrivateKey function.

type CreatePubsubInput

type CreatePubsubInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Topic             string `url:"topic,omitempty"`
	User              string `url:"user,omitempty"`
	SecretKey         string `url:"secret_key,omitempty"`
	ProjectID         string `url:"project_id,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	Format            string `url:"format,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreatePubsubInput is used as input to the CreatePubsub function.

type CreateRequestSettingInput

type CreateRequestSettingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name             string               `url:"name,omitempty"`
	ForceMiss        Compatibool          `url:"force_miss,omitempty"`
	ForceSSL         Compatibool          `url:"force_ssl,omitempty"`
	Action           RequestSettingAction `url:"action,omitempty"`
	BypassBusyWait   Compatibool          `url:"bypass_busy_wait,omitempty"`
	MaxStaleAge      *uint                `url:"max_stale_age,omitempty"`
	HashKeys         string               `url:"hash_keys,omitempty"`
	XForwardedFor    RequestSettingXFF    `url:"xff,omitempty"`
	TimerSupport     Compatibool          `url:"timer_support,omitempty"`
	GeoHeaders       Compatibool          `url:"geo_headers,omitempty"`
	DefaultHost      string               `url:"default_host,omitempty"`
	RequestCondition string               `url:"request_condition,omitempty"`
}

CreateRequestSettingInput is used as input to the CreateRequestSetting function.

type CreateResponseObjectInput

type CreateResponseObjectInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name             string `url:"name,omitempty"`
	Status           *uint  `url:"status,omitempty"`
	Response         string `url:"response,omitempty"`
	Content          string `url:"content,omitempty"`
	ContentType      string `url:"content_type,omitempty"`
	RequestCondition string `url:"request_condition,omitempty"`
	CacheCondition   string `url:"cache_condition,omitempty"`
}

CreateResponseObjectInput is used as input to the CreateResponseObject function.

type CreateS3Input

type CreateS3Input struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name                         string                 `url:"name,omitempty"`
	BucketName                   string                 `url:"bucket_name,omitempty"`
	Domain                       string                 `url:"domain,omitempty"`
	AccessKey                    string                 `url:"access_key,omitempty"`
	SecretKey                    string                 `url:"secret_key,omitempty"`
	IAMRole                      string                 `url:"iam_role,omitempty"`
	Path                         string                 `url:"path,omitempty"`
	Period                       uint                   `url:"period,omitempty"`
	CompressionCodec             string                 `url:"compression_codec,omitempty"`
	GzipLevel                    uint8                  `url:"gzip_level,omitempty"`
	Format                       string                 `url:"format,omitempty"`
	MessageType                  string                 `url:"message_type,omitempty"`
	FormatVersion                uint                   `url:"format_version,omitempty"`
	ResponseCondition            string                 `url:"response_condition,omitempty"`
	TimestampFormat              string                 `url:"timestamp_format,omitempty"`
	Redundancy                   S3Redundancy           `url:"redundancy,omitempty"`
	Placement                    string                 `url:"placement,omitempty"`
	PublicKey                    string                 `url:"public_key,omitempty"`
	ServerSideEncryptionKMSKeyID string                 `url:"server_side_encryption_kms_key_id,omitempty"`
	ServerSideEncryption         S3ServerSideEncryption `url:"server_side_encryption,omitempty"`
	ACL                          S3AccessControlList    `url:"acl,omitempty"`
}

CreateS3Input is used as input to the CreateS3 function.

type CreateSFTPInput

type CreateSFTPInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Address           string `url:"address,omitempty"`
	Port              uint   `url:"port,omitempty"`
	User              string `url:"user,omitempty"`
	Password          string `url:"password,omitempty"`
	PublicKey         string `url:"public_key,omitempty"`
	SecretKey         string `url:"secret_key,omitempty"`
	SSHKnownHosts     string `url:"ssh_known_hosts,omitempty"`
	Path              string `url:"path,omitempty"`
	Period            uint   `url:"period,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	CompressionCodec  string `url:"compression_codec,omitempty"`
	GzipLevel         uint8  `url:"gzip_level,omitempty"`
	Format            string `url:"format,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	TimestampFormat   string `url:"timestamp_format,omitempty"`
	MessageType       string `url:"message_type,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateSFTPInput is used as input to the CreateSFTP function.

type CreateScalyrInput

type CreateScalyrInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Format            string `url:"format,omitempty"`
	FormatVersion     uint   `url:"format_version,omitempty"`
	Token             string `url:"token,omitempty"`
	Region            string `url:"region,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateScalyrInput is used as input to the CreateScalyr function.

type CreateSecretInput added in v6.7.0

type CreateSecretInput struct {
	// ID of the Secret Store (required).
	ID string
	// Name of the Secret (required).
	Name string
	// Secret is the plaintext secret to be stored (required).
	// The value will be base64-encoded when delivered to the API,
	// which is the required format.
	Secret []byte
}

CreateSecretInput is used as input to the CreateSecret function.

type CreateSecretStoreInput added in v6.7.0

type CreateSecretStoreInput struct {
	// Name of the Secret Store (required).
	Name string
}

CreateSecretStoreInput is used as input to the CreateSecretStore function.

type CreateServerInput

type CreateServerInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// PoolID is the ID of the pool (required).
	PoolID string

	// Address is the hostname or IP of the origin server (required).
	Address string `url:"address"`

	// Optional fields.
	Comment      string `url:"comment,omitempty"`
	Weight       uint   `url:"weight,omitempty"`
	MaxConn      uint   `url:"max_conn,omitempty"`
	Port         uint   `url:"port,omitempty"`
	Disabled     bool   `url:"disabled,omitempty"`
	OverrideHost string `url:"override_host,omitempty"`
}

CreateServerInput is used as input to the CreateServer function.

type CreateServiceAuthorizationInput added in v6.4.0

type CreateServiceAuthorizationInput struct {
	// ID value is ignored and should not be set, needed to make JSONAPI work correctly.
	ID string `jsonapi:"primary,service_authorization"`

	// Permission is the level of permissions to grant the user to the service. Valid values are "full", "read_only", "purge_select" or "purge_all".
	Permission string `jsonapi:"attr,permission,omitempty"`

	// Service is the ID of the service to grant permissions for.
	Service *SAService `jsonapi:"relation,service,omitempty"`

	// UserID is the ID of the user which should have its permissions set.
	User *SAUser `jsonapi:"relation,user,omitempty"`
}

CreateServiceAuthorizationInput is used as input to the CreateServiceAuthorization function.

type CreateServiceInput

type CreateServiceInput struct {
	Name    string `url:"name,omitempty"`
	Type    string `url:"type,omitempty"`
	Comment string `url:"comment,omitempty"`
}

CreateServiceInput is used as input to the CreateService function.

type CreateSnippetInput

type CreateSnippetInput struct {
	// ServiceID is the ID of the service to add the snippet to (required).
	ServiceID string

	// ServiceVersion is the editable configuration version (required).
	ServiceVersion int

	// Name is the name for the snippet.
	Name string `url:"name"`

	// Priority determines the ordering for multiple snippets. Lower numbers execute first.
	Priority *int `url:"priority,omitempty"`

	// Dynamic sets the snippet version to regular (0) or dynamic (1).
	Dynamic int `url:"dynamic"`

	// Content is the VCL code that specifies exactly what the snippet does.
	Content string `url:"content"`

	// Type is the location in generated VCL where the snippet should be placed.
	Type SnippetType `url:"type"`
}

CreateSnippetInput is the input for CreateSnippet

type CreateSplunkInput

type CreateSplunkInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string      `url:"name,omitempty"`
	URL               string      `url:"url,omitempty"`
	RequestMaxEntries uint        `url:"request_max_entries,omitempty"`
	RequestMaxBytes   uint        `url:"request_max_bytes,omitempty"`
	Format            string      `url:"format,omitempty"`
	FormatVersion     uint        `url:"format_version,omitempty"`
	ResponseCondition string      `url:"response_condition,omitempty"`
	Placement         string      `url:"placement,omitempty"`
	Token             string      `url:"token,omitempty"`
	UseTLS            Compatibool `url:"use_tls,omitempty"`
	TLSCACert         string      `url:"tls_ca_cert,omitempty"`
	TLSHostname       string      `url:"tls_hostname,omitempty"`
	TLSClientCert     string      `url:"tls_client_cert,omitempty"`
	TLSClientKey      string      `url:"tls_client_key,omitempty"`
}

CreateSplunkInput is used as input to the CreateSplunk function.

type CreateSumologicInput

type CreateSumologicInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string `url:"name,omitempty"`
	Address           string `url:"address,omitempty"`
	URL               string `url:"url,omitempty"`
	Format            string `url:"format,omitempty"`
	ResponseCondition string `url:"response_condition,omitempty"`
	MessageType       string `url:"message_type,omitempty"`
	FormatVersion     int    `url:"format_version,omitempty"`
	Placement         string `url:"placement,omitempty"`
}

CreateSumologicInput is used as input to the CreateSumologic function.

type CreateSyslogInput

type CreateSyslogInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name              string      `url:"name,omitempty"`
	Address           string      `url:"address,omitempty"`
	Hostname          string      `url:"hostname,omitempty"`
	Port              uint        `url:"port,omitempty"`
	UseTLS            Compatibool `url:"use_tls,omitempty"`
	IPV4              string      `url:"ipv4,omitempty"`
	TLSCACert         string      `url:"tls_ca_cert,omitempty"`
	TLSHostname       string      `url:"tls_hostname,omitempty"`
	TLSClientCert     string      `url:"tls_client_cert,omitempty"`
	TLSClientKey      string      `url:"tls_client_key,omitempty"`
	Token             string      `url:"token,omitempty"`
	Format            string      `url:"format,omitempty"`
	FormatVersion     uint        `url:"format_version,omitempty"`
	MessageType       string      `url:"message_type,omitempty"`
	ResponseCondition string      `url:"response_condition,omitempty"`
	Placement         string      `url:"placement,omitempty"`
}

CreateSyslogInput is used as input to the CreateSyslog function.

type CreateTLSActivationInput

type CreateTLSActivationInput struct {
	ID            string                `jsonapi:"primary,tls_activation"`   // ID value does not need to be set.
	Certificate   *CustomTLSCertificate `jsonapi:"relation,tls_certificate"` // Only ID of CustomTLSCertificate needs to be set.
	Configuration *TLSConfiguration     `jsonapi:"relation,tls_configuration,omitempty"`
	Domain        *TLSDomain            `jsonapi:"relation,tls_domain"`
}

CreateTLSActivationInput is used as input to the CreateTLSActivation function.

type CreateTLSSubscriptionInput

type CreateTLSSubscriptionInput struct {
	// ID value is ignored and should not be set, needed to make JSONAPI work correctly.
	ID string `jsonapi:"primary,tls_subscription"`
	// CertificateAuthority is the entity that issues and certifies the TLS certificates for your subscription. Valid values are lets-encrypt or globalsign.
	CertificateAuthority string `jsonapi:"attr,certificate_authority,omitempty"`
	// Configuration options that apply to the enabled domains on this subscription. Only ID needs to be populated
	Configuration *TLSConfiguration `jsonapi:"relation,tls_configuration,omitempty"`
	// CommonName is the common name associated with the subscription generated by Fastly TLS. Must be included in Domains. Only the ID fields of each one need to be set.
	CommonName *TLSDomain `jsonapi:"relation,common_name,omitempty"`
	// Domains list to enable TLS for. Only the ID fields of each one need to be set.
	Domains []*TLSDomain `jsonapi:"relation,tls_domain"`
}

CreateTLSSubscriptionInput is used as input to the CreateTLSSubscription function

type CreateTokenInput

type CreateTokenInput struct {
	Name      string     `url:"name,omitempty"`
	Scope     TokenScope `url:"scope,omitempty"`
	Username  string     `url:"username,omitempty"`
	Password  string     `url:"password,omitempty"`
	Services  []string   `url:"services,brackets,omitempty"`
	ExpiresAt *time.Time `url:"expires_at,omitempty"`
}

CreateTokenInput is used as input to the Token function.

type CreateUserInput

type CreateUserInput struct {
	Login string `url:"login"`
	Name  string `url:"name"`

	Role string `url:"role,omitempty"`
}

CreateUserInput is used as input to the CreateUser function.

type CreateVCLInput

type CreateVCLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	Name    string `url:"name,omitempty"`
	Content string `url:"content,omitempty"`
	Main    bool   `url:"main,omitempty"`
}

CreateVCLInput is used as input to the CreateVCL function.

type CreateVersionInput

type CreateVersionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// A personal freeform descriptive note.
	Comment string `url:"comment,omitempty"`
}

CreateVersionInput is the input to the CreateVersion function.

type CreateWAFActiveRulesInput

type CreateWAFActiveRulesInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// The list of WAF active rules (ModSecID, Status and Revision are required).
	Rules []*WAFActiveRule
}

CreateWAFActiveRulesInput used as input for adding rules to a WAF.

type CreateWAFInput

type CreateWAFInput struct {
	ID                string `jsonapi:"primary,waf_firewall"`
	PrefetchCondition string `jsonapi:"attr,prefetch_condition"`
	Response          string `jsonapi:"attr,response"`

	// ServiceID is the ID of the service (required).
	ServiceID string `jsonapi:"attr,service_id"`

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int `jsonapi:"attr,service_version_number"`
}

CreateWAFInput is used as input to the CreateWAF function.

type CreateWAFRuleExclusionInput

type CreateWAFRuleExclusionInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// The Web Application Firewall's exclusion
	WAFRuleExclusion *WAFRuleExclusion
}

CreateWAFRuleExclusionInput used as input to create a WAF rule exclusion.

type CustomTLSCertificate

type CustomTLSCertificate struct {
	ID                 string       `jsonapi:"primary,tls_certificate"`
	IssuedTo           string       `jsonapi:"attr,issued_to"`
	Issuer             string       `jsonapi:"attr,issuer"`
	Name               string       `jsonapi:"attr,name"`
	NotAfter           *time.Time   `jsonapi:"attr,not_after,iso8601"`
	NotBefore          *time.Time   `jsonapi:"attr,not_before,iso8601"`
	Replace            bool         `jsonapi:"attr,replace"`
	SerialNumber       string       `jsonapi:"attr,serial_number"`
	SignatureAlgorithm string       `jsonapi:"attr,signature_algorithm"`
	Domains            []*TLSDomain `jsonapi:"relation,tls_domains"`
	CreatedAt          *time.Time   `jsonapi:"attr,created_at,iso8601"`
	UpdatedAt          *time.Time   `jsonapi:"attr,updated_at,iso8601"`
}

CustomTLSCertificate represents a custom certificate. Uses common TLSDomain type from BulkCertificate.

type CustomTLSConfiguration

type CustomTLSConfiguration struct {
	ID            string       `jsonapi:"primary,tls_configuration"`
	DNSRecords    []*DNSRecord `jsonapi:"relation,dns_records"`
	Bulk          bool         `jsonapi:"attr,bulk"`
	Default       bool         `jsonapi:"attr,default"`
	HTTPProtocols []string     `jsonapi:"attr,http_protocols"`
	Name          string       `jsonapi:"attr,name"`
	TLSProtocols  []string     `jsonapi:"attr,tls_protocols"`
	CreatedAt     *time.Time   `jsonapi:"attr,created_at,iso8601"`
	UpdatedAt     *time.Time   `jsonapi:"attr,updated_at,iso8601"`
}

CustomTLSConfiguration represents a TLS configuration response from the Fastly API.

type DNSRecord

type DNSRecord struct {
	ID         string `jsonapi:"primary,dns_record"`
	RecordType string `jsonapi:"attr,record_type"`
	Region     string `jsonapi:"attr,region"`
}

DNSRecord is a child of CustomTLSConfiguration

type Datacenter

type Datacenter struct {
	Code        string      `mapstructure:"code"`
	Coordinates Coordinates `mapstructure:"coordinates"`
	Group       string      `mapstructure:"group"`
	Name        string      `mapstructure:"name"`
	Shield      string      `mapstructure:"shield"`
}

Datacenter is a list of Datacenters returned by the Fastly API.

type Datadog

type Datadog struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Token             string     `mapstructure:"token"`
	Region            string     `mapstructure:"region"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Datadog represents a Datadog response from the Fastly API.

type DeactivateVersionInput

type DeactivateVersionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

DeactivateVersionInput is the input to the DeactivateVersion function.

type DeleteACLEntryInput

type DeleteACLEntryInput struct {
	ServiceID string
	ACLID     string
	ID        string
}

DeleteACLEntryInput the input parameter to DeleteACLEntry function.

type DeleteACLInput

type DeleteACLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the ACL to delete (required).
	Name string
}

DeleteACLInput is the input parameter to DeleteACL function.

type DeleteBackendInput

type DeleteBackendInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the backend to delete (required).
	Name string
}

DeleteBackendInput is the input parameter to DeleteBackend.

type DeleteBigQueryInput

type DeleteBigQueryInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the BigQuery to delete (required).
	Name string
}

DeleteBigQueryInput is the input parameter to DeleteBigQuery.

type DeleteBlobStorageInput

type DeleteBlobStorageInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the blob storage to delete (required).
	Name string
}

DeleteBlobStorageInput is the input parameter to DeleteBlobStorage.

type DeleteBulkCertificateInput

type DeleteBulkCertificateInput struct {
	ID string
}

DeleteBulkCertificateInput used for deleting a certificate.

type DeleteCacheSettingInput

type DeleteCacheSettingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the cache setting to delete (required).
	Name string
}

DeleteCacheSettingInput is the input parameter to DeleteCacheSetting.

type DeleteCloudfilesInput

type DeleteCloudfilesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Cloudfiles to delete (required).
	Name string
}

DeleteCloudfilesInput is the input parameter to DeleteCloudfiles.

type DeleteConditionInput

type DeleteConditionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the condition to delete (required).
	Name string
}

DeleteConditionInput is the input parameter to DeleteCondition.

type DeleteCustomTLSCertificateInput

type DeleteCustomTLSCertificateInput struct {
	ID string
}

DeleteCustomTLSCertificateInput used for deleting a certificate.

type DeleteDatadogInput

type DeleteDatadogInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Datadog to delete (required).
	Name string
}

DeleteDatadogInput is the input parameter to DeleteDatadog.

type DeleteDictionaryInput

type DeleteDictionaryInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the dictionary to delete (required).
	Name string
}

DeleteDictionaryInput is the input parameter to DeleteDictionary.

type DeleteDictionaryItemInput

type DeleteDictionaryItemInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// DictionaryID is the ID of the dictionary to retrieve items for (required).
	DictionaryID string

	// ItemKey is the name of the dictionary item to delete.
	ItemKey string
}

DeleteDictionaryItemInput is the input parameter to DeleteDictionaryItem.

type DeleteDigitalOceanInput

type DeleteDigitalOceanInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the DigitalOcean to delete (required).
	Name string
}

DeleteDigitalOceanInput is the input parameter to DeleteDigitalOcean.

type DeleteDirectorBackendInput

type DeleteDirectorBackendInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Director is the name of the director (required).
	Director string

	// Backend is the name of the backend (required).
	Backend string
}

DeleteDirectorBackendInput is the input parameter to DeleteDirectorBackend.

type DeleteDirectorInput

type DeleteDirectorInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the director to delete (required).
	Name string
}

DeleteDirectorInput is the input parameter to DeleteDirector.

type DeleteDomainInput

type DeleteDomainInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the domain that the service will respond to (required).
	Name string `url:"name"`
}

DeleteDomainInput is used as input to the DeleteDomain function.

type DeleteERLInput added in v6.3.0

type DeleteERLInput struct {
	ServiceID      string `form:"service_id"`
	ServiceVersion int    `form:"version"`
	ERLID          string `form:"id"`
}

DeleteERLInput is used as input to the DeleteERL function.

type DeleteElasticsearchInput

type DeleteElasticsearchInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Elasticsearch endpoint to fetch.
	Name string
}

type DeleteFTPInput

type DeleteFTPInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the FTP to delete (required).
	Name string
}

DeleteFTPInput is the input parameter to DeleteFTP.

type DeleteGCSInput

type DeleteGCSInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the GCS to delete (required).
	Name string
}

DeleteGCSInput is the input parameter to DeleteGCS.

type DeleteGzipInput

type DeleteGzipInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Gzip to delete (required).
	Name string
}

DeleteGzipInput is the input parameter to DeleteGzip.

type DeleteHTTPSInput

type DeleteHTTPSInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the HTTPS endpoint to fetch.
	Name string
}

type DeleteHeaderInput

type DeleteHeaderInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the header to delete (required).
	Name string
}

DeleteHeaderInput is the input parameter to DeleteHeader.

type DeleteHealthCheckInput

type DeleteHealthCheckInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the health check to delete (required).
	Name string
}

DeleteHealthCheckInput is the input parameter to DeleteHealthCheck.

type DeleteHerokuInput

type DeleteHerokuInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the heroku to delete (required).
	Name string
}

DeleteHerokuInput is the input parameter to DeleteHeroku.

type DeleteHoneycombInput

type DeleteHoneycombInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the honeycomb to delete (required).
	Name string
}

DeleteHoneycombInput is the input parameter to DeleteHoneycomb.

type DeleteKafkaInput

type DeleteKafkaInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the kafka to delete (required).
	Name string
}

DeleteKafkaInput is the input parameter to DeleteKafka.

type DeleteKinesisInput

type DeleteKinesisInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Kinesis logging object to delete (required).
	Name string
}

DeleteKinesisInput is the input parameter to DeleteKinesis.

type DeleteLogentriesInput

type DeleteLogentriesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the logentries to delete (required).
	Name string
}

DeleteLogentriesInput is the input parameter to DeleteLogentries.

type DeleteLogglyInput

type DeleteLogglyInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the loggly to delete (required).
	Name string
}

DeleteLogglyInput is the input parameter to DeleteLoggly.

type DeleteLogshuttleInput

type DeleteLogshuttleInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the logshuttle to delete (required).
	Name string
}

DeleteLogshuttleInput is the input parameter to DeleteLogshuttle.

type DeleteManagedLoggingInput

type DeleteManagedLoggingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string
	// Kind is the kind of managed logging we are removing (required).
	Kind ManagedLoggingKind
}

DeleteManagedLoggingInput is used as input to the DeleteManagedLogging function.

type DeleteNewRelicInput

type DeleteNewRelicInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the newrelic to delete (required).
	Name string
}

DeleteNewRelicInput is the input parameter to DeleteNewRelic.

type DeleteObjectStoreInput added in v6.6.0

type DeleteObjectStoreInput struct {
	// ID is the ID of the object store to delete (required).
	ID string
}

DeleteObjectStoreInput is the input to the DeleteObjectStore function.

type DeleteObjectStoreKeyInput added in v6.6.0

type DeleteObjectStoreKeyInput struct {
	// ID is the ID of the object store (required).
	ID string

	// Key is the key to delete (required).
	Key string
}

DeleteObjectStoreKeyInput is the input to the DeleteObjectStoreKey function.

type DeleteOpenstackInput

type DeleteOpenstackInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Openstack to delete (required).
	Name string
}

DeleteOpenstackInput is the input parameter to DeleteOpenstack.

type DeletePapertrailInput

type DeletePapertrailInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the papertrail to delete (required).
	Name string
}

DeletePapertrailInput is the input parameter to DeletePapertrail.

type DeletePoolInput

type DeletePoolInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the pool to delete (required).
	Name string
}

DeletePoolInput is used as input to the DeletePool function.

type DeletePrivateKeyInput

type DeletePrivateKeyInput struct {
	ID string
}

DeletePrivateKeyInput used for deleting a private key.

type DeletePubsubInput

type DeletePubsubInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Pubsub to delete (required).
	Name string
}

DeletePubsubInput is the input parameter to DeletePubsub.

type DeleteRequestSettingInput

type DeleteRequestSettingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the request settings to delete (required).
	Name string
}

DeleteRequestSettingInput is the input parameter to DeleteRequestSetting.

type DeleteResponseObjectInput

type DeleteResponseObjectInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the response object to delete (required).
	Name string
}

DeleteResponseObjectInput is the input parameter to DeleteResponseObject.

type DeleteS3Input

type DeleteS3Input struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the S3 to delete (required).
	Name string
}

DeleteS3Input is the input parameter to DeleteS3.

type DeleteSFTPInput

type DeleteSFTPInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the SFTP to delete (required).
	Name string
}

DeleteSFTPInput is the input parameter to DeleteSFTP.

type DeleteScalyrInput

type DeleteScalyrInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the scalyr to delete (required).
	Name string
}

DeleteScalyrInput is the input parameter to DeleteScalyr.

type DeleteSecretInput added in v6.7.0

type DeleteSecretInput struct {
	// ID of the Secret Store (required).
	ID string
	// Name of the secret (required).
	Name string
}

DeleteSecretInput is used as input to the DeleteSecret function.

type DeleteSecretStoreInput added in v6.7.0

type DeleteSecretStoreInput struct {
	// ID of the Secret Store (required).
	ID string
}

DeleteSecretStoreInput is used as input to the DeleteSecretStore function.

type DeleteServerInput

type DeleteServerInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// PoolID is the ID of the pool (required).
	PoolID string

	Server string
}

DeleteServerInput is used as input to the DeleteServer function.

type DeleteServiceAuthorizationInput added in v6.4.0

type DeleteServiceAuthorizationInput struct {
	// ID of the service authorization to delete.
	ID string
}

DeleteServiceAuthorizationInput is used as input to the DeleteServiceAuthorization function.

type DeleteServiceInput

type DeleteServiceInput struct {
	ID string
}

DeleteServiceInput is used as input to the DeleteService function.

type DeleteSnippetInput

type DeleteSnippetInput struct {
	// ServiceID is the ID of the Service to add the snippet to.
	ServiceID string

	// Name is the Name of the Snippet to Delete
	Name string

	// ServiceVersion is the editable configuration version (required).
	ServiceVersion int
}

type DeleteSplunkInput

type DeleteSplunkInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the splunk to delete (required).
	Name string
}

DeleteSplunkInput is the input parameter to DeleteSplunk.

type DeleteSumologicInput

type DeleteSumologicInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the sumologic to delete (required).
	Name string
}

DeleteSumologicInput is the input parameter to DeleteSumologic.

type DeleteSyslogInput

type DeleteSyslogInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the syslog to delete (required).
	Name string
}

DeleteSyslogInput is the input parameter to DeleteSyslog.

type DeleteTLSActivationInput

type DeleteTLSActivationInput struct {
	ID string
}

DeleteTLSActivationInput used for deleting a certificate.

type DeleteTLSSubscriptionInput

type DeleteTLSSubscriptionInput struct {
	// ID of the TLS subscription to delete.
	ID string
	// Force the subscription to be deleted, even if domains are active. Warning: can disable production traffic.
	Force bool
}

DeleteTLSSubscriptionInput is used as input to the DeleteTLSSubscription function

type DeleteTokenInput

type DeleteTokenInput struct {
	TokenID string
}

DeleteTokenInput is used as input to the DeleteToken function.

type DeleteUserInput

type DeleteUserInput struct {
	ID string
}

DeleteUserInput is used as input to the DeleteUser function.

type DeleteVCLInput

type DeleteVCLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the VCL to delete (required).
	Name string
}

DeleteVCLInput is the input parameter to DeleteVCL.

type DeleteWAFActiveRulesInput

type DeleteWAFActiveRulesInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// The list of WAF active rules (ModSecID is required).
	Rules []*WAFActiveRule
}

DeleteWAFActiveRulesInput used as input for removing rules from a WAF.

type DeleteWAFInput

type DeleteWAFInput struct {
	// This is the WAF ID.
	ID string `jsonapi:"primary,waf_firewall"`
	// The service version.
	ServiceVersion int `jsonapi:"attr,service_version_number"`
}

DeleteWAFInput is used as input to the DeleteWAFInput function.

type DeleteWAFRuleExclusionInput

type DeleteWAFRuleExclusionInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// The rule exclusion number.
	Number int
}

DeleteWAFRuleExclusionInput used as input for removing WAF rule exclusions.

type DeployWAFVersionInput

type DeployWAFVersionInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
}

DeployWAFVersionInput used as input for deploying a WAF version.

type Dictionary

type Dictionary struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	ID        string     `mapstructure:"id"`
	Name      string     `mapstructure:"name"`
	WriteOnly bool       `mapstructure:"write_only"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

Dictionary represents a dictionary response from the Fastly API.

type DictionaryInfo

type DictionaryInfo struct {
	// LastUpdated is the Time-stamp (GMT) when the dictionary was last updated.
	LastUpdated *time.Time `mapstructure:"last_updated"`

	// Digest is the hash of the dictionary content.
	Digest string `mapstructure:"digest"`

	// ItemCount is the number of items belonging to the dictionary.
	ItemCount int `mapstructure:"item_count"`
}

DictionaryInfo represents a dictionary metadata response from the Fastly API.

type DictionaryItem

type DictionaryItem struct {
	ServiceID    string `mapstructure:"service_id"`
	DictionaryID string `mapstructure:"dictionary_id"`
	ItemKey      string `mapstructure:"item_key"`

	ItemValue string     `mapstructure:"item_value"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

DictionaryItem represents a dictionary item response from the Fastly API.

type Diff

type Diff struct {
	Format string `mapstructure:"format"`
	From   int    `mapstructure:"from"`
	To     int    `mapstructure:"to"`
	Diff   string `mapstructure:"diff"`
}

Diff represents a diff of two versions as a response from the Fastly API.

type DigitalOcean

type DigitalOcean struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	BucketName        string     `mapstructure:"bucket_name"`
	Domain            string     `mapstructure:"domain"`
	AccessKey         string     `mapstructure:"access_key"`
	SecretKey         string     `mapstructure:"secret_key"`
	Path              string     `mapstructure:"path"`
	Period            uint       `mapstructure:"period"`
	GzipLevel         uint8      `mapstructure:"gzip_level"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	MessageType       string     `mapstructure:"message_type"`
	TimestampFormat   string     `mapstructure:"timestamp_format"`
	Placement         string     `mapstructure:"placement"`
	PublicKey         string     `mapstructure:"public_key"`
	CompressionCodec  string     `mapstructure:"compression_codec"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

DigitalOcean represents a DigitalOcean response from the Fastly API.

type Director

type Director struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name      string       `mapstructure:"name"`
	Backends  []string     `mapstructure:"backends"`
	Comment   string       `mapstructure:"comment"`
	Shield    string       `mapstructure:"shield"`
	Quorum    uint         `mapstructure:"quorum"`
	Type      DirectorType `mapstructure:"type"`
	Retries   uint         `mapstructure:"retries"`
	Capacity  uint         `mapstructure:"capacity"`
	CreatedAt *time.Time   `mapstructure:"created_at"`
	UpdatedAt *time.Time   `mapstructure:"updated_at"`
	DeletedAt *time.Time   `mapstructure:"deleted_at"`
}

Director represents a director response from the Fastly API.

type DirectorBackend

type DirectorBackend struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Director  string     `mapstructure:"director_name"`
	Backend   string     `mapstructure:"backend_name"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

DirectorBackend is the relationship between a director and a backend in the Fastly API.

type DirectorType

type DirectorType uint8

DirectorType is a type of director.

const (
	// DirectorTypeRandom is a director that does random direction.
	DirectorTypeRandom DirectorType = 1

	// DirectorTypeRoundRobin is a director that does round-robin direction.
	DirectorTypeRoundRobin DirectorType = 2

	// DirectorTypeHash is a director that does hash direction.
	DirectorTypeHash DirectorType = 3

	// DirectorTypeClient is a director that does client direction.
	DirectorTypeClient DirectorType = 4
)

type Domain

type Domain struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name      string     `mapstructure:"name"`
	Comment   string     `mapstructure:"comment"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

Domain represents the the domain name Fastly will serve content for.

type DomainMetadata

type DomainMetadata struct {
	ServiceID      string `json:"service_id"`
	ServiceVersion int    `json:"version"`

	Name      string     `json:"name"`
	Comment   string     `json:"comment"`
	CreatedAt *time.Time `json:"created_at"`
	UpdatedAt *time.Time `json:"updated_at"`
	DeletedAt *time.Time `json:"deleted_at"`
}

DomainMetadata represents a domain name configured for a Fastly service.

type DomainValidationResult

type DomainValidationResult struct {
	Metadata DomainMetadata
	CName    string
	Valid    bool
}

DomainValidationResult defines an idiomatic representation of the API response.

func (*DomainValidationResult) UnmarshalJSON

func (d *DomainValidationResult) UnmarshalJSON(data []byte) error

UnmarshalJSON works around the badly designed API response by coercing the raw data into a more appropriate data structure.

type DynamicSnippet

type DynamicSnippet struct {
	ServiceID string `mapstructure:"service_id"`
	ID        string `mapstructure:"snippet_id"`

	Content   string     `mapstructure:"content"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
}

DynamicSnippet is the object returned when updating or retrieving a Dynamic Snippet

type ERL added in v6.3.0

type ERL struct {
	Action             ERLAction        `mapstructure:"action"`
	ClientKey          []string         `mapstructure:"client_key"`
	CreatedAt          *time.Time       `mapstructure:"created_at"`
	DeletedAt          *time.Time       `mapstructure:"deleted_at"`
	FeatureRevision    int              `mapstructure:"feature_revision"` // 1..
	HttpMethods        []string         `mapstructure:"http_methods"`
	ID                 string           `mapstructure:"id"`
	LoggerType         ERLLogger        `mapstructure:"logger_type"`
	Name               string           `mapstructure:"name"`
	PenaltyBoxDuration int              `mapstructure:"penalty_box_duration"` // 1..60
	Response           *ERLResponseType `mapstructure:"response"`             // required if Action != Log
	ResponseObjectName string           `mapstructure:"response_object_name"`
	RpsLimit           int              `mapstructure:"rps_limit"` // 10..10000
	ServiceId          string           `mapstructure:"service_id"`
	UpdatedAt          *time.Time       `mapstructure:"updated_at"`
	UriDictionaryName  string           `mapstructure:"uri_dictionary_name"`
	Version            int              `mapstructure:"version"` // 1..
	WindowSize         ERLWindowSize    `mapstructure:"window_size"`
}

ERL models the response from the Fastly API.

type ERLAction added in v6.3.0

type ERLAction string

ERLAction represents the action variants for when a rate limiter violation is detected.

const (
	ERLActionLogOnly        ERLAction = "log_only"
	ERLActionResponse       ERLAction = "response"
	ERLActionResponseObject ERLAction = "response_object"
)

type ERLLogger added in v6.3.0

type ERLLogger string

ERLLogger represents the supported log provider variants.

const (
	ERLLogAzureBlob       ERLLogger = "azureblob"
	ERLLogBigQuery        ERLLogger = "bigquery"
	ERLLogCloudFiles      ERLLogger = "cloudfiles"
	ERLLogDataDog         ERLLogger = "datadog"
	ERLLogDigitalOcean    ERLLogger = "digitalocean"
	ERLLogElasticSearch   ERLLogger = "elasticsearch"
	ERLLogFtp             ERLLogger = "ftp"
	ERLLogGcs             ERLLogger = "gcs"
	ERLLogGoogleAnalytics ERLLogger = "googleanalytics"
	ERLLogHeroku          ERLLogger = "heroku"
	ERLLogHoneycomb       ERLLogger = "honeycomb"
	ERLLogHttp            ERLLogger = "http"
	ERLLogHttps           ERLLogger = "https"
	ERLLogKafta           ERLLogger = "kafka"
	ERLLogKinesis         ERLLogger = "kinesis"
	ERLLogLogEntries      ERLLogger = "logentries"
	ERLLogLoggly          ERLLogger = "loggly"
	ERLLogLogShuttle      ERLLogger = "logshuttle"
	ERLLogNewRelic        ERLLogger = "newrelic"
	ERLLogOpenStack       ERLLogger = "openstack"
	ERLLogPaperTrail      ERLLogger = "papertrail"
	ERLLogPubSub          ERLLogger = "pubsub"
	ERLLogS3              ERLLogger = "s3"
	ERLLogScalyr          ERLLogger = "scalyr"
	ERLLogSftp            ERLLogger = "sftp"
	ERLLogSplunk          ERLLogger = "splunk"
	ERLLogStackDriver     ERLLogger = "stackdriver"
	ERLLogSumoLogiuc      ERLLogger = "sumologic"
	ERLLogSysLog          ERLLogger = "syslog"
)

type ERLResponseType added in v6.3.0

type ERLResponseType struct {
	ERLStatus      int    `url:"status,omitempty"`
	ERLContentType string `url:"content_type,omitempty"`
	ERLContent     string `url:"content,omitempty"`
}

ERLResponseType models the response from the Fastly API.

type ERLWindowSize added in v6.3.0

type ERLWindowSize int

ERLWindowSize represents the duration variants for when the RPS limit is exceeded.

const (
	ERLSize1  ERLWindowSize = 1
	ERLSize10 ERLWindowSize = 10
	ERLSize60 ERLWindowSize = 60
)

type ERLsByName added in v6.3.0

type ERLsByName []*ERL

ERLsByName is a sortable list of ERLs

func (ERLsByName) Len added in v6.3.0

func (s ERLsByName) Len() int

Len, Swap, and Less implement the sortable interface

func (ERLsByName) Less added in v6.3.0

func (s ERLsByName) Less(i, j int) bool

func (ERLsByName) Swap added in v6.3.0

func (s ERLsByName) Swap(i, j int)

type EdgeCheck

type EdgeCheck struct {
	Hash         string             `mapstructure:"hash"`
	Server       string             `mapstructure:"server"`
	ResponseTime float64            `mapstructure:"response_time"`
	Request      *EdgeCheckRequest  `mapstructure:"request"`
	Response     *EdgeCheckResponse `mapstructure:"response"`
}

EdgeCheck represents an edge check response from the Fastly API.

type EdgeCheckInput

type EdgeCheckInput struct {
	URL string `url:"url,omitempty"`
}

EdgeCheckInput is used as input to the EdgeCheck function.

type EdgeCheckRequest

type EdgeCheckRequest struct {
	URL     string       `mapstructure:"url"`
	Method  string       `mapstructure:"method"`
	Headers *http.Header `mapstructure:"headers"`
}

EdgeCheckRequest is the request part of an EdgeCheck response.

type EdgeCheckResponse

type EdgeCheckResponse struct {
	Status  uint         `mapstructure:"status"`
	Headers *http.Header `mapstructure:"headers"`
}

EdgeCheckResponse is the response part of an EdgeCheck response.

type Elasticsearch

type Elasticsearch struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Format            string     `mapstructure:"format"`
	Index             string     `mapstructure:"index"`
	URL               string     `mapstructure:"url"`
	Pipeline          string     `mapstructure:"pipeline"`
	User              string     `mapstructure:"user"`
	Password          string     `mapstructure:"password"`
	RequestMaxEntries uint       `mapstructure:"request_max_entries"`
	RequestMaxBytes   uint       `mapstructure:"request_max_bytes"`
	Placement         string     `mapstructure:"placement"`
	TLSCACert         string     `mapstructure:"tls_ca_cert"`
	TLSClientCert     string     `mapstructure:"tls_client_cert"`
	TLSClientKey      string     `mapstructure:"tls_client_key"`
	TLSHostname       string     `mapstructure:"tls_hostname"`
	FormatVersion     uint       `mapstructure:"format_version"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Elasticsearch represents an Elasticsearch Logging response from the Fastly API.

type ErrorObject

type ErrorObject struct {
	ID     string `mapstructure:"id"`
	Title  string `mapstructure:"title"`
	Detail string `mapstructure:"detail"`
	Status string `mapstructure:"status"`
	Code   string `mapstructure:"code"`

	Meta *map[string]interface{} `mapstructure:"meta"`
}

ErrorObject is a single error.

type Event

type Event struct {
	ID          string                 `jsonapi:"primary,event"`
	CustomerID  string                 `jsonapi:"attr,customer_id"`
	Description string                 `jsonapi:"attr,description"`
	EventType   string                 `jsonapi:"attr,event_type"`
	IP          string                 `jsonapi:"attr,ip"`
	Metadata    map[string]interface{} `jsonapi:"attr,metadata,omitempty"`
	ServiceID   string                 `jsonapi:"attr,service_id"`
	UserID      string                 `jsonapi:"attr,user_id"`
	CreatedAt   *time.Time             `jsonapi:"attr,created_at,iso8601"`
	Admin       bool                   `jsonapi:"attr,admin"`
}

Events represents an event_logs item response from the Fastly API.

type EventsPaginationInfo

type EventsPaginationInfo struct {
	First string `json:"first,omitempty"`
	Last  string `json:"last,omitempty"`
	Next  string `json:"next,omitempty"`
}

EventsPaginationInfo stores links to searches related to the current one, showing any information about additional results being stored on another page

type FTP

type FTP struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Address           string     `mapstructure:"address"`
	Port              uint       `mapstructure:"port"`
	Username          string     `mapstructure:"user"`
	Password          string     `mapstructure:"password"`
	PublicKey         string     `mapstructure:"public_key"`
	Path              string     `mapstructure:"path"`
	Period            uint       `mapstructure:"period"`
	CompressionCodec  string     `mapstructure:"compression_codec"`
	GzipLevel         uint8      `mapstructure:"gzip_level"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	TimestampFormat   string     `mapstructure:"timestamp_format"`
	MessageType       string     `mapstructure:"message_type"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

FTP represents an FTP logging response from the Fastly API.

type FieldError

type FieldError struct {
	// contains filtered or unexported fields
}

FieldError represents a custom error type for API data fields.

func NewFieldError

func NewFieldError(kind string) *FieldError

NewFieldError returns an error that formats as the given text.

func (*FieldError) Error

func (e *FieldError) Error() string

Error fulfills the error interface.

NOTE: some fields are optional but still need to present an error depending on the API they are associated with. For example, when updating a service the 'name' and 'comment' fields are both optional, but at least one of them needs to be provided for the API call to have any purpose (otherwise the API backend will just reject the call, thus being a waste of network resources).

Because of this we allow modifying the error message to reflect whether the field was either missing or some other type of error occurred.

func (*FieldError) Message

func (e *FieldError) Message(msg string) *FieldError

type GCS

type GCS struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Bucket            string     `mapstructure:"bucket_name"`
	User              string     `mapstructure:"user"`
	AccountName       string     `mapstructure:"account_name"`
	SecretKey         string     `mapstructure:"secret_key"`
	Path              string     `mapstructure:"path"`
	Period            uint       `mapstructure:"period"`
	CompressionCodec  string     `mapstructure:"compression_codec"`
	GzipLevel         uint8      `mapstructure:"gzip_level"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	MessageType       string     `mapstructure:"message_type"`
	ResponseCondition string     `mapstructure:"response_condition"`
	TimestampFormat   string     `mapstructure:"timestamp_format"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

GCS represents an GCS logging response from the Fastly API.

type GetACLEntryInput

type GetACLEntryInput struct {
	ServiceID string
	ACLID     string
	ID        string
}

GetACLEntryInput is the input parameter to GetACLEntry function.

type GetACLInput

type GetACLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the ACL to get (required).
	Name string
}

GetACLInput is the input parameter to GetACL function.

type GetAPIEventInput

type GetAPIEventInput struct {
	// EventID is the ID of the event and is required.
	EventID string
}

GetAPIEventInput is used as input to the GetAPIEvent function.

type GetAPIEventsFilterInput

type GetAPIEventsFilterInput struct {
	// CustomerID to Limit the returned events to a specific customer.
	CustomerID string

	// ServiceID to Limit the returned events to a specific service.
	ServiceID string

	// EventType to Limit the returned events to a specific event type. See above for event codes.
	EventType string

	// UserID to Limit the returned events to a specific user.
	UserID string

	// Number is the Pagination page number.
	PageNumber int

	// Size is the Number of items to return on each paginated page.
	MaxResults int
}

GetAPIEventsFilter is used as input to the GetAPIEvents function.

type GetAPIEventsResponse

type GetAPIEventsResponse struct {
	Events []*Event
	Links  EventsPaginationInfo `json:"links"`
}

GetAPIEventsResponse is the data returned to the user from a GetAPIEvents call

type GetBackendInput

type GetBackendInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the backend to fetch.
	Name string
}

GetBackendInput is used as input to the GetBackend function.

type GetBigQueryInput

type GetBigQueryInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the BigQuery to fetch.
	Name string
}

GetBigQueryInput is used as input to the GetBigQuery function.

type GetBillingInput

type GetBillingInput struct {
	Year  uint16
	Month uint8
}

GetBillingInput is used as input to the GetBilling function.

type GetBlobStorageInput

type GetBlobStorageInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the blob storage to fetch.
	Name string
}

GetBlobStorageInput is used as input to the GetBlobStorage function.

type GetBulkCertificateInput

type GetBulkCertificateInput struct {
	ID string
}

GetBulkCertificateInput is used as input to the GetBulkCertificate function.

type GetCacheSettingInput

type GetCacheSettingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the cache setting to fetch.
	Name string
}

GetCacheSettingInput is used as input to the GetCacheSetting function.

type GetCloudfilesInput

type GetCloudfilesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Cloudfiles to fetch.
	Name string
}

GetCloudfilesInput is used as input to the GetCloudfiles function.

type GetConditionInput

type GetConditionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the condition to fetch.
	Name string
}

GetConditionInput is used as input to the GetCondition function.

type GetCustomTLSCertificateInput

type GetCustomTLSCertificateInput struct {
	ID string
}

GetCustomTLSCertificateInput is used as input to the GetCustomTLSCertificate function.

type GetCustomTLSConfigurationInput

type GetCustomTLSConfigurationInput struct {
	ID      string
	Include string // Include related objects. Optional, comma-separated values. Permitted values: dns_records.
}

GetCustomTLSConfigurationInput is used as input to the GetCustomTLSConfiguration function.

type GetDatadogInput

type GetDatadogInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Datadog to fetch.
	Name string
}

GetDatadogInput is used as input to the GetDatadog function.

type GetDictionaryInfoInput

type GetDictionaryInfoInput struct {
	// ServiceID is the ID of the service Dictionary belongs to (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// ID is the alphanumeric string identifying a dictionary.
	ID string
}

GetDictionaryInfoInput is used as input to the GetDictionary function.

type GetDictionaryInput

type GetDictionaryInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the dictionary to fetch.
	Name string
}

GetDictionaryInput is used as input to the GetDictionary function.

type GetDictionaryItemInput

type GetDictionaryItemInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// DictionaryID is the ID of the dictionary to retrieve items for (required).
	DictionaryID string

	// ItemKey is the name of the dictionary item to fetch.
	ItemKey string
}

GetDictionaryItemInput is used as input to the GetDictionaryItem function.

type GetDiffInput

type GetDiffInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// From is the version to diff from. This can either be a string indicating a
	// positive number (e.g. "1") or a negative number from "-1" down ("-1" is the
	// latest version).
	From int

	// To is the version to diff up to. The same rules for From apply.
	To int

	// Format is an optional field to specify the format with which the diff will
	// be returned. Acceptable values are "text" (default), "html", or
	// "html_simple".
	Format string
}

GetDiffInput is used as input to the GetDiff function.

type GetDigitalOceanInput

type GetDigitalOceanInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the DigitalOcean to fetch.
	Name string
}

GetDigitalOceanInput is used as input to the GetDigitalOcean function.

type GetDirectorBackendInput

type GetDirectorBackendInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Director is the name of the director (required).
	Director string

	// Backend is the name of the backend (required).
	Backend string
}

GetDirectorBackendInput is used as input to the GetDirectorBackend function.

type GetDirectorInput

type GetDirectorInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the director to fetch.
	Name string
}

GetDirectorInput is used as input to the GetDirector function.

type GetDomainInput

type GetDomainInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the domain to fetch.
	Name string `url:"name"`
}

GetDomainInput is used as input to the GetDomain function.

type GetDynamicSnippetInput

type GetDynamicSnippetInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ID is the ID of the Snippet to fetch.
	ID string
}

GetDynamicSnippetInput is used as input to the GetDynamicSnippet function.

type GetERLInput added in v6.3.0

type GetERLInput struct {
	ServiceID      string `form:"service_id"`
	ServiceVersion int    `form:"version"`
	ERLID          string `form:"id"`
}

GetERLInput is used as input to the GetERL function.

type GetElasticsearchInput

type GetElasticsearchInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Elasticsearch endpoint to fetch.
	Name string
}

GetElasticsearchInput is used as input to the GetElasticsearch function.

type GetFTPInput

type GetFTPInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the FTP to fetch.
	Name string
}

GetFTPInput is used as input to the GetFTP function.

type GetGCSInput

type GetGCSInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the GCS to fetch.
	Name string
}

GetGCSInput is used as input to the GetGCS function.

type GetGeneratedVCLInput

type GetGeneratedVCLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

GetGeneratedVCLInput is used as input to the GetGeneratedVCL function.

type GetGzipInput

type GetGzipInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Gzip to fetch.
	Name string
}

GetGzipInput is used as input to the GetGzip function.

type GetHTTPSInput

type GetHTTPSInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the HTTPS endpoint to fetch.
	Name string
}

GetHTTPSInput is used as input to the GetHTTPS function.

type GetHeaderInput

type GetHeaderInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the header to fetch.
	Name string
}

GetHeaderInput is used as input to the GetHeader function.

type GetHealthCheckInput

type GetHealthCheckInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the health check to fetch.
	Name string
}

GetHealthCheckInput is used as input to the GetHealthCheck function.

type GetHerokuInput

type GetHerokuInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the heroku to fetch.
	Name string
}

GetHerokuInput is used as input to the GetHeroku function.

type GetHoneycombInput

type GetHoneycombInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the honeycomb to fetch.
	Name string
}

GetHoneycombInput is used as input to the GetHoneycomb function.

type GetKafkaInput

type GetKafkaInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the kafka to fetch.
	Name string
}

GetKafkaInput is used as input to the GetKafka function.

type GetKinesisInput

type GetKinesisInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Kinesis logging object to fetch (required).
	Name string
}

GetKinesisInput is used as input to the GetKinesis function.

type GetLogentriesInput

type GetLogentriesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the logentries to fetch.
	Name string
}

GetLogentriesInput is used as input to the GetLogentries function.

type GetLogglyInput

type GetLogglyInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the loggly to fetch.
	Name string
}

GetLogglyInput is used as input to the GetLoggly function.

type GetLogshuttleInput

type GetLogshuttleInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the logshuttle to fetch.
	Name string
}

GetLogshuttleInput is used as input to the GetLogshuttle function.

type GetNewRelicInput

type GetNewRelicInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the newrelic to fetch.
	Name string
}

GetNewRelicInput is used as input to the GetNewRelic function.

type GetObjectStoreInput added in v6.6.0

type GetObjectStoreInput struct {
	// ID is the ID of the store to fetch (required).
	ID string
}

GetObjectStoreInput is the input to the GetObjectStore function.

type GetObjectStoreKeyInput added in v6.6.0

type GetObjectStoreKeyInput struct {
	// ID is the ID of the object store (required).
	ID string

	// Key is the key to fetch (required).
	Key string
}

GetObjectStoreKeyInput is the input to the GetObjectStoreKey function.

type GetOpenstackInput

type GetOpenstackInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Openstack to fetch.
	Name string
}

GetOpenstackInput is used as input to the GetOpenstack function.

type GetOriginMetricsInput added in v6.2.0

type GetOriginMetricsInput struct {
	ServiceID   string
	Start       time.Time
	End         time.Time
	Metrics     []string
	GroupBy     []string
	Downsample  string
	Hosts       []string
	Datacenters []string
	Regions     []string
	Cursor      string
}

GetOriginMetricsInput is the input to an OriginMetrics request.

type GetPackageInput

type GetPackageInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string `mapstructure:"service_id"`

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int `mapstructure:"version"`
}

GetPackageInput is used as input to the GetPackage function.

type GetPapertrailInput

type GetPapertrailInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the papertrail to fetch.
	Name string
}

GetPapertrailInput is used as input to the GetPapertrail function.

type GetPoolInput

type GetPoolInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the pool of interest (required).
	Name string
}

GetPoolInput is used as input to the GetPool function.

type GetPrivateKeyInput

type GetPrivateKeyInput struct {
	ID string
}

GetPrivateKeyInput is an input to the GetPrivateKey function. Allowed values for the fields are described at https://developer.fastly.com/reference/api/tls/platform/.

type GetPubsubInput

type GetPubsubInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Pubsub to fetch.
	Name string
}

GetPubsubInput is used as input to the GetPubsub function.

type GetRealtimeStatsInput

type GetRealtimeStatsInput struct {
	ServiceID string
	Timestamp uint64
	Limit     uint32
}

GetRealtimeStatsInput is an input parameter to GetRealtimeStats function

type GetRequestSettingInput

type GetRequestSettingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the request settings to fetch.
	Name string
}

GetRequestSettingInput is used as input to the GetRequestSetting function.

type GetResponseObjectInput

type GetResponseObjectInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the response object to fetch.
	Name string
}

GetResponseObjectInput is used as input to the GetResponseObject function.

type GetS3Input

type GetS3Input struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the S3 to fetch.
	Name string
}

GetS3Input is used as input to the GetS3 function.

type GetSFTPInput

type GetSFTPInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the SFTP to fetch.
	Name string
}

GetSFTPInput is used as input to the GetSFTP function.

type GetScalyrInput

type GetScalyrInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the scalyr to fetch.
	Name string
}

GetScalyrInput is used as input to the GetScalyr function.

type GetSecretInput added in v6.7.0

type GetSecretInput struct {
	// ID of the Secret Store (required).
	ID string
	// Name of the Secret (required).
	Name string
}

GetSecretInput is used as input to the GetSecret function.

type GetSecretStoreInput added in v6.7.0

type GetSecretStoreInput struct {
	// ID of the Secret Store (required).
	ID string
}

GetSecretStoreInput is used as input to the GetSecretStore function.

type GetServerInput

type GetServerInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// PoolID is the ID of the pool (required).
	PoolID string

	Server string
}

GetServerInput is used as input to the GetServer function.

type GetServiceAuthorizationInput added in v6.4.0

type GetServiceAuthorizationInput struct {
	// ID of the service authorization to retrieve.
	ID string
}

GetServiceAuthorizationInput is used as input to the GetServiceAuthorization function.

type GetServiceInput

type GetServiceInput struct {
	ID string
}

GetServiceInput is used as input to the GetService function.

type GetSettingsInput

type GetSettingsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

GetSettingsInput is used as input to the GetSettings function.

type GetSnippetInput

type GetSnippetInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Snippet to fetch.
	Name string
}

GetSnippetInput is used as input to the GetSnippet function.

type GetSplunkInput

type GetSplunkInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the splunk to fetch.
	Name string
}

GetSplunkInput is used as input to the GetSplunk function.

type GetStatsInput

type GetStatsInput struct {
	Service string
	Field   string
	From    string
	To      string
	By      string
	Region  string
}

GetStatsInput is an input to the GetStats function. Stats can be filtered by a Service ID, an individual stats field, time range (From and To), sampling rate (By) and/or Fastly region (Region) Allowed values for the fields are described at https://developer.fastly.com/reference/api/metrics-stats/

type GetSumologicInput

type GetSumologicInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the sumologic to fetch.
	Name string
}

GetSumologicInput is used as input to the GetSumologic function.

type GetSyslogInput

type GetSyslogInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the syslog to fetch.
	Name string
}

GetSyslogInput is used as input to the GetSyslog function.

type GetTLSActivationInput

type GetTLSActivationInput struct {
	ID      string
	Include *string // Include related objects. Optional, comma-separated values. Permitted values: tls_certificate, tls_configuration, and tls_domain.
}

GetTLSActivationInput is used as input to the GetTLSActivation function.

type GetTLSSubscriptionInput

type GetTLSSubscriptionInput struct {
	// ID of the TLS subscription to fetch.
	ID string
	// Include related objects. Optional, comma-separated values. Permitted values: tls_authorizations.
	Include *string
}

GetTLSSubscriptionInput is used as input to the GetTLSSubscription function

type GetUsageInput

type GetUsageInput struct {
	From   string
	To     string
	By     string
	Region string
}

GetUsageInput is used as an input to the GetUsage function Value for the input are described at https://developer.fastly.com/reference/api/metrics-stats/

type GetUserInput

type GetUserInput struct {
	ID string
}

GetUserInput is used as input to the GetUser function.

type GetVCLInput

type GetVCLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the VCL to fetch.
	Name string
}

GetVCLInput is used as input to the GetVCL function.

type GetVersionInput

type GetVersionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// SrrviceVersion is the version number to fetch (required).
	ServiceVersion int
}

GetVersionInput is the input to the GetVersion function.

type GetWAFInput

type GetWAFInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// ID is the WAF's ID.
	ID string
}

GetWAFInput is used as input to the GetWAF function.

type GetWAFVersionInput

type GetWAFVersionInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
}

GetWAFVersionInput used as input for GetWAFVersion function.

type Gzip

type Gzip struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name           string     `mapstructure:"name"`
	ContentTypes   string     `mapstructure:"content_types"`
	Extensions     string     `mapstructure:"extensions"`
	CacheCondition string     `mapstructure:"cache_condition"`
	CreatedAt      *time.Time `mapstructure:"created_at"`
	UpdatedAt      *time.Time `mapstructure:"updated_at"`
	DeletedAt      *time.Time `mapstructure:"deleted_at"`
}

Gzip represents an Gzip logging response from the Fastly API.

type HTTPError

type HTTPError struct {
	// StatusCode is the HTTP status code (2xx-5xx).
	StatusCode int

	Errors []*ErrorObject `mapstructure:"errors"`
}

HTTPError is a custom error type that wraps an HTTP status code with some helper functions.

func NewHTTPError

func NewHTTPError(resp *http.Response) *HTTPError

NewHTTPError creates a new HTTP error from the given code.

func (*HTTPError) Error

func (e *HTTPError) Error() string

Error implements the error interface and returns the string representing the error text that includes the status code and the corresponding status text.

func (*HTTPError) IsNotFound

func (e *HTTPError) IsNotFound() bool

IsNotFound returns true if the HTTP error code is a 404, false otherwise.

func (*HTTPError) String

func (e *HTTPError) String() string

String implements the stringer interface and returns the string representing the string text that includes the status code and corresponding status text.

type HTTPS

type HTTPS struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Format            string     `mapstructure:"format"`
	URL               string     `mapstructure:"url"`
	RequestMaxEntries uint       `mapstructure:"request_max_entries"`
	RequestMaxBytes   uint       `mapstructure:"request_max_bytes"`
	ContentType       string     `mapstructure:"content_type"`
	HeaderName        string     `mapstructure:"header_name"`
	HeaderValue       string     `mapstructure:"header_value"`
	Method            string     `mapstructure:"method"`
	JSONFormat        string     `mapstructure:"json_format"`
	Placement         string     `mapstructure:"placement"`
	TLSCACert         string     `mapstructure:"tls_ca_cert"`
	TLSClientCert     string     `mapstructure:"tls_client_cert"`
	TLSClientKey      string     `mapstructure:"tls_client_key"`
	TLSHostname       string     `mapstructure:"tls_hostname"`
	MessageType       string     `mapstructure:"message_type"`
	FormatVersion     uint       `mapstructure:"format_version"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

HTTPS represents an HTTPS Logging response from the Fastly API.

type Header struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string       `mapstructure:"name"`
	Action            HeaderAction `mapstructure:"action"`
	IgnoreIfSet       bool         `mapstructure:"ignore_if_set"`
	Type              HeaderType   `mapstructure:"type"`
	Destination       string       `mapstructure:"dst"`
	Source            string       `mapstructure:"src"`
	Regex             string       `mapstructure:"regex"`
	Substitution      string       `mapstructure:"substitution"`
	Priority          uint         `mapstructure:"priority"`
	RequestCondition  string       `mapstructure:"request_condition"`
	CacheCondition    string       `mapstructure:"cache_condition"`
	ResponseCondition string       `mapstructure:"response_condition"`
	CreatedAt         *time.Time   `mapstructure:"created_at"`
	UpdatedAt         *time.Time   `mapstructure:"updated_at"`
	DeletedAt         *time.Time   `mapstructure:"deleted_at"`
}

Header represents a header response from the Fastly API.

type HeaderAction

type HeaderAction string

HeaderAction is a type of header action.

const (
	// HeaderActionSet is a header action that sets or resets a header.
	HeaderActionSet HeaderAction = "set"

	// HeaderActionAppend is a header action that appends to an existing header.
	HeaderActionAppend HeaderAction = "append"

	// HeaderActionDelete is a header action that deletes a header.
	HeaderActionDelete HeaderAction = "delete"

	// HeaderActionRegex is a header action that performs a single regex
	// replacement on a header.
	HeaderActionRegex HeaderAction = "regex"

	// HeaderActionRegexRepeat is a header action that performs a global regex
	// replacement on a header.
	HeaderActionRegexRepeat HeaderAction = "regex_repeat"
)

func PHeaderAction

func PHeaderAction(t HeaderAction) *HeaderAction

PHeaderAction returns pointer to HeaderAction.

type HeaderType

type HeaderType string

HeaderType is a type of header.

const (
	// HeaderTypeRequest is a header type that performs on the request before
	// lookups.
	HeaderTypeRequest HeaderType = "request"

	// HeaderTypeFetch is a header type that performs on the request to the origin
	// server.
	HeaderTypeFetch HeaderType = "fetch"

	// HeaderTypeCache is a header type that performs on the response before it's
	// store in the cache.
	HeaderTypeCache HeaderType = "cache"

	// HeaderTypeResponse is a header type that performs on the response before
	// delivering to the client.
	HeaderTypeResponse HeaderType = "response"
)

func PHeaderType

func PHeaderType(t HeaderType) *HeaderType

PHeaderType returns pointer to HeaderType.

type HealthCheck

type HealthCheck struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name             string     `mapstructure:"name"`
	Comment          string     `mapstructure:"comment"`
	Method           string     `mapstructure:"method"`
	Headers          []string   `mapstructure:"headers"`
	Host             string     `mapstructure:"host"`
	Path             string     `mapstructure:"path"`
	HTTPVersion      string     `mapstructure:"http_version"`
	Timeout          uint       `mapstructure:"timeout"`
	CheckInterval    uint       `mapstructure:"check_interval"`
	ExpectedResponse uint       `mapstructure:"expected_response"`
	Window           uint       `mapstructure:"window"`
	Threshold        uint       `mapstructure:"threshold"`
	Initial          uint       `mapstructure:"initial"`
	CreatedAt        *time.Time `mapstructure:"created_at"`
	UpdatedAt        *time.Time `mapstructure:"updated_at"`
	DeletedAt        *time.Time `mapstructure:"deleted_at"`
}

HealthCheck represents a health check response from the Fastly API.

type Heroku

type Heroku struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	URL               string     `mapstructure:"url"`
	Token             string     `mapstructure:"token"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Heroku represents a heroku response from the Fastly API.

type Honeycomb

type Honeycomb struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	Dataset           string     `mapstructure:"dataset"`
	Token             string     `mapstructure:"token"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Honeycomb represents a honeycomb response from the Fastly API.

type IPAddrs

type IPAddrs []string

IPAddrs is a sortable list of IP addresses returned by the Fastly API.

type InsertObjectStoreKeyInput added in v6.6.0

type InsertObjectStoreKeyInput struct {
	// ID is the ID of the object store (required).
	ID string

	// Key is the key to add (required).
	Key string

	// Value is the value to insert (required).
	Value string
}

InsertObjectStoreKeyInput is the input to the InsertObjectStoreKey function.

type Kafka

type Kafka struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Brokers           string     `mapstructure:"brokers"`
	Topic             string     `mapstructure:"topic"`
	RequiredACKs      string     `mapstructure:"required_acks"`
	UseTLS            bool       `mapstructure:"use_tls"`
	CompressionCodec  string     `mapstructure:"compression_codec"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	TLSCACert         string     `mapstructure:"tls_ca_cert"`
	TLSHostname       string     `mapstructure:"tls_hostname"`
	TLSClientCert     string     `mapstructure:"tls_client_cert"`
	TLSClientKey      string     `mapstructure:"tls_client_key"`
	ParseLogKeyvals   bool       `mapstructure:"parse_log_keyvals"`
	RequestMaxBytes   uint       `mapstructure:"request_max_bytes"`
	AuthMethod        string     `mapstructure:"auth_method"`
	User              string     `mapstructure:"user"`
	Password          string     `mapstructure:"password"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Kafka represents a kafka response from the Fastly API.

type Kinesis

type Kinesis struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	StreamName        string     `mapstructure:"topic"`
	Region            string     `mapstructure:"region"`
	AccessKey         string     `mapstructure:"access_key"`
	SecretKey         string     `mapstructure:"secret_key"`
	IAMRole           string     `mapstructure:"iam_role"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Kinesis represents a Kinesis response from the Fastly API.

type LatestVersionInput

type LatestVersionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string
}

LatestVersionInput is the input to the LatestVersion function.

type ListACLEntriesInput

type ListACLEntriesInput struct {
	ServiceID string
	ACLID     string
	Direction string
	PerPage   int
	Page      int
	Sort      string
}

ListACLEntriesInput is the input parameter to ListACLEntries function.

type ListACLsInput

type ListACLsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListACLsInput is used as input to the ListACLs function.

type ListAclEntriesPaginator

type ListAclEntriesPaginator struct {
	CurrentPage int
	NextPage    int
	LastPage    int
	// contains filtered or unexported fields
}

func (*ListAclEntriesPaginator) GetNext

func (p *ListAclEntriesPaginator) GetNext() ([]*ACLEntry, error)

GetNext retrieves data in the next page

func (*ListAclEntriesPaginator) HasNext

func (p *ListAclEntriesPaginator) HasNext() bool

HasNext returns a boolean indicating whether more pages are available

func (*ListAclEntriesPaginator) Remaining

func (p *ListAclEntriesPaginator) Remaining() int

Remaining returns the remaining page count

type ListAllWAFActiveRulesInput

type ListAllWAFActiveRulesInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// Limit results to active rules with the specified status.
	FilterStatus string
	// Limit results to active rules with the specified message.
	FilterMessage string
	// Limit results to active rules that represent the specified ModSecurity modsec_rule_id.
	FilterModSedID string
	// Include relationships. Optional, comma-separated values. Permitted values: waf_rule_revision and waf_firewall_version.
	Include string
}

ListAllWAFActiveRulesInput used as input for listing all WAF active rules.

type ListAllWAFRuleExclusionsInput

type ListAllWAFRuleExclusionsInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// Limit results to exclusions with the specified exclusions type.
	FilterExclusionType *string
	// Limit results to exclusions with the specified exclusion name.
	FilterName *string
	// Limit results to exclusions that represent the specified ModSecurity modsec_rule_id.
	FilterModSedID *string
	// Include relationships. Optional. Permitted values: waf_rules.
	Include []string
}

ListAllWAFRuleExclusionsInput used as input for listing all WAF rule exclusions.

type ListAllWAFRulesInput

type ListAllWAFRulesInput struct {
	// Limit the returned rules to a set linked to a tag by name.
	FilterTagNames []string
	// Limit the returned rules to a set by publishers.
	FilterPublishers []string
	// Limit the returned rules to a set by modsecurity rule IDs.
	FilterModSecIDs []int
	// Excludes individual rules by modsecurity rule IDs.
	ExcludeMocSecIDs []int
	// Include relationships. Optional, comma-separated values. Permitted values: waf_tags and waf_rule_revisions.
	Include string
}

ListAllWAFRulesInput used as input for listing all WAF rules.

type ListAllWAFVersionsInput

type ListAllWAFVersionsInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// Include relationships. Optional, comma-separated values. Permitted values: waf_firewall_versions.
	Include string
}

ListAllWAFVersionsInput used as input for listing all WAF versions.

type ListBackendsInput

type ListBackendsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListBackendsInput is used as input to the ListBackends function.

type ListBigQueriesInput

type ListBigQueriesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListBigQueriesInput is used as input to the ListBigQueries function.

type ListBlobStoragesInput

type ListBlobStoragesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListBlobStoragesInput is used as input to the ListBlobStorages function.

type ListBulkCertificatesInput

type ListBulkCertificatesInput struct {
	PageNumber              int    // The page index for pagination.
	PageSize                int    // The number of keys per page.
	FilterTLSDomainsIDMatch string // Filter certificates by their matching, fully-qualified domain name. Returns all partial matches. Must provide a value longer than 3 characters.
	Sort                    string // The order in which to list certificates. Valid values are created_at, not_before, not_after. May precede any value with a - for descending.
}

ListBulkCertificatesInput is used as input to the ListBulkCertificates function.

type ListCacheSettingsInput

type ListCacheSettingsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListCacheSettingsInput is used as input to the ListCacheSettings function.

type ListCloudfilesInput

type ListCloudfilesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListCloudfilesInput is used as input to the ListCloudfiles function.

type ListConditionsInput

type ListConditionsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListConditionsInput is used as input to the ListConditions function.

type ListCustomTLSCertificatesInput

type ListCustomTLSCertificatesInput struct {
	FilterNotAfter     string // Limit the returned certificates to those that expire prior to the specified date in UTC. Accepts parameters: lte (e.g., filter[not_after][lte]=2020-05-05).
	FilterTLSDomainsID string // Limit the returned certificates to those that include the specific domain.
	Include            string // Include related objects. Optional, comma-separated values. Permitted values: tls_activations.
	PageNumber         int    // The page index for pagination.
	PageSize           int    // The number of keys per page.
	Sort               string // The order in which to list certificates. Valid values are created_at, not_before, not_after. May precede any value with a - for descending.
}

ListCustomTLSCertificatesInput is used as input to the Client.ListCustomTLSCertificates function.

type ListCustomTLSConfigurationsInput

type ListCustomTLSConfigurationsInput struct {
	FilterBulk bool   // Whether or not to only include bulk=true configurations
	Include    string // Include related objects. Optional, comma-separated values. Permitted values: dns_records.
	PageNumber int    // The page index for pagination.
	PageSize   int    // The number of keys per page.
}

ListCustomTLSConfigurationsInput is used as input to the ListCustomTLSConfigurationsInput function.

type ListCustomerTokensInput

type ListCustomerTokensInput struct {
	CustomerID string
}

ListCustomerTokensInput is used as input to the ListCustomerTokens function.

type ListCustomerUsersInput

type ListCustomerUsersInput struct {
	CustomerID string
}

ListCustomerUsersInput is used as input to the ListCustomerUsers function.

type ListDatadogInput

type ListDatadogInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListDatadogInput is used as input to the ListDatadog function.

type ListDictionariesInput

type ListDictionariesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListDictionariesInput is used as input to the ListDictionaries function.

type ListDictionaryItemsInput

type ListDictionaryItemsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// DictionaryID is the ID of the dictionary to retrieve items for (required).
	DictionaryID string
	Direction    string
	PerPage      int
	Page         int
	Sort         string
}

ListDictionaryItemsInput is used as input to the ListDictionaryItems function.

type ListDictionaryItemsPaginator

type ListDictionaryItemsPaginator struct {
	CurrentPage int
	NextPage    int
	LastPage    int
	// contains filtered or unexported fields
}

func (*ListDictionaryItemsPaginator) GetNext

GetNext retrieves data in the next page

func (*ListDictionaryItemsPaginator) HasNext

func (p *ListDictionaryItemsPaginator) HasNext() bool

HasNext returns a boolean indicating whether more pages are available

func (*ListDictionaryItemsPaginator) Remaining

func (p *ListDictionaryItemsPaginator) Remaining() int

Remaining returns the remaining page count

type ListDigitalOceansInput

type ListDigitalOceansInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListDigitalOceansInput is used as input to the ListDigitalOceans function.

type ListDirectorsInput

type ListDirectorsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListDirectorsInput is used as input to the ListDirectors function.

type ListDomainsInput

type ListDomainsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListDomainsInput is used as input to the ListDomains function.

type ListERLsInput added in v6.3.0

type ListERLsInput struct {
	ServiceID      string // required
	ServiceVersion int    // required
}

ListERLsInput is used as input to the ListERLs function.

type ListElasticsearchInput

type ListElasticsearchInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListElasticsearchInput is used as input to the ListElasticsearch function.

type ListFTPsInput

type ListFTPsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListFTPsInput is used as input to the ListFTPs function.

type ListGCSsInput

type ListGCSsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListGCSsInput is used as input to the ListGCSs function.

type ListGzipsInput

type ListGzipsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListGzipsInput is used as input to the ListGzips function.

type ListHTTPSInput

type ListHTTPSInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListHTTPSInput is used as input to the ListHTTPS function.

type ListHeadersInput

type ListHeadersInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListHeadersInput is used as input to the ListHeaders function.

type ListHealthChecksInput

type ListHealthChecksInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListHealthChecksInput is used as input to the ListHealthChecks function.

type ListHerokusInput

type ListHerokusInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListHerokusInput is used as input to the ListHerokus function.

type ListHoneycombsInput

type ListHoneycombsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListHoneycombsInput is used as input to the ListHoneycombs function.

type ListKafkasInput

type ListKafkasInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListKafkasInput is used as input to the ListKafkas function.

type ListKinesisInput

type ListKinesisInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListKinesisInput is used as input to the ListKinesis function.

type ListLogentriesInput

type ListLogentriesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListLogentriesInput is used as input to the ListLogentries function.

type ListLogglyInput

type ListLogglyInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListLogglyInput is used as input to the ListLoggly function.

type ListLogshuttlesInput

type ListLogshuttlesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListLogshuttlesInput is used as input to the ListLogshuttles function.

type ListNewRelicInput

type ListNewRelicInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListNewRelicInput is used as input to the ListNewRelic function.

type ListObjectStoreKeysInput added in v6.6.0

type ListObjectStoreKeysInput struct {
	// ID is the ID of the object store to list keys for.
	ID string

	Limit  int
	Cursor string
}

ListObjectStoreKeysInput is the input to the ListObjectStoreKeys function.

type ListObjectStoreKeysResponse added in v6.6.0

type ListObjectStoreKeysResponse struct {
	// Data is the list of keys
	Data []string

	// Meta is the information for pagination
	Meta map[string]string
}

ListObjectStoreKeysResponse is the response to the ListObjectStoreKeys function.

type ListObjectStoresInput added in v6.6.0

type ListObjectStoresInput struct {
	Cursor string
	Limit  int
}

ListObjectStoreInput is used as an input to the ListObjectStores function.

type ListObjectStoresPaginator added in v6.6.0

type ListObjectStoresPaginator struct {
	// contains filtered or unexported fields
}

ListObjectStoresPagiator is the opaque type for a ListObjectStores call with pagination.

func (*ListObjectStoresPaginator) Err added in v6.6.0

Err returns any error from the pagination.

func (*ListObjectStoresPaginator) Next added in v6.6.0

func (l *ListObjectStoresPaginator) Next() bool

Next advances the paginator and fetches the next set of object stores.

func (*ListObjectStoresPaginator) Stores added in v6.6.0

func (l *ListObjectStoresPaginator) Stores() []ObjectStore

Stores returns the current partial list of object stores.

type ListObjectStoresResponse added in v6.6.0

type ListObjectStoresResponse struct {
	// Data is the list of returned object stores
	Data []ObjectStore

	// Meta is the information for pagination
	Meta map[string]string
}

ListObjectStoresResponse is the return type for the ListObjectStores function.

type ListObjectsStoreKeysPaginator added in v6.6.0

type ListObjectsStoreKeysPaginator struct {
	// contains filtered or unexported fields
}

ListObjectStoreKeysPaginator is the opaque type for a ListObjectStoreKeys calls with pagination.

func (*ListObjectsStoreKeysPaginator) Err added in v6.6.0

Err returns any error from the paginator.

func (*ListObjectsStoreKeysPaginator) Keys added in v6.6.0

Keys returns the current set of keys retrieved by the paginator.

func (*ListObjectsStoreKeysPaginator) Next added in v6.6.0

Next advanced the paginator.

type ListOpenstackInput

type ListOpenstackInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListOpenstackInput is used as input to the ListOpenstack function.

type ListPapertrailsInput

type ListPapertrailsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListPapertrailsInput is used as input to the ListPapertrails function.

type ListPoolsInput

type ListPoolsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListPoolsInput is used as input to the ListPools function.

type ListPrivateKeysInput

type ListPrivateKeysInput struct {
	PageNumber  int    // The page index for pagination.
	PageSize    int    // The number of keys per page.
	FilterInUse string // Limit the returned keys to those without any matching TLS certificates.
}

ListPrivateKeysInput is used as input to the ListPrivateKeys function.

type ListPubsubsInput

type ListPubsubsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListPubsubsInput is used as input to the ListPubsubs function.

type ListRequestSettingsInput

type ListRequestSettingsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListRequestSettingsInput is used as input to the ListRequestSettings function.

type ListResponseObjectsInput

type ListResponseObjectsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListResponseObjectsInput is used as input to the ListResponseObjects function.

type ListS3sInput

type ListS3sInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListS3sInput is used as input to the ListS3s function.

type ListSFTPsInput

type ListSFTPsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListSFTPsInput is used as input to the ListSFTPs function.

type ListScalyrsInput

type ListScalyrsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListScalyrsInput is used as input to the ListScalyrs function.

type ListSecretStoresInput added in v6.7.0

type ListSecretStoresInput struct {
	// Limit is the desired number of Secret Stores (optional).
	Limit int
	// Cursor is the pagination cursor (optional).
	Cursor string
}

ListSecretStoresInput is used as input to the ListSecretStores function.

type ListSecretsInput added in v6.7.0

type ListSecretsInput struct {
	// ID of the Secret Store (required).
	ID string
	// Limit is the desired number of Secrets (optional).
	Limit int
	// Cursor is the pagination cursor (optional).
	Cursor string
}

ListSecretsInput is used as input to the ListSecrets function.

type ListServersInput

type ListServersInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// PoolID is the ID of the pool (required).
	PoolID string
}

ListServersInput is used as input to the ListServers function.

type ListServiceAuthorizationsInput added in v6.4.1

type ListServiceAuthorizationsInput struct {
	// Limit the number of returned service authorizations.
	PageSize int
	// Request a specific page of service authorizations.
	PageNumber int
}

ListServiceAuthorizationsInput is used as input to the ListWAFs function.

type ListServiceDomainInput

type ListServiceDomainInput struct {
	ID string
}

type ListServicesInput

type ListServicesInput struct {
	Direction string
	PerPage   int
	Page      int
	Sort      string
}

ListServicesInput is used as input to the ListServices function.

type ListServicesPaginator

type ListServicesPaginator struct {
	CurrentPage int
	NextPage    int
	LastPage    int
	// contains filtered or unexported fields
}

func (*ListServicesPaginator) GetNext

func (p *ListServicesPaginator) GetNext() ([]*Service, error)

GetNext retrieves data in the next page

func (*ListServicesPaginator) HasNext

func (p *ListServicesPaginator) HasNext() bool

HasNext returns a boolean indicating whether more pages are available

func (*ListServicesPaginator) Remaining

func (p *ListServicesPaginator) Remaining() int

Remaining returns the remaining page count

type ListSnippetsInput

type ListSnippetsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListSnippetsInput is used as input to the ListSnippets function.

type ListSplunksInput

type ListSplunksInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListSplunksInput is used as input to the ListSplunks function.

type ListSumologicsInput

type ListSumologicsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListSumologicsInput is used as input to the ListSumologics function.

type ListSyslogsInput

type ListSyslogsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListSyslogsInput is used as input to the ListSyslogs function.

type ListTLSActivationsInput

type ListTLSActivationsInput struct {
	FilterTLSCertificateID   string // Limit the returned activations to a specific certificate.
	FilterTLSConfigurationID string // Limit the returned activations to a specific TLS configuration.
	FilterTLSDomainID        string // Limit the returned rules to a specific domain name.
	Include                  string // Include related objects. Optional, comma-separated values. Permitted values: tls_certificate, tls_configuration, and tls_domain.
	PageNumber               int    // The page index for pagination.
	PageSize                 int    // The number of activations per page.
}

ListTLSActivationsInput is used as input to the ListTLSActivations function.

type ListTLSDomainsInput

type ListTLSDomainsInput struct {
	// Limit the returned domains to those currently using Fastly to terminate TLS with SNI (that is, domains considered "in use")
	FilterInUse *bool
	// Limit the returned domains to those listed in the given TLS certificate's SAN list
	FilterTLSCertificateID string
	// Limit the returned domains to those for a given TLS subscription
	FilterTLSSubscriptionID string
	// Include related objects
	Include string
	// Current page
	PageNumber int
	// Number of records per page
	PageSize int
	// The order in which to list the results by creation date
	Sort string
}

ListTLSDomainsInput is used as input to Client.ListTLSDomains.

type ListTLSSubscriptionsInput

type ListTLSSubscriptionsInput struct {
	// Limit the returned subscriptions to those that have currently active orders. Permitted values: true.
	FilterActiveOrders bool
	// Limit the returned subscriptions by state. Valid values are pending, processing, issued, and renewing. Accepts parameters: not (e.g., filter[state][not]=renewing).
	FilterState string
	// Limit the returned subscriptions to those that include the specific domain.
	FilterTLSDomainsID string
	// Include related objects. Optional, comma-separated values. Permitted values: tls_authorizations.
	Include string
	// Current page.
	PageNumber int
	// Number of records per page.
	PageSize int
	// The order in which to list the results by creation date. Accepts created_at (ascending sort order) or -created_at (descending).
	Sort string
}

ListTLSSubscriptionsInput is used as input to the ListTLSSubscriptions function

type ListVCLsInput

type ListVCLsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ListVCLsInput is used as input to the ListVCLs function.

type ListVersionsInput

type ListVersionsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string
}

ListVersionsInput is the input to the ListVersions function.

type ListWAFActiveRulesInput

type ListWAFActiveRulesInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// Limit results to active rules with the specified status.
	FilterStatus string
	// Limit results to active rules with the specified message.
	FilterMessage string
	// Limit results to active rules that represent the specified ModSecurity modsec_rule_id.
	FilterModSedID string
	// Limit the number of returned pages.
	PageSize int
	// Request a specific page of active rules.
	PageNumber int
	// Include relationships. Optional, comma-separated values. Permitted values: waf_rule_revision and waf_firewall_version.
	Include string
}

ListWAFActiveRulesInput used as input for listing a WAF's active rules.

type ListWAFRuleExclusionsInput

type ListWAFRuleExclusionsInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// Limit results to exclusions with the specified exclusions type.
	FilterExclusionType *string
	// Limit results to exclusions with the specified exclusion name.
	FilterName *string
	// Limit results to exclusions that represent the specified ModSecurity modsec_rule_id.
	FilterModSedID *string
	// Limit the number of returned pages.
	PageSize *int
	// Request a specific page of exclusions.
	PageNumber *int
	// Include relationships. Optional. Permitted values: waf_rules.
	Include []string
}

ListWAFRuleExclusionsInput used as input for listing a WAF's rule exclusions.

type ListWAFRulesInput

type ListWAFRulesInput struct {
	// Limit the returned rules to a set linked to list of tags by name.
	FilterTagNames []string
	// Limit the returned rules to a set by publishers.
	FilterPublishers []string
	// Limit the returned rules to a set by modsecurity rule IDs.
	FilterModSecIDs []int
	// Excludes individual rules by modsecurity rule IDs.
	// FIXME: Should be d not c (ExcludeMocSecIDs -> ExcludeModSecIDs)
	ExcludeMocSecIDs []int
	// Limit the number of returned rules.
	PageSize int
	// Request a specific page of rules.
	PageNumber int
	// Include relationships. Optional, comma-separated values. Permitted values: waf_tags and waf_rule_revisions.
	Include string
}

ListWAFRulesInput used as input for listing WAF rules.

type ListWAFVersionsInput

type ListWAFVersionsInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// Limit the number records returned.
	PageSize int
	// Request a specific page of WAFs.
	PageNumber int
	// Include relationships. Optional, comma-separated values. Permitted values: waf_firewall_versions.
	Include string
}

ListWAFVersionsInput used as input for listing WAF versions.

type ListWAFsInput

type ListWAFsInput struct {
	// Limit the number of returned firewalls.
	PageSize int
	// Request a specific page of firewalls.
	PageNumber int
	// Specify the service ID of the returned firewalls.
	FilterService string
	// Specify the version of the service for the firewalls.
	FilterVersion int
	// Include relationships. Optional, comma-separated values. Permitted values: waf_firewall_versions.
	Include string
}

ListWAFsInput is used as input to the ListWAFs function.

type LockVersionInput

type LockVersionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

LockVersionInput is the input to the LockVersion function.

type LockWAFVersionInput

type LockWAFVersionInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
}

LockWAFVersionInput used as input for locking a WAF version.

type Logentries

type Logentries struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Port              uint       `mapstructure:"port"`
	UseTLS            bool       `mapstructure:"use_tls"`
	Token             string     `mapstructure:"token"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Region            string     `mapstructure:"region"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
	Placement         string     `mapstructure:"placement"`
}

Logentries represents a logentries response from the Fastly API.

type Loggly

type Loggly struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Token             string     `mapstructure:"token"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Loggly represents a loggly response from the Fastly API.

type Logshuttle

type Logshuttle struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	URL               string     `mapstructure:"url"`
	Token             string     `mapstructure:"token"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Logshuttle represents a logshuttle response from the Fastly API.

type ManagedLogging

type ManagedLogging struct {
	ServiceID string `mapstructure:"service_id"`
}

ManagedLogging represents a managed logging endpoint for a service.

type ManagedLoggingKind

type ManagedLoggingKind uint

ManagedLoggingKind type represents multiple kinds of log streams the managed logging feature will support.

const (
	ManagedLoggingUnset ManagedLoggingKind = iota
	ManagedLoggingInstanceOutput
)

type NewRelic

type NewRelic struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Token             string     `mapstructure:"token"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	Region            string     `mapstructure:"region"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

NewRelic represents a newrelic response from the Fastly API.

type ObjectStore added in v6.6.0

type ObjectStore struct {
	Name      string     `mapstructure:"name"`
	ID        string     `mapstructure:"id"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
}

ObjectStore represents an Object Store response from the Fastly API.

type Openstack

type Openstack struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	User              string     `mapstructure:"user"`
	AccessKey         string     `mapstructure:"access_key"`
	BucketName        string     `mapstructure:"bucket_name"`
	URL               string     `mapstructure:"url"`
	Path              string     `mapstructure:"path"`
	Placement         string     `mapstructure:"placement"`
	Period            uint       `mapstructure:"period"`
	CompressionCodec  string     `mapstructure:"compression_codec"`
	GzipLevel         uint8      `mapstructure:"gzip_level"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	MessageType       string     `mapstructure:"message_type"`
	TimestampFormat   string     `mapstructure:"timestamp_format"`
	PublicKey         string     `mapstructure:"public_key"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Openstack represents a Openstack response from the Fastly API.

type OriginData added in v6.2.0

type OriginData struct {
	Dimensions map[string]string `mapstructure:"dimensions"`
	Values     []OriginMetrics   `mapstructure:"values"`
}

OriginData represents the series of values over time for a single dimension combination.

type OriginInspector added in v6.2.0

type OriginInspector struct {
	Data   []OriginData `mapstructure:"data"`
	Meta   OriginMeta   `mapstructure:"meta"`
	Status string       `mapstructure:"status"`
}

OriginInspector represents the response format returned for a request to the historical Origin Inspector metrics endpoint.

type OriginMeta added in v6.2.0

type OriginMeta struct {
	Start      string            `mapstructure:"start"`
	End        string            `mapstructure:"end"`
	Downsample string            `mapstructure:"downsample"`
	Metric     string            `mapstructure:"metric"`
	Limit      int               `mapstructure:"limit"`
	NextCursor string            `mapstructure:"next_cursor"`
	Sort       string            `mapstructure:"sort"`
	GroupBy    string            `mapstructure:"group_by"`
	Filters    map[string]string `mapstructure:"filters"`
}

OriginMeta is the meta section returned for /metrics/origins responses

type OriginMetrics added in v6.2.0

type OriginMetrics struct {
	Latency0to1ms         uint64 `mapstructure:"latency_0_to_1ms"`
	Latency1to5ms         uint64 `mapstructure:"latency_1_to_5ms"`
	Latency5to10ms        uint64 `mapstructure:"latency_5_to_10ms"`
	Latency10to50ms       uint64 `mapstructure:"latency_10_to_50ms"`
	Latency50to100ms      uint64 `mapstructure:"latency_50_to_100ms"`
	Latency100to250ms     uint64 `mapstructure:"latency_100_to_250ms"`
	Latency250to500ms     uint64 `mapstructure:"latency_250_to_500ms"`
	Latency500to1000ms    uint64 `mapstructure:"latency_500_to_1000ms"`
	Latency1000to5000ms   uint64 `mapstructure:"latency_1000_to_5000ms"`
	Latency5000to10000ms  uint64 `mapstructure:"latency_5000_to_10000ms"`
	Latency10000to60000ms uint64 `mapstructure:"latency_10000_to_60000ms"`
	Latency60000ms        uint64 `mapstructure:"latency_60000ms"`
	RespBodyBytes         uint64 `mapstructure:"resp_body_bytes"`
	RespHeaderBytes       uint64 `mapstructure:"resp_header_bytes"`
	Responses             uint64 `mapstructure:"responses"`
	Status1xx             uint64 `mapstructure:"status_1xx"`
	Status200             uint64 `mapstructure:"status_200"`
	Status204             uint64 `mapstructure:"status_204"`
	Status206             uint64 `mapstructure:"status_206"`
	Status2xx             uint64 `mapstructure:"status_2xx"`
	Status301             uint64 `mapstructure:"status_301"`
	Status302             uint64 `mapstructure:"status_302"`
	Status304             uint64 `mapstructure:"status_304"`
	Status3xx             uint64 `mapstructure:"status_3xx"`
	Status400             uint64 `mapstructure:"status_400"`
	Status401             uint64 `mapstructure:"status_401"`
	Status403             uint64 `mapstructure:"status_403"`
	Status404             uint64 `mapstructure:"status_404"`
	Status416             uint64 `mapstructure:"status_416"`
	Status429             uint64 `mapstructure:"status_429"`
	Status4xx             uint64 `mapstructure:"status_4xx"`
	Status500             uint64 `mapstructure:"status_500"`
	Status501             uint64 `mapstructure:"status_501"`
	Status502             uint64 `mapstructure:"status_502"`
	Status503             uint64 `mapstructure:"status_503"`
	Status504             uint64 `mapstructure:"status_504"`
	Status505             uint64 `mapstructure:"status_505"`
	Status5xx             uint64 `mapstructure:"status_5xx"`
	Timestamp             uint64 `mapstructure:"timestamp"`
}

OriginMetrics represents the possible metrics that can be returned by a call to the Origin Inspector endpoints.

type Package

type Package struct {
	ID             string
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`
	Metadata       PackageMetadata
	CreatedAt      *time.Time `mapstructure:"created_at"`
	UpdatedAt      *time.Time `mapstructure:"updated_at"`
	DeletedAt      *time.Time `mapstructure:"deleted_at"`
}

Package is a container for data returned about a package.

func PopulatePackage

func PopulatePackage(body io.ReadCloser) (*Package, error)

PopulatePackage encapsulates the decoding of returned package data.

type PackageMetadata

type PackageMetadata struct {
	Name        string
	Description string
	Authors     []string
	Language    string
	Size        int64
	HashSum     string
}

Package is a container for metadata returned about a package. It is a separate struct to allow correct serialisation by mapstructure - the raw data is returned as a json sub-block.

type PaginatorACLEntries

type PaginatorACLEntries interface {
	HasNext() bool
	Remaining() int
	GetNext() ([]*ACLEntry, error)
}

PaginatorACLEntries represents a paginator.

type PaginatorDictionaryItems

type PaginatorDictionaryItems interface {
	HasNext() bool
	Remaining() int
	GetNext() ([]*DictionaryItem, error)
}

PaginatorDictionaryItems represents a paginator.

type PaginatorServices

type PaginatorServices interface {
	HasNext() bool
	Remaining() int
	GetNext() ([]*Service, error)
}

PaginatorServices represents a paginator.

type Papertrail

type Papertrail struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Address           string     `mapstructure:"address"`
	Port              uint       `mapstructure:"port"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
	Placement         string     `mapstructure:"placement"`
}

Papertrail represents a papertrail response from the Fastly API.

type Pool

type Pool struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	ID               string     `mapstructure:"id"`
	Name             string     `mapstructure:"name"`
	Comment          string     `mapstructure:"comment"`
	Shield           string     `mapstructure:"shield"`
	RequestCondition string     `mapstructure:"request_condition"`
	MaxConnDefault   uint       `mapstructure:"max_conn_default"`
	ConnectTimeout   uint       `mapstructure:"connect_timeout"`
	FirstByteTimeout uint       `mapstructure:"first_byte_timeout"`
	Quorum           uint       `mapstructure:"quorum"`
	UseTLS           bool       `mapstructure:"use_tls"`
	TLSCACert        string     `mapstructure:"tls_ca_cert"`
	TLSCiphers       string     `mapstructure:"tls_ciphers"`
	TLSClientKey     string     `mapstructure:"tls_client_key"`
	TLSClientCert    string     `mapstructure:"tls_client_cert"`
	TLSSNIHostname   string     `mapstructure:"tls_sni_hostname"`
	TLSCheckCert     bool       `mapstructure:"tls_check_cert"`
	TLSCertHostname  string     `mapstructure:"tls_cert_hostname"`
	MinTLSVersion    string     `mapstructure:"min_tls_version"`
	MaxTLSVersion    string     `mapstructure:"max_tls_version"`
	Healthcheck      string     `mapstructure:"healthcheck"`
	Type             PoolType   `mapstructure:"type"`
	OverrideHost     string     `mapstructure:"override_host"`
	CreatedAt        *time.Time `mapstructure:"created_at"`
	DeletedAt        *time.Time `mapstructure:"deleted_at"`
	UpdatedAt        *time.Time `mapstructure:"updated_at"`
}

Pool represents a pool response from the Fastly API.

type PoolType

type PoolType string

PoolType is a type of pool.

const (
	// PoolTypeRandom is a pool that does random direction.
	PoolTypeRandom PoolType = "random"

	// PoolTypeHash is a pool that does hash direction.
	PoolTypeHash PoolType = "hash"

	// PoolTypeClient ins a pool that does client direction.
	PoolTypeClient PoolType = "client"
)

func PPoolType

func PPoolType(t PoolType) *PoolType

PPoolType returns pointer to PoolType.

type PrivateKey

type PrivateKey struct {
	ID            string     `jsonapi:"primary,tls_private_key"`
	Name          string     `jsonapi:"attr,name"`
	KeyLength     int        `jsonapi:"attr,key_length"`
	KeyType       string     `jsonapi:"attr,key_type"`
	PublicKeySHA1 string     `jsonapi:"attr,public_key_sha1"`
	CreatedAt     *time.Time `jsonapi:"attr,created_at,iso8601"`
	Replace       bool       `jsonapi:"attr,replace"`
}

PrivateKey represents a private key is used to sign a Certificate.

type Pubsub

type Pubsub struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Topic             string     `mapstructure:"topic"`
	User              string     `mapstructure:"user"`
	SecretKey         string     `mapstructure:"secret_key"`
	ProjectID         string     `mapstructure:"project_id"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Pubsub represents an Pubsub logging response from the Fastly API.

type Purge

type Purge struct {
	// Status is the status of the purge, usually "ok".
	Status string `mapstructure:"status"`

	// ID is the unique ID of the purge request.
	ID string `mapstructure:"id"`
}

Purge is a response from a purge request.

type PurgeAllInput

type PurgeAllInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string
}

PurgeAllInput is used as input to the Purge function.

type PurgeInput

type PurgeInput struct {
	// URL is the URL to purge (required).
	URL string

	// Soft performs a soft purge.
	Soft bool
}

PurgeInput is used as input to the Purge function.

type PurgeKeyInput

type PurgeKeyInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// Key is the key to purge (required).
	Key string

	// Soft performs a soft purge.
	Soft bool
}

PurgeKeyInput is used as input to the PurgeKey function.

type PurgeKeysInput

type PurgeKeysInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// Keys are the keys to purge (required).
	Keys []string

	// Soft performs a soft purge.
	Soft bool
}

PurgeKeysInput is used as input to the PurgeKeys function.

type RTSClient

type RTSClient struct {
	// contains filtered or unexported fields
}

RTSClient is the entrypoint to the Fastly's Realtime Stats API.

func NewRealtimeStatsClient

func NewRealtimeStatsClient() *RTSClient

NewRealtimeStatsClient instantiates a new Fastly API client for the realtime stats. This function requires the environment variable `FASTLY_API_KEY` is set and contains a valid API key to authenticate with Fastly.

func NewRealtimeStatsClientForEndpoint

func NewRealtimeStatsClientForEndpoint(token, endpoint string) (*RTSClient, error)

NewRealtimeStatsClientForEndpoint creates an RTSClient from a token and endpoint url. `token` is a Fastly API token and `endpoint` is RealtimeStatsEndpoint for the production realtime stats API.

func (*RTSClient) GetRealtimeStats

func (c *RTSClient) GetRealtimeStats(i *GetRealtimeStatsInput) (*RealtimeStatsResponse, error)

GetRealtimeStats returns realtime stats for a service based on the GetRealtimeStatsInput parameter. The realtime stats work in a rolling fashion where first request will return a timestamp which should be passed to the next call and so on. More details at https://developer.fastly.com/reference/api/metrics-stats/realtime/

func (*RTSClient) GetRealtimeStatsJSON

func (c *RTSClient) GetRealtimeStatsJSON(i *GetRealtimeStatsInput, dst interface{}) error

GetRealtimeStatsJSON fetches stats and decodes the response directly to the JSON struct dst.

type RealtimeData

type RealtimeData struct {
	Datacenter map[string]*Stats `mapstructure:"datacenter"`
	Aggregated *Stats            `mapstructure:"aggregated"`
	Recorded   uint64            `mapstructure:"recorded"`
}

RealtimeData represents combined stats for all Fastly's POPs and aggregate of them. It also includes a timestamp of when the stats were recorded

type RealtimeStatsResponse

type RealtimeStatsResponse struct {
	Timestamp      uint64          `mapstructure:"Timestamp"`
	Data           []*RealtimeData `mapstructure:"Data"`
	Error          string          `mapstructure:"Error"`
	AggregateDelay uint32          `mapstructure:"AggregateDelay"`
}

RealtimeStatsResponse is a response from Fastly's real-time analytics endpoint

type RegionsResponse

type RegionsResponse struct {
	Status  string            `mapstructure:"status"`
	Meta    map[string]string `mapstructure:"meta"`
	Message string            `mapstructure:"msg"`
	Data    []string          `mapstructure:"data"`
}

RegionsResponse is a response from Fastly regions API endpoint

type RegionsUsage

type RegionsUsage map[string]*Usage

RegionsUsage is a list of aggregated usage data by Fastly's region

type RequestOptions

type RequestOptions struct {
	// Params is a map of key-value pairs that will be added to the Request.
	Params map[string]string

	// Headers is a map of key-value pairs that will be added to the Request.
	Headers map[string]string

	// Body is an io.Reader object that will be streamed or uploaded with the
	// Request. BodyLength is the final size of the Body.
	Body       io.Reader
	BodyLength int64

	// Can this request run in parallel
	Parallel bool

	// HealthCheckHeaders indicates if there is any special parsing required to
	// support the health check API endpoint (refer to client.RequestForm).
	//
	// FIXME: For the future code-generated API client world.
	HealthCheckHeaders bool
}

RequestOptions is the list of options to pass to the request.

type RequestSetting

type RequestSetting struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name             string               `mapstructure:"name"`
	ForceMiss        bool                 `mapstructure:"force_miss"`
	ForceSSL         bool                 `mapstructure:"force_ssl"`
	Action           RequestSettingAction `mapstructure:"action"`
	BypassBusyWait   bool                 `mapstructure:"bypass_busy_wait"`
	MaxStaleAge      uint                 `mapstructure:"max_stale_age"`
	HashKeys         string               `mapstructure:"hash_keys"`
	XForwardedFor    RequestSettingXFF    `mapstructure:"xff"`
	TimerSupport     bool                 `mapstructure:"timer_support"`
	GeoHeaders       bool                 `mapstructure:"geo_headers"`
	DefaultHost      string               `mapstructure:"default_host"`
	RequestCondition string               `mapstructure:"request_condition"`
	CreatedAt        *time.Time           `mapstructure:"created_at"`
	UpdatedAt        *time.Time           `mapstructure:"updated_at"`
	DeletedAt        *time.Time           `mapstructure:"deleted_at"`
}

RequestSetting represents a request setting response from the Fastly API.

type RequestSettingAction

type RequestSettingAction string

RequestSettingAction is a type of request setting action.

const (
	// RequestSettingActionLookup sets request handling to lookup via the cache.
	RequestSettingActionLookup RequestSettingAction = "lookup"

	// RequestSettingActionPass sets request handling to pass the cache.
	RequestSettingActionPass RequestSettingAction = "pass"
)

type RequestSettingXFF

type RequestSettingXFF string

RequestSettingXFF is a type of X-Forwarded-For value to set.

const (
	// RequestSettingXFFClear clears any X-Forwarded-For headers.
	RequestSettingXFFClear RequestSettingXFF = "clear"

	// RequestSettingXFFLeave leaves any X-Forwarded-For headers untouched.
	RequestSettingXFFLeave RequestSettingXFF = "leave"

	// RequestSettingXFFAppend adds Fastly X-Forwarded-For headers.
	RequestSettingXFFAppend RequestSettingXFF = "append"

	// RequestSettingXFFAppendAll appends all Fastly X-Forwarded-For headers.
	RequestSettingXFFAppendAll RequestSettingXFF = "append_all"

	// RequestSettingXFFOverwrite clears any X-Forwarded-For headers and replaces
	// with Fastly ones.
	RequestSettingXFFOverwrite RequestSettingXFF = "overwrite"
)

type ResetUserPasswordInput

type ResetUserPasswordInput struct {
	Login string
}

ResetUserPasswordInput is used as input to the ResetUserPassword function.

type ResponseObject

type ResponseObject struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name             string     `mapstructure:"name"`
	Status           uint       `mapstructure:"status"`
	Response         string     `mapstructure:"response"`
	Content          string     `mapstructure:"content"`
	ContentType      string     `mapstructure:"content_type"`
	RequestCondition string     `mapstructure:"request_condition"`
	CacheCondition   string     `mapstructure:"cache_condition"`
	CreatedAt        *time.Time `mapstructure:"created_at"`
	UpdatedAt        *time.Time `mapstructure:"updated_at"`
	DeletedAt        *time.Time `mapstructure:"deleted_at"`
}

ResponseObject represents a response object response from the Fastly API.

type S3

type S3 struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name                         string                 `mapstructure:"name"`
	BucketName                   string                 `mapstructure:"bucket_name"`
	Domain                       string                 `mapstructure:"domain"`
	AccessKey                    string                 `mapstructure:"access_key"`
	SecretKey                    string                 `mapstructure:"secret_key"`
	IAMRole                      string                 `mapstructure:"iam_role"`
	Path                         string                 `mapstructure:"path"`
	Period                       uint                   `mapstructure:"period"`
	CompressionCodec             string                 `mapstructure:"compression_codec"`
	GzipLevel                    uint8                  `mapstructure:"gzip_level"`
	Format                       string                 `mapstructure:"format"`
	FormatVersion                uint                   `mapstructure:"format_version"`
	ResponseCondition            string                 `mapstructure:"response_condition"`
	MessageType                  string                 `mapstructure:"message_type"`
	TimestampFormat              string                 `mapstructure:"timestamp_format"`
	Placement                    string                 `mapstructure:"placement"`
	PublicKey                    string                 `mapstructure:"public_key"`
	Redundancy                   S3Redundancy           `mapstructure:"redundancy"`
	ServerSideEncryptionKMSKeyID string                 `mapstructure:"server_side_encryption_kms_key_id"`
	ServerSideEncryption         S3ServerSideEncryption `mapstructure:"server_side_encryption"`
	CreatedAt                    *time.Time             `mapstructure:"created_at"`
	UpdatedAt                    *time.Time             `mapstructure:"updated_at"`
	DeletedAt                    *time.Time             `mapstructure:"deleted_at"`
	ACL                          S3AccessControlList    `mapstructure:"acl"`
}

S3 represents a S3 response from the Fastly API.

type S3AccessControlList

type S3AccessControlList string

func S3AccessControlListPtr

func S3AccessControlListPtr(v S3AccessControlList) *S3AccessControlList

type S3Redundancy

type S3Redundancy string

func S3RedundancyPtr

func S3RedundancyPtr(v S3Redundancy) *S3Redundancy

type S3ServerSideEncryption

type S3ServerSideEncryption string

type SAResponse added in v6.4.1

type SAResponse struct {
	Items []*ServiceAuthorization
	Info  infoResponse
}

SAResponse is an object containing the list of ServiceAuthorization results. FIXME: Ambiguous name (SAResponse -> ServiceAuthorizations)

type SAService added in v6.4.0

type SAService struct {
	ID string `jsonapi:"primary,service"`
}

SAService represents a service.

type SAUser added in v6.4.0

type SAUser struct {
	ID string `jsonapi:"primary,user"`
}

SAUser represents a service user account.

type SFTP

type SFTP struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Address           string     `mapstructure:"address"`
	Port              uint       `mapstructure:"port"`
	User              string     `mapstructure:"user"`
	Password          string     `mapstructure:"password"`
	PublicKey         string     `mapstructure:"public_key"`
	SecretKey         string     `mapstructure:"secret_key"`
	SSHKnownHosts     string     `mapstructure:"ssh_known_hosts"`
	Path              string     `mapstructure:"path"`
	Period            uint       `mapstructure:"period"`
	CompressionCodec  string     `mapstructure:"compression_codec"`
	GzipLevel         uint8      `mapstructure:"gzip_level"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	TimestampFormat   string     `mapstructure:"timestamp_format"`
	MessageType       string     `mapstructure:"message_type"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

SFTP represents an SFTP logging response from the Fastly API.

type Scalyr

type Scalyr struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	Token             string     `mapstructure:"token"`
	Region            string     `mapstructure:"region"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Scalyr represents a scalyr response from the Fastly API.

type SearchServiceInput

type SearchServiceInput struct {
	Name string
}

SearchServiceInput is used as input to the SearchService function.

type Secret added in v6.7.0

type Secret struct {
	Name string `json:"name"`
	// Digest is an opaque hash of the secret.
	Digest []byte `json:"digest"`
}

Secret is a Secret Store secret.

type SecretStore added in v6.7.0

type SecretStore struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

SecretStore represents a Secret Store response from the Fastly API.

type SecretStoreMeta added in v6.7.0

type SecretStoreMeta struct {
	// Limit is the limit of results returned.
	Limit int `json:"limit"`
	// NextCursor can be used on a subsequent request to fetch
	// the next page of data.
	NextCursor string `json:"next_cursor,omitempty"`
}

SecretStoreMeta is the metadata returned from Secret Store paginated responses.

type SecretStores added in v6.7.0

type SecretStores struct {
	// Data is a list of Secret Stores.
	Data []SecretStore `json:"data"`
	// Meta contains response pagination data.
	Meta SecretStoreMeta `json:"meta"`
}

SecretStores represents a list of Secret Stores from the Fastly API.

type Secrets added in v6.7.0

type Secrets struct {
	// Data is a list of Secrets.
	Data []Secret `json:"data"`
	// Meta contains pagination data.
	Meta SecretStoreMeta `json:"meta"`
}

Secrets represents a list of Secrets from the Fastly API.

type Server

type Server struct {
	ServiceID string `mapstructure:"service_id"`
	PoolID    string `mapstructure:"pool_id"`
	ID        string `mapstructure:"id"`

	Address      string     `mapstructure:"address"`
	Comment      string     `mapstructure:"comment"`
	Weight       uint       `mapstructure:"weight"`
	MaxConn      uint       `mapstructure:"max_conn"`
	Port         uint       `mapstructure:"port"`
	Disabled     bool       `mapstructure:"disabled"`
	OverrideHost string     `mapstructure:"override_host"`
	CreatedAt    *time.Time `mapstructure:"created_at"`
	DeletedAt    *time.Time `mapstructure:"deleted_at"`
	UpdatedAt    *time.Time `mapstructure:"updated_at"`
}

ServerType represents a server response from the Fastly API.

type Service

type Service struct {
	ID            string     `mapstructure:"id"`
	Name          string     `mapstructure:"name"`
	Type          string     `mapstructure:"type"`
	Comment       string     `mapstructure:"comment"`
	CustomerID    string     `mapstructure:"customer_id"`
	CreatedAt     *time.Time `mapstructure:"created_at"`
	UpdatedAt     *time.Time `mapstructure:"updated_at"`
	DeletedAt     *time.Time `mapstructure:"deleted_at"`
	ActiveVersion uint       `mapstructure:"version"`
	Versions      []*Version `mapstructure:"versions"`
}

Service represents a single service for the Fastly account.

type ServiceAuthorization added in v6.4.0

type ServiceAuthorization struct {
	ID         string     `jsonapi:"primary,service_authorization"`
	Permission string     `jsonapi:"attr,permission,omitempty"`
	CreatedAt  *time.Time `jsonapi:"attr,created_at,iso8601"`
	UpdatedAt  *time.Time `jsonapi:"attr,updated_at,iso8601"`
	// FIXME: Typo (DeltedAt -> DeletedAt).
	DeltedAt *time.Time `jsonapi:"attr,deleted_at,iso8601"`
	User     *SAUser    `jsonapi:"relation,user,omitempty"`
	Service  *SAService `jsonapi:"relation,service,omitempty"`
}

ServiceAuthorization is the API response model.

type ServiceDetail

type ServiceDetail struct {
	ID            string     `mapstructure:"id"`
	Name          string     `mapstructure:"name"`
	Type          string     `mapstructure:"type"`
	Comment       string     `mapstructure:"comment"`
	CustomerID    string     `mapstructure:"customer_id"`
	ActiveVersion Version    `mapstructure:"active_version"`
	Version       Version    `mapstructure:"version"`
	Versions      []*Version `mapstructure:"versions"`
	CreatedAt     *time.Time `mapstructure:"created_at"`
	UpdatedAt     *time.Time `mapstructure:"updated_at"`
	DeletedAt     *time.Time `mapstructure:"deleted_at"`
}

type ServiceDomain

type ServiceDomain struct {
	Locked         bool       `mapstructure:"locked"`
	Name           string     `mapstructure:"name"`
	DeletedAt      *time.Time `mapstructure:"deleted_at"`
	ServiceID      string     `mapstructure:"service_id"`
	ServiceVersion int64      `mapstructure:"version"`
	CreatedAt      *time.Time `mapstructure:"created_at"`
	Comment        string     `mapstructure:"comment"`
	UpdatedAt      *time.Time `mapstructure:"updated_at"`
}

type ServiceDomainsList

type ServiceDomainsList []*ServiceDomain

type ServicesByRegionsUsage

type ServicesByRegionsUsage map[string]*ServicesUsage

ServicesByRegionsUsage is a list of ServicesUsage by Fastly's region

type ServicesUsage

type ServicesUsage map[string]*Usage

ServicesUsage is a list of usage data by a service

type Settings

type Settings struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	DefaultTTL      uint   `mapstructure:"general.default_ttl"`
	DefaultHost     string `mapstructure:"general.default_host"`
	StaleIfError    bool   `mapstructure:"general.stale_if_error"`
	StaleIfErrorTTL uint   `mapstructure:"general.stale_if_error_ttl"`
}

Settings represents a backend response from the Fastly API.

type Snippet

type Snippet struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name      string      `mapstructure:"name"`
	ID        string      `mapstructure:"id"`
	Priority  int         `mapstructure:"priority"`
	Dynamic   int         `mapstructure:"dynamic"`
	Content   string      `mapstructure:"content"`
	Type      SnippetType `mapstructure:"type"`
	CreatedAt *time.Time  `mapstructure:"created_at"`
	UpdatedAt *time.Time  `mapstructure:"updated_at"`
	DeletedAt *time.Time  `mapstructure:"deleted_at"`
}

Snippet is the Fastly Snippet object

type SnippetType

type SnippetType string

SnippetType is the type of VCL Snippet

const (
	// SnippetTypeInit sets the type to init
	SnippetTypeInit SnippetType = "init"

	// SnippetTypeRecv sets the type to recv
	SnippetTypeRecv SnippetType = "recv"

	// SnippetTypeHash sets the type to hash
	SnippetTypeHash SnippetType = "hash"

	// SnippetTypeHit sets the type to hit
	SnippetTypeHit SnippetType = "hit"

	// SnippetTypeMiss sets the type to miss
	SnippetTypeMiss SnippetType = "miss"

	// SnippetTypePass sets the type to pass
	SnippetTypePass SnippetType = "pass"

	// SnippetTypeFetch sets the type to fetch
	SnippetTypeFetch SnippetType = "fetch"

	// SnippetTypeError sets the type to error
	SnippetTypeError SnippetType = "error"

	// SnippetTypeDeliver sets the type to deliver
	SnippetTypeDeliver SnippetType = "deliver"

	// SnippetTypeLog sets the type to log
	SnippetTypeLog SnippetType = "log"

	// SnippetTypeNone sets the type to none
	SnippetTypeNone SnippetType = "none"
)

func SnippetTypeToString

func SnippetTypeToString(b string) *SnippetType

Helper function to get a pointer to string

type Splunk

type Splunk struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	URL               string     `mapstructure:"url"`
	RequestMaxEntries uint       `mapstructure:"request_max_entries"`
	RequestMaxBytes   uint       `mapstructure:"request_max_bytes"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	Token             string     `mapstructure:"token"`
	UseTLS            bool       `mapstructure:"use_tls"`
	TLSCACert         string     `mapstructure:"tls_ca_cert"`
	TLSHostname       string     `mapstructure:"tls_hostname"`
	TLSClientCert     string     `mapstructure:"tls_client_cert"`
	TLSClientKey      string     `mapstructure:"tls_client_key"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Splunk represents a splunk response from the Fastly API.

type Stats

type Stats struct {
	Requests                  uint64      `mapstructure:"requests"`                 // Number of requests processed.
	Hits                      uint64      `mapstructure:"hits"`                     // Number of cache hits.
	HitsTime                  float64     `mapstructure:"hits_time"`                // Total amount of time spent processing cache hits (in seconds).
	Miss                      uint64      `mapstructure:"miss"`                     // Number of cache misses.
	MissTime                  float64     `mapstructure:"miss_time"`                // Amount of time spent processing cache misses (in seconds).
	Pass                      uint64      `mapstructure:"pass"`                     // Number of requests that passed through the CDN without being cached.
	PassTime                  float64     `mapstructure:"pass_time"`                // Amount of time spent processing cache passes (in seconds).
	Synth                     uint64      `mapstructure:"synth"`                    // Number of requests that returned synth response.
	Errors                    uint64      `mapstructure:"errors"`                   // Number of cache errors.
	Restarts                  uint64      `mapstructure:"restarts"`                 // Number of restarts performed.
	HitRatio                  float64     `mapstructure:"hit_ratio"`                // Ratio of cache hits to cache misses (between 0 and 1).
	Bandwidth                 uint64      `mapstructure:"bandwidth"`                // Total bytes delivered (body_size + header_size).
	RequestBodyBytes          uint64      `mapstructure:"req_body_bytes"`           // Total body bytes received.
	RequestHeaderBytes        uint64      `mapstructure:"req_header_bytes"`         // Total header bytes received.
	ResponseBodyBytes         uint64      `mapstructure:"resp_body_bytes"`          // Total body bytes delivered.
	ResponseHeaderBytes       uint64      `mapstructure:"resp_header_bytes"`        // Total header bytes delivered.
	BERequestBodyBytes        uint64      `mapstructure:"bereq_body_bytes"`         // Total body bytes sent to origin.
	BERequestHeaderbytes      uint64      `mapstructure:"bereq_header_bytes"`       // Total header bytes sent to origin.
	Uncachable                uint64      `mapstructure:"uncachable"`               // Number of requests that were designated uncachable.
	Pipe                      uint64      `mapstructure:"pipe"`                     // Optional. Pipe operations performed (legacy feature).
	TLS                       uint64      `mapstructure:"tls"`                      // Number of requests that were received over TLS.
	TLSv10                    uint64      `mapstructure:"tls_v10"`                  // Number of requests received over TLS 1.0.
	TLSv11                    uint64      `mapstructure:"tls_v11"`                  // Number of requests received over TLS 1.`.
	TLSv12                    uint64      `mapstructure:"tls_v12"`                  // Number of requests received over TLS 1.2.
	TLSv13                    uint64      `mapstructure:"tls_v13"`                  // Number of requests received over TLS 1.3.
	Shield                    uint64      `mapstructure:"shield"`                   // Number of requests from shield to origin.
	ShieldResponseBodyBytes   uint64      `mapstructure:"shield_resp_body_bytes"`   // Total body bytes delivered via a shield.
	ShieldResponseHeaderBytes uint64      `mapstructure:"shield_resp_header_bytes"` // Total header bytes delivered via a shield.
	IPv6                      uint64      `mapstructure:"ipv6"`                     // Number of requests that were received over IPv6.
	OTFP                      uint64      `mapstructure:"otfp"`                     // Number of responses that came from the Fastly On-the-Fly Packager for On Demand Streaming service for video-on-demand.
	Video                     uint64      `mapstructure:"video"`                    // Number of responses with the video segment or video manifest MIME type (i.e., application/x-mpegurl, application/vnd.apple.mpegurl, application/f4m, application/dash+xml, application/vnd.ms-sstr+xml, ideo/mp2t, audio/aac, video/f4f, video/x-flv, video/mp4, audio/mp4).
	PCI                       uint64      `mapstructure:"pci"`                      // Number of responses with the PCI flag turned on.
	Log                       uint64      `mapstructure:"log"`                      // Number of log lines sent.
	HTTP2                     uint64      `mapstructure:"http2"`                    // Number of requests received over HTTP2.
	WAFLogged                 uint64      `mapstructure:"waf_logged"`               // Number of requests that triggered a WAF rule and were logged.
	WAFBlocked                uint64      `mapstructure:"waf_blocked"`              // Number of requests that triggered a WAF rule and were blocked.
	WAFPassed                 uint64      `mapstructure:"waf_passed"`               // Number of requests that triggered a WAF rule and were passed.
	AttackRequestBodyBytes    uint64      `mapstructure:"attack_req_body_bytes"`    // Total body bytes received from requests that triggered a WAF rule.
	AttachRequestHeaderBytes  uint64      `mapstructure:"attack_req_header_bytes"`  // Total header bytes received from requests that triggered a WAF rule.
	AttackResponseSynthBytes  uint64      `mapstructure:"attack_resp_synth_bytes"`  // Total bytes delivered for requests that triggered a WAF rule and returned a synthetic response.
	ImageOptimizer            uint64      `mapstructure:"imgopto"`                  // Number of responses that came from the Fastly Image Optimizer service.
	Status200                 uint64      `mapstructure:"status_200"`               // Number of responses sent with status code 200 (Success).
	Status204                 uint64      `mapstructure:"status_204"`               // Number of responses sent with status code 204 (No Content).
	Status206                 uint64      `mapstructure:"status_206"`               // Number of responses sent with status code 206 (Partial Content).
	Status301                 uint64      `mapstructure:"status_301"`               // Number of responses sent with status code 301 (Moved Permanently).
	Status302                 uint64      `mapstructure:"status_302"`               // Number of responses sent with status code 302 (Found).
	Status304                 uint64      `mapstructure:"status_304"`               // Number of responses sent with status code 304 (Not Modified).
	Status400                 uint64      `mapstructure:"status_400"`               // Number of responses sent with status code 400 (Bad Request).
	Status401                 uint64      `mapstructure:"status_401"`               // Number of responses sent with status code 401 (Unauthorized).
	Status403                 uint64      `mapstructure:"status_403"`               // Number of responses sent with status code 403 (Forbidden).
	Status404                 uint64      `mapstructure:"status_404"`               // Number of responses sent with status code 404 (Not Found).
	Status416                 uint64      `mapstructure:"status_416"`               // Number of responses sent with status code 416 (Range Not Satisfiable).
	Status500                 uint64      `mapstructure:"status_500"`               // Number of responses sent with status code 500 (Internal Server Error).
	Status501                 uint64      `mapstructure:"status_501"`               // Number of responses sent with status code 501 (Not Implemented).
	Status502                 uint64      `mapstructure:"status_502"`               // Number of responses sent with status code 502 (Bad Gateway).
	Status503                 uint64      `mapstructure:"status_503"`               // Number of responses sent with status code 503 (Service Unavailable).
	Status504                 uint64      `mapstructure:"status_504"`               // Number of responses sent with status code 504 (Gateway Timeout).
	Status505                 uint64      `mapstructure:"status_505"`               // Number of responses sent with status code 505 (HTTP Version Not Supported).
	Status1xx                 uint64      `mapstructure:"status_1xx"`               // Number of "Informational" category status codes delivered.
	Status2xx                 uint64      `mapstructure:"status_2xx"`               // Number of "Success" status codes delivered.
	Status3xx                 uint64      `mapstructure:"status_3xx"`               // Number of "Redirection" codes delivered.
	Status4xx                 uint64      `mapstructure:"status_4xx"`               // Number of "Client Error" codes delivered.
	Status5xx                 uint64      `mapstructure:"status_5xx"`               // Number of "Server Error" codes delivered.
	ObjectSize1k              uint64      `mapstructure:"object_size_1k"`           // Number of objects served that were under 1KB in size.
	ObjectSize10k             uint64      `mapstructure:"object_size_10k"`          // Number of objects served that were between 1KB and 10KB in size.
	ObjectSize100k            uint64      `mapstructure:"object_size_100k"`         // Number of objects served that were between 10KB and 100KB in size.
	ObjectSize1m              uint64      `mapstructure:"object_size_1m"`           // Number of objects served that were between 100KB and 1MB in size.
	ObjectSize10m             uint64      `mapstructure:"object_size_10m"`          // Number of objects served that were between 1MB and 10MB in size.
	ObjectSize100m            uint64      `mapstructure:"object_size_100m"`         // Number of objects served that were between 10MB and 100MB in size.
	ObjectSize1g              uint64      `mapstructure:"object_size_1g"`           // Number of objects served that were between 100MB and 1GB in size.
	MissHistogram             map[int]int `mapstructure:"miss_histogram"`           // Number of requests to origin in time buckets of 10s of milliseconds
	BilledHeaderBytes         uint64      `mapstructure:"billed_header_bytes"`
	BilledBodyBytes           uint64      `mapstructure:"billed_body_bytes"`
}

Stats represent metrics of a Fastly service

type StatsFieldResponse

type StatsFieldResponse struct {
	Status  string              `mapstructure:"status"`
	Meta    map[string]string   `mapstructure:"meta"`
	Message string              `mapstructure:"msg"`
	Data    map[string][]*Stats `mapstructure:"data"`
}

StatsFieldResponse is a response from the service stats/field API endpoint

type StatsResponse

type StatsResponse struct {
	Status  string            `mapstructure:"status"`
	Meta    map[string]string `mapstructure:"meta"`
	Message string            `mapstructure:"msg"`
	Data    []*Stats          `mapstructure:"data"`
}

StatsResponse is a response from the service stats API endpoint

type Sumologic

type Sumologic struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Address           string     `mapstructure:"address"`
	URL               string     `mapstructure:"url"`
	Format            string     `mapstructure:"format"`
	ResponseCondition string     `mapstructure:"response_condition"`
	MessageType       string     `mapstructure:"message_type"`
	FormatVersion     int        `mapstructure:"format_version"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
	Placement         string     `mapstructure:"placement"`
}

Sumologic represents a sumologic response from the Fastly API.

type Syslog

type Syslog struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name              string     `mapstructure:"name"`
	Address           string     `mapstructure:"address"`
	Hostname          string     `mapstructure:"hostname"`
	Port              uint       `mapstructure:"port"`
	UseTLS            bool       `mapstructure:"use_tls"`
	IPV4              string     `mapstructure:"ipv4"`
	TLSCACert         string     `mapstructure:"tls_ca_cert"`
	TLSHostname       string     `mapstructure:"tls_hostname"`
	TLSClientCert     string     `mapstructure:"tls_client_cert"`
	TLSClientKey      string     `mapstructure:"tls_client_key"`
	Token             string     `mapstructure:"token"`
	Format            string     `mapstructure:"format"`
	FormatVersion     uint       `mapstructure:"format_version"`
	MessageType       string     `mapstructure:"message_type"`
	ResponseCondition string     `mapstructure:"response_condition"`
	Placement         string     `mapstructure:"placement"`
	CreatedAt         *time.Time `mapstructure:"created_at"`
	UpdatedAt         *time.Time `mapstructure:"updated_at"`
	DeletedAt         *time.Time `mapstructure:"deleted_at"`
}

Syslog represents a syslog response from the Fastly API.

type TLSActivation

type TLSActivation struct {
	ID            string                `jsonapi:"primary,tls_activation"`
	Configuration *TLSConfiguration     `jsonapi:"relation,tls_configuration"` // TLSConfiguration type shared with BulkCertificate
	Domain        *TLSDomain            `jsonapi:"relation,tls_domain"`        // TLSDomain type shared with BulkCertificate
	Certificate   *CustomTLSCertificate `jsonapi:"relation,tls_certificate"`
	CreatedAt     *time.Time            `jsonapi:"attr,created_at,iso8601"`
}

TLSActivation represents a /tls/activations response.

type TLSAuthorizations

type TLSAuthorizations struct {
	ID string `jsonapi:"primary,tls_authorization"`
	// Nested structs only work with values, not pointers. See https://github.com/google/jsonapi/pull/99
	Challenges []TLSChallenge `jsonapi:"attr,challenges"`
	CreatedAt  *time.Time     `jsonapi:"attr,created_at,iso8601,omitempty"`
	UpdatedAt  *time.Time     `jsonapi:"attr,updated_at,iso8601,omitempty"`
	State      string         `jsonapi:"attr,state,omitempty"`
}

TLSAuthorizations gives information needed to verify domain ownership in order to enable a TLSSubscription

type TLSChallenge

type TLSChallenge struct {
	Type       string   `jsonapi:"attr,type"`
	RecordType string   `jsonapi:"attr,record_type"`
	RecordName string   `jsonapi:"attr,record_name"`
	Values     []string `jsonapi:"attr,values"`
}

TLSChallenge represents a DNS record to be added for a specific type of domain ownership challenge

type TLSConfiguration

type TLSConfiguration struct {
	ID   string `jsonapi:"primary,tls_configuration"`
	Type string `jsonapi:"attr,type"`
}

TLSConfiguration represents the dedicated IP address pool that will be used to route traffic from the TLSDomain.

type TLSDomain

type TLSDomain struct {
	ID            string                  `jsonapi:"primary,tls_domain"`
	Type          string                  `jsonapi:"attr,type"`
	Activations   []*TLSActivation        `jsonapi:"relation,tls_activations,omitempty"`
	Certificates  []*CustomTLSCertificate `jsonapi:"relation,tls_certificates,omitempty"`
	Subscriptions []*TLSSubscription      `jsonapi:"relation,tls_subscriptions,omitempty"`
}

TLSDomain represents a domain (including wildcard domains) that is listed on a certificate's Subject Alternative Names (SAN) list.

type TLSSubscription

type TLSSubscription struct {
	ID                   string                        `jsonapi:"primary,tls_subscription"`
	CertificateAuthority string                        `jsonapi:"attr,certificate_authority"`
	State                string                        `jsonapi:"attr,state"`
	CreatedAt            *time.Time                    `jsonapi:"attr,created_at,iso8601"`
	UpdatedAt            *time.Time                    `jsonapi:"attr,updated_at,iso8601"`
	Configuration        *TLSConfiguration             `jsonapi:"relation,tls_configuration"`
	CommonName           *TLSDomain                    `jsonapi:"relation,common_name"`
	Domains              []*TLSDomain                  `jsonapi:"relation,tls_domains"`
	Certificates         []*TLSSubscriptionCertificate `jsonapi:"relation,tls_certificates"`
	Authorizations       []*TLSAuthorizations          `jsonapi:"relation,tls_authorizations"`
}

TLSSubscription represents a managed TLS certificate

type TLSSubscriptionCertificate

type TLSSubscriptionCertificate struct {
	ID string `jsonapi:"primary,tls_certificate"`
}

type Token

type Token struct {
	ID          string     `mapstructure:"id"`
	Name        string     `mapstructure:"name"`
	UserID      string     `mapstructure:"user_id"`
	Services    []string   `mapstructure:"services"`
	AccessToken string     `mapstructure:"access_token"`
	Scope       TokenScope `mapstructure:"scope"`
	IP          string     `mapstructure:"ip"`
	CreatedAt   *time.Time `mapstructure:"created_at"`
	LastUsedAt  *time.Time `mapstructure:"last_used_at"`
	ExpiresAt   *time.Time `mapstructure:"expires_at"`
}

Token represents an API token which are used to authenticate requests to the Fastly API.

type TokenScope

type TokenScope string

TokenScope is used to match possible authorization scopes

const (
	// GlobalScope is the default scope covering all supported capabilities.
	GlobalScope TokenScope = "global"
	// PurgeSelectScope allows purging with surrogate key and URL, disallows purging with purge all.
	PurgeSelectScope TokenScope = "purge_select"
	// PurgeAllScope allows purging an entire service via purge_all.
	PurgeAllScope TokenScope = "purge_all"
	// GlobalReadScope allows read-only access to account information, configuration, and stats.
	GlobalReadScope TokenScope = "global:read"
)

type UpdateACLEntryInput

type UpdateACLEntryInput struct {
	// Required fields
	ServiceID string
	ACLID     string
	ID        string

	// Optional fields
	IP      *string      `url:"ip,omitempty"`
	Subnet  *int         `url:"subnet,omitempty"`
	Negated *Compatibool `url:"negated,omitempty"`
	Comment *string      `url:"comment,omitempty"`
}

UpdateACLEntryInput is the input parameter to UpdateACLEntry function.

type UpdateACLInput

type UpdateACLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the ACL to update (required).
	Name string

	// NewName is the new name of the ACL to update (required).
	NewName string `url:"name"`
}

UpdateACLInput is the input parameter to UpdateACL function.

type UpdateBackendInput

type UpdateBackendInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the backend to update.
	Name string

	NewName             *string      `url:"name,omitempty"`
	Comment             *string      `url:"comment,omitempty"`
	Address             *string      `url:"address,omitempty"`
	Port                *uint        `url:"port,omitempty"`
	OverrideHost        *string      `url:"override_host,omitempty"`
	ConnectTimeout      *uint        `url:"connect_timeout,omitempty"`
	MaxConn             *uint        `url:"max_conn,omitempty"`
	ErrorThreshold      *uint        `url:"error_threshold,omitempty"`
	FirstByteTimeout    *uint        `url:"first_byte_timeout,omitempty"`
	BetweenBytesTimeout *uint        `url:"between_bytes_timeout,omitempty"`
	AutoLoadbalance     *Compatibool `url:"auto_loadbalance,omitempty"`
	Weight              *uint        `url:"weight,omitempty"`
	RequestCondition    *string      `url:"request_condition,omitempty"`
	HealthCheck         *string      `url:"healthcheck,omitempty"`
	Shield              *string      `url:"shield,omitempty"`
	UseSSL              *Compatibool `url:"use_ssl,omitempty"`
	SSLCheckCert        *Compatibool `url:"ssl_check_cert,omitempty"`
	SSLCACert           *string      `url:"ssl_ca_cert,omitempty"`
	SSLClientCert       *string      `url:"ssl_client_cert,omitempty"`
	SSLClientKey        *string      `url:"ssl_client_key,omitempty"`
	SSLHostname         *string      `url:"ssl_hostname,omitempty"`
	SSLCertHostname     *string      `url:"ssl_cert_hostname,omitempty"`
	SSLSNIHostname      *string      `url:"ssl_sni_hostname,omitempty"`
	MinTLSVersion       *string      `url:"min_tls_version,omitempty"`
	MaxTLSVersion       *string      `url:"max_tls_version,omitempty"`
	SSLCiphers          string       `url:"ssl_ciphers,omitempty"`
}

UpdateBackendInput is used as input to the UpdateBackend function.

type UpdateBigQueryInput

type UpdateBigQueryInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the BigQuery to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	ProjectID         *string `url:"project_id,omitempty"`
	Dataset           *string `url:"dataset,omitempty"`
	Table             *string `url:"table,omitempty"`
	Template          *string `url:"template_suffix,omitempty"`
	User              *string `url:"user,omitempty"`
	SecretKey         *string `url:"secret_key,omitempty"`
	Format            *string `url:"format,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
}

UpdateBigQueryInput is used as input to the UpdateBigQuery function.

type UpdateBlobStorageInput

type UpdateBlobStorageInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the blob storage to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Path              *string `url:"path,omitempty"`
	AccountName       *string `url:"account_name,omitempty"`
	Container         *string `url:"container,omitempty"`
	SASToken          *string `url:"sas_token,omitempty"`
	Period            *uint   `url:"period,omitempty"`
	TimestampFormat   *string `url:"timestamp_format,omitempty"`
	CompressionCodec  *string `url:"compression_codec,omitempty"`
	GzipLevel         *uint8  `url:"gzip_level,omitempty"`
	PublicKey         *string `url:"public_key,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	MessageType       *string `url:"message_type,omitempty"`
	Placement         *string `url:"placement,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	FileMaxBytes      *uint   `url:"file_max_bytes,omitempty"`
}

UpdateBlobStorageInput is used as input to the UpdateBlobStorage function.

type UpdateBulkCertificateInput

type UpdateBulkCertificateInput struct {
	ID                string `jsonapi:"attr,id"`
	CertBlob          string `jsonapi:"attr,cert_blob"`
	IntermediatesBlob string `jsonapi:"attr,intermediates_blob,omitempty"`
	AllowUntrusted    bool   `jsonapi:"attr,allow_untrusted_root"`
}

UpdateBulkCertificateInput is used as input to the UpdateBulkCertificate function.

type UpdateCacheSettingInput

type UpdateCacheSettingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the cache setting to update.
	Name string

	NewName        *string            `url:"name,omitempty"`
	Action         CacheSettingAction `url:"action,omitempty"`
	TTL            *uint              `url:"ttl,omitempty"`
	StaleTTL       *uint              `url:"stale_ttl,omitempty"`
	CacheCondition *string            `url:"cache_condition,omitempty"`
}

UpdateCacheSettingInput is used as input to the UpdateCacheSetting function.

type UpdateCloudfilesInput

type UpdateCloudfilesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Cloudfiles to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	User              *string `url:"user,omitempty"`
	AccessKey         *string `url:"access_key,omitempty"`
	BucketName        *string `url:"bucket_name,omitempty"`
	Path              *string `url:"path,omitempty"`
	Region            *string `url:"region,omitempty"`
	Placement         *string `url:"placement,omitempty"`
	Period            *uint   `url:"period,omitempty"`
	GzipLevel         *uint8  `url:"gzip_level,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	MessageType       *string `url:"message_type,omitempty"`
	TimestampFormat   *string `url:"timestamp_format,omitempty"`
	PublicKey         *string `url:"public_key,omitempty"`
	CompressionCodec  *string `url:"compression_codec,omitempty"`
}

UpdateCloudfilesInput is used as input to the UpdateCloudfiles function.

type UpdateConditionInput

type UpdateConditionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the condition to update.
	Name string

	Comment   *string `url:"comment,omitempty"`
	Statement *string `url:"statement,omitempty"`
	Type      *string `url:"type,omitempty"`
	Priority  *int    `url:"priority,omitempty"`
}

UpdateConditionInput is used as input to the UpdateCondition function.

type UpdateCustomTLSCertificateInput

type UpdateCustomTLSCertificateInput struct {
	ID       string `jsonapi:"primary,tls_certificate"`
	CertBlob string `jsonapi:"attr,cert_blob"`
	Name     string `jsonapi:"attr,name,omitempty"`
}

UpdateCustomTLSCertificateInput is used as input to the UpdateCustomTLSCertificate function.

type UpdateCustomTLSConfigurationInput

type UpdateCustomTLSConfigurationInput struct {
	ID   string
	Name string `jsonapi:"attr,name"`
}

UpdateCustomTLSConfigurationInput is used as input to the UpdateCustomTLSConfiguration function.

type UpdateDatadogInput

type UpdateDatadogInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Datadog to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Token             *string `url:"token,omitempty"`
	Region            *string `url:"region,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateDatadogInput is used as input to the UpdateDatadog function.

type UpdateDictionaryInput

type UpdateDictionaryInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the dictionary to update.
	Name string

	NewName   *string      `url:"name,omitempty"`
	WriteOnly *Compatibool `url:"write_only,omitempty"`
}

UpdateDictionaryInput is used as input to the UpdateDictionary function.

type UpdateDictionaryItemInput

type UpdateDictionaryItemInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// DictionaryID is the ID of the dictionary to retrieve items for (required).
	DictionaryID string

	// ItemKey is the name of the dictionary item to fetch (required).
	ItemKey string

	// ItemValue is the new value of the dictionary item (required).
	ItemValue string `url:"item_value"`
}

UpdateDictionaryItemInput is used as input to the UpdateDictionaryItem function.

type UpdateDigitalOceanInput

type UpdateDigitalOceanInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the DigitalOcean to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	BucketName        *string `url:"bucket_name,omitempty"`
	Domain            *string `url:"domain,omitempty"`
	AccessKey         *string `url:"access_key,omitempty"`
	SecretKey         *string `url:"secret_key,omitempty"`
	Path              *string `url:"path,omitempty"`
	Period            *uint   `url:"period,omitempty"`
	GzipLevel         *uint8  `url:"gzip_level,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	MessageType       *string `url:"message_type,omitempty"`
	TimestampFormat   *string `url:"timestamp_format,omitempty"`
	Placement         *string `url:"placement,omitempty"`
	PublicKey         *string `url:"public_key,omitempty"`
	CompressionCodec  *string `url:"compression_codec,omitempty"`
}

UpdateDigitalOceanInput is used as input to the UpdateDigitalOcean function.

type UpdateDirectorInput

type UpdateDirectorInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the director to update.
	Name string

	NewName  *string      `url:"name,omitempty"`
	Comment  *string      `url:"comment,omitempty"`
	Shield   *string      `url:"shield,omitempty"`
	Quorum   *uint        `url:"quorum,omitempty"`
	Type     DirectorType `url:"type,omitempty"`
	Retries  *uint        `url:"retries,omitempty"`
	Capacity *uint        `url:"capacity,omitempty"`
}

UpdateDirectorInput is used as input to the UpdateDirector function.

type UpdateDomainInput

type UpdateDomainInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the domain that the service will respond to (required).
	Name string

	// NewName is the updated name of the domain
	NewName *string `url:"name,omitempty"`

	// Comment is a personal, freeform descriptive note.
	Comment *string `url:"comment,omitempty"`
}

UpdateDomainInput is used as input to the UpdateDomain function.

type UpdateDynamicSnippetInput

type UpdateDynamicSnippetInput struct {
	// ServiceID is the ID of the Service to add the snippet to.
	ServiceID string

	// ID is the ID of the Snippet to modify
	ID string

	// Content is the VCL code that specifies exactly what the snippet does.
	Content *string `url:"content,omitempty"`
}

UpdateDynamicSnippetInput is the input for UpdateDynamicSnippet

type UpdateERLInput added in v6.3.0

type UpdateERLInput struct {
	Action             ERLAction        `url:"action,omitempty"`
	ClientKey          []string         `url:"client_key,omitempty,brackets"`
	HttpMethods        []string         `url:"http_methods,omitempty,brackets"`
	ID                 string           `url:"id"`
	Name               string           `url:"name,omitempty"`
	PenaltyBoxDuration int              `url:"penalty_box_duration,omitempty"`
	Response           *ERLResponseType `url:"response,omitempty"`
	RpsLimit           int              `url:"rps_limit,omitempty"`
	ServiceID          string           `url:"-"`
	ServiceVersion     int              `url:"-"`
	WindowSize         ERLWindowSize    `url:"window_size,omitempty"`
}

UpdateERLInput is used as input to the UpdateERL function.

type UpdateElasticsearchInput

type UpdateElasticsearchInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Elasticsearch endpoint to fetch.
	Name string

	NewName           *string `url:"name,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Format            *string `url:"format,omitempty"`
	Index             *string `url:"index,omitempty"`
	URL               *string `url:"url,omitempty"`
	Pipeline          *string `url:"pipeline,omitempty"`
	User              *string `url:"user,omitempty"`
	Password          *string `url:"password,omitempty"`
	RequestMaxEntries *uint   `url:"request_max_entries,omitempty"`
	RequestMaxBytes   *uint   `url:"request_max_bytes,omitempty"`
	Placement         *string `url:"placement,omitempty"`
	TLSCACert         *string `url:"tls_ca_cert,omitempty"`
	TLSClientCert     *string `url:"tls_client_cert,omitempty"`
	TLSClientKey      *string `url:"tls_client_key,omitempty"`
	TLSHostname       *string `url:"tls_hostname,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
}

type UpdateFTPInput

type UpdateFTPInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the FTP to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Address           *string `url:"address,omitempty"`
	Port              *uint   `url:"port,omitempty"`
	PublicKey         *string `url:"public_key,omitempty"`
	Username          *string `url:"user,omitempty"`
	Password          *string `url:"password,omitempty"`
	Path              *string `url:"path,omitempty"`
	Period            *uint   `url:"period,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	CompressionCodec  *string `url:"compression_codec,omitempty"`
	GzipLevel         *uint8  `url:"gzip_level,omitempty"`
	Format            *string `url:"format,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	MessageType       *string `url:"message_type,omitempty"`
	TimestampFormat   *string `url:"timestamp_format,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateFTPInput is used as input to the UpdateFTP function.

type UpdateGCSInput

type UpdateGCSInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the GCS to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Bucket            *string `url:"bucket_name,omitempty"`
	User              *string `url:"user,omitempty"`
	AccountName       *string `url:"account_name,omitempty"`
	SecretKey         *string `url:"secret_key,omitempty"`
	Path              *string `url:"path,omitempty"`
	Period            *uint   `url:"period,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	CompressionCodec  *string `url:"compression_codec,omitempty"`
	GzipLevel         *uint8  `url:"gzip_level,omitempty"`
	Format            *string `url:"format,omitempty"`
	MessageType       *string `url:"message_type,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	TimestampFormat   *string `url:"timestamp_format,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateGCSInput is used as input to the UpdateGCS function.

type UpdateGzipInput

type UpdateGzipInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Gzip to update.
	Name string

	NewName        *string `url:"name,omitempty"`
	ContentTypes   *string `url:"content_types,omitempty"`
	Extensions     *string `url:"extensions,omitempty"`
	CacheCondition *string `url:"cache_condition,omitempty"`
}

UpdateGzipInput is used as input to the UpdateGzip function.

type UpdateHTTPSInput

type UpdateHTTPSInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the HTTPS endpoint to fetch.
	Name string

	NewName           *string `url:"name,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Format            *string `url:"format,omitempty"`
	URL               *string `url:"url,omitempty"`
	RequestMaxEntries *uint   `url:"request_max_entries,omitempty"`
	RequestMaxBytes   *uint   `url:"request_max_bytes,omitempty"`
	ContentType       *string `url:"content_type,omitempty"`
	HeaderName        *string `url:"header_name,omitempty"`
	HeaderValue       *string `url:"header_value,omitempty"`
	Method            *string `url:"method,omitempty"`
	JSONFormat        *string `url:"json_format,omitempty"`
	Placement         *string `url:"placement,omitempty"`
	TLSCACert         *string `url:"tls_ca_cert,omitempty"`
	TLSClientCert     *string `url:"tls_client_cert,omitempty"`
	TLSClientKey      *string `url:"tls_client_key,omitempty"`
	TLSHostname       *string `url:"tls_hostname,omitempty"`
	MessageType       *string `url:"message_type,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
}

type UpdateHeaderInput

type UpdateHeaderInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the header to update.
	Name string

	NewName           *string       `url:"name,omitempty"`
	Action            *HeaderAction `url:"action,omitempty"`
	IgnoreIfSet       *Compatibool  `url:"ignore_if_set,omitempty"`
	Type              *HeaderType   `url:"type,omitempty"`
	Destination       *string       `url:"dst,omitempty"`
	Source            *string       `url:"src,omitempty"`
	Regex             *string       `url:"regex,omitempty"`
	Substitution      *string       `url:"substitution,omitempty"`
	Priority          *uint         `url:"priority,omitempty"`
	RequestCondition  *string       `url:"request_condition,omitempty"`
	CacheCondition    *string       `url:"cache_condition,omitempty"`
	ResponseCondition *string       `url:"response_condition,omitempty"`
}

UpdateHeaderInput is used as input to the UpdateHeader function.

type UpdateHealthCheckInput

type UpdateHealthCheckInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the health check to update.
	Name string

	NewName          *string   `url:"name,omitempty"`
	Comment          *string   `url:"comment,omitempty"`
	Method           *string   `url:"method,omitempty"`
	Headers          *[]string `url:"headers,omitempty"`
	Host             *string   `url:"host,omitempty"`
	Path             *string   `url:"path,omitempty"`
	HTTPVersion      *string   `url:"http_version,omitempty"`
	Timeout          *uint     `url:"timeout,omitempty"`
	CheckInterval    *uint     `url:"check_interval,omitempty"`
	ExpectedResponse *uint     `url:"expected_response,omitempty"`
	Window           *uint     `url:"window,omitempty"`
	Threshold        *uint     `url:"threshold,omitempty"`
	Initial          *uint     `url:"initial,omitempty"`
}

UpdateHealthCheckInput is used as input to the UpdateHealthCheck function.

type UpdateHerokuInput

type UpdateHerokuInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the heroku to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	URL               *string `url:"url,omitempty"`
	Token             *string `url:"token,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateHerokuInput is used as input to the UpdateHeroku function.

type UpdateHoneycombInput

type UpdateHoneycombInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the honeycomb to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	Dataset           *string `url:"dataset,omitempty"`
	Token             *string `url:"token,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateHoneycombInput is used as input to the UpdateHoneycomb function.

type UpdateKafkaInput

type UpdateKafkaInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the kafka to update.
	Name string

	NewName           *string      `url:"name,omitempty"`
	Brokers           *string      `url:"brokers,omitempty"`
	Topic             *string      `url:"topic,omitempty"`
	RequiredACKs      *string      `url:"required_acks,omitempty"`
	UseTLS            *Compatibool `url:"use_tls,omitempty"`
	CompressionCodec  *string      `url:"compression_codec,omitempty"`
	Format            *string      `url:"format,omitempty"`
	FormatVersion     *uint        `url:"format_version,omitempty"`
	ResponseCondition *string      `url:"response_condition,omitempty"`
	Placement         *string      `url:"placement,omitempty"`
	TLSCACert         *string      `url:"tls_ca_cert,omitempty"`
	TLSHostname       *string      `url:"tls_hostname,omitempty"`
	TLSClientCert     *string      `url:"tls_client_cert,omitempty"`
	TLSClientKey      *string      `url:"tls_client_key,omitempty"`
	ParseLogKeyvals   *Compatibool `url:"parse_log_keyvals,omitempty"`
	RequestMaxBytes   *uint        `url:"request_max_bytes,omitempty"`
	AuthMethod        *string      `url:"auth_method,omitempty"`
	User              *string      `url:"user,omitempty"`
	Password          *string      `url:"password,omitempty"`
}

UpdateKafkaInput is used as input to the UpdateKafka function.

type UpdateKinesisInput

type UpdateKinesisInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Kinesis logging object to update (required).
	Name string

	NewName           *string `url:"name,omitempty"`
	StreamName        *string `url:"topic,omitempty"`
	Region            *string `url:"region,omitempty"`
	AccessKey         *string `url:"access_key,omitempty"`
	SecretKey         *string `url:"secret_key,omitempty"`
	IAMRole           *string `url:"iam_role,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateKinesisInput is used as input to the UpdateKinesis function.

type UpdateLogentriesInput

type UpdateLogentriesInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the logentries to update.
	Name string

	NewName           *string      `url:"name,omitempty"`
	Port              *uint        `url:"port,omitempty"`
	UseTLS            *Compatibool `url:"use_tls,omitempty"`
	Token             *string      `url:"token,omitempty"`
	Format            *string      `url:"format,omitempty"`
	FormatVersion     *uint        `url:"format_version,omitempty"`
	ResponseCondition *string      `url:"response_condition,omitempty"`
	Region            *string      `url:"region,omitempty"`
	Placement         *string      `url:"placement,omitempty"`
}

UpdateLogentriesInput is used as input to the UpdateLogentries function.

type UpdateLogglyInput

type UpdateLogglyInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the loggly to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Token             *string `url:"token,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateLogglyInput is used as input to the UpdateLoggly function.

type UpdateLogshuttleInput

type UpdateLogshuttleInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the logshuttle to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	URL               *string `url:"url,omitempty"`
	Token             *string `url:"token,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateLogshuttleInput is used as input to the UpdateLogshuttle function.

type UpdateNewRelicInput

type UpdateNewRelicInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the newrelic to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Token             *string `url:"token,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
	Region            *string `url:"region,omitempty"`
}

UpdateNewRelicInput is used as input to the UpdateNewRelic function.

type UpdateOpenstackInput

type UpdateOpenstackInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Openstack to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	AccessKey         *string `url:"access_key,omitempty"`
	BucketName        *string `url:"bucket_name,omitempty"`
	URL               *string `url:"url,omitempty"`
	User              *string `url:"user,omitempty"`
	Path              *string `url:"path,omitempty"`
	Placement         *string `url:"placement,omitempty"`
	Period            *uint   `url:"period,omitempty"`
	CompressionCodec  *string `url:"compression_codec,omitempty"`
	GzipLevel         *uint8  `url:"gzip_level,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	MessageType       *string `url:"message_type,omitempty"`
	TimestampFormat   *string `url:"timestamp_format,omitempty"`
	PublicKey         *string `url:"public_key,omitempty"`
}

UpdateOpenstackInput is used as input to the UpdateOpenstack function.

type UpdatePackageInput

type UpdatePackageInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string `mapstructure:"service_id"`

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int `mapstructure:"version"`

	// PackagePath is the local filesystem path to the package to upload.
	PackagePath string
}

UpdatePackageInput is used as input to the UpdatePackage function.

type UpdatePapertrailInput

type UpdatePapertrailInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the papertrail to update.
	Name string

	NewName           *string    `url:"name,omitempty"`
	Address           *string    `url:"address,omitempty"`
	Port              *uint      `url:"port,omitempty"`
	FormatVersion     *uint      `url:"format_version,omitempty"`
	Format            *string    `url:"format,omitempty"`
	ResponseCondition *string    `url:"response_condition,omitempty"`
	CreatedAt         *time.Time `url:"created_at,omitempty"`
	UpdatedAt         *time.Time `url:"updated_at,omitempty"`
	DeletedAt         *time.Time `url:"deleted_at,omitempty"`
	Placement         *string    `url:"placement,omitempty"`
}

UpdatePapertrailInput is used as input to the UpdatePapertrail function.

type UpdatePoolInput

type UpdatePoolInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the pool to update (required).
	Name string

	// Optional fields.
	NewName          *string      `url:"name,omitempty"`
	Comment          *string      `url:"comment,omitempty"`
	Shield           *string      `url:"shield,omitempty"`
	RequestCondition *string      `url:"request_condition,omitempty"`
	MaxConnDefault   *uint        `url:"max_conn_default,omitempty"`
	ConnectTimeout   *uint        `url:"connect_timeout,omitempty"`
	FirstByteTimeout *uint        `url:"first_byte_timeout,omitempty"`
	Quorum           *uint        `url:"quorum,omitempty"`
	UseTLS           *Compatibool `url:"use_tls,omitempty"`
	TLSCACert        *string      `url:"tls_ca_cert,omitempty"`
	TLSCiphers       *string      `url:"tls_ciphers,omitempty"`
	TLSClientKey     *string      `url:"tls_client_key,omitempty"`
	TLSClientCert    *string      `url:"tls_client_cert,omitempty"`
	TLSSNIHostname   *string      `url:"tls_sni_hostname,omitempty"`
	TLSCheckCert     *Compatibool `url:"tls_check_cert,omitempty"`
	TLSCertHostname  *string      `url:"tls_cert_hostname,omitempty"`
	MinTLSVersion    *string      `url:"min_tls_version,omitempty"`
	MaxTLSVersion    *string      `url:"max_tls_version,omitempty"`
	Healthcheck      *string      `url:"healthcheck,omitempty"`
	Type             *PoolType    `url:"type,omitempty"`
	OverrideHost     *string      `url:"override_host,omitempty"`
}

UpdatePoolInput is used as input to the UpdatePool function.

type UpdatePubsubInput

type UpdatePubsubInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the Pubsub to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Topic             *string `url:"topic,omitempty"`
	User              *string `url:"user,omitempty"`
	SecretKey         *string `url:"secret_key,omitempty"`
	ProjectID         *string `url:"project_id,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	Format            *string `url:"format,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdatePubsubInput is used as input to the UpdatePubsub function.

type UpdateRequestSettingInput

type UpdateRequestSettingInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the request settings to update.
	Name string

	NewName          *string              `url:"name,omitempty"`
	ForceMiss        *Compatibool         `url:"force_miss,omitempty"`
	ForceSSL         *Compatibool         `url:"force_ssl,omitempty"`
	Action           RequestSettingAction `url:"action,omitempty"`
	BypassBusyWait   *Compatibool         `url:"bypass_busy_wait,omitempty"`
	MaxStaleAge      *uint                `url:"max_stale_age,omitempty"`
	HashKeys         *string              `url:"hash_keys,omitempty"`
	XForwardedFor    RequestSettingXFF    `url:"xff,omitempty"`
	TimerSupport     *Compatibool         `url:"timer_support,omitempty"`
	GeoHeaders       *Compatibool         `url:"geo_headers,omitempty"`
	DefaultHost      *string              `url:"default_host,omitempty"`
	RequestCondition *string              `url:"request_condition,omitempty"`
}

UpdateRequestSettingInput is used as input to the UpdateRequestSetting function.

type UpdateResponseObjectInput

type UpdateResponseObjectInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the response object to update.
	Name string

	NewName          *string `url:"name,omitempty"`
	Status           *uint   `url:"status,omitempty"`
	Response         *string `url:"response,omitempty"`
	Content          *string `url:"content,omitempty"`
	ContentType      *string `url:"content_type,omitempty"`
	RequestCondition *string `url:"request_condition,omitempty"`
	CacheCondition   *string `url:"cache_condition,omitempty"`
}

UpdateResponseObjectInput is used as input to the UpdateResponseObject function.

type UpdateS3Input

type UpdateS3Input struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the S3 to update.
	Name string

	NewName                      *string                 `url:"name,omitempty"`
	BucketName                   *string                 `url:"bucket_name,omitempty"`
	Domain                       *string                 `url:"domain,omitempty"`
	AccessKey                    *string                 `url:"access_key,omitempty"`
	SecretKey                    *string                 `url:"secret_key,omitempty"`
	IAMRole                      *string                 `url:"iam_role,omitempty"`
	Path                         *string                 `url:"path,omitempty"`
	Period                       *uint                   `url:"period,omitempty"`
	CompressionCodec             *string                 `url:"compression_codec,omitempty"`
	GzipLevel                    *uint8                  `url:"gzip_level,omitempty"`
	Format                       *string                 `url:"format,omitempty"`
	FormatVersion                *uint                   `url:"format_version,omitempty"`
	ResponseCondition            *string                 `url:"response_condition,omitempty"`
	MessageType                  *string                 `url:"message_type,omitempty"`
	TimestampFormat              *string                 `url:"timestamp_format,omitempty"`
	Redundancy                   *S3Redundancy           `url:"redundancy,omitempty"`
	Placement                    *string                 `url:"placement,omitempty"`
	PublicKey                    *string                 `url:"public_key,omitempty"`
	ServerSideEncryptionKMSKeyID *string                 `url:"server_side_encryption_kms_key_id,omitempty"`
	ServerSideEncryption         *S3ServerSideEncryption `url:"server_side_encryption,omitempty"`
	ACL                          *S3AccessControlList    `url:"acl,omitempty"`
}

UpdateS3Input is used as input to the UpdateS3 function.

type UpdateSFTPInput

type UpdateSFTPInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the SFTP to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Address           *string `url:"address,omitempty"`
	Port              *uint   `url:"port,omitempty"`
	PublicKey         *string `url:"public_key,omitempty"`
	SecretKey         *string `url:"secret_key,omitempty"`
	SSHKnownHosts     *string `url:"ssh_known_hosts,omitempty"`
	User              *string `url:"user,omitempty"`
	Password          *string `url:"password,omitempty"`
	Path              *string `url:"path,omitempty"`
	Period            *uint   `url:"period,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	CompressionCodec  *string `url:"compression_codec,omitempty"`
	GzipLevel         *uint8  `url:"gzip_level,omitempty"`
	Format            *string `url:"format,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	TimestampFormat   *string `url:"timestamp_format,omitempty"`
	MessageType       *string `url:"message_type,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateSFTPInput is used as input to the UpdateSFTP function.

type UpdateScalyrInput

type UpdateScalyrInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the scalyr to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Format            *string `url:"format,omitempty"`
	FormatVersion     *uint   `url:"format_version,omitempty"`
	Token             *string `url:"token,omitempty"`
	Region            *string `url:"region,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateScalyrInput is used as input to the UpdateScalyr function.

type UpdateServerInput

type UpdateServerInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// PoolID is the ID of the pool (required).
	PoolID string

	Server string

	// Optional fields.
	Address      *string `url:"address,omitempty"`
	Comment      *string `url:"comment,omitempty"`
	Weight       *uint   `url:"weight,omitempty"`
	MaxConn      *uint   `url:"max_conn,omitempty"`
	Port         *uint   `url:"port,omitempty"`
	Disabled     *bool   `url:"disabled,omitempty"`
	OverrideHost *string `url:"override_host,omitempty"`
}

UpdateServerInput is used as input to the UpdateServer function.

type UpdateServiceAuthorizationInput added in v6.4.0

type UpdateServiceAuthorizationInput struct {
	// ID uniquely identifies the service authorization (service and user pair) to be updated.
	ID string `jsonapi:"primary,service_authorization"`

	// The permission to grant the user to the service referenced by this service authorization.
	// FIXME: Should be singular (Permissions -> Permission).
	Permissions string `jsonapi:"attr,permission,omitempty"`
}

UpdateServiceAuthorizationInput is used as input to the UpdateServiceAuthorization function.

type UpdateServiceInput

type UpdateServiceInput struct {
	ServiceID string

	Name    *string `url:"name,omitempty"`
	Comment *string `url:"comment,omitempty"`
}

UpdateServiceInput is used as input to the UpdateService function.

type UpdateSettingsInput

type UpdateSettingsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	DefaultTTL      uint    `url:"general.default_ttl"`
	DefaultHost     *string `url:"general.default_host,omitempty"`
	StaleIfError    *bool   `url:"general.stale_if_error,omitempty"`
	StaleIfErrorTTL *uint   `url:"general.stale_if_error_ttl,omitempty"`
}

UpdateSettingsInput is used as input to the UpdateSettings function.

type UpdateSnippetInput

type UpdateSnippetInput struct {
	// ServiceID is the ID of the service to add the snippet to (required).
	ServiceID string

	// ServiceVersion is the editable configuration version (required).
	ServiceVersion int

	Name string

	// Name is the name for the snippet.
	NewName *string `url:"name,omitempty"`

	// Priority determines the ordering for multiple snippets. Lower numbers execute first.
	Priority *int `url:"priority,omitempty"`

	// Content is the VCL code that specifies exactly what the snippet does.
	Content *string `url:"content,omitempty"`

	// Type is the location in generated VCL where the snippet should be placed.
	Type *SnippetType `url:"type,omitempty"`
}

UpdateSnippetInput is the input for UpdateSnippet

type UpdateSplunkInput

type UpdateSplunkInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the splunk to update.
	Name string

	NewName           *string      `url:"name,omitempty"`
	URL               *string      `url:"url,omitempty"`
	RequestMaxEntries *uint        `url:"request_max_entries,omitempty"`
	RequestMaxBytes   *uint        `url:"request_max_bytes,omitempty"`
	Format            *string      `url:"format,omitempty"`
	FormatVersion     *uint        `url:"format_version,omitempty"`
	ResponseCondition *string      `url:"response_condition,omitempty"`
	Placement         *string      `url:"placement,omitempty"`
	Token             *string      `url:"token,omitempty"`
	UseTLS            *Compatibool `url:"use_tls,omitempty"`
	TLSCACert         *string      `url:"tls_ca_cert,omitempty"`
	TLSHostname       *string      `url:"tls_hostname,omitempty"`
	TLSClientCert     *string      `url:"tls_client_cert,omitempty"`
	TLSClientKey      *string      `url:"tls_client_key,omitempty"`
}

UpdateSplunkInput is used as input to the UpdateSplunk function.

type UpdateSumologicInput

type UpdateSumologicInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the sumologic to update.
	Name string

	NewName           *string `url:"name,omitempty"`
	Address           *string `url:"address,omitempty"`
	URL               *string `url:"url,omitempty"`
	Format            *string `url:"format,omitempty"`
	ResponseCondition *string `url:"response_condition,omitempty"`
	MessageType       *string `url:"message_type,omitempty"`
	FormatVersion     *int    `url:"format_version,omitempty"`
	Placement         *string `url:"placement,omitempty"`
}

UpdateSumologicInput is used as input to the UpdateSumologic function.

type UpdateSyslogInput

type UpdateSyslogInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the syslog to update.
	Name string

	NewName           *string      `url:"name,omitempty"`
	Address           *string      `url:"address,omitempty"`
	Hostname          *string      `url:"hostname,omitempty"`
	Port              *uint        `url:"port,omitempty"`
	UseTLS            *Compatibool `url:"use_tls,omitempty"`
	IPV4              *string      `url:"ipv4,omitempty"`
	TLSCACert         *string      `url:"tls_ca_cert,omitempty"`
	TLSHostname       *string      `url:"tls_hostname,omitempty"`
	TLSClientCert     *string      `url:"tls_client_cert,omitempty"`
	TLSClientKey      *string      `url:"tls_client_key,omitempty"`
	Token             *string      `url:"token,omitempty"`
	Format            *string      `url:"format,omitempty"`
	FormatVersion     *uint        `url:"format_version,omitempty"`
	MessageType       *string      `url:"message_type,omitempty"`
	ResponseCondition *string      `url:"response_condition,omitempty"`
	Placement         *string      `url:"placement,omitempty"`
}

UpdateSyslogInput is used as input to the UpdateSyslog function.

type UpdateTLSActivationInput

type UpdateTLSActivationInput struct {
	ID          string                `jsonapi:"primary,tls_activation"`
	Certificate *CustomTLSCertificate `jsonapi:"relation,tls_certificate"` // Only ID of CustomTLSCertificate needs to be set.
}

UpdateTLSActivationInput is used as input to the UpdateTLSActivation function.

type UpdateTLSSubscriptionInput

type UpdateTLSSubscriptionInput struct {
	// ID of the subscription to update.
	ID string `jsonapi:"primary,tls_subscription"`
	// Configuration options that apply to the enabled domains on this subscription. Only ID needs to be populated
	Configuration *TLSConfiguration `jsonapi:"relation,tls_configuration,omitempty"`
	// CommonName is the common name associated with the subscription generated by Fastly TLS. Must be included in Domains. Only the ID fields of each one need to be set.
	CommonName *TLSDomain `jsonapi:"relation,common_name,omitempty"`
	// Domains list to enable TLS for. Only the ID fields of each one need to be set.
	Domains []*TLSDomain `jsonapi:"relation,tls_domain,omitempty"`
	// Force the update to be applied, even if domains are active. Warning: can disable production traffic.
	Force bool
}

UpdateTLSSubscriptionInput is used as input to the UpdateTLSSubscription function (Limited Availability)

type UpdateUserInput

type UpdateUserInput struct {
	ID string `url:"-"`

	Name *string `url:"name,omitempty"`
	Role *string `url:"role,omitempty"`
}

UpdateUserInput is used as input to the UpdateUser function.

type UpdateVCLInput

type UpdateVCLInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the VCL to update (required).
	Name string

	NewName *string `url:"name,omitempty"`
	Content *string `url:"content,omitempty"`
}

UpdateVCLInput is used as input to the UpdateVCL function.

type UpdateVersionInput

type UpdateVersionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// A personal freeform descriptive note.
	Comment *string `url:"comment,omitempty"`
}

UpdateVersionInput is the input to the UpdateVersion function.

type UpdateWAFInput

type UpdateWAFInput struct {
	// ServiceID is the ID of the service.
	ServiceID *string `jsonapi:"attr,service_id,omitempty"`

	// ServiceVersion is the specific configuration version.
	ServiceVersion *int `jsonapi:"attr,service_version_number,omitempty"`

	ID                string  `jsonapi:"primary,waf_firewall"`
	PrefetchCondition *string `jsonapi:"attr,prefetch_condition,omitempty"`
	Response          *string `jsonapi:"attr,response,omitempty"`
	Disabled          *bool   `jsonapi:"attr,disabled,omitempty"`
}

UpdateWAFInput is used as input to the UpdateWAF function.

type UpdateWAFRuleExclusionInput

type UpdateWAFRuleExclusionInput struct {
	// The Web Application Firewall's ID.
	WAFID string
	// The Web Application Firewall's version number.
	WAFVersionNumber int
	// The exclusion number.
	Number int
	// The WAF rule exclusion
	WAFRuleExclusion *WAFRuleExclusion
}

UpdateWAFRuleExclusionInput is used for exclusions updates.

type UpdateWAFVersionInput

type UpdateWAFVersionInput struct {
	// The Web Application Firewall's ID.
	WAFID *string
	// The Web Application Firewall's version number.
	WAFVersionNumber *int
	// The Web Application Firewall's version ID.
	WAFVersionID                     *string `jsonapi:"primary,waf_firewall_version"`
	Comment                          *string `jsonapi:"attr,comment,omitempty"`
	CRSValidateUTF8Encoding          *bool   `jsonapi:"attr,crs_validate_utf8_encoding,omitempty"`
	AllowedHTTPVersions              *string `jsonapi:"attr,allowed_http_versions,omitempty"`
	AllowedMethods                   *string `jsonapi:"attr,allowed_methods,omitempty"`
	AllowedRequestContentType        *string `jsonapi:"attr,allowed_request_content_type,omitempty"`
	AllowedRequestContentTypeCharset *string `jsonapi:"attr,allowed_request_content_type_charset,omitempty"`
	HighRiskCountryCodes             *string `jsonapi:"attr,high_risk_country_codes,omitempty"`
	RestrictedExtensions             *string `jsonapi:"attr,restricted_extensions,omitempty"`
	RestrictedHeaders                *string `jsonapi:"attr,restricted_headers,omitempty"`
	ArgLength                        *int    `jsonapi:"attr,arg_length,omitempty"`
	ArgNameLength                    *int    `jsonapi:"attr,arg_name_length,omitempty"`
	CombinedFileSizes                *int    `jsonapi:"attr,combined_file_sizes,omitempty"`
	CriticalAnomalyScore             *int    `jsonapi:"attr,critical_anomaly_score,omitempty"`
	ErrorAnomalyScore                *int    `jsonapi:"attr,error_anomaly_score,omitempty"`
	HTTPViolationScoreThreshold      *int    `jsonapi:"attr,http_violation_score_threshold,omitempty"`
	InboundAnomalyScoreThreshold     *int    `jsonapi:"attr,inbound_anomaly_score_threshold,omitempty"`
	LFIScoreThreshold                *int    `jsonapi:"attr,lfi_score_threshold,omitempty"`
	MaxFileSize                      *int    `jsonapi:"attr,max_file_size,omitempty"`
	MaxNumArgs                       *int    `jsonapi:"attr,max_num_args,omitempty"`
	NoticeAnomalyScore               *int    `jsonapi:"attr,notice_anomaly_score,omitempty"`
	ParanoiaLevel                    *int    `jsonapi:"attr,paranoia_level,omitempty"`
	PHPInjectionScoreThreshold       *int    `jsonapi:"attr,php_injection_score_threshold,omitempty"`
	RCEScoreThreshold                *int    `jsonapi:"attr,rce_score_threshold,omitempty"`
	RFIScoreThreshold                *int    `jsonapi:"attr,rfi_score_threshold,omitempty"`
	SessionFixationScoreThreshold    *int    `jsonapi:"attr,session_fixation_score_threshold,omitempty"`
	SQLInjectionScoreThreshold       *int    `jsonapi:"attr,sql_injection_score_threshold,omitempty"`
	TotalArgLength                   *int    `jsonapi:"attr,total_arg_length,omitempty"`
	WarningAnomalyScore              *int    `jsonapi:"attr,warning_anomaly_score,omitempty"`
	XSSScoreThreshold                *int    `jsonapi:"attr,xss_score_threshold,omitempty"`
}

UpdateWAFVersionInput is used as input to the UpdateWAFVersion function. This struct uses pointers due to the problem detailed on this issue https://github.com/opencredo/go-fastly/pull/17.

func (UpdateWAFVersionInput) HasChanges

func (i UpdateWAFVersionInput) HasChanges() bool

HasChanges checks that UpdateWAFVersionInput has changed in terms of configuration, which means - if it has configuration fields populated. if UpdateWAFVersionInput is updated to have a slice this method will not longer work as it is. if a slice is introduced the "!=" must be replaced with !DeepEquals

type Usage

type Usage struct {
	Requests  uint64 `mapstructure:"requests"`
	Bandwidth uint64 `mapstructure:"bandwidth"`
}

Usage represents usage data of a single service or region

type UsageByServiceResponse

type UsageByServiceResponse struct {
	Status  string                  `mapstructure:"status"`
	Meta    map[string]string       `mapstructure:"meta"`
	Message string                  `mapstructure:"msg"`
	Data    *ServicesByRegionsUsage `mapstructure:"data"`
}

UsageStatsResponse is a response from the account usage API endpoint

type UsageResponse

type UsageResponse struct {
	Status  string            `mapstructure:"status"`
	Meta    map[string]string `mapstructure:"meta"`
	Message string            `mapstructure:"msg"`
	Data    *RegionsUsage     `mapstructure:"data"`
}

UsageStatsResponse is a response from the account usage API endpoint

type UsageStatsResponse

type UsageStatsResponse struct {
	Status  string            `mapstructure:"status"`
	Meta    map[string]string `mapstructure:"meta"`
	Message string            `mapstructure:"msg"`
	Data    map[string]*Usage `mapstructure:"data"`
}

UsageStatsResponse is a response from the account usage API endpoint

type User

type User struct {
	ID                     string     `mapstructure:"id"`
	Login                  string     `mapstructure:"login"`
	Name                   string     `mapstructure:"name"`
	Role                   string     `mapstructure:"role"`
	CustomerID             string     `mapstructure:"customer_id"`
	EmailHash              string     `mapstructure:"email_hash"`
	LimitServices          bool       `mapstructure:"limit_services"`
	Locked                 bool       `mapstructure:"locked"`
	RequireNewPassword     bool       `mapstructure:"require_new_password"`
	TwoFactorAuthEnabled   bool       `mapstructure:"two_factor_auth_enabled"`
	TwoFactorSetupRequired bool       `mapstructure:"two_factor_setup_required"`
	CreatedAt              *time.Time `mapstructure:"created_at"`
	UpdatedAt              *time.Time `mapstructure:"updated_at"`
	DeletedAt              *time.Time `mapstructure:"deleted_at"`
}

User represents a user of the Fastly API and web interface.

type VCL

type VCL struct {
	ServiceID      string `mapstructure:"service_id"`
	ServiceVersion int    `mapstructure:"version"`

	Name      string     `mapstructure:"name"`
	Main      bool       `mapstructure:"main"`
	Content   string     `mapstructure:"content"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

VCL represents a response about VCL from the Fastly API.

type ValidateAllDomainsInput

type ValidateAllDomainsInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ValidateAllDomainsInput is used as input to the ValidateAllDomains function.

type ValidateDomainInput

type ValidateDomainInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int

	// Name is the name of the domain to validate.
	Name string `url:"name"`
}

ValidateDomainInput is used as input to the ValidateDomain function.

type ValidateVersionInput

type ValidateVersionInput struct {
	// ServiceID is the ID of the service (required).
	ServiceID string

	// ServiceVersion is the specific configuration version (required).
	ServiceVersion int
}

ValidateVersionInput is the input to the ValidateVersion function.

type Version

type Version struct {
	Number    int        `mapstructure:"number"`
	Comment   string     `mapstructure:"comment"`
	ServiceID string     `mapstructure:"service_id"`
	Active    bool       `mapstructure:"active"`
	Locked    bool       `mapstructure:"locked"`
	Deployed  bool       `mapstructure:"deployed"`
	Staging   bool       `mapstructure:"staging"`
	Testing   bool       `mapstructure:"testing"`
	CreatedAt *time.Time `mapstructure:"created_at"`
	UpdatedAt *time.Time `mapstructure:"updated_at"`
	DeletedAt *time.Time `mapstructure:"deleted_at"`
}

Version represents a distinct configuration version.

type WAF

type WAF struct {
	ID                             string     `jsonapi:"primary,waf_firewall"`
	ServiceID                      string     `jsonapi:"attr,service_id"`
	ServiceVersion                 int        `jsonapi:"attr,service_version_number"`
	PrefetchCondition              string     `jsonapi:"attr,prefetch_condition"`
	Response                       string     `jsonapi:"attr,response"`
	Disabled                       bool       `jsonapi:"attr,disabled"`
	CreatedAt                      *time.Time `jsonapi:"attr,created_at,iso8601"`
	UpdatedAt                      *time.Time `jsonapi:"attr,updated_at,iso8601"`
	ActiveRulesTrustwaveLogCount   int        `jsonapi:"attr,active_rules_trustwave_log_count"`
	ActiveRulesTrustwaveBlockCount int        `jsonapi:"attr,active_rules_trustwave_block_count"`
	ActiveRulesFastlyLogCount      int        `jsonapi:"attr,active_rules_fastly_log_count"`
	ActiveRulesFastlyBlockCount    int        `jsonapi:"attr,active_rules_fastly_block_count"`
	ActiveRulesOWASPLogCount       int        `jsonapi:"attr,active_rules_owasp_log_count"`
	ActiveRulesOWASPBlockCount     int        `jsonapi:"attr,active_rules_owasp_block_count"`
	ActiveRulesOWASPScoreCount     int        `jsonapi:"attr,active_rules_owasp_score_count"`
}

WAF is the information about a firewall object.

type WAFActiveRule

type WAFActiveRule struct {
	ID             string     `jsonapi:"primary,waf_active_rule,omitempty"`
	Status         string     `jsonapi:"attr,status,omitempty"`
	ModSecID       int        `jsonapi:"attr,modsec_rule_id,omitempty"`
	Revision       int        `jsonapi:"attr,revision,omitempty"`
	Outdated       bool       `jsonapi:"attr,outdated,omitempty"`
	LatestRevision int        `jsonapi:"attr,latest_revision,omitempty"`
	CreatedAt      *time.Time `jsonapi:"attr,created_at,iso8601,omitempty"`
	UpdatedAt      *time.Time `jsonapi:"attr,updated_at,iso8601,omitempty"`
}

WAFActiveRule is the information about a WAF active rule object.

type WAFActiveRuleResponse

type WAFActiveRuleResponse struct {
	Items []*WAFActiveRule
	Info  infoResponse
}

WAFActiveRuleResponse represents a list of active rules - full response.

type WAFConfigurationSet

type WAFConfigurationSet struct {
	ID string `jsonapi:"primary,configuration_set"`
}

WAFConfigurationSet represents information about a configuration_set.

type WAFResponse

type WAFResponse struct {
	Items []*WAF
	Info  infoResponse
}

WAFResponse an object containing the list of WAF results.

type WAFRule

type WAFRule struct {
	ID        string             `jsonapi:"primary,waf_rule,omitempty"`
	ModSecID  int                `jsonapi:"attr,modsec_rule_id,omitempty"`
	Publisher string             `jsonapi:"attr,publisher,omitempty"`
	Type      string             `jsonapi:"attr,type,omitempty"`
	Revisions []*WAFRuleRevision `jsonapi:"relation,waf_rule_revisions,omitempty"`
}

WAFRule is the information about a WAF rule object.

type WAFRuleExclusion

type WAFRuleExclusion struct {
	ID            string     `jsonapi:"primary,waf_exclusion"`
	Name          *string    `jsonapi:"attr,name"`
	ExclusionType *string    `jsonapi:"attr,exclusion_type"`
	Condition     *string    `jsonapi:"attr,condition"`
	Number        *int       `jsonapi:"attr,number"`
	Rules         []*WAFRule `jsonapi:"relation,waf_rules,omitempty"`
	CreatedAt     *time.Time `jsonapi:"attr,created_at,iso8601,omitempty"`
	UpdatedAt     *time.Time `jsonapi:"attr,updated_at,iso8601,omitempty"`
}

WAFRuleExclusion is the information about a WAF rule exclusion object.

type WAFRuleExclusionResponse

type WAFRuleExclusionResponse struct {
	Items []*WAFRuleExclusion
	Info  infoResponse
}

WAFRuleExclusionResponse represents a list of rule exclusions - full response.

type WAFRuleResponse

type WAFRuleResponse struct {
	Items []*WAFRule
	Info  infoResponse
}

WAFRuleResponse represents a list WAF rules full response.

type WAFRuleRevision

type WAFRuleRevision struct {
	ID            string `jsonapi:"primary,waf_rule_revision,omitempty"`
	Status        string `jsonapi:"attr,message,omitempty"`
	Severity      int    `jsonapi:"attr,severity,omitempty"`
	Revision      int    `jsonapi:"attr,revision,omitempty"`
	ParanoiaLevel int    `jsonapi:"attr,paranoia_level,omitempty"`
	ModSecID      int    `jsonapi:"attr,modsec_rule_id,omitempty"`
	State         string `jsonapi:"attr,state,omitempty"`
	Source        string `jsonapi:"attr,source,omitempty"`
	VCL           string `jsonapi:"attr,vcl,omitempty"`
}

WAFRuleRevision is the information about a WAF rule revision object.

type WAFVersion

type WAFVersion struct {
	// See documentation here https://developer.fastly.com/reference/api/waf/ngwaf/#api-section-ngwaf_firewall_versions
	ID                               string     `jsonapi:"primary,waf_firewall_version"`
	Number                           int        `jsonapi:"attr,number"`
	Active                           bool       `jsonapi:"attr,active"`
	Locked                           bool       `jsonapi:"attr,locked"`
	CRSValidateUTF8Encoding          bool       `jsonapi:"attr,crs_validate_utf8_encoding"`
	Comment                          string     `jsonapi:"attr,comment"`
	Error                            string     `jsonapi:"attr,error"`
	LastDeploymentStatus             string     `jsonapi:"attr,last_deployment_status"`
	AllowedHTTPVersions              string     `jsonapi:"attr,allowed_http_versions"`
	AllowedMethods                   string     `jsonapi:"attr,allowed_methods"`
	AllowedRequestContentType        string     `jsonapi:"attr,allowed_request_content_type"`
	AllowedRequestContentTypeCharset string     `jsonapi:"attr,allowed_request_content_type_charset"`
	HighRiskCountryCodes             string     `jsonapi:"attr,high_risk_country_codes"`
	RestrictedExtensions             string     `jsonapi:"attr,restricted_extensions"`
	RestrictedHeaders                string     `jsonapi:"attr,restricted_headers"`
	ArgLength                        int        `jsonapi:"attr,arg_length"`
	ArgNameLength                    int        `jsonapi:"attr,arg_name_length"`
	CombinedFileSizes                int        `jsonapi:"attr,combined_file_sizes"`
	CriticalAnomalyScore             int        `jsonapi:"attr,critical_anomaly_score"`
	ErrorAnomalyScore                int        `jsonapi:"attr,error_anomaly_score"`
	HTTPViolationScoreThreshold      int        `jsonapi:"attr,http_violation_score_threshold"`
	InboundAnomalyScoreThreshold     int        `jsonapi:"attr,inbound_anomaly_score_threshold"`
	LFIScoreThreshold                int        `jsonapi:"attr,lfi_score_threshold"`
	MaxFileSize                      int        `jsonapi:"attr,max_file_size"`
	MaxNumArgs                       int        `jsonapi:"attr,max_num_args"`
	NoticeAnomalyScore               int        `jsonapi:"attr,notice_anomaly_score"`
	ParanoiaLevel                    int        `jsonapi:"attr,paranoia_level"`
	PHPInjectionScoreThreshold       int        `jsonapi:"attr,php_injection_score_threshold"`
	RCEScoreThreshold                int        `jsonapi:"attr,rce_score_threshold"`
	RFIScoreThreshold                int        `jsonapi:"attr,rfi_score_threshold"`
	SessionFixationScoreThreshold    int        `jsonapi:"attr,session_fixation_score_threshold"`
	SQLInjectionScoreThreshold       int        `jsonapi:"attr,sql_injection_score_threshold"`
	TotalArgLength                   int        `jsonapi:"attr,total_arg_length"`
	WarningAnomalyScore              int        `jsonapi:"attr,warning_anomaly_score"`
	XSSScoreThreshold                int        `jsonapi:"attr,xss_score_threshold"`
	ActiveRulesTrustwaveLogCount     int        `jsonapi:"attr,active_rules_trustwave_log_count"`
	ActiveRulesTrustwaveBlockCount   int        `jsonapi:"attr,active_rules_trustwave_block_count"`
	ActiveRulesFastlyLogCount        int        `jsonapi:"attr,active_rules_fastly_log_count"`
	ActiveRulesFastlyBlockCount      int        `jsonapi:"attr,active_rules_fastly_block_count"`
	ActiveRulesOWASPLogCount         int        `jsonapi:"attr,active_rules_owasp_log_count"`
	ActiveRulesOWASPBlockCount       int        `jsonapi:"attr,active_rules_owasp_block_count"`
	ActiveRulesOWASPScoreCount       int        `jsonapi:"attr,active_rules_owasp_score_count"`
	DeployedAt                       *time.Time `jsonapi:"attr,deployed_at,iso8601"`
	CreatedAt                        *time.Time `jsonapi:"attr,created_at,iso8601"`
	UpdatedAt                        *time.Time `jsonapi:"attr,updated_at,iso8601"`
}

WAFVersion is the information about a WAF version object.

type WAFVersionResponse

type WAFVersionResponse struct {
	Items []*WAFVersion
	Info  infoResponse
}

WAFVersionResponse represents a list WAF versions full response.

Jump to

Keyboard shortcuts

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