papi

package
v2.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package papi provides access to the Akamai Property APIs

Package papi provides access to the Akamai Property APIs

Index

Constants

View Source
const (
	// ActivationTypeActivate is used for creating a new activation
	ActivationTypeActivate ActivationType = "ACTIVATE"

	// ActivationTypeDeactivate is used for creating a new de-activation
	ActivationTypeDeactivate ActivationType = "DEACTIVATE"

	// ActivationStatusActive is an activation that is currently serving traffic
	ActivationStatusActive ActivationStatus = "ACTIVE"

	// ActivationStatusInactive is an activation that has been superceded by another
	ActivationStatusInactive ActivationStatus = "INACTIVE"

	// ActivationStatusNew is a not yet active activation
	ActivationStatusNew ActivationStatus = "NEW"

	// ActivationStatusPending is the pending status
	ActivationStatusPending ActivationStatus = "PENDING"

	// ActivationStatusAborted is returned when a PENDING activation is successfully canceled
	ActivationStatusAborted ActivationStatus = "ABORTED"

	// ActivationStatusFailed is returned when an activation fails downstream from the api
	ActivationStatusFailed ActivationStatus = "FAILED"

	// ActivationStatusZone1 is not yet active
	ActivationStatusZone1 ActivationStatus = "ZONE_1"

	// ActivationStatusZone2 is not yet active
	ActivationStatusZone2 ActivationStatus = "ZONE_2"

	// ActivationStatusZone3 is not yet active
	ActivationStatusZone3 ActivationStatus = "ZONE_3"

	// ActivationStatusDeactivating is pending deactivation
	ActivationStatusDeactivating ActivationStatus = "PENDING_DEACTIVATION"

	// ActivationStatusDeactivated is deactivated
	ActivationStatusDeactivated ActivationStatus = "DEACTIVATED"

	// ActivationNetworkStaging is the staging network
	ActivationNetworkStaging ActivationNetwork = "STAGING"

	// ActivationNetworkProduction is the production network
	ActivationNetworkProduction ActivationNetwork = "PRODUCTION"
)
View Source
const (
	// EHSecureNetworkStandardTLS constant
	EHSecureNetworkStandardTLS = "STANDARD_TLS"
	// EHSecureNetworkSharedCert constant
	EHSecureNetworkSharedCert = "SHARED_CERT"
	// EHSecureNetworkEnhancedTLS constant
	EHSecureNetworkEnhancedTLS = "ENHANCED_TLS"

	// EHIPVersionV4 constant
	EHIPVersionV4 = "IPV4"
	// EHIPVersionV6Performance constant
	EHIPVersionV6Performance = "IPV6_PERFORMANCE"
	// EHIPVersionV6Compliance constant
	EHIPVersionV6Compliance = "IPV6_COMPLIANCE"

	// UseCaseGlobal constant
	UseCaseGlobal = "GLOBAL"
)
View Source
const (
	// RuleValidateModeFast const
	RuleValidateModeFast = "fast"
	// RuleValidateModeFull const
	RuleValidateModeFull = "full"

	// RuleCriteriaMustSatisfyAll const
	RuleCriteriaMustSatisfyAll RuleCriteriaMustSatisfy = "all"
	//RuleCriteriaMustSatisfyAny const
	RuleCriteriaMustSatisfyAny RuleCriteriaMustSatisfy = "any"
)
View Source
const (
	// SearchKeyEdgeHostname search request key
	SearchKeyEdgeHostname = "edgeHostname"
	// SearchKeyHostname search request key
	SearchKeyHostname = "hostname"
	// SearchKeyPropertyName search request key
	SearchKeyPropertyName = "propertyName"
)

Variables

View Source
var (
	// ErrCreateActivation represents error when creating activation fails
	ErrCreateActivation = errors.New("creating activation")
	// ErrGetActivations represents error when fetching activations fails
	ErrGetActivations = errors.New("fetching activations")
	// ErrGetActivation represents error when fetching activation fails
	ErrGetActivation = errors.New("fetching activation")
	// ErrCancelActivation represents error when canceling activation fails
	ErrCancelActivation = errors.New("canceling activation")
)
View Source
var (
	// ErrGetClientSettings represents error when fetching client setting fails
	ErrGetClientSettings = errors.New("fetching client settings")
	// ErrUpdateClientSettings represents error when updating client setting fails
	ErrUpdateClientSettings = errors.New("updating client settings")
)
View Source
var (
	// ErrGetCPCodes represents error when fetching CP Codes fails
	ErrGetCPCodes = errors.New("fetching CP Codes")
	// ErrGetCPCode represents error when fetching CP Code fails
	ErrGetCPCode = errors.New("fetching CP Code")
	// ErrGetCPCodeDetail represents error when fetching CP Code Details fails
	ErrGetCPCodeDetail = errors.New("fetching CP Code Detail")
	// ErrCreateCPCode represents error when creating CP Code fails
	ErrCreateCPCode = errors.New("creating CP Code")
	// ErrUpdateCPCode represents error when updating CP Code
	ErrUpdateCPCode = errors.New("updating CP Code")
)
View Source
var (
	// ErrGetEdgeHostnames represents error when fetching edge hostnames fails
	ErrGetEdgeHostnames = errors.New("fetching edge hostnames")
	// ErrGetEdgeHostname represents error when fetching edge hostname fails
	ErrGetEdgeHostname = errors.New("fetching edge hostname")
	// ErrCreateEdgeHostname represents error when creating edge hostname fails
	ErrCreateEdgeHostname = errors.New("creating edge hostname")
)
View Source
var (
	// ErrStructValidation is returned returned when given struct validation failed
	ErrStructValidation = errors.New("struct validation")

	// ErrNotFound is returned when requested resource was not found
	ErrNotFound = errors.New("resource not found")
)
View Source
var (
	// ErrGetProperties represents error when fetching properties fails
	ErrGetProperties = errors.New("fetching properties")
	// ErrGetProperty represents error when fetching property fails
	ErrGetProperty = errors.New("fetching property")
	// ErrCreateProperty represents error when creating property fails
	ErrCreateProperty = errors.New("creating property")
	// ErrRemoveProperty represents error when removing property fails
	ErrRemoveProperty = errors.New("removing property")
)
View Source
var (
	// ErrGetPropertyVersionHostnames represents error when fetching hostnames fails
	ErrGetPropertyVersionHostnames = errors.New("fetching hostnames")
	// ErrUpdatePropertyVersionHostnames represents error when updating hostnames fails
	ErrUpdatePropertyVersionHostnames = errors.New("updating hostnames")
)
View Source
var (
	// ErrGetPropertyVersions represents error when fetching property versions fails
	ErrGetPropertyVersions = errors.New("fetching property versions")
	// ErrGetPropertyVersion represents error when fetching property version fails
	ErrGetPropertyVersion = errors.New("fetching property version")
	// ErrGetLatestVersion represents error when fetching latest property version fails
	ErrGetLatestVersion = errors.New("fetching latest property version")
	// ErrCreatePropertyVersion represents error when creating property version fails
	ErrCreatePropertyVersion = errors.New("creating property version")
	// ErrGetAvailableBehaviors represents error when fetching available behaviors fails
	ErrGetAvailableBehaviors = errors.New("fetching available behaviors")
	// ErrGetAvailableCriteria represents error when fetching available criteria fails
	ErrGetAvailableCriteria = errors.New("fetching available criteria")
)
View Source
var (
	// ErrGetRuleTree represents error when fetching rule tree fails
	ErrGetRuleTree = errors.New("fetching rule tree")
	// ErrUpdateRuleTree represents error when updating rule tree fails
	ErrUpdateRuleTree = errors.New("updating rule tree")
)
View Source
var (
	// ErrGetContracts represents error when fetching contracts fails
	ErrGetContracts = errors.New("fetching contracts")
)
View Source
var (
	// ErrGetGroups represents error when fetching groups fails
	ErrGetGroups = errors.New("fetching groups")
)
View Source
var (
	// ErrGetProducts represents error when fetching products fails
	ErrGetProducts = errors.New("fetching products")
)
View Source
var (
	// ErrGetRuleFormats represents error when fetching rule formats fails
	ErrGetRuleFormats = errors.New("fetching rule formats")
)
View Source
var (
	// ErrInvalidResponseLink is returned when there was an error while fetching ID from location response object
	ErrInvalidResponseLink = errors.New("response link URL is invalid")
)
View Source
var (
	// ErrSearchProperties represents error when searching for properties fails
	ErrSearchProperties = errors.New("searching for properties")
)

Functions

func ResponseLinkParse

func ResponseLinkParse(link string) (string, error)

ResponseLinkParse parse the link and returns the id

Types

type Activation

type Activation struct {
	AccountID              string                  `json:"accountId,omitempty"`
	ActivationID           string                  `json:"activationId,omitempty"`
	ActivationType         ActivationType          `json:"activationType,omitempty"`
	UseFastFallback        bool                    `json:"useFastFallback"`
	FallbackInfo           *ActivationFallbackInfo `json:"fallbackInfo,omitempty"`
	AcknowledgeWarnings    []string                `json:"acknowledgeWarnings,omitempty"`
	AcknowledgeAllWarnings bool                    `json:"acknowledgeAllWarnings"`
	FastPush               bool                    `json:"fastPush,omitempty"`
	FMAActivationState     string                  `json:"fmaActivationState,omitempty"`
	GroupID                string                  `json:"groupId,omitempty"`
	IgnoreHTTPErrors       bool                    `json:"ignoreHttpErrors,omitempty"`
	PropertyName           string                  `json:"propertyName,omitempty"`
	PropertyID             string                  `json:"propertyId,omitempty"`
	PropertyVersion        int                     `json:"propertyVersion"`
	Network                ActivationNetwork       `json:"network"`
	Status                 ActivationStatus        `json:"status,omitempty"`
	SubmitDate             string                  `json:"submitDate,omitempty"`
	UpdateDate             string                  `json:"updateDate,omitempty"`
	Note                   string                  `json:"note,omitempty"`
	NotifyEmails           []string                `json:"notifyEmails"`
}

Activation represents a property activation resource

type ActivationFallbackInfo

type ActivationFallbackInfo struct {
	FastFallbackAttempted      bool    `json:"fastFallbackAttempted"`
	FallbackVersion            int     `json:"fallbackVersion"`
	CanFastFallback            bool    `json:"canFastFallback"`
	SteadyStateTime            int     `json:"steadyStateTime"`
	FastFallbackExpirationTime int     `json:"fastFallbackExpirationTime"`
	FastFallbackRecoveryState  *string `json:"fastFallbackRecoveryState,omitempty"`
}

ActivationFallbackInfo encapsulates information about fast fallback, which may allow you to fallback to a previous activation when POSTing an activation with useFastFallback enabled.

type ActivationNetwork

type ActivationNetwork string

ActivationNetwork is the activation network value

type ActivationStatus

type ActivationStatus string

ActivationStatus is an activation status value

type ActivationType

type ActivationType string

ActivationType is an activation type value

type Activations

type Activations interface {
	// CreateActivation creates a new activation or deactivation request
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#postpropertyactivations
	CreateActivation(context.Context, CreateActivationRequest) (*CreateActivationResponse, error)

	// GetActivations returns a list of the property activations
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyactivations
	GetActivations(ctx context.Context, params GetActivationsRequest) (*GetActivationsResponse, error)

	// GetActivation gets details about an activation
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyactivation
	GetActivation(context.Context, GetActivationRequest) (*GetActivationResponse, error)

	// CancelActivation allows for canceling an activation while it is still PENDING
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#deletepropertyactivation
	CancelActivation(context.Context, CancelActivationRequest) (*CancelActivationResponse, error)
}

Activations contains operations available on Activation resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#propertyactivationsgroup

type ActivationsItems

type ActivationsItems struct {
	Items []*Activation `json:"items"`
}

ActivationsItems are the activation items array from a response

type AvailableFeature

type AvailableFeature struct {
	Name       string `json:"name"`
	SchemaLink string `json:"schemaLink"`
}

AvailableFeature represents details of a single feature (behavior or criteria available for selected property version

type AvailableFeatureItems

type AvailableFeatureItems struct {
	Items []AvailableFeature `json:"items"`
}

AvailableFeatureItems contains a slice of AvailableFeature items

type CPCode

type CPCode struct {
	ID          string   `json:"cpcodeId"`
	Name        string   `json:"cpcodeName"`
	CreatedDate string   `json:"createdDate"`
	ProductIDs  []string `json:"productIds"`
}

CPCode contains CP code resource data

type CPCodeContract added in v2.11.0

type CPCodeContract struct {
	ContractID string `json:"contractId"`
	Status     string `json:"status,omitempty"`
}

CPCodeContract contains contract data used in CPRG API calls

func (CPCodeContract) Validate added in v2.11.0

func (contract CPCodeContract) Validate() error

Validate validates CPCodeContract

type CPCodeDetailResponse added in v2.11.0

type CPCodeDetailResponse struct {
	ID               int              `json:"cpcodeId"`
	Name             string           `json:"cpcodeName"`
	Purgeable        bool             `json:"purgeable"`
	AccountID        string           `json:"accountId"`
	DefaultTimeZone  string           `json:"defaultTimezone"`
	OverrideTimeZone CPCodeTimeZone   `json:"overrideTimezone"`
	Type             string           `json:"type"`
	Contracts        []CPCodeContract `json:"contracts"`
	Products         []CPCodeProduct  `json:"products"`
}

CPCodeDetailResponse is a response returned while fetching CP code details using CPRG API call

type CPCodeItems

type CPCodeItems struct {
	Items []CPCode `json:"items"`
}

CPCodeItems contains a list of CPCode items

type CPCodeProduct added in v2.11.0

type CPCodeProduct struct {
	ProductID   string `json:"productId"`
	ProductName string `json:"productName,omitempty"`
}

CPCodeProduct contains product data used in CPRG API calls

func (CPCodeProduct) Validate added in v2.11.0

func (product CPCodeProduct) Validate() error

Validate validates CPCodeProduct

type CPCodeTimeZone added in v2.11.0

type CPCodeTimeZone struct {
	TimeZoneID    string `json:"timezoneId"`
	TimeZoneValue string `json:"timezoneValue,omitempty"`
}

CPCodeTimeZone contains time zone data used in CPRG API calls

func (CPCodeTimeZone) Validate added in v2.11.0

func (timeZone CPCodeTimeZone) Validate() error

Validate validates CPCodeTimeZone

type CPCodes

type CPCodes interface {
	// GetCPCodes lists all available CP codes
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getcpcodes
	GetCPCodes(context.Context, GetCPCodesRequest) (*GetCPCodesResponse, error)

	// GetCPCode gets the CP code with provided ID
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getcpcode
	GetCPCode(context.Context, GetCPCodeRequest) (*GetCPCodesResponse, error)

	// GetCPCodeDetail lists detailed information about a specific CP code
	// See: https://techdocs.akamai.com/cp-codes/reference/get-cpcode
	GetCPCodeDetail(context.Context, int) (*CPCodeDetailResponse, error)

	// CreateCPCode creates a new CP code
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#postcpcodes
	CreateCPCode(context.Context, CreateCPCodeRequest) (*CreateCPCodeResponse, error)

	// UpdateCPCode modifies a specific CP code. You should only modify a CP code's name, time zone, and purgeable member
	// See: https://techdocs.akamai.com/cp-codes/reference/put-cpcode
	UpdateCPCode(context.Context, UpdateCPCodeRequest) (*CPCodeDetailResponse, error)
}

CPCodes contains operations available on CPCode resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#cpcodesgroup

type CancelActivationRequest

type CancelActivationRequest struct {
	PropertyID   string
	ActivationID string
	ContractID   string
	GroupID      string
}

CancelActivationRequest is used to delete a PENDING activation

func (CancelActivationRequest) Validate

func (v CancelActivationRequest) Validate() error

Validate validate CancelActivationRequest

type CancelActivationResponse

type CancelActivationResponse struct {
	Activations ActivationsItems `json:"activations"`
}

CancelActivationResponse is a response from deleting a PENDING activation

type CertStatusItem added in v2.4.0

type CertStatusItem struct {
	ValidationCname ValidationCname `json:"validationCname,omitempty"`
	Staging         []StatusItem    `json:"staging,omitempty"`
	Production      []StatusItem    `json:"production,omitempty"`
}

CertStatusItem contains information about certificate status for specific Hostname

type ClientFunc

type ClientFunc func(sess session.Session, opts ...Option) PAPI

ClientFunc is a papi client new method, this can used for mocking

type ClientSettings

type ClientSettings interface {
	// GetClientSettings returns client's settings.
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getclientsettings
	GetClientSettings(context.Context) (*ClientSettingsBody, error)
	// UpdateClientSettings updates client's settings.
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#putclientsettings
	UpdateClientSettings(context.Context, ClientSettingsBody) (*ClientSettingsBody, error)
}

ClientSettings contains operations available on ClientSettings resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#clientsettingsgroup

type ClientSettingsBody

type ClientSettingsBody struct {
	RuleFormat  string `json:"ruleFormat"`
	UsePrefixes bool   `json:"usePrefixes"`
}

ClientSettingsBody represents both the request and response bodies for operating on client settings resource

type Contract

type Contract struct {
	ContractID       string `json:"contractId"`
	ContractTypeName string `json:"contractTypeName"`
}

Contract represents a property contract resource

type Contracts

type Contracts interface {
	// GetContract provides a read-only list of contract names and identifiers
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getcontracts
	GetContracts(context.Context) (*GetContractsResponse, error)
}

Contracts contains operations available on Contract resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#contractsgroup

type ContractsItems

type ContractsItems struct {
	Items []*Contract `json:"items"`
}

ContractsItems is the response items array

type CreateActivationRequest

type CreateActivationRequest struct {
	PropertyID string
	ContractID string
	GroupID    string
	Activation Activation
}

CreateActivationRequest is the request parameters for a new activation or deactivation request

func (CreateActivationRequest) Validate

func (v CreateActivationRequest) Validate() error

Validate validates CreateActivationRequest

type CreateActivationResponse

type CreateActivationResponse struct {
	Response
	ActivationID   string
	ActivationLink string `json:"activationLink"`
}

CreateActivationResponse is the response for a new activation or deactivation

type CreateCPCode

type CreateCPCode struct {
	ProductID  string `json:"productId"`
	CPCodeName string `json:"cpcodeName"`
}

CreateCPCode contains the request body for CP code creation

func (CreateCPCode) Validate

func (cp CreateCPCode) Validate() error

Validate validates CreateCPCode

type CreateCPCodeRequest

type CreateCPCodeRequest struct {
	ContractID string
	GroupID    string
	CPCode     CreateCPCode
}

CreateCPCodeRequest contains data required to create CP code (both request body and group/contract information

func (CreateCPCodeRequest) Validate

func (cp CreateCPCodeRequest) Validate() error

Validate validates CreateCPCodeRequest

type CreateCPCodeResponse

type CreateCPCodeResponse struct {
	CPCodeLink string `json:"cpcodeLink"`
	CPCodeID   string `json:"-"`
}

CreateCPCodeResponse contains the response from CP code creation as well as the ID of created resource

type CreateEdgeHostnameRequest

type CreateEdgeHostnameRequest struct {
	ContractID   string
	GroupID      string
	Options      []string
	EdgeHostname EdgeHostnameCreate
}

CreateEdgeHostnameRequest contains query params and body required for creation of new edge hostname

func (CreateEdgeHostnameRequest) Validate

func (eh CreateEdgeHostnameRequest) Validate() error

Validate validates CreateEdgeHostnameRequest

type CreateEdgeHostnameResponse

type CreateEdgeHostnameResponse struct {
	EdgeHostnameLink string `json:"edgeHostnameLink"`
	EdgeHostnameID   string `json:"-"`
}

CreateEdgeHostnameResponse contains a link returned after creating new edge hostname and DI of this hostname

type CreatePropertyRequest

type CreatePropertyRequest struct {
	ContractID string
	GroupID    string
	Property   PropertyCreate
}

CreatePropertyRequest is passed to CreateProperty

func (CreatePropertyRequest) Validate

func (v CreatePropertyRequest) Validate() error

Validate validates CreatePropertyRequest

type CreatePropertyResponse

type CreatePropertyResponse struct {
	Response
	PropertyID   string
	PropertyLink string `json:"propertyLink"`
}

CreatePropertyResponse is returned by CreateProperty

type CreatePropertyVersionRequest

type CreatePropertyVersionRequest struct {
	PropertyID string
	ContractID string
	GroupID    string
	Version    PropertyVersionCreate
}

CreatePropertyVersionRequest contains path and query params, as well as request body required to execute POST /versions request

func (CreatePropertyVersionRequest) Validate

func (v CreatePropertyVersionRequest) Validate() error

Validate validates CreatePropertyVersionRequest

type CreatePropertyVersionResponse

type CreatePropertyVersionResponse struct {
	VersionLink     string `json:"versionLink"`
	PropertyVersion int
}

CreatePropertyVersionResponse contains a link returned after creating new property version and version number of this version

type EdgeHostnameCreate

type EdgeHostnameCreate struct {
	ProductID         string    `json:"productId"`
	DomainPrefix      string    `json:"domainPrefix"`
	DomainSuffix      string    `json:"domainSuffix"`
	Secure            bool      `json:"secure,omitempty"`
	SecureNetwork     string    `json:"secureNetwork,omitempty"`
	SlotNumber        int       `json:"slotNumber,omitempty"`
	IPVersionBehavior string    `json:"ipVersionBehavior"`
	CertEnrollmentID  int       `json:"certEnrollmentId,omitempty"`
	UseCases          []UseCase `json:"useCases,omitempty"`
}

EdgeHostnameCreate contains body of edge hostname POST request

func (EdgeHostnameCreate) Validate

func (eh EdgeHostnameCreate) Validate() error

Validate validates EdgeHostnameCreate

type EdgeHostnameGetItem

type EdgeHostnameGetItem struct {
	ID                string    `json:"edgeHostnameId"`
	Domain            string    `json:"edgeHostnameDomain"`
	ProductID         string    `json:"productId"`
	DomainPrefix      string    `json:"domainPrefix"`
	DomainSuffix      string    `json:"domainSuffix"`
	Status            string    `json:"status,omitempty"`
	Secure            bool      `json:"secure"`
	IPVersionBehavior string    `json:"ipVersionBehavior"`
	UseCases          []UseCase `json:"useCases,omitempty"`
}

EdgeHostnameGetItem contains GET details for edge hostname

type EdgeHostnameItems

type EdgeHostnameItems struct {
	Items []EdgeHostnameGetItem `json:"items"`
}

EdgeHostnameItems contains a list of EdgeHostnames

type EdgeHostnames

EdgeHostnames contains operations available on EdgeHostnames resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#edgehostnamesgroup

type Error

type Error struct {
	Type          string          `json:"type"`
	Title         string          `json:"title"`
	Detail        string          `json:"detail"`
	Instance      string          `json:"instance,omitempty"`
	BehaviorName  string          `json:"behaviorName,omitempty"`
	ErrorLocation string          `json:"errorLocation,omitempty"`
	StatusCode    int             `json:"statusCode,omitempty"`
	Errors        json.RawMessage `json:"errors,omitempty"`
	Warnings      json.RawMessage `json:"warnings,omitempty"`
	LimitKey      string          `json:"limitKey"`
	Limit         int             `json:"limit"`
	Remaining     int             `json:"remaining"`
}

Error is a papi error interface

func (*Error) Error

func (e *Error) Error() string

func (*Error) Is

func (e *Error) Is(target error) bool

Is handles error comparisons

type GetActivationRequest

type GetActivationRequest struct {
	PropertyID   string
	ContractID   string
	GroupID      string
	ActivationID string
}

GetActivationRequest is the get activation request

func (GetActivationRequest) Validate

func (v GetActivationRequest) Validate() error

Validate validates GetActivationRequest

type GetActivationResponse

type GetActivationResponse struct {
	GetActivationsResponse
	Activation *Activation `json:"-"`
}

GetActivationResponse is the get activation response

type GetActivationsRequest

type GetActivationsRequest struct {
	PropertyID string
	ContractID string
	GroupID    string
}

GetActivationsRequest is the get activation request

func (GetActivationsRequest) Validate

func (v GetActivationsRequest) Validate() error

Validate validates GetActivationsRequest

type GetActivationsResponse

type GetActivationsResponse struct {
	Response

	Activations ActivationsItems `json:"activations"`

	// RetryAfter is the value of the Retry-After header.
	//  For activations whose status is PENDING, a Retry-After header provides an estimate for when it’s likely to change.
	RetryAfter int `json:"-"`
}

GetActivationsResponse is the get activation response

type GetCPCodeRequest

type GetCPCodeRequest struct {
	CPCodeID   string
	ContractID string
	GroupID    string
}

GetCPCodeRequest gets details about a CP code.

func (GetCPCodeRequest) Validate

func (cp GetCPCodeRequest) Validate() error

Validate validates GetCPCodeRequest

type GetCPCodesRequest

type GetCPCodesRequest struct {
	ContractID string
	GroupID    string
}

GetCPCodesRequest contains parameters required to list/create CP codes GroupID and ContractID are required as part of every CP code operation, ID is required only for operating on specific CP code

func (GetCPCodesRequest) Validate

func (cp GetCPCodesRequest) Validate() error

Validate validates GetCPCodesRequest

type GetCPCodesResponse

type GetCPCodesResponse struct {
	AccountID  string      `json:"accountId"`
	ContractID string      `json:"contractId"`
	GroupID    string      `json:"groupId"`
	CPCodes    CPCodeItems `json:"cpcodes"`
	CPCode     CPCode
}

GetCPCodesResponse is a response returned while fetching CP codes

type GetContractsResponse

type GetContractsResponse struct {
	AccountID string         `json:"accountId"`
	Contracts ContractsItems `json:"contracts"`
}

GetContractsResponse represents a collection of property manager contracts This is the reponse to the /papi/v1/contracts request

type GetEdgeHostnameRequest

type GetEdgeHostnameRequest struct {
	EdgeHostnameID string
	ContractID     string
	GroupID        string
	Options        []string
}

GetEdgeHostnameRequest contains path and query params used to fetch specific edge hostname

func (GetEdgeHostnameRequest) Validate

func (eh GetEdgeHostnameRequest) Validate() error

Validate validates GetEdgeHostnameRequest

type GetEdgeHostnamesRequest

type GetEdgeHostnamesRequest struct {
	ContractID string
	GroupID    string
	Options    []string
}

GetEdgeHostnamesRequest contains query params used for listing edge hostnames

func (GetEdgeHostnamesRequest) Validate

func (eh GetEdgeHostnamesRequest) Validate() error

Validate validates GetEdgeHostnamesRequest

type GetEdgeHostnamesResponse

type GetEdgeHostnamesResponse struct {
	AccountID     string            `json:"accountId"`
	ContractID    string            `json:"contractId"`
	GroupID       string            `json:"groupId"`
	EdgeHostnames EdgeHostnameItems `json:"edgeHostnames"`
	EdgeHostname  EdgeHostnameGetItem
}

GetEdgeHostnamesResponse contains data received by calling GetEdgeHostnames or GetEdgeHostname

type GetFeaturesCriteriaResponse

type GetFeaturesCriteriaResponse struct {
	ContractID         string                `json:"contractId"`
	GroupID            string                `json:"groupId"`
	ProductID          string                `json:"productId"`
	RuleFormat         string                `json:"ruleFormat"`
	AvailableBehaviors AvailableFeatureItems `json:"availableBehaviors"`
}

GetFeaturesCriteriaResponse contains response received when fetching both available behaviors and available criteria for a property

type GetFeaturesRequest

type GetFeaturesRequest struct {
	PropertyID      string
	PropertyVersion int
	ContractID      string
	GroupID         string
}

GetFeaturesRequest contains path and query params required to fetch both available behaviors and available criteria for a property

func (GetFeaturesRequest) Validate

func (v GetFeaturesRequest) Validate() error

Validate validates GetFeaturesRequest

type GetGroupsResponse

type GetGroupsResponse struct {
	AccountID   string     `json:"accountId"`
	AccountName string     `json:"accountName"`
	Groups      GroupItems `json:"groups"`
}

GetGroupsResponse represents a collection of groups This is the response to the /papi/v1/groups request

type GetLatestVersionRequest

type GetLatestVersionRequest struct {
	PropertyID  string
	ActivatedOn string
	ContractID  string
	GroupID     string
}

GetLatestVersionRequest contains path and query params required to fetch latest property version

func (GetLatestVersionRequest) Validate

func (v GetLatestVersionRequest) Validate() error

Validate validates GetLatestVersionRequest

type GetProductsRequest

type GetProductsRequest struct {
	ContractID string
}

GetProductsRequest contains data required to list products associated to a contract

func (GetProductsRequest) Validate

func (pr GetProductsRequest) Validate() error

Validate validates GetProductsRequest

type GetProductsResponse

type GetProductsResponse struct {
	AccountID  string        `json:"accountId"`
	ContractID string        `json:"contractId"`
	Products   ProductsItems `json:"products"`
}

GetProductsResponse contains details about all products associated to a contract

type GetPropertiesRequest

type GetPropertiesRequest struct {
	ContractID string
	GroupID    string
}

GetPropertiesRequest is the argument for GetProperties

func (GetPropertiesRequest) Validate

func (v GetPropertiesRequest) Validate() error

Validate validates GetPropertiesRequest

type GetPropertiesResponse

type GetPropertiesResponse struct {
	Properties PropertiesItems `json:"properties"`
}

GetPropertiesResponse is the response for GetProperties

type GetPropertyRequest

type GetPropertyRequest struct {
	ContractID string
	GroupID    string
	PropertyID string
}

GetPropertyRequest is the argument for GetProperty

func (GetPropertyRequest) Validate

func (v GetPropertyRequest) Validate() error

Validate validates GetPropertyRequest

type GetPropertyResponse

type GetPropertyResponse struct {
	Response
	Properties PropertiesItems `json:"properties"`
	Property   *Property       `json:"-"`
}

GetPropertyResponse is the response for GetProperty

type GetPropertyVersionHostnamesRequest

type GetPropertyVersionHostnamesRequest struct {
	PropertyID        string
	PropertyVersion   int
	ContractID        string
	GroupID           string
	ValidateHostnames bool
	IncludeCertStatus bool
}

GetPropertyVersionHostnamesRequest contains parameters required to list property version hostnames

func (GetPropertyVersionHostnamesRequest) Validate

Validate validates GetPropertyVersionHostnamesRequest

type GetPropertyVersionHostnamesResponse

type GetPropertyVersionHostnamesResponse struct {
	AccountID       string                `json:"accountId"`
	ContractID      string                `json:"contractId"`
	GroupID         string                `json:"groupId"`
	PropertyID      string                `json:"propertyId"`
	PropertyVersion int                   `json:"propertyVersion"`
	Etag            string                `json:"etag"`
	Hostnames       HostnameResponseItems `json:"hostnames"`
}

GetPropertyVersionHostnamesResponse contains all property version hostnames associated to the given parameters

type GetPropertyVersionRequest

type GetPropertyVersionRequest struct {
	PropertyID      string
	PropertyVersion int
	ContractID      string
	GroupID         string
}

GetPropertyVersionRequest contains path and query params used for fetching specific property version

func (GetPropertyVersionRequest) Validate

func (v GetPropertyVersionRequest) Validate() error

Validate validates GetPropertyVersionRequest

type GetPropertyVersionsRequest

type GetPropertyVersionsRequest struct {
	PropertyID string
	ContractID string
	GroupID    string
	Limit      int
	Offset     int
}

GetPropertyVersionsRequest contains path and query params used for listing property versions

func (GetPropertyVersionsRequest) Validate

func (v GetPropertyVersionsRequest) Validate() error

Validate validates GetPropertyVersionsRequest

type GetPropertyVersionsResponse

type GetPropertyVersionsResponse struct {
	PropertyID   string               `json:"propertyId"`
	PropertyName string               `json:"propertyName"`
	AccountID    string               `json:"accountId"`
	ContractID   string               `json:"contractId"`
	GroupID      string               `json:"groupId"`
	AssetID      string               `json:"assetId"`
	Versions     PropertyVersionItems `json:"versions"`
	Version      PropertyVersionGetItem
}

GetPropertyVersionsResponse contains GET response returned while fetching property versions or specific version

type GetRuleFormatsResponse

type GetRuleFormatsResponse struct {
	RuleFormats RuleFormatItems `json:"ruleFormats"`
}

GetRuleFormatsResponse contains the response body of GET /rule-formats request

type GetRuleTreeRequest

type GetRuleTreeRequest struct {
	PropertyID      string
	PropertyVersion int
	ContractID      string
	GroupID         string
	ValidateMode    string
	ValidateRules   bool
	RuleFormat      string
}

GetRuleTreeRequest contains path and query params necessary to perform GET /rules request

func (GetRuleTreeRequest) Validate

func (r GetRuleTreeRequest) Validate() error

Validate validates GetRuleTreeRequest struct

type GetRuleTreeResponse

type GetRuleTreeResponse struct {
	Response
	PropertyID      string `json:"propertyId"`
	PropertyVersion int    `json:"propertyVersion"`
	Etag            string `json:"etag"`
	RuleFormat      string `json:"ruleFormat"`
	Rules           Rules  `json:"rules"`
	Comments        string `json:"comments,omitempty"`
}

GetRuleTreeResponse contains data returned by performing GET /rules request

type Group

type Group struct {
	GroupID       string   `json:"groupId"`
	GroupName     string   `json:"groupName"`
	ParentGroupID string   `json:"parentGroupId,omitempty"`
	ContractIDs   []string `json:"contractIds"`
}

Group represents a property group resource

type GroupItems

type GroupItems struct {
	Items []*Group `json:"items"`
}

GroupItems represents sub-component of the group response

type Groups

type Groups interface {
	// GetGroups provides a read-only list of groups, which may contain properties.
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getgroups
	GetGroups(context.Context) (*GetGroupsResponse, error)
}

Groups contains operations available on Group resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#groupsgroup

type Hostname

type Hostname struct {
	CnameType            HostnameCnameType `json:"cnameType"`
	EdgeHostnameID       string            `json:"edgeHostnameId,omitempty"`
	CnameFrom            string            `json:"cnameFrom"`
	CnameTo              string            `json:"cnameTo,omitempty"`
	CertProvisioningType string            `json:"certProvisioningType"`
	CertStatus           CertStatusItem    `json:"certStatus,omitempty"`
}

Hostname contains information about each of the HostnameResponseItems

type HostnameCnameType

type HostnameCnameType string

HostnameCnameType represents HostnameCnameType enum

const (
	// HostnameCnameTypeEdgeHostname const
	HostnameCnameTypeEdgeHostname HostnameCnameType = "EDGE_HOSTNAME"
)

type HostnameResponseItems

type HostnameResponseItems struct {
	Items []Hostname `json:"items"`
}

HostnameResponseItems contains the response body for GetPropertyVersionHostnamesResponse

type Option

type Option func(*papi)

Option defines a PAPI option

func WithUsePrefixes

func WithUsePrefixes(usePrefixes bool) Option

WithUsePrefixes sets the `PAPI-Use-Prefixes` header on requests See: https://developer.akamai.com/api/core_features/property_manager/v1.html#prefixes

type PAPI

PAPI is the papi api interface

func Client

func Client(sess session.Session, opts ...Option) PAPI

Client returns a new papi Client instance with the specified controller

type ProductItem

type ProductItem struct {
	ProductName string `json:"productName"`
	ProductID   string `json:"productId"`
}

ProductItem contains product resource data

type Products

type Products interface {
	// GetProducts lists all available Products
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#productsgroup
	GetProducts(context.Context, GetProductsRequest) (*GetProductsResponse, error)
}

Products contains operations available on Products resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#productsgroup

type ProductsItems

type ProductsItems struct {
	Items []ProductItem `json:"items"`
}

ProductsItems contains a list of ProductItem

type Properties

type Properties interface {
	GetProperties(ctx context.Context, r GetPropertiesRequest) (*GetPropertiesResponse, error)
	CreateProperty(ctx context.Context, params CreatePropertyRequest) (*CreatePropertyResponse, error)
	GetProperty(ctx context.Context, params GetPropertyRequest) (*GetPropertyResponse, error)
	RemoveProperty(ctx context.Context, params RemovePropertyRequest) (*RemovePropertyResponse, error)
}

Properties contains operations available on Property resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#propertiesgroup

type PropertiesItems

type PropertiesItems struct {
	Items []*Property `json:"items"`
}

PropertiesItems is an array of properties

type Property

type Property struct {
	AccountID         string `json:"accountId"`
	AssetID           string `json:"assetId"`
	ContractID        string `json:"contractId"`
	GroupID           string `json:"groupId"`
	LatestVersion     int    `json:"latestVersion"`
	Note              string `json:"note"`
	ProductID         string `json:"productId"`
	ProductionVersion *int   `json:"productionVersion,omitempty"`
	PropertyID        string `json:"propertyId"`
	PropertyName      string `json:"propertyName"`
	RuleFormat        string `json:"ruleFormat"`
	StagingVersion    *int   `json:"stagingVersion,omitempty"`
}

Property contains configuration data to apply to edge content.

type PropertyCloneFrom

type PropertyCloneFrom struct {
	CloneFromVersionEtag string `json:"cloneFromVersionEtag,omitempty"`
	CopyHostnames        bool   `json:"copyHostnames,omitempty"`
	PropertyID           string `json:"propertyId"`
	Version              int    `json:"version"`
}

PropertyCloneFrom optionally identifies another property instance to clone when making a POST request to create a new property

func (PropertyCloneFrom) Validate

func (c PropertyCloneFrom) Validate() error

Validate validates PropertyCloneFrom

type PropertyCreate

type PropertyCreate struct {
	CloneFrom    *PropertyCloneFrom `json:"cloneFrom,omitempty"`
	ProductID    string             `json:"productId"`
	PropertyName string             `json:"propertyName"`
	RuleFormat   string             `json:"ruleFormat,omitempty"`
}

PropertyCreate represents a POST /property request body

func (PropertyCreate) Validate

func (p PropertyCreate) Validate() error

Validate validates PropertyCreate

type PropertyVersionCreate

type PropertyVersionCreate struct {
	CreateFromVersion     int    `json:"createFromVersion"`
	CreateFromVersionEtag string `json:"createFromVersionEtag,omitempty"`
}

PropertyVersionCreate contains request body used in POST /versions request

func (PropertyVersionCreate) Validate

func (v PropertyVersionCreate) Validate() error

Validate validates PropertyVersionCreate

type PropertyVersionGetItem

type PropertyVersionGetItem struct {
	Etag             string        `json:"etag"`
	Note             string        `json:"note"`
	ProductID        string        `json:"productId"`
	ProductionStatus VersionStatus `json:"productionStatus"`
	PropertyVersion  int           `json:"propertyVersion"`
	RuleFormat       string        `json:"ruleFormat"`
	StagingStatus    VersionStatus `json:"stagingStatus"`
	UpdatedByUser    string        `json:"updatedByUser"`
	UpdatedDate      string        `json:"updatedDate"`
}

PropertyVersionGetItem contains detailed information about specific property version returned in GET

type PropertyVersionHostnames

type PropertyVersionHostnames interface {
	// GetPropertyVersionHostnames lists all the hostnames assigned to a property version
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyversionhostnames
	GetPropertyVersionHostnames(context.Context, GetPropertyVersionHostnamesRequest) (*GetPropertyVersionHostnamesResponse, error)

	// CreatePropertyVersionHostnames lists all the hostnames assigned to a property version
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#putpropertyversionhostnames
	UpdatePropertyVersionHostnames(context.Context, UpdatePropertyVersionHostnamesRequest) (*UpdatePropertyVersionHostnamesResponse, error)
}

PropertyVersionHostnames contains operations available on PropertyVersionHostnames resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#propertyversionhostnamesgroup

type PropertyVersionItems

type PropertyVersionItems struct {
	Items []PropertyVersionGetItem `json:"items"`
}

PropertyVersionItems contains collection of property version details

type PropertyVersions

type PropertyVersions interface {
	// GetPropertyVersions fetches available property versions
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyversions
	GetPropertyVersions(context.Context, GetPropertyVersionsRequest) (*GetPropertyVersionsResponse, error)

	// GetPropertyVersion fetches specific property version
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyversion
	GetPropertyVersion(context.Context, GetPropertyVersionRequest) (*GetPropertyVersionsResponse, error)

	// CreatePropertyVersion creates a new property version
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#postpropertyversions
	CreatePropertyVersion(context.Context, CreatePropertyVersionRequest) (*CreatePropertyVersionResponse, error)

	// GetLatestVersion fetches latest property version
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getlatestversion
	GetLatestVersion(context.Context, GetLatestVersionRequest) (*GetPropertyVersionsResponse, error)

	// GetAvailableBehaviors fetches a list of behaviors applied to property version
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getavailablebehaviors
	GetAvailableBehaviors(context.Context, GetFeaturesRequest) (*GetFeaturesCriteriaResponse, error)

	// GetAvailableCriteria fetches a list of criteria applied to property version
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getavailablecriteria
	GetAvailableCriteria(context.Context, GetFeaturesRequest) (*GetFeaturesCriteriaResponse, error)
}

PropertyVersions contains operations available on PropertyVersions resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#propertyversionsgroup

type RemovePropertyRequest

type RemovePropertyRequest struct {
	PropertyID string
	ContractID string
	GroupID    string
}

RemovePropertyRequest is the argument for RemoveProperty

func (RemovePropertyRequest) Validate

func (v RemovePropertyRequest) Validate() error

Validate validates RemovePropertyRequest

type RemovePropertyResponse

type RemovePropertyResponse struct {
	Message string `json:"message"`
}

RemovePropertyResponse is the response for GetProperties

type Response

type Response struct {
	AccountID  string   `json:"accountId,omitempty"`
	ContractID string   `json:"contractId,omitempty"`
	GroupID    string   `json:"groupId,omitempty"`
	Etag       string   `json:"etag,omitempty"`
	Errors     []*Error `json:"errors,omitempty"`
	Warnings   []*Error `json:"warnings,omitempty"`
}

Response is a base PAPI Response type

type RuleBehavior

type RuleBehavior struct {
	Locked       bool           `json:"locked,omitempty"`
	Name         string         `json:"name"`
	Options      RuleOptionsMap `json:"options"`
	UUID         string         `json:"uuid,omitempty"`
	TemplateUuid string         `json:"templateUuid,omitempty"`
}

RuleBehavior contains data for both rule behaviors and rule criteria

func (RuleBehavior) Validate

func (b RuleBehavior) Validate() error

Validate validates RuleBehavior struct

type RuleCriteriaMustSatisfy

type RuleCriteriaMustSatisfy string

RuleCriteriaMustSatisfy represents criteriaMustSatisfy field values

type RuleCustomOverride

type RuleCustomOverride struct {
	Name       string `json:"name"`
	OverrideID string `json:"overrideId"`
}

RuleCustomOverride represents customOverride field from Rule resource

func (RuleCustomOverride) Validate

func (co RuleCustomOverride) Validate() error

Validate validates RuleCustomOverride struct

type RuleError

type RuleError struct {
	Type         string `json:"type"`
	Title        string `json:"title"`
	Detail       string `json:"detail"`
	Instance     string `json:"instance"`
	BehaviorName string `json:"behaviorName"`
}

RuleError represents and entry in error field from PUT /rules response body

type RuleFormatItems

type RuleFormatItems struct {
	Items []string `json:"items"`
}

RuleFormatItems contains a list of rule formats

type RuleFormats

type RuleFormats interface {
	// GetRuleFormats provides a list of rule formats
	// See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getruleformats
	GetRuleFormats(context.Context) (*GetRuleFormatsResponse, error)
}

RuleFormats contains operations available on RuleFormat resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#ruleformatsgroup

type RuleOptions

type RuleOptions struct {
	IsSecure bool `json:"is_secure,omitempty"`
}

RuleOptions represents options field from Rule resource

type RuleOptionsMap

type RuleOptionsMap map[string]interface{}

RuleOptionsMap is a type wrapping map[string]interface{} used for adding rule options

type RuleVariable

type RuleVariable struct {
	Description string `json:"description,omitempty"`
	Hidden      bool   `json:"hidden"`
	Name        string `json:"name"`
	Sensitive   bool   `json:"sensitive"`
	Value       string `json:"value,omitempty"`
}

RuleVariable represents and entry in variables field from Rule resource

func (RuleVariable) Validate

func (v RuleVariable) Validate() error

Validate validates RuleVariable struct

type Rules

type Rules struct {
	AdvancedOverride    string                  `json:"advancedOverride,omitempty"`
	Behaviors           []RuleBehavior          `json:"behaviors,omitempty"`
	Children            []Rules                 `json:"children,omitempty"`
	Comments            string                  `json:"comments,omitempty"`
	Criteria            []RuleBehavior          `json:"criteria,omitempty"`
	CriteriaLocked      bool                    `json:"criteriaLocked,omitempty"`
	CustomOverride      *RuleCustomOverride     `json:"customOverride,omitempty"`
	Name                string                  `json:"name"`
	Options             RuleOptions             `json:"options,omitempty"`
	UUID                string                  `json:"uuid,omitempty"`
	TemplateUuid        string                  `json:"templateUuid,omitempty"`
	TemplateLink        string                  `json:"templateLink,omitempty"`
	Variables           []RuleVariable          `json:"variables,omitempty"`
	CriteriaMustSatisfy RuleCriteriaMustSatisfy `json:"criteriaMustSatisfy,omitempty"`
}

Rules contains Rule object

func (Rules) Validate

func (r Rules) Validate() error

Validate validates Rules struct

type RulesUpdate

type RulesUpdate struct {
	Comments string `json:"comments,omitempty"`
	Rules    Rules  `json:"rules"`
}

RulesUpdate is a wrapper for the request body of PUT /rules request

func (RulesUpdate) Validate

func (r RulesUpdate) Validate() error

Validate validates RulesUpdate struct

type Search interface {
	// Search earches properties by name, or by the hostname or edge hostname for which it’s currently active
	// https://developer.akamai.com/api/core_features/property_manager/v1.html#postfindbyvalue
	SearchProperties(context.Context, SearchRequest) (*SearchResponse, error)
}

Search contains SearchProperty method used for fetching properties https://developer.akamai.com/api/core_features/property_manager/v1.html#searchgroup

type SearchItem

type SearchItem struct {
	AccountID        string `json:"accountId"`
	AssetID          string `json:"assetId"`
	ContractID       string `json:"contractId"`
	EdgeHostname     string `json:"edgeHostname"`
	GroupID          string `json:"groupId"`
	Hostname         string `json:"hostname"`
	ProductionStatus string `json:"productionStatus"`
	PropertyID       string `json:"propertyId"`
	PropertyName     string `json:"propertyName"`
	PropertyVersion  int    `json:"propertyVersion"`
	StagingStatus    string `json:"stagingStatus"`
	UpdatedByUser    string `json:"updatedByUser"`
	UpdatedDate      string `json:"updatedDate"`
}

SearchItem contains details of a search result

type SearchItems

type SearchItems struct {
	Items []SearchItem `json:"items"`
}

SearchItems contains a list of search results

type SearchRequest

type SearchRequest struct {
	Key   string
	Value string
}

SearchRequest contains key-value pair for search request Key must have one of three values: "edgeHostname", "hostname" or "propertyName"

func (SearchRequest) Validate

func (s SearchRequest) Validate() error

Validate validate SearchRequest struct

type SearchResponse

type SearchResponse struct {
	Versions SearchItems `json:"versions"`
}

SearchResponse contains response body of POST /search request

type StatusItem added in v2.4.0

type StatusItem struct {
	Status string `json:"status,omitempty"`
}

StatusItem determines whether a hostname is capable of serving secure content over the staging or production network.

type UpdateCPCodeRequest added in v2.11.0

type UpdateCPCodeRequest struct {
	ID               int              `json:"cpcodeId"`
	Name             string           `json:"cpcodeName"`
	Purgeable        *bool            `json:"purgeable,omitempty"`
	OverrideTimeZone *CPCodeTimeZone  `json:"overrideTimezone,omitempty"`
	Contracts        []CPCodeContract `json:"contracts"`
	Products         []CPCodeProduct  `json:"products"`
}

UpdateCPCodeRequest contains parameters required to update CP code, using CPRG API call

func (UpdateCPCodeRequest) Validate added in v2.11.0

func (cp UpdateCPCodeRequest) Validate() error

Validate validates UpdateCPCodeRequest

type UpdatePropertyVersionHostnamesRequest

type UpdatePropertyVersionHostnamesRequest struct {
	PropertyID        string
	PropertyVersion   int
	ContractID        string
	GroupID           string
	ValidateHostnames bool
	IncludeCertStatus bool
	Hostnames         []Hostname
}

UpdatePropertyVersionHostnamesRequest contains parameters required to update the set of hostname entries for a property version

func (UpdatePropertyVersionHostnamesRequest) Validate

Validate validates UpdatePropertyVersionHostnamesRequest

type UpdatePropertyVersionHostnamesResponse

type UpdatePropertyVersionHostnamesResponse struct {
	AccountID       string                `json:"accountId"`
	ContractID      string                `json:"contractId"`
	GroupID         string                `json:"groupId"`
	PropertyID      string                `json:"propertyId"`
	PropertyVersion int                   `json:"propertyVersion"`
	Etag            string                `json:"etag"`
	Hostnames       HostnameResponseItems `json:"hostnames"`
}

UpdatePropertyVersionHostnamesResponse contains information about each of the HostnameRequestItems

type UpdateRulesRequest

type UpdateRulesRequest struct {
	PropertyID      string
	PropertyVersion int
	ContractID      string
	DryRun          bool
	GroupID         string
	ValidateMode    string
	ValidateRules   bool
	Rules           RulesUpdate
}

UpdateRulesRequest contains path and query params, as well as request body necessary to perform PUT /rules request

func (UpdateRulesRequest) Validate

func (r UpdateRulesRequest) Validate() error

Validate validates UpdateRulesRequest struct

type UpdateRulesResponse

type UpdateRulesResponse struct {
	AccountID       string      `json:"accountId"`
	ContractID      string      `json:"contractId"`
	Comments        string      `json:"comments,omitempty"`
	GroupID         string      `json:"groupId"`
	PropertyID      string      `json:"propertyId"`
	PropertyVersion int         `json:"propertyVersion"`
	Etag            string      `json:"etag"`
	RuleFormat      string      `json:"ruleFormat"`
	Rules           Rules       `json:"rules"`
	Errors          []RuleError `json:"errors"`
}

UpdateRulesResponse contains data returned by performing PUT /rules request

type UseCase

type UseCase struct {
	Option  string `json:"option"`
	Type    string `json:"type"`
	UseCase string `json:"useCase"`
}

UseCase contains UseCase data

func (UseCase) Validate

func (uc UseCase) Validate() error

Validate validates UseCase

type ValidationCname added in v2.4.0

type ValidationCname struct {
	Hostname string `json:"hostname,omitempty"`
	Target   string `json:"target,omitempty"`
}

ValidationCname is the CNAME record used to validate the certificate’s domain

type VersionStatus

type VersionStatus string

VersionStatus represents ProductionVersion and StagingVersion of a Version struct

const (
	// VersionStatusActive const
	VersionStatusActive VersionStatus = "ACTIVE"
	// VersionStatusInactive const
	VersionStatusInactive VersionStatus = "INACTIVE"
	// VersionStatusPending const
	VersionStatusPending VersionStatus = "PENDING"
	// VersionStatusDeactivated const
	VersionStatusDeactivated VersionStatus = "DEACTIVATED"
	// VersionProduction const
	VersionProduction = "PRODUCTION"
	// VersionStaging const
	VersionStaging = "STAGING"
)

Jump to

Keyboard shortcuts

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