papi

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 16 Imported by: 2

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 superseded 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"

	// ActivationStatusCancelling is returned when cancellation is in progress
	ActivationStatusCancelling ActivationStatus = "PENDING_CANCELLATION"

	// 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 (
	// NoncomplianceReasonNoProductionTraffic is noncompliance reason type for compliance record
	NoncomplianceReasonNoProductionTraffic = "NO_PRODUCTION_TRAFFIC"
	// NoncomplianceReasonOther is noncompliance reason type for compliance record
	NoncomplianceReasonOther = "OTHER"
	// NoncomplianceReasonEmergency is noncompliance reason type for compliance record
	NoncomplianceReasonEmergency = "EMERGENCY"
	// NoncomplianceReasonNone is noncompliance reason type for compliance record
	NoncomplianceReasonNone = "NONE"
)
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 (
	// ErrListIncludes is returned in case an error occurs on ListIncludes operation
	ErrListIncludes = errors.New("list Includes")
	// ErrListIncludeParents is returned in case an error occurs on ListIncludeParents operation
	ErrListIncludeParents = errors.New("list Include Parents")
	// ErrGetInclude is returned in case an error occurs on GetInclude operation
	ErrGetInclude = errors.New("get an Include")
	// ErrCreateInclude is returned in case an error occurs on CreateInclude operation
	ErrCreateInclude = errors.New("create an Include")
	// ErrDeleteInclude is returned in case an error occurs on DeleteInclude operation
	ErrDeleteInclude = errors.New("delete an Include")
)
View Source
var (
	// ErrActivateInclude is returned in case an error occurs on ActivateInclude operation
	ErrActivateInclude = errors.New("activate include")
	// ErrDeactivateInclude is returned in case an error occurs on DeactivateInclude operation
	ErrDeactivateInclude = errors.New("deactivate include")
	// ErrCancelIncludeActivation is returned in case an error occurs on CancelIncludeActivation operation
	ErrCancelIncludeActivation = errors.New("cancel include activation")
	// ErrGetIncludeActivation is returned in case an error occurs on GetIncludeActivation operation
	ErrGetIncludeActivation = errors.New("get include activation")
	// ErrListIncludeActivations is returned in case an error occurs on ListIncludeActivations operation
	ErrListIncludeActivations = errors.New("list include activations")
)
View Source
var (
	// ErrGetIncludeRuleTree represents error when fetching rule tree fails
	ErrGetIncludeRuleTree = errors.New("fetching include rule tree")
	// ErrUpdateIncludeRuleTree represents error when updating rule tree fails
	ErrUpdateIncludeRuleTree = errors.New("updating include rule tree")
)
View Source
var (
	// ErrCreateIncludeVersion is returned in case an error occurs on CreateIncludeVersion operation
	ErrCreateIncludeVersion = errors.New("create an include version")
	// ErrGetIncludeVersion is returned in case an error occurs on GetIncludeVersion operation
	ErrGetIncludeVersion = errors.New("get an include version")
	// ErrListIncludeVersions is returned in case an error occurs on ListIncludeVersions operation
	ErrListIncludeVersions = errors.New("list include versions")
	// ErrListIncludeVersionAvailableCriteria is returned in case an error occurs on ListIncludeVersionAvailableCriteria operation
	ErrListIncludeVersionAvailableCriteria = errors.New("list include version available criteria")
	// ErrListIncludeVersionAvailableBehaviors is returned in case an error occurs on ListIncludeVersionAvailableBehaviors operation
	ErrListIncludeVersionAvailableBehaviors = errors.New("list include version available behaviors")
)
View Source
var (
	// ErrStructValidation is 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")

	// ErrSBDNotEnabled indicates that secure-by-default is not enabled on the given account
	ErrSBDNotEnabled = errors.New("secure-by-default is not enabled")

	// ErrDefaultCertLimitReached indicates that the limit for DEFAULT certificates has been reached
	ErrDefaultCertLimitReached = errors.New("the limit for DEFAULT certificates has been reached")
)
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")
	// ErrListAvailableIncludes represents error when fetching available includes
	ErrListAvailableIncludes = errors.New("fetching available includes")
	// ErrListReferencedIncludes represents error when fetching referenced includes
	ErrListReferencedIncludes = errors.New("fetching referenced includes")
)
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 ActivateIncludeRequest

type ActivateIncludeRequest ActivateOrDeactivateIncludeRequest

ActivateIncludeRequest contains parameters used to activate include

func (ActivateIncludeRequest) Validate

func (i ActivateIncludeRequest) Validate() error

Validate validates ActivateIncludeRequest

type ActivateOrDeactivateIncludeRequest

type ActivateOrDeactivateIncludeRequest struct {
	IncludeID              string            `json:"-"`
	Version                int               `json:"includeVersion"`
	Network                ActivationNetwork `json:"network"`
	Note                   string            `json:"note"`
	NotifyEmails           []string          `json:"notifyEmails"`
	AcknowledgeWarnings    []string          `json:"acknowledgeWarnings,omitempty"`
	AcknowledgeAllWarnings bool              `json:"acknowledgeAllWarnings"`
	IgnoreHTTPErrors       *bool             `json:"ignoreHttpErrors,omitempty"`
	ComplianceRecord       complianceRecord  `json:"complianceRecord,omitempty"`
}

ActivateOrDeactivateIncludeRequest contains parameters used to activate or deactivate include

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"`
	ComplianceRecord       complianceRecord        `json:"complianceRecord,omitempty"`
}

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 ActivationIncludeResponse

type ActivationIncludeResponse struct {
	ActivationID   string `json:"-"`
	ActivationLink string `json:"activationLink"`
}

ActivationIncludeResponse represents a response object returned by ActivateInclude operation

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://techdocs.akamai.com/property-mgr/reference/post-property-activations
	CreateActivation(context.Context, CreateActivationRequest) (*CreateActivationResponse, error)

	// GetActivations returns a list of the property activations
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-property-activations
	GetActivations(ctx context.Context, params GetActivationsRequest) (*GetActivationsResponse, error)

	// GetActivation gets details about an activation
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-property-activation
	GetActivation(context.Context, GetActivationRequest) (*GetActivationResponse, error)

	// CancelActivation allows for canceling an activation while it is still PENDING
	//
	// https://techdocs.akamai.com/property-mgr/reference/delete-property-activation
	CancelActivation(context.Context, CancelActivationRequest) (*CancelActivationResponse, error)
}

Activations contains operations available on Activation resource

type ActivationsItems

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

ActivationsItems are the activation items array from a response

type AvailableBehaviors

type AvailableBehaviors struct {
	Items []Behavior `json:"items"`
}

AvailableBehaviors represents list of available behaviors for the include version

type AvailableBehaviorsResponse

type AvailableBehaviorsResponse struct {
	ContractID         string             `json:"contractId"`
	GroupID            string             `json:"groupId"`
	ProductID          string             `json:"productId"`
	RuleFormat         string             `json:"ruleFormat"`
	AvailableBehaviors AvailableBehaviors `json:"behaviors"`
}

AvailableBehaviorsResponse represents a response object returned by GetIncludeVersionAvailableBehavior

type AvailableCriteria

type AvailableCriteria struct {
	Items []Criteria `json:"items"`
}

AvailableCriteria represents list of available criteria for the include version

type AvailableCriteriaResponse

type AvailableCriteriaResponse struct {
	ContractID        string            `json:"contractId"`
	GroupID           string            `json:"groupId"`
	ProductID         string            `json:"productId"`
	RuleFormat        string            `json:"ruleFormat"`
	AvailableCriteria AvailableCriteria `json:"criteria"`
}

AvailableCriteriaResponse represents a response object returned by ListIncludeVersionAvailableCriteria

type Behavior

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

Behavior represents available behavior object

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

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

CPCodeContract contains contract data used in CPRG API calls

func (CPCodeContract) Validate

func (contract CPCodeContract) Validate() error

Validate validates CPCodeContract

type CPCodeDetailResponse

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

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

CPCodeProduct contains product data used in CPRG API calls

func (CPCodeProduct) Validate

func (product CPCodeProduct) Validate() error

Validate validates CPCodeProduct

type CPCodeTimeZone

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

func (timeZone CPCodeTimeZone) Validate() error

Validate validates CPCodeTimeZone

type CPCodes

type CPCodes interface {
	// GetCPCodes lists all available CP codes
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-cpcodes
	GetCPCodes(context.Context, GetCPCodesRequest) (*GetCPCodesResponse, error)

	// GetCPCode gets the CP code with provided ID
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-cpcode
	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://techdocs.akamai.com/property-mgr/reference/post-cpcodes
	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

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 CancelIncludeActivationRequest

type CancelIncludeActivationRequest struct {
	ContractID   string
	GroupID      string
	IncludeID    string
	ActivationID string
}

CancelIncludeActivationRequest contains parameters used to cancel pending activation of include

func (CancelIncludeActivationRequest) Validate

Validate validates CancelIncludeActivationRequest

type CancelIncludeActivationResponse

type CancelIncludeActivationResponse ListIncludeActivationsResponse

CancelIncludeActivationResponse represents a response object returned by CancelIncludeActivation operation

type CertStatusItem

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://techdocs.akamai.com/property-mgr/reference/get-client-settings
	GetClientSettings(context.Context) (*ClientSettingsBody, error)

	// UpdateClientSettings updates client's settings.
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/put-client-settings
	UpdateClientSettings(context.Context, ClientSettingsBody) (*ClientSettingsBody, error)
}

ClientSettings contains operations available on ClientSettings resource

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 CloneIncludeFrom

type CloneIncludeFrom struct {
	CloneFromVersionEtag string `json:"cloneFromVersionEtag,omitempty"`
	IncludeID            string `json:"includeId"`
	Version              int    `json:"version"`
}

CloneIncludeFrom optionally identifies another include instance to clone when making a request to create new include

type ComplianceRecordEmergency

type ComplianceRecordEmergency struct {
	TicketID string `json:"ticketId,omitempty"`
}

ComplianceRecordEmergency holds data relevant for ComplianceRecord with noncomplianceReason 'Emergency'

func (ComplianceRecordEmergency) MarshalJSON

func (c ComplianceRecordEmergency) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaller for ComplianceRecordEmergency struct

type ComplianceRecordNoProductionTraffic

type ComplianceRecordNoProductionTraffic struct {
	TicketID string `json:"ticketId,omitempty"`
}

ComplianceRecordNoProductionTraffic holds data relevant for ComplianceRecord with noncomplianceReason 'NoProductionTraffic'

func (ComplianceRecordNoProductionTraffic) MarshalJSON

func (c ComplianceRecordNoProductionTraffic) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaller for ComplianceRecordNoProductionTraffic struct

type ComplianceRecordNone

type ComplianceRecordNone struct {
	CustomerEmail  string `json:"customerEmail"`
	PeerReviewedBy string `json:"peerReviewedBy"`
	UnitTested     bool   `json:"unitTested"`
	TicketID       string `json:"ticketId,omitempty"`
}

ComplianceRecordNone holds data relevant for ComplianceRecord with noncomplianceReason 'None'

func (ComplianceRecordNone) MarshalJSON

func (c ComplianceRecordNone) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaller for ComplianceRecordNone struct

func (*ComplianceRecordNone) Validate

func (c *ComplianceRecordNone) Validate() error

Validate validates ComplianceRecordNone

type ComplianceRecordOther

type ComplianceRecordOther struct {
	OtherNoncomplianceReason string `json:"otherNoncomplianceReason"`
	TicketID                 string `json:"ticketId,omitempty"`
}

ComplianceRecordOther holds data relevant for ComplianceRecord with noncomplianceReason 'Other'

func (ComplianceRecordOther) MarshalJSON

func (c ComplianceRecordOther) MarshalJSON() ([]byte, error)

MarshalJSON is a custom marshaller for ComplianceRecordOther struct

func (*ComplianceRecordOther) Validate

func (c *ComplianceRecordOther) Validate() error

Validate validates ComplianceRecordOther

type Contract

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

Contract represents a property contract resource

type Contracts

type Contracts interface {
	// GetContracts provides a read-only list of contract names and identifiers
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-contracts
	GetContracts(context.Context) (*GetContractsResponse, error)
}

Contracts contains operations available on Contract resource

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 CreateCPCodeFn

CreateCPCodeFn is any function having the same signature as 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 CreateIncludeRequest

type CreateIncludeRequest struct {
	ContractID       string            `json:"-"`
	GroupID          string            `json:"-"`
	IncludeName      string            `json:"includeName"`
	IncludeType      IncludeType       `json:"includeType"`
	ProductID        string            `json:"productId"`
	RuleFormat       string            `json:"ruleFormat,omitempty"`
	CloneIncludeFrom *CloneIncludeFrom `json:"cloneFrom,omitempty"`
}

CreateIncludeRequest contains parameters used to create an include

func (CreateIncludeRequest) Validate

func (i CreateIncludeRequest) Validate() error

Validate validates CreateIncludeRequest

type CreateIncludeResponse

type CreateIncludeResponse struct {
	IncludeID       string `json:"-"`
	IncludeLink     string `json:"includeLink"`
	ResponseHeaders CreateIncludeResponseHeaders
}

CreateIncludeResponse represents a response object returned by CreateInclude

type CreateIncludeResponseHeaders

type CreateIncludeResponseHeaders struct {
	IncludesLimitTotal     string
	IncludesLimitRemaining string
}

CreateIncludeResponseHeaders contains information received in response headers when making a request to create new include

type CreateIncludeVersionRequest

type CreateIncludeVersionRequest struct {
	IncludeID string
	IncludeVersionRequest
}

CreateIncludeVersionRequest contains parameters used to create a new include version

func (CreateIncludeVersionRequest) Validate

func (i CreateIncludeVersionRequest) Validate() error

Validate validates CreateIncludeVersionRequest

type CreateIncludeVersionResponse

type CreateIncludeVersionResponse struct {
	VersionLink string
	Version     int
}

CreateIncludeVersionResponse represents a response object returned by CreateIncludeVersion

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 Criteria

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

Criteria represents available criteria object

type DeactivateIncludeRequest

type DeactivateIncludeRequest ActivateOrDeactivateIncludeRequest

DeactivateIncludeRequest contains parameters used to deactivate include

func (DeactivateIncludeRequest) Validate

func (i DeactivateIncludeRequest) Validate() error

Validate validates DeactivateIncludeRequest

type DeactivationIncludeResponse

type DeactivationIncludeResponse struct {
	ActivationID   string `json:"-"`
	ActivationLink string `json:"activationLink"`
}

DeactivationIncludeResponse represents a response object returned by DeactivateInclude operation

type DeleteIncludeRequest

type DeleteIncludeRequest struct {
	ContractID string
	GroupID    string
	IncludeID  string
}

DeleteIncludeRequest contains parameters used to delete an include

func (DeleteIncludeRequest) Validate

func (i DeleteIncludeRequest) Validate() error

Validate validates DeleteIncludeRequest

type DeleteIncludeResponse

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

DeleteIncludeResponse represents a response object returned by DeleteInclude

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

type EdgeHostnames interface {
	// GetEdgeHostnames fetches a list of edge hostnames
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-edgehostnames
	GetEdgeHostnames(context.Context, GetEdgeHostnamesRequest) (*GetEdgeHostnamesResponse, error)

	// GetEdgeHostname fetches edge hostname with given ID
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-edgehostname
	GetEdgeHostname(context.Context, GetEdgeHostnameRequest) (*GetEdgeHostnamesResponse, error)

	// CreateEdgeHostname creates a new edge hostname
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/post-edgehostnames
	CreateEdgeHostname(context.Context, CreateEdgeHostnameRequest) (*CreateEdgeHostnameResponse, error)
}

EdgeHostnames contains operations available on EdgeHostnames resource

type Error

type Error struct {
	Type          string          `json:"type"`
	Title         string          `json:"title,omitempty"`
	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,omitempty"`
	Limit         *int            `json:"limit,omitempty"`
	Remaining     *int            `json:"remaining,omitempty"`
}

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 ErrorItem

type ErrorItem struct {
	VersionID             int    `json:"versionId"`
	PropertyName          string `json:"propertyName"`
	VersionNumber         int    `json:"versionNumber"`
	HasValidationError    bool   `json:"hasValidationError"`
	HasValidationWarning  bool   `json:"hasValidationWarning"`
	ValidationResultsLink string `json:"validationResultsLink"`
}

ErrorItem represents validation progress error item object

type ExternalIncludeData

type ExternalIncludeData struct {
	IncludeID   string      `json:"id"`
	IncludeName string      `json:"name"`
	IncludeType IncludeType `json:"includeType"`
	FileName    string      `json:"fileName"`
	ProductName string      `json:"productName"`
	RuleFormat  string      `json:"ruleFormat"`
}

ExternalIncludeData contains data for a specific include from AvailableIncludes

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 GetAvailableBehaviorsRequest

type GetAvailableBehaviorsRequest GetAvailableItemsRequest

GetAvailableBehaviorsRequest contains path and query params required to fetch available behaviors for a property

func (GetAvailableBehaviorsRequest) Validate

func (v GetAvailableBehaviorsRequest) Validate() error

Validate validates GetAvailableBehaviorsRequest

type GetAvailableCriteriaRequest

type GetAvailableCriteriaRequest GetAvailableItemsRequest

GetAvailableCriteriaRequest contains path and query params required to fetch available criteria for a property

func (GetAvailableCriteriaRequest) Validate

func (v GetAvailableCriteriaRequest) Validate() error

Validate validates GetAvailableCriteriaRequest

type GetAvailableItemsRequest

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

GetAvailableItemsRequest contains path and query params required to fetch available behaviors or criteria for a property

type GetBehaviorsResponse

type GetBehaviorsResponse AvailableBehaviorsResponse

GetBehaviorsResponse represents a response object returned by GetAvailableBehaviors

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 GetCPCodesFn

GetCPCodesFn is any function having the same signature as GetCPCodes

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 is the response to the /papi/v1/contracts request

type GetCriteriaResponse

type GetCriteriaResponse AvailableCriteriaResponse

GetCriteriaResponse represents a response object returned by GetAvailableCriteria

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 GetGroupsFn

type GetGroupsFn func(context.Context) (*GetGroupsResponse, error)

GetGroupsFn is any function having the same signature as GetGroups

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 GetIncludeActivationRequest

type GetIncludeActivationRequest struct {
	IncludeID    string
	ActivationID string
}

GetIncludeActivationRequest contains parameters used to get the include activation

func (GetIncludeActivationRequest) Validate

func (i GetIncludeActivationRequest) Validate() error

Validate validates GetIncludeActivationRequest

type GetIncludeActivationResponse

type GetIncludeActivationResponse struct {
	AccountID   string                `json:"accountId"`
	ContractID  string                `json:"contractId"`
	GroupID     string                `json:"groupId"`
	Activations IncludeActivationsRes `json:"activations"`
	Validations *Validations          `json:"validations,omitempty"`
	Activation  IncludeActivation     `json:"-"`
}

GetIncludeActivationResponse represents a response object returned by GetIncludeActivation

type GetIncludeRequest

type GetIncludeRequest struct {
	ContractID string
	GroupID    string
	IncludeID  string
}

GetIncludeRequest contains parameters used to fetch an include

func (GetIncludeRequest) Validate

func (i GetIncludeRequest) Validate() error

Validate validates GetIncludeRequest

type GetIncludeResponse

type GetIncludeResponse struct {
	Includes IncludeItems `json:"includes"`
	Include  Include      `json:"-"`
}

GetIncludeResponse represents a response object returned by GetInclude

type GetIncludeRuleTreeRequest

type GetIncludeRuleTreeRequest struct {
	ContractID     string
	GroupID        string
	IncludeID      string
	IncludeVersion int
	RuleFormat     string
	ValidateMode   string
	ValidateRules  bool
}

GetIncludeRuleTreeRequest contains path and query params necessary to perform GetIncludeRuleTree

func (GetIncludeRuleTreeRequest) Validate

func (i GetIncludeRuleTreeRequest) Validate() error

Validate validates GetIncludeRuleTreeRequest struct

type GetIncludeRuleTreeResponse

type GetIncludeRuleTreeResponse struct {
	Response
	Comments       string      `json:"comments,omitempty"`
	Etag           string      `json:"etag"`
	IncludeID      string      `json:"includeId"`
	IncludeName    string      `json:"includeName"`
	IncludeType    IncludeType `json:"includeType"`
	IncludeVersion int         `json:"includeVersion"`
	RuleFormat     string      `json:"ruleFormat"`
	Rules          Rules       `json:"rules"`
}

GetIncludeRuleTreeResponse contains data returned by performing GetIncludeRuleTree request

type GetIncludeVersionRequest

type GetIncludeVersionRequest struct {
	IncludeID  string
	Version    int
	ContractID string
	GroupID    string
}

GetIncludeVersionRequest contains parameters used to get the include version

func (GetIncludeVersionRequest) Validate

func (i GetIncludeVersionRequest) Validate() error

Validate validates GetIncludeVersionRequest

type GetIncludeVersionResponse

type GetIncludeVersionResponse struct {
	IncludeID       string         `json:"includeId"`
	IncludeName     string         `json:"includeName"`
	AccountID       string         `json:"accountId"`
	ContractID      string         `json:"contractId"`
	GroupID         string         `json:"groupId"`
	AssetID         string         `json:"assetId"`
	IncludeType     IncludeType    `json:"includeType"`
	IncludeVersions Versions       `json:"versions"`
	IncludeVersion  IncludeVersion `json:"-"`
}

GetIncludeVersionResponse represents a response object returned by GetIncludeVersion

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 GetPropertyFunc

type GetPropertyFunc func(context.Context, GetPropertyRequest) (*GetPropertyResponse, error)

GetPropertyFunc is any function having the same signature as GetProperty

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 GetPropertyVersionHostnamesFn

GetPropertyVersionHostnamesFn is any function having the same signature as GetPropertyVersionHostnames

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 GetPropertyVersionsFn

GetPropertyVersionsFn is any function having the same signature as GetPropertyVersions

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 GetRuleTreeFn

type GetRuleTreeFn = func(context.Context, GetRuleTreeRequest) (*GetRuleTreeResponse, error)

GetRuleTreeFn is any function having the same signature as GetRuleTree

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://techdocs.akamai.com/property-mgr/reference/get-groups
	GetGroups(context.Context) (*GetGroupsResponse, error)
}

Groups contains operations available on Group resource

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 Include

type Include struct {
	AccountID         string      `json:"accountId"`
	AssetID           string      `json:"assetId"`
	ContractID        string      `json:"contractId"`
	GroupID           string      `json:"groupId"`
	IncludeID         string      `json:"includeId"`
	IncludeName       string      `json:"includeName"`
	IncludeType       IncludeType `json:"includeType"`
	LatestVersion     int         `json:"latestVersion"`
	ProductionVersion *int        `json:"productionVersion"`
	PropertyType      *string     `json:"propertyType"`
	StagingVersion    *int        `json:"stagingVersion"`
}

Include represents an Include object

type IncludeActivation

type IncludeActivation struct {
	ActivationID        string                  `json:"activationId"`
	Network             ActivationNetwork       `json:"network"`
	ActivationType      ActivationType          `json:"activationType"`
	Status              ActivationStatus        `json:"status"`
	SubmitDate          string                  `json:"submitDate"`
	UpdateDate          string                  `json:"updateDate"`
	Note                string                  `json:"note"`
	NotifyEmails        []string                `json:"notifyEmails"`
	FMAActivationState  string                  `json:"fmaActivationState"`
	FallbackInfo        *ActivationFallbackInfo `json:"fallbackInfo"`
	IncludeID           string                  `json:"includeId"`
	IncludeName         string                  `json:"includeName"`
	IncludeType         IncludeType             `json:"includeType"`
	IncludeVersion      int                     `json:"includeVersion"`
	IncludeActivationID string                  `json:"includeActivationId"`
}

IncludeActivation represents an include activation object

type IncludeActivations

type IncludeActivations interface {
	// ActivateInclude creates a new include activation, which deactivates any current activation
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/post-include-activation
	ActivateInclude(context.Context, ActivateIncludeRequest) (*ActivationIncludeResponse, error)

	// DeactivateInclude deactivates the include activation
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/post-include-activation
	DeactivateInclude(context.Context, DeactivateIncludeRequest) (*DeactivationIncludeResponse, error)

	// CancelIncludeActivation cancels specified include activation, if it is still in `PENDING` state
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/delete-include-activation
	CancelIncludeActivation(context.Context, CancelIncludeActivationRequest) (*CancelIncludeActivationResponse, error)

	// GetIncludeActivation gets details about an activation
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-include-activation
	GetIncludeActivation(context.Context, GetIncludeActivationRequest) (*GetIncludeActivationResponse, error)

	// ListIncludeActivations lists all activations for all versions of the include, on both production and staging networks
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-include-activations
	ListIncludeActivations(context.Context, ListIncludeActivationsRequest) (*ListIncludeActivationsResponse, error)
}

IncludeActivations contains operations available on IncludeVersion resource

type IncludeActivationsRes

type IncludeActivationsRes struct {
	Items []IncludeActivation `json:"items"`
}

IncludeActivationsRes represents Activations object

type IncludeItems

type IncludeItems struct {
	Items []Include `json:"items"`
}

IncludeItems represents a list of Include objects

type IncludeRules

type IncludeRules interface {
	// GetIncludeRuleTree gets the entire rule tree for an include version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-include-version-rules
	GetIncludeRuleTree(context.Context, GetIncludeRuleTreeRequest) (*GetIncludeRuleTreeResponse, error)

	// UpdateIncludeRuleTree updates the rule tree for an include version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/patch-include-version-rules
	UpdateIncludeRuleTree(context.Context, UpdateIncludeRuleTreeRequest) (*UpdateIncludeRuleTreeResponse, error)
}

IncludeRules contains operations available on IncludeRule resource

type IncludeType

type IncludeType string

IncludeType is type of include

const (
	// IncludeTypeMicroServices is used for creating a new microservices include
	IncludeTypeMicroServices IncludeType = "MICROSERVICES"

	// IncludeTypeCommonSettings is used for creating a new common_settings include
	IncludeTypeCommonSettings IncludeType = "COMMON_SETTINGS"
)

type IncludeVersion

type IncludeVersion struct {
	UpdatedByUser    string        `json:"updatedByUser"`
	UpdatedDate      string        `json:"updatedDate"`
	ProductionStatus VersionStatus `json:"productionStatus"`
	Etag             string        `json:"etag"`
	ProductID        string        `json:"productId"`
	Note             string        `json:"note,omitempty"`
	RuleFormat       string        `json:"ruleFormat,omitempty"`
	IncludeVersion   int           `json:"includeVersion"`
	StagingStatus    VersionStatus `json:"stagingStatus"`
}

IncludeVersion represents an include version object

type IncludeVersionRequest

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

IncludeVersionRequest contains body parameters used to create a new include version

type IncludeVersions

type IncludeVersions interface {
	// CreateIncludeVersion creates a new include version based on any previous version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/post-include-versions
	CreateIncludeVersion(context.Context, CreateIncludeVersionRequest) (*CreateIncludeVersionResponse, error)

	// GetIncludeVersion polls the state of a specific include version, for example to check its activation status
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-include-version
	GetIncludeVersion(context.Context, GetIncludeVersionRequest) (*GetIncludeVersionResponse, error)

	// ListIncludeVersions lists the include versions, with results limited to the 500 most recent versions
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-include-versions
	ListIncludeVersions(context.Context, ListIncludeVersionsRequest) (*ListIncludeVersionsResponse, error)

	// ListIncludeVersionAvailableCriteria lists available criteria for the include version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-include-available-criteria
	ListIncludeVersionAvailableCriteria(context.Context, ListAvailableCriteriaRequest) (*AvailableCriteriaResponse, error)

	// ListIncludeVersionAvailableBehaviors lists available behaviors for the include version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-include-available-behaviors
	ListIncludeVersionAvailableBehaviors(context.Context, ListAvailableBehaviorsRequest) (*AvailableBehaviorsResponse, error)
}

IncludeVersions contains operations available on IncludeVersion resource

type Includes

type Includes interface {
	// ListIncludes lists Includes available for the current contract and group
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-includes
	ListIncludes(context.Context, ListIncludesRequest) (*ListIncludesResponse, error)

	// ListIncludeParents lists parents of a specific Include
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-include-parents
	ListIncludeParents(context.Context, ListIncludeParentsRequest) (*ListIncludeParentsResponse, error)

	// GetInclude gets information about a specific Include
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-include
	GetInclude(context.Context, GetIncludeRequest) (*GetIncludeResponse, error)

	// CreateInclude creates a new Include
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/post-includes
	CreateInclude(context.Context, CreateIncludeRequest) (*CreateIncludeResponse, error)

	// DeleteInclude deletes an Include
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/delete-include
	DeleteInclude(context.Context, DeleteIncludeRequest) (*DeleteIncludeResponse, error)
}

Includes contains operations available on Include resource

type ListAvailableBehaviorsRequest

type ListAvailableBehaviorsRequest struct {
	IncludeID string
	Version   int
}

ListAvailableBehaviorsRequest contains parameters used to get available include version behaviors

func (ListAvailableBehaviorsRequest) Validate

func (i ListAvailableBehaviorsRequest) Validate() error

Validate validates ListAvailableBehaviorsRequest

type ListAvailableCriteriaRequest

type ListAvailableCriteriaRequest struct {
	IncludeID string
	Version   int
}

ListAvailableCriteriaRequest contains parameters used to get available include version criteria

func (ListAvailableCriteriaRequest) Validate

func (i ListAvailableCriteriaRequest) Validate() error

Validate validates ListAvailableCriteriaRequest

type ListAvailableIncludesRequest

type ListAvailableIncludesRequest ListAvailableReferencedIncludesRequest

ListAvailableIncludesRequest contains path and query params required to fetch list of available includes

func (ListAvailableIncludesRequest) Validate

func (v ListAvailableIncludesRequest) Validate() error

Validate validates ListAvailableIncludesRequest

type ListAvailableIncludesResponse

type ListAvailableIncludesResponse struct {
	AvailableIncludes []ExternalIncludeData
}

ListAvailableIncludesResponse contains response received when fetching list of available includes

func (*ListAvailableIncludesResponse) UnmarshalJSON

func (r *ListAvailableIncludesResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON reads a ListAvailableIncludesResponse struct from its data argument and transform map of includes into array for better usability.

type ListAvailableReferencedIncludesRequest

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

ListAvailableReferencedIncludesRequest common request struct for ListReferencedIncludesRequest and ListAvailableIncludesRequest

type ListIncludeActivationsRequest

type ListIncludeActivationsRequest struct {
	IncludeID  string
	ContractID string
	GroupID    string
}

ListIncludeActivationsRequest contains parameters used to list the include activations

func (ListIncludeActivationsRequest) Validate

func (i ListIncludeActivationsRequest) Validate() error

Validate validates ListIncludeActivationsRequest

type ListIncludeActivationsResponse

type ListIncludeActivationsResponse struct {
	AccountID   string                `json:"accountId"`
	ContractID  string                `json:"contractId"`
	GroupID     string                `json:"groupId"`
	Activations IncludeActivationsRes `json:"activations"`
}

ListIncludeActivationsResponse represents a response object returned by ListIncludeActivations

type ListIncludeParentsRequest

type ListIncludeParentsRequest struct {
	ContractID string
	GroupID    string
	IncludeID  string
}

ListIncludeParentsRequest contains parameters used to list parents of an include

func (ListIncludeParentsRequest) Validate

func (i ListIncludeParentsRequest) Validate() error

Validate validates ListIncludeParentsRequest

type ListIncludeParentsResponse

type ListIncludeParentsResponse struct {
	Properties ParentPropertyItems `json:"properties"`
}

ListIncludeParentsResponse represents a response object returned by ListIncludeParents

type ListIncludeVersionsRequest

type ListIncludeVersionsRequest struct {
	IncludeID  string
	ContractID string
	GroupID    string
}

ListIncludeVersionsRequest contains parameters used to list the include versions

func (ListIncludeVersionsRequest) Validate

func (i ListIncludeVersionsRequest) Validate() error

Validate validates ListIncludeVersionsRequest

type ListIncludeVersionsResponse

type ListIncludeVersionsResponse struct {
	IncludeID       string      `json:"includeId"`
	IncludeName     string      `json:"includeName"`
	AccountID       string      `json:"accountId"`
	ContractID      string      `json:"contractId"`
	GroupID         string      `json:"groupId"`
	AssetID         string      `json:"assetId"`
	IncludeType     IncludeType `json:"includeType"`
	IncludeVersions Versions    `json:"versions"`
}

ListIncludeVersionsResponse represents a response object returned by ListIncludeVersions

type ListIncludesRequest

type ListIncludesRequest struct {
	ContractID string
	GroupID    string
}

ListIncludesRequest contains parameters used to list includes

func (ListIncludesRequest) Validate

func (i ListIncludesRequest) Validate() error

Validate validates ListIncludesRequest

type ListIncludesResponse

type ListIncludesResponse struct {
	Includes IncludeItems `json:"includes"`
}

ListIncludesResponse represents a response object returned by ListIncludes

type ListReferencedIncludesRequest

type ListReferencedIncludesRequest ListAvailableReferencedIncludesRequest

ListReferencedIncludesRequest contains path and query params required to fetch list of referenced includes

func (ListReferencedIncludesRequest) Validate

func (v ListReferencedIncludesRequest) Validate() error

Validate validates ListReferencedIncludesRequest

type ListReferencedIncludesResponse

type ListReferencedIncludesResponse struct {
	Includes IncludeItems `json:"includes"`
}

ListReferencedIncludesResponse contains response received when fetching list of referenced includes The response from the API is a map, but we convert it to the array for better usability.

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) ActivateInclude

func (*Mock) CancelActivation

func (*Mock) CreateActivation

func (*Mock) CreateCPCode

func (p *Mock) CreateCPCode(ctx context.Context, r CreateCPCodeRequest) (*CreateCPCodeResponse, error)

func (*Mock) CreateEdgeHostname

func (*Mock) CreateInclude

func (p *Mock) CreateInclude(ctx context.Context, r CreateIncludeRequest) (*CreateIncludeResponse, error)

func (*Mock) CreateProperty

func (p *Mock) CreateProperty(ctx context.Context, r CreatePropertyRequest) (*CreatePropertyResponse, error)

func (*Mock) DeactivateInclude

func (*Mock) DeleteInclude

func (p *Mock) DeleteInclude(ctx context.Context, r DeleteIncludeRequest) (*DeleteIncludeResponse, error)

func (*Mock) GetActivation

func (p *Mock) GetActivation(ctx context.Context, r GetActivationRequest) (*GetActivationResponse, error)

func (*Mock) GetActivations

func (p *Mock) GetActivations(ctx context.Context, r GetActivationsRequest) (*GetActivationsResponse, error)

func (*Mock) GetAvailableBehaviors

func (p *Mock) GetAvailableBehaviors(ctx context.Context, r GetAvailableBehaviorsRequest) (*GetBehaviorsResponse, error)

func (*Mock) GetAvailableCriteria

func (p *Mock) GetAvailableCriteria(ctx context.Context, r GetAvailableCriteriaRequest) (*GetCriteriaResponse, error)

func (*Mock) GetCPCode

func (p *Mock) GetCPCode(ctx context.Context, r GetCPCodeRequest) (*GetCPCodesResponse, error)

func (*Mock) GetCPCodeDetail

func (p *Mock) GetCPCodeDetail(ctx context.Context, r int) (*CPCodeDetailResponse, error)

func (*Mock) GetCPCodes

func (p *Mock) GetCPCodes(ctx context.Context, r GetCPCodesRequest) (*GetCPCodesResponse, error)

func (*Mock) GetClientSettings

func (p *Mock) GetClientSettings(ctx context.Context) (*ClientSettingsBody, error)

func (*Mock) GetContracts

func (p *Mock) GetContracts(ctx context.Context) (*GetContractsResponse, error)

func (*Mock) GetEdgeHostname

func (*Mock) GetEdgeHostnames

func (*Mock) GetGroups

func (p *Mock) GetGroups(ctx context.Context) (*GetGroupsResponse, error)

func (*Mock) GetInclude

func (p *Mock) GetInclude(ctx context.Context, r GetIncludeRequest) (*GetIncludeResponse, error)

func (*Mock) GetIncludeRuleTree

func (*Mock) GetIncludeVersion

func (*Mock) GetLatestVersion

func (*Mock) GetProducts

func (p *Mock) GetProducts(ctx context.Context, r GetProductsRequest) (*GetProductsResponse, error)

func (*Mock) GetProperties

func (p *Mock) GetProperties(ctx context.Context, r GetPropertiesRequest) (*GetPropertiesResponse, error)

func (*Mock) GetProperty

func (p *Mock) GetProperty(ctx context.Context, r GetPropertyRequest) (*GetPropertyResponse, error)

func (*Mock) GetRuleFormats

func (p *Mock) GetRuleFormats(ctx context.Context) (*GetRuleFormatsResponse, error)

func (*Mock) GetRuleTree

func (p *Mock) GetRuleTree(ctx context.Context, r GetRuleTreeRequest) (*GetRuleTreeResponse, error)

func (*Mock) ListIncludeParents

func (*Mock) ListIncludeVersionAvailableBehaviors

func (p *Mock) ListIncludeVersionAvailableBehaviors(ctx context.Context, r ListAvailableBehaviorsRequest) (*AvailableBehaviorsResponse, error)

func (*Mock) ListIncludeVersionAvailableCriteria

func (p *Mock) ListIncludeVersionAvailableCriteria(ctx context.Context, r ListAvailableCriteriaRequest) (*AvailableCriteriaResponse, error)

func (*Mock) ListIncludes

func (p *Mock) ListIncludes(ctx context.Context, r ListIncludesRequest) (*ListIncludesResponse, error)

func (*Mock) OnCreateCPCode

func (p *Mock) OnCreateCPCode(impl CreateCPCodeFn, args ...interface{}) *mock.Call

func (*Mock) OnGetCPCodes

func (p *Mock) OnGetCPCodes(impl GetCPCodesFn, args ...interface{}) *mock.Call

func (*Mock) OnGetGroups

func (p *Mock) OnGetGroups(ctx interface{}, impl GetGroupsFn) *mock.Call

func (*Mock) OnGetProperty

func (p *Mock) OnGetProperty(ctx, req interface{}, impl GetPropertyFunc) *mock.Call

func (*Mock) OnGetPropertyVersionHostnames

func (p *Mock) OnGetPropertyVersionHostnames(ctx, req interface{}, impl GetPropertyVersionHostnamesFn) *mock.Call

func (*Mock) OnGetPropertyVersions

func (p *Mock) OnGetPropertyVersions(ctx, req interface{}, impl GetPropertyVersionsFn) *mock.Call

func (*Mock) OnGetRuleTree

func (p *Mock) OnGetRuleTree(ctx, req interface{}, impl GetRuleTreeFn) *mock.Call

func (*Mock) OnUpdateCPCode

func (p *Mock) OnUpdateCPCode(impl UpdateCPCodeFn, args ...interface{}) *mock.Call

func (*Mock) OnUpdateRuleTree

func (p *Mock) OnUpdateRuleTree(ctx, req interface{}, impl UpdateRuleTreeFn) *mock.Call

func (*Mock) RemoveProperty

func (p *Mock) RemoveProperty(ctx context.Context, r RemovePropertyRequest) (*RemovePropertyResponse, error)

func (*Mock) SearchProperties

func (p *Mock) SearchProperties(ctx context.Context, r SearchRequest) (*SearchResponse, error)

func (*Mock) UpdateCPCode

func (p *Mock) UpdateCPCode(ctx context.Context, r UpdateCPCodeRequest) (*CPCodeDetailResponse, error)

func (*Mock) UpdateClientSettings

func (p *Mock) UpdateClientSettings(ctx context.Context, r ClientSettingsBody) (*ClientSettingsBody, error)

func (*Mock) UpdateRuleTree

func (p *Mock) UpdateRuleTree(ctx context.Context, r UpdateRulesRequest) (*UpdateRulesResponse, error)

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://techdocs.akamai.com/property-mgr/reference/id-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 ParentProperty

type ParentProperty struct {
	AccountID         string `json:"accountId"`
	AssetID           string `json:"assetId"`
	ContractID        string `json:"contractId"`
	GroupID           string `json:"groupId"`
	ProductionVersion *int   `json:"productionVersion,omitempty"`
	PropertyID        string `json:"propertyId"`
	PropertyName      string `json:"propertyName"`
	StagingVersion    *int   `json:"stagingVersion,omitempty"`
}

ParentProperty represents an include parent object

type ParentPropertyItems

type ParentPropertyItems struct {
	Items []ParentProperty `json:"items"`
}

ParentPropertyItems represents a list of ParentProperty objects

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://techdocs.akamai.com/property-mgr/reference/get-products
	GetProducts(context.Context, GetProductsRequest) (*GetProductsResponse, error)
}

Products contains operations available on Products resource

type ProductsItems

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

ProductsItems contains a list of ProductItem

type Properties

type Properties interface {
	// GetProperties lists properties available for the current contract and group
	//
	// https://techdocs.akamai.com/property-mgr/reference/get-products
	GetProperties(ctx context.Context, r GetPropertiesRequest) (*GetPropertiesResponse, error)

	// CreateProperty creates a new property from scratch or bases one on another property's rule tree and optionally its set of assigned hostnames
	//
	// https://techdocs.akamai.com/property-mgr/reference/post-properties
	CreateProperty(ctx context.Context, params CreatePropertyRequest) (*CreatePropertyResponse, error)

	// GetProperty gets a specific property
	//
	// https://techdocs.akamai.com/property-mgr/reference/get-property
	GetProperty(ctx context.Context, params GetPropertyRequest) (*GetPropertyResponse, error)

	// RemoveProperty removes a specific property, which you can only do if none of its versions are currently active
	//
	// https://techdocs.akamai.com/property-mgr/reference/delete-property
	RemoveProperty(ctx context.Context, params RemovePropertyRequest) (*RemovePropertyResponse, error)
}

Properties contains operations available on Property resource

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 PropertyRules

type PropertyRules interface {
	// GetRuleTree gets the entire rule tree for a property version.
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-property-version-rules
	GetRuleTree(context.Context, GetRuleTreeRequest) (*GetRuleTreeResponse, error)

	// UpdateRuleTree updates the rule tree for a property version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/put-property-version-rules
	UpdateRuleTree(context.Context, UpdateRulesRequest) (*UpdateRulesResponse, error)
}

PropertyRules contains operations available on PropertyRule resource

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://techdocs.akamai.com/property-mgr/reference/get-property-version-hostnames
	GetPropertyVersionHostnames(context.Context, GetPropertyVersionHostnamesRequest) (*GetPropertyVersionHostnamesResponse, error)

	// UpdatePropertyVersionHostnames modifies the set of hostnames for a property version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/patch-property-version-hostnames
	UpdatePropertyVersionHostnames(context.Context, UpdatePropertyVersionHostnamesRequest) (*UpdatePropertyVersionHostnamesResponse, error)
}

PropertyVersionHostnames contains operations available on PropertyVersionHostnames resource

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://techdocs.akamai.com/property-mgr/reference/get-property-versions
	GetPropertyVersions(context.Context, GetPropertyVersionsRequest) (*GetPropertyVersionsResponse, error)

	// GetPropertyVersion fetches specific property version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-property-version
	GetPropertyVersion(context.Context, GetPropertyVersionRequest) (*GetPropertyVersionsResponse, error)

	// CreatePropertyVersion creates a new property version and returns location and number for the new version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/post-property-versions
	CreatePropertyVersion(context.Context, CreatePropertyVersionRequest) (*CreatePropertyVersionResponse, error)

	// GetLatestVersion fetches the latest property version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-latest-property-version
	GetLatestVersion(context.Context, GetLatestVersionRequest) (*GetPropertyVersionsResponse, error)

	// GetAvailableBehaviors fetches a list of available behaviors for given property version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-available-behaviors
	GetAvailableBehaviors(context.Context, GetAvailableBehaviorsRequest) (*GetBehaviorsResponse, error)

	// GetAvailableCriteria fetches a list of available criteria for given property version
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-available-criteria
	GetAvailableCriteria(context.Context, GetAvailableCriteriaRequest) (*GetCriteriaResponse, error)

	// ListAvailableIncludes lists external resources that can be applied within a property version's rules
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-property-version-external-resources
	ListAvailableIncludes(context.Context, ListAvailableIncludesRequest) (*ListAvailableIncludesResponse, error)

	// ListReferencedIncludes lists referenced includes for parent property
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/get-property-version-includes
	ListReferencedIncludes(context.Context, ListReferencedIncludesRequest) (*ListReferencedIncludesResponse, error)
}

PropertyVersions contains operations available on PropertyVersions resource

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://techdocs.akamai.com/property-mgr/reference/get-rule-formats
	GetRuleFormats(context.Context) (*GetRuleFormatsResponse, error)
}

RuleFormats contains operations available on RuleFormat resource

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 {
	// SearchProperties searches properties by name, or by the hostname or edge hostname for which it’s currently active
	//
	// See: https://techdocs.akamai.com/property-mgr/reference/post-search-find-by-value
	SearchProperties(context.Context, SearchRequest) (*SearchResponse, error)
}

Search contains SearchProperty method used for fetching properties

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

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 UpdateCPCodeFn

UpdateCPCodeFn is any function having the same signature as UpdateCPCode

type UpdateCPCodeRequest

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

func (cp UpdateCPCodeRequest) Validate() error

Validate validates UpdateCPCodeRequest

type UpdateIncludeResponseHeaders

type UpdateIncludeResponseHeaders struct {
	ElementsPerPropertyRemaining      string
	ElementsPerPropertyTotal          string
	MaxNestedRulesPerIncludeRemaining string
	MaxNestedRulesPerIncludeTotal     string
}

UpdateIncludeResponseHeaders contains information received in response headers when making a UpdateIncludeRuleTree request

type UpdateIncludeRuleTreeRequest

type UpdateIncludeRuleTreeRequest struct {
	ContractID     string
	DryRun         bool
	GroupID        string
	IncludeID      string
	IncludeVersion int
	Rules          RulesUpdate
	ValidateMode   string
	ValidateRules  bool
}

UpdateIncludeRuleTreeRequest contains path and query params, as well as request body necessary to perform UpdateIncludeRuleTree

func (UpdateIncludeRuleTreeRequest) Validate

func (i UpdateIncludeRuleTreeRequest) Validate() error

Validate validates UpdateIncludeRuleTreeRequest struct

type UpdateIncludeRuleTreeResponse

type UpdateIncludeRuleTreeResponse struct {
	Response
	ResponseHeaders UpdateIncludeResponseHeaders
	Comments        string      `json:"comments,omitempty"`
	Etag            string      `json:"etag"`
	IncludeID       string      `json:"includeId"`
	IncludeName     string      `json:"includeName"`
	IncludeType     IncludeType `json:"includeType"`
	IncludeVersion  int         `json:"includeVersion"`
	RuleFormat      string      `json:"ruleFormat"`
	Rules           Rules       `json:"rules"`
}

UpdateIncludeRuleTreeResponse contains data returned by performing UpdateIncludeRuleTree request

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 UpdateRuleTreeFn

type UpdateRuleTreeFn func(context.Context, UpdateRulesRequest) (*UpdateRulesResponse, error)

UpdateRuleTreeFn is any function having the same signature as UpdateRuleTree

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

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 ValidationProgress

type ValidationProgress struct {
	ErrorItems []ErrorItem `json:"errorItemsList"`
}

ValidationProgress represents include activation validation progress object

type ValidationSummary

type ValidationSummary struct {
	CompletePercent      float64 `json:"completePercent"`
	HasValidationError   bool    `json:"hasValidationError"`
	HasValidationWarning bool    `json:"hasValidationWarning"`
	HasSystemError       bool    `json:"hasSystemError"`
	HasClientError       bool    `json:"hasClientError"`
	MessageState         string  `json:"messageState"`
}

ValidationSummary represent include activation validation summary object

type Validations

type Validations struct {
	ValidationSummary          ValidationSummary  `json:"validationSummary"`
	ValidationProgressItemList ValidationProgress `json:"validationProgressItemList"`
	Network                    ActivationNetwork  `json:"network"`
}

Validations represent include activation validation object

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"
)

type Versions

type Versions struct {
	Items []IncludeVersion `json:"items"`
}

Versions represents IncludeVersions object

Jump to

Keyboard shortcuts

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