Documentation ¶
Overview ¶
Package papi provides a simple wrapper for the Akamai Property Manager API
Index ¶
- Constants
- Variables
- func Init(config edgegrid.Config)
- type Activation
- func (activation *Activation) Cancel(property *Property) error
- func (activation *Activation) GetActivation(property *Property) (time.Duration, error)
- func (activation *Activation) Init()
- func (activation *Activation) PollStatus(property *Property) bool
- func (activation *Activation) Save(property *Property, acknowledgeWarnings bool) error
- type ActivationComplianceRecord
- type ActivationValue
- type Activations
- func (activations *Activations) GetActivations(property *Property) error
- func (activations *Activations) GetLatestActivation(network NetworkValue, status StatusValue) (*Activation, error)
- func (activations *Activations) GetLatestProductionActivation(status StatusValue) (*Activation, error)
- func (activations *Activations) GetLatestStagingActivation(status StatusValue) (*Activation, error)
- type AvailableBehavior
- type AvailableBehaviors
- type AvailableCriteria
- type Behavior
- type ClientSettings
- type ClonePropertyFrom
- type CnameTypeValue
- type Contract
- type Contracts
- type CpCode
- type CpCodes
- type Criteria
- type CustomBehavior
- type CustomBehaviors
- type CustomOverride
- type CustomOverrides
- type EdgeHostname
- type EdgeHostnames
- func (edgeHostnames *EdgeHostnames) AddEdgeHostname(edgeHostname *EdgeHostname)
- func (edgeHostnames *EdgeHostnames) FindEdgeHostname(edgeHostname *EdgeHostname) (*EdgeHostname, error)
- func (edgeHostnames *EdgeHostnames) GetEdgeHostnames(contract *Contract, group *Group, options string) error
- func (edgeHostnames *EdgeHostnames) NewEdgeHostname() *EdgeHostname
- func (edgeHostnames *EdgeHostnames) PostUnmarshalJSON() error
- type Group
- func (group *Group) GetCpCodes(contract *Contract) (*CpCodes, error)
- func (group *Group) GetEdgeHostnames(contract *Contract, options string) (*EdgeHostnames, error)
- func (group *Group) GetGroup()
- func (group *Group) GetProperties(contract *Contract) (*Properties, error)
- func (group *Group) NewProperty(contract *Contract) (*Property, error)
- type Groups
- type Hostname
- type Hostnames
- type NetworkValue
- type OptionValue
- type Product
- type Products
- type Properties
- func (properties *Properties) AddProperty(newProperty *Property)
- func (properties *Properties) FindProperty(id string) (*Property, error)
- func (properties *Properties) GetProperties(contract *Contract, group *Group) error
- func (properties *Properties) NewProperty(contract *Contract, group *Group) *Property
- func (properties *Properties) PostUnmarshalJSON() error
- type Property
- func (property *Property) Activate(activation *Activation, acknowledgeWarnings bool) error
- func (property *Property) Delete() error
- func (property *Property) GetActivations() (*Activations, error)
- func (property *Property) GetAvailableBehaviors() (*AvailableBehaviors, error)
- func (property *Property) GetHostnames(version *Version) (*Hostnames, error)
- func (property *Property) GetLatestVersion(activatedOn NetworkValue) (*Version, error)
- func (property *Property) GetProperty() error
- func (property *Property) GetRules() (*Rules, error)
- func (property *Property) GetRulesDigest() (string, error)
- func (property *Property) GetVersions() (*Versions, error)
- func (property *Property) PostUnmarshalJSON() error
- func (property *Property) PreMarshalJSON() error
- func (property *Property) Save() error
- type Rule
- func (rule *Rule) AddBehavior(behavior *Behavior)
- func (rule *Rule) AddChildRule(childRule *Rule)
- func (rule *Rule) AddCriteria(criteria *Criteria)
- func (rule *Rule) AddVariable(variable *Variable)
- func (rule *Rule) MergeBehavior(behavior *Behavior)
- func (rule *Rule) MergeChildRule(childRule *Rule)
- func (rule *Rule) MergeCriteria(criteria *Criteria)
- type RuleCriteriaMustSatisfyValue
- type RuleErrors
- type RuleFormats
- type Rules
- func (rules *Rules) FindBehavior(path string) (*Behavior, error)
- func (rules *Rules) FindCriteria(path string) (*Criteria, error)
- func (rules *Rules) FindParentRule(path string) (*Rule, error)
- func (rules *Rules) FindRule(path string) (*Rule, error)
- func (rules *Rules) FindVariable(path string) (*Variable, error)
- func (rules *Rules) Freeze(format string) error
- func (rules *Rules) GetRules(property *Property) error
- func (rules *Rules) GetRulesDigest(property *Property) (string, error)
- func (rules *Rules) PreMarshalJSON() error
- func (rules *Rules) Save() error
- type SearchKey
- type SearchResult
- type StatusValue
- type Variable
- type Version
- type Versions
- func (versions *Versions) AddVersion(version *Version)
- func (versions *Versions) GetLatestVersion(activatedOn NetworkValue) (*Version, error)
- func (versions *Versions) GetVersions(property *Property) error
- func (versions *Versions) NewVersion(createFromVersion *Version, useEtagStrict bool) *Version
- func (versions *Versions) PostUnmarshalJSON() error
Constants ¶
const ( // ActivationTypeActivate Activation.ActivationType value ACTIVATE ActivationTypeActivate ActivationValue = "ACTIVATE" // ActivationTypeDeactivate Activation.ActivationType value DEACTIVATE ActivationTypeDeactivate ActivationValue = "DEACTIVATE" // NetworkProduction Activation.Network value PRODUCTION NetworkProduction NetworkValue = "PRODUCTION" // NetworkStaging Activation.Network value STAGING NetworkStaging NetworkValue = "STAGING" // StatusActive Activation.Status value ACTIVE StatusActive StatusValue = "ACTIVE" // StatusInactive Activation.Status value INACTIVE StatusInactive StatusValue = "INACTIVE" // StatusPending Activation.Status value PENDING StatusPending StatusValue = "PENDING" // StatusZone1 Activation.Status value ZONE_1 StatusZone1 StatusValue = "ZONE_1" // StatusZone2 Activation.Status value ZONE_2 StatusZone2 StatusValue = "ZONE_2" // StatusZone3 Activation.Status value ZONE_3 StatusZone3 StatusValue = "ZONE_3" // StatusAborted Activation.Status value ABORTED StatusAborted StatusValue = "ABORTED" // StatusFailed Activation.Status value FAILED StatusFailed StatusValue = "FAILED" // StatusDeactivated Activation.Status value DEACTIVATED StatusDeactivated StatusValue = "DEACTIVATED" // StatusPendingDeactivation Activation.Status value PENDING_DEACTIVATION StatusPendingDeactivation StatusValue = "PENDING_DEACTIVATION" // StatusNew Activation.Status value NEW StatusNew StatusValue = "NEW" )
const ( ErrInvalidPath = iota ErrCriteriaNotFound ErrBehaviorNotFound ErrVariableNotFound ErrRuleNotFound ErrInvalidRules )
Error constants
Variables ¶
var (
Config edgegrid.Config
)
var ( ErrorMap = map[int]error{ ErrInvalidPath: errors.New("Invalid Path"), ErrCriteriaNotFound: errors.New("Criteria not found"), ErrBehaviorNotFound: errors.New("Behavior not found"), ErrVariableNotFound: errors.New("Variable not found"), ErrRuleNotFound: errors.New("Rule not found"), ErrInvalidRules: errors.New("Rule validation failed. See papi.Rules.Errors for details"), } )
Functions ¶
Types ¶
type Activation ¶
type Activation struct { client.Resource ActivationID string `json:"activationId,omitempty"` ActivationType ActivationValue `json:"activationType,omitempty"` AcknowledgeWarnings []string `json:"acknowledgeWarnings,omitempty"` ComplianceRecord *ActivationComplianceRecord `json:"complianceRecord,omitempty"` FastPush bool `json:"fastPush,omitempty"` IgnoreHTTPErrors bool `json:"ignoreHttpErrors,omitempty"` PropertyName string `json:"propertyName,omitempty"` PropertyID string `json:"propertyId,omitempty"` PropertyVersion int `json:"propertyVersion"` Network NetworkValue `json:"network"` Status StatusValue `json:"status,omitempty"` SubmitDate string `json:"submitDate,omitempty"` UpdateDate string `json:"updateDate,omitempty"` Note string `json:"note,omitempty"` NotifyEmails []string `json:"notifyEmails"` StatusChange chan bool `json:"-"` // contains filtered or unexported fields }
Activation represents a property activation resource
func NewActivation ¶
func NewActivation(parent *Activations) *Activation
NewActivation creates a new Activation
func (*Activation) Cancel ¶
func (activation *Activation) Cancel(property *Property) error
Cancel an activation in progress
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#cancelapendingactivation Endpoint: DELETE /papi/v1/properties/{propertyId}/activations/{activationId}{?contractId,groupId}
func (*Activation) GetActivation ¶
func (activation *Activation) GetActivation(property *Property) (time.Duration, error)
GetActivation populates the Activation resource
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getanactivation Endpoint: GET /papi/v1/properties/{propertyId}/activations/{activationId}{?contractId,groupId}
func (*Activation) Init ¶
func (activation *Activation) Init()
func (*Activation) PollStatus ¶
func (activation *Activation) PollStatus(property *Property) bool
PollStatus will responsibly poll till the property is active or an error occurs
The Activation.StatusChange is a channel that can be used to block on status changes. If a new valid status is returned, true will be sent to the channel, otherwise, false will be sent.
go activation.PollStatus(property) for activation.Status != edgegrid.StatusActive { select { case statusChanged := <-activation.StatusChange: if statusChanged == false { break } case <-time.After(time.Minute * 30): break } } if activation.Status == edgegrid.StatusActive { // Activation succeeded }
func (*Activation) Save ¶
func (activation *Activation) Save(property *Property, acknowledgeWarnings bool) error
Save activates a given property
If acknowledgeWarnings is true and warnings are returned on the first attempt, a second attempt is made, acknowledging the warnings.
See: Property.Activate() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#activateaproperty Endpoint: POST /papi/v1/properties/{propertyId}/activations/{?contractId,groupId}
type ActivationComplianceRecord ¶
type ActivationComplianceRecord struct {
NoncomplianceReason string `json:"noncomplianceReason,omitempty"`
}
type ActivationValue ¶
type ActivationValue string
ActivationValue is used to create an "enum" of possible Activation.ActivationType values
type Activations ¶
type Activations struct { client.Resource AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` Activations struct { Items []*Activation `json:"items"` } `json:"activations"` }
Activations is a collection of property activations
func (*Activations) GetActivations ¶
func (activations *Activations) GetActivations(property *Property) error
GetActivations retrieves activation data for a given property
See: Property.GetActivations() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listactivations Endpoint: GET /papi/v1/properties/{propertyId}/activations/{?contractId,groupId}
func (*Activations) GetLatestActivation ¶
func (activations *Activations) GetLatestActivation(network NetworkValue, status StatusValue) (*Activation, error)
GetLatestActivation gets the latest activation for the specified network
Default to NetworkProduction. Pass in a status to check for, defaults to StatusActive
This can return an activation OR a deactivation. Check activation.ActivationType and activation.Status for what you're looking for
func (*Activations) GetLatestProductionActivation ¶
func (activations *Activations) GetLatestProductionActivation(status StatusValue) (*Activation, error)
GetLatestProductionActivation retrieves the latest activation for the production network
Pass in a status to check for, defaults to StatusActive
func (*Activations) GetLatestStagingActivation ¶
func (activations *Activations) GetLatestStagingActivation(status StatusValue) (*Activation, error)
GetLatestStagingActivation retrieves the latest activation for the staging network
Pass in a status to check for, defaults to StatusActive
type AvailableBehavior ¶
type AvailableBehavior struct { client.Resource Name string `json:"name"` SchemaLink string `json:"schemaLink"` // contains filtered or unexported fields }
AvailableBehavior represents an available behavior resource
func NewAvailableBehavior ¶
func NewAvailableBehavior(parent *AvailableBehaviors) *AvailableBehavior
NewAvailableBehavior creates a new AvailableBehavior
func (*AvailableBehavior) GetSchema ¶
func (behavior *AvailableBehavior) GetSchema() (*gojsonschema.Schema, error)
GetSchema retrieves the JSON schema for an available behavior
type AvailableBehaviors ¶
type AvailableBehaviors struct { client.Resource ContractID string `json:"contractId"` GroupID string `json:"groupId"` ProductID string `json:"productId"` RuleFormat string `json:"ruleFormat"` Behaviors struct { Items []AvailableBehavior `json:"items"` } `json:"behaviors"` }
AvailableBehaviors represents a collection of available rule behaviors
func GetAvailableBehaviors ¶
func GetAvailableBehaviors(property *Property) (*AvailableBehaviors, error)
GetAvailableBehaviors retrieves all available behaviors for a property
func NewAvailableBehaviors ¶
func NewAvailableBehaviors() *AvailableBehaviors
NewAvailableBehaviors creates a new AvailableBehaviors
func (*AvailableBehaviors) GetAvailableBehaviors ¶
func (availableBehaviors *AvailableBehaviors) GetAvailableBehaviors(property *Property) error
GetAvailableBehaviors retrieves available behaviors for a given property
See: Property.GetAvailableBehaviors API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listavailablebehaviors Endpoint: GET /papi/v1/properties/{propertyId}/versions/{propertyVersion}/available-behaviors{?contractId,groupId}
func (*AvailableBehaviors) PostUnmarshalJSON ¶
func (availableBehaviors *AvailableBehaviors) PostUnmarshalJSON() error
PostUnmarshalJSON is called after JSON unmarshaling into EdgeHostnames
See: jsonhooks-v1/jsonhooks.Unmarshal()
type AvailableCriteria ¶
type AvailableCriteria struct { client.Resource ContractID string `json:"contractId"` GroupID string `json:"groupId"` ProductID string `json:"productId"` RuleFormat string `json:"ruleFormat"` AvailableCriteria struct { Items []struct { Name string `json:"name"` SchemaLink string `json:"schemaLink"` } `json:"items"` } `json:"availableCriteria"` }
AvailableCriteria represents a collection of available rule criteria
func GetAvailableCriteria ¶
func GetAvailableCriteria(property *Property) (*AvailableCriteria, error)
GetAvailableCriteria retrieves all available criteria for a property
func NewAvailableCriteria ¶
func NewAvailableCriteria() *AvailableCriteria
NewAvailableCriteria creates a new AvailableCriteria
func (*AvailableCriteria) GetAvailableCriteria ¶
func (availableCriteria *AvailableCriteria) GetAvailableCriteria(property *Property) error
GetAvailableCriteria retrieves criteria available for a given property
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listavailablecriteria Endpoint: GET /papi/v1/properties/{propertyId}/versions/{propertyVersion}/available-criteria{?contractId,groupId}
type Behavior ¶
type Behavior struct { client.Resource Name string `json:"name"` Options OptionValue `json:"options"` Locked bool `json:"locked,omitempty"` UUID string `json:"uuid,omitempty"` }
Behavior represents a rule behavior resource
func (*Behavior) MergeOptions ¶ added in v0.5.0
func (behavior *Behavior) MergeOptions(newOptions OptionValue)
MergeOptions merges the given options with the existing options
type ClientSettings ¶
type ClientSettings struct { client.Resource RuleFormat string `json:"ruleFormat"` }
ClientSettings represents the PAPI client settings resource
func NewClientSettings ¶
func NewClientSettings() *ClientSettings
NewClientSettings creates a new ClientSettings
func (*ClientSettings) GetClientSettings ¶
func (clientSettings *ClientSettings) GetClientSettings() error
GetClientSettings populates ClientSettings
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getclientsettings Endpoint: GET /papi/v1/client-settings
func (*ClientSettings) Save ¶
func (clientSettings *ClientSettings) Save() error
Save updates client settings
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#updateclientsettings Endpoint: PUT /papi/v1/client-settings
type ClonePropertyFrom ¶
type ClonePropertyFrom struct { client.Resource PropertyID string `json:"propertyId"` Version int `json:"version"` CopyHostnames bool `json:"copyHostnames,omitempty"` CloneFromVersionEtag string `json:"cloneFromVersionEtag,omitempty"` }
ClonePropertyFrom represents
func NewClonePropertyFrom ¶
func NewClonePropertyFrom() *ClonePropertyFrom
NewClonePropertyFrom creates a new ClonePropertyFrom
type CnameTypeValue ¶
type CnameTypeValue string
CnameTypeValue is used to create an "enum" of possible Hostname.CnameType values
const ( // CnameTypeEdgeHostname Hostname.CnameType value EDGE_HOSTNAME CnameTypeEdgeHostname CnameTypeValue = "EDGE_HOSTNAME" )
type Contract ¶
type Contract struct { client.Resource ContractID string `json:"contractId"` ContractTypeName string `json:"contractTypeName"` // contains filtered or unexported fields }
Contract represents a property contract resource
func (*Contract) GetContract ¶
GetContract populates a Contract
func (*Contract) GetProducts ¶
GetProducts gets products associated with a contract
type Contracts ¶
type Contracts struct { client.Resource AccountID string `json:"accountId"` Contracts struct { Items []*Contract `json:"items"` } `json:"contracts"` }
Contracts represents a collection of property manager contracts
func (*Contracts) FindContract ¶ added in v0.5.0
FindContract finds a specific contract by ID
func (*Contracts) GetContracts ¶
GetContracts populates Contracts with contract data
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listcontracts Endpoint: GET /papi/v1/contracts
func (*Contracts) PostUnmarshalJSON ¶
PostUnmarshalJSON is called after JSON unmarshaling into EdgeHostnames
See: jsonhooks-v1/jsonhooks.Unmarshal()
type CpCode ¶
type CpCode struct { client.Resource CpcodeID string `json:"cpcodeId,omitempty"` CpcodeName string `json:"cpcodeName"` ProductID string `json:"productId,omitempty"` ProductIDs []string `json:"productIds,omitempty"` CreatedDate time.Time `json:"createdDate,omitempty"` // contains filtered or unexported fields }
CpCode represents a single CP Code
API Docs: https://developer.akamai.com/api/luna/papi/data.html#cpcode
func (*CpCode) GetCpCode ¶
GetCpCode populates the *CpCode with it's data
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getacpcode Endpoint: GET /papi/v1/cpcodes/{cpcodeId}{?contractId,groupId}
func (*CpCode) ID ¶
ID retrieves a CP Codes integer ID
PAPI Behaviors require the integer ID, rather than the prefixed string returned
func (*CpCode) Save ¶
Save will create a new CP Code. You cannot update a CP Code; trying to do so will result in an error.
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#createanewcpcode Endpoint: POST /papi/v1/cpcodes/{?contractId,groupId}
type CpCodes ¶
type CpCodes struct { client.Resource AccountID string `json:"accountId"` Contract *Contract `json:"-"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` Group *Group `json:"-"` CpCodes struct { Items []*CpCode `json:"items"` } `json:"cpcodes"` }
CpCodes represents a collection of CP Codes
See: CpCodes.GetCpCodes() API Docs: https://developer.akamai.com/api/luna/papi/data.html#cpcode
func GetCpCodes ¶
GetCpCodes creates a new CpCodes struct and populates it with all CP Codes associated with a contract/group
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listcpcodes
func NewCpCodes ¶
NewCpCodes creates a new *CpCodes
func (*CpCodes) GetCpCodes ¶
GetCpCodes populates a *CpCodes with it's related CP Codes
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listcpcodes Endpoint: GET /papi/v1/cpcodes/{?contractId,groupId}
func (*CpCodes) NewCpCode ¶
NewCpCode creates a new *CpCode associated with this *CpCodes as it's parent.
func (*CpCodes) PostUnmarshalJSON ¶
PostUnmarshalJSON is called after UnmarshalJSON to setup the structs internal state. The cpcodes.Complete channel is utilized to communicate full completion.
type Criteria ¶
type Criteria struct { client.Resource Name string `json:"name"` Options OptionValue `json:"options"` UUID string `json:"uuid,omitempty"` Locked bool `json:"locked,omitempty"` }
Criteria represents a rule criteria resource
func (*Criteria) MergeOptions ¶ added in v0.5.0
func (criteria *Criteria) MergeOptions(newOptions OptionValue)
MergeOptions merges the given options with the existing options
type CustomBehavior ¶ added in v0.5.0
type CustomBehavior struct { client.Resource BehaviorID string `json:"behaviorId,omitempty"` Description string `json:"description"` DisplayName string `json:"displayName"` Name string `json:"name"` Status string `json:"status",omitempty` UpdatedByUser string `json:"updatedByUser,omitempty"` UpdatedDate time.Time `json:"updatedDate,omitempty"` XML string `json:"xml,omitempty"` // contains filtered or unexported fields }
CustomBehavior represents a single Custom Behavior
API Docs: https://developer.akamai.com/api/luna/papi/data.html#custombehavior
func NewCustomBehavior ¶ added in v0.5.0
func NewCustomBehavior(behaviors *CustomBehaviors) *CustomBehavior
NewCustomBehavior creates a new *CustomBehavior
func (*CustomBehavior) GetCustomBehavior ¶ added in v0.5.0
func (behavior *CustomBehavior) GetCustomBehavior() error
GetCustomBehavior populates the *CustomBehavior with it's data
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getcustombehavior Endpoint: GET /papi/v1/custom-behaviors/{behaviorId}
type CustomBehaviors ¶ added in v0.5.0
type CustomBehaviors struct { client.Resource AccountID string `json:"accountId"` CustomBehaviors struct { Items []*CustomBehavior `json:"items"` } `json:"customBehaviors"` }
CustomBehaviors represents a collection of Custom Behaviors
See: CustomBehaviors.GetCustomBehaviors() API Docs: https://developer.akamai.com/api/luna/papi/data.html#custombehavior
func NewCustomBehaviors ¶ added in v0.5.0
func NewCustomBehaviors() *CustomBehaviors
NewCustomBehaviors creates a new *CustomBehaviors
func (*CustomBehaviors) AddCustomBehavior ¶ added in v0.5.0
func (behaviors *CustomBehaviors) AddCustomBehavior(behavior *CustomBehavior)
func (*CustomBehaviors) GetCustomBehaviors ¶ added in v0.5.0
func (behaviors *CustomBehaviors) GetCustomBehaviors() error
GetCustomBehaviors populates a *CustomBehaviors with it's related Custom Behaviors
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getcustombehaviors Endpoint: GET /papi/v1/custom-behaviors
func (*CustomBehaviors) PostUnmarshalJSON ¶ added in v0.5.0
func (behaviors *CustomBehaviors) PostUnmarshalJSON() error
PostUnmarshalJSON is called after UnmarshalJSON to setup the structs internal state. The cpcodes.Complete channel is utilized to communicate full completion.
type CustomOverride ¶ added in v0.5.0
type CustomOverride struct { client.Resource Description string `json:"description"` DisplayName string `json:"displayName"` Name string `json:"name"` OverrideID string `json:"overrideId,omitempty"` Status string `json:"status",omitempty` UpdatedByUser string `json:"updatedByUser,omitempty"` UpdatedDate time.Time `json:"updatedDate,omitempty"` XML string `json:"xml,omitempty"` // contains filtered or unexported fields }
CustomOverride represents a single Custom Override
API Docs: https://developer.akamai.com/api/luna/papi/data.html#customoverride
func NewCustomOverride ¶ added in v0.5.0
func NewCustomOverride(overrides *CustomOverrides) *CustomOverride
NewCustomOverride creates a new *CustomOverride
func (*CustomOverride) GetCustomOverride ¶ added in v0.5.0
func (override *CustomOverride) GetCustomOverride() error
GetCustomOverride populates the *CustomOverride with it's data
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getcustomoverride Endpoint: GET /papi/v1/custom-overrides/{overrideId}
type CustomOverrides ¶ added in v0.5.0
type CustomOverrides struct { client.Resource AccountID string `json:"accountId"` CustomOverrides struct { Items []*CustomOverride `json:"items"` } `json:"customOverrides"` }
CustomOverrides represents a collection of Custom Overrides
See: CustomerOverrides.GetCustomOverrides() API Docs: https://developer.akamai.com/api/luna/papi/data.html#cpcode
func NewCustomOverrides ¶ added in v0.5.0
func NewCustomOverrides() *CustomOverrides
NewCustomOverrides creates a new *CustomOverrides
func (*CustomOverrides) AddCustomOverride ¶ added in v0.5.0
func (overrides *CustomOverrides) AddCustomOverride(override *CustomOverride)
func (*CustomOverrides) GetCustomOverrides ¶ added in v0.5.0
func (overrides *CustomOverrides) GetCustomOverrides() error
GetCustomOverrides populates a *CustomOverrides with it's related Custom Overrides
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getcustomoverrides Endpoint: GET /papi/v1/custom-overrides
func (*CustomOverrides) PostUnmarshalJSON ¶ added in v0.5.0
func (overrides *CustomOverrides) PostUnmarshalJSON() error
PostUnmarshalJSON is called after UnmarshalJSON to setup the structs internal state. The CustomOverrides.Complete channel is utilized to communicate full completion.
type EdgeHostname ¶
type EdgeHostname struct { client.Resource EdgeHostnameID string `json:"edgeHostnameId,omitempty"` EdgeHostnameDomain string `json:"edgeHostnameDomain,omitempty"` ProductID string `json:"productId"` DomainPrefix string `json:"domainPrefix"` DomainSuffix string `json:"domainSuffix"` Status StatusValue `json:"status,omitempty"` Secure bool `json:"secure,omitempty"` IPVersionBehavior string `json:"ipVersionBehavior,omitempty"` MapDetailsSerialNumber int `json:"mapDetails:serialNumber,omitempty"` MapDetailsSlotNumber int `json:"mapDetails:slotNumber,omitempty"` MapDetailsMapDomain string `json:"mapDetails:mapDomain,omitempty"` StatusChange chan bool `json:"-"` // contains filtered or unexported fields }
EdgeHostname represents an Edge Hostname resource
func NewEdgeHostname ¶
func NewEdgeHostname(edgeHostnames *EdgeHostnames) *EdgeHostname
NewEdgeHostname creates a new EdgeHostname
func (*EdgeHostname) GetEdgeHostname ¶
func (edgeHostname *EdgeHostname) GetEdgeHostname(options string) error
GetEdgeHostname populates EdgeHostname with data
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getanedgehostname Endpoint: GET /papi/v1/edgehostnames/{edgeHostnameId}{?contractId,groupId,options}
func (*EdgeHostname) Init ¶
func (edgeHostname *EdgeHostname) Init()
func (*EdgeHostname) PollStatus ¶
func (edgeHostname *EdgeHostname) PollStatus(options string) bool
PollStatus will responsibly poll till the property is active or an error occurs
The EdgeHostname.StatusChange is a channel that can be used to block on status changes. If a new valid status is returned, true will be sent to the channel, otherwise, false will be sent.
go edgeHostname.PollStatus("") for edgeHostname.Status != edgegrid.StatusActive { select { case statusChanged := <-edgeHostname.StatusChange: if statusChanged == false { break } case <-time.After(time.Minute * 30): break } } if edgeHostname.Status == edgegrid.StatusActive { // EdgeHostname activated successfully }
func (*EdgeHostname) Save ¶
func (edgeHostname *EdgeHostname) Save(options string) error
Save creates a new Edge Hostname
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#createanewedgehostname Endpoint: POST /papi/v1/edgehostnames/{?contractId,groupId,options}
type EdgeHostnames ¶
type EdgeHostnames struct { client.Resource AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` EdgeHostnames struct { Items []*EdgeHostname `json:"items"` } `json:"edgeHostnames"` }
EdgeHostnames is a collection for PAPI Edge Hostname resources
func GetEdgeHostnames ¶
func GetEdgeHostnames(contract *Contract, group *Group, options string) (*EdgeHostnames, error)
GetEdgeHostnames retrieves all edge hostnames
func NewEdgeHostnames ¶
func NewEdgeHostnames() *EdgeHostnames
NewEdgeHostnames creates a new EdgeHostnames
func (*EdgeHostnames) AddEdgeHostname ¶
func (edgeHostnames *EdgeHostnames) AddEdgeHostname(edgeHostname *EdgeHostname)
func (*EdgeHostnames) FindEdgeHostname ¶
func (edgeHostnames *EdgeHostnames) FindEdgeHostname(edgeHostname *EdgeHostname) (*EdgeHostname, error)
func (*EdgeHostnames) GetEdgeHostnames ¶
func (edgeHostnames *EdgeHostnames) GetEdgeHostnames(contract *Contract, group *Group, options string) error
GetEdgeHostnames will populate EdgeHostnames with Edge Hostname data
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listedgehostnames Endpoint: GET /papi/v1/edgehostnames/{?contractId,groupId,options}
func (*EdgeHostnames) NewEdgeHostname ¶
func (edgeHostnames *EdgeHostnames) NewEdgeHostname() *EdgeHostname
NewEdgeHostname creates a new EdgeHostname within a given EdgeHostnames
func (*EdgeHostnames) PostUnmarshalJSON ¶
func (edgeHostnames *EdgeHostnames) PostUnmarshalJSON() error
PostUnmarshalJSON is called after JSON unmarshaling into EdgeHostnames
See: jsonhooks-v1/jsonhooks.Unmarshal()
type Group ¶
type Group struct { client.Resource GroupName string `json:"groupName"` GroupID string `json:"groupId"` ParentGroupID string `json:"parentGroupId,omitempty"` ContractIDs []string `json:"contractIds"` // contains filtered or unexported fields }
Group represents a group resource
func (*Group) GetCpCodes ¶
GetCpCodes retrieves all CP codes associated with a given group and contract
func (*Group) GetEdgeHostnames ¶
func (group *Group) GetEdgeHostnames(contract *Contract, options string) (*EdgeHostnames, error)
GetEdgeHostnames retrieves all Edge hostnames associated with a given group/contract
func (*Group) GetProperties ¶
func (group *Group) GetProperties(contract *Contract) (*Properties, error)
GetProperties retrieves all properties associated with a given group and contract
type Groups ¶
type Groups struct { client.Resource AccountID string `json:"accountId"` AccountName string `json:"accountName"` Groups struct { Items []*Group `json:"items"` } `json:"groups"` }
Groups represents a collection of PAPI groups
func (*Groups) GetGroups ¶
GetGroups populates Groups with group data
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listgroups Endpoint: GET /papi/v1/groups/
func (*Groups) PostUnmarshalJSON ¶
PostUnmarshalJSON is called after JSON unmarshaling into EdgeHostnames
See: jsonhooks-v1/jsonhooks.Unmarshal()
type Hostname ¶
type Hostname struct { client.Resource CnameType CnameTypeValue `json:"cnameType"` EdgeHostnameID string `json:"edgeHostnameId"` CnameFrom string `json:"cnameFrom"` CnameTo string `json:"cnameTo,omitempty"` // contains filtered or unexported fields }
Hostname represents a property hostname resource
type Hostnames ¶
type Hostnames struct { client.Resource 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 struct { Items []*Hostname `json:"items"` } `json:"hostnames"` }
Hostnames is a collection of Property Hostnames
func (*Hostnames) GetHostnames ¶
GetHostnames retrieves hostnames assigned to a given property
If no version is given, the latest version is used ¶
See: Property.GetHostnames() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listapropertyshostnames Endpoint: GET /papi/v1/properties/{propertyId}/versions/{propertyVersion}/hostnames/{?contractId,groupId}
func (*Hostnames) NewHostname ¶
NewHostname creates a new Hostname within a given Hostnames
func (*Hostnames) PostUnmarshalJSON ¶
PostUnmarshalJSON is called after JSON unmarshaling into EdgeHostnames
See: jsonhooks-v1/jsonhooks.Unmarshal()
type NetworkValue ¶
type NetworkValue string
NetworkValue is used to create an "enum" of possible Activation.Network values
type OptionValue ¶
type OptionValue map[string]interface{}
OptionValue represents a generic option value
OptionValue is a map with string keys, and any type of value. You can nest OptionValues as necessary to create more complex values.
type Product ¶
type Product struct { client.Resource ProductName string `json:"productName"` ProductID string `json:"productId"` // contains filtered or unexported fields }
Product represents a product resource
type Products ¶
type Products struct { client.Resource AccountID string `json:"accountId"` ContractID string `json:"contractId"` Products struct { Items []*Product `json:"items"` } `json:"products"` }
Products represents a collection of products
func GetProducts ¶
GetProducts retrieves all products
func (*Products) FindProduct ¶ added in v0.5.0
FindProduct finds a specific product by ID
func (*Products) GetProducts ¶
GetProducts populates Products with product data
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listproducts Endpoint: GET /papi/v1/products/{?contractId}
func (*Products) PostUnmarshalJSON ¶
PostUnmarshalJSON is called after JSON unmarshaling into EdgeHostnames
See: jsonhooks-v1/jsonhooks.Unmarshal()
type Properties ¶
type Properties struct { client.Resource Properties struct { Items []*Property `json:"items"` } `json:"properties"` }
Properties is a collection of PAPI Property resources
func GetProperties ¶
func GetProperties(contract *Contract, group *Group) (*Properties, error)
GetProperties retrieves all properties for a given contract/group
func (*Properties) AddProperty ¶
func (properties *Properties) AddProperty(newProperty *Property)
AddProperty adds a property to the collection, if the property already exists in the collection it will be replaced.
func (*Properties) FindProperty ¶
func (properties *Properties) FindProperty(id string) (*Property, error)
FindProperty finds a property by ID within the collection
func (*Properties) GetProperties ¶
func (properties *Properties) GetProperties(contract *Contract, group *Group) error
GetProperties populates Properties with property data
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listproperties Endpoint: GET /papi/v1/properties/{?contractId,groupId}
func (*Properties) NewProperty ¶
func (properties *Properties) NewProperty(contract *Contract, group *Group) *Property
NewProperty creates a new property associated with the collection
func (*Properties) PostUnmarshalJSON ¶
func (properties *Properties) PostUnmarshalJSON() error
PostUnmarshalJSON is called after JSON unmarshaling into EdgeHostnames
See: jsonhooks-v1/jsonhooks.Unmarshal()
type Property ¶
type Property struct { client.Resource AccountID string `json:"accountId,omitempty"` Contract *Contract `json:"-"` Group *Group `json:"-"` ContractID string `json:"contractId,omitempty"` GroupID string `json:"groupId,omitempty"` PropertyID string `json:"propertyId,omitempty"` PropertyName string `json:"propertyName"` LatestVersion int `json:"latestVersion,omitempty"` StagingVersion int `json:"stagingVersion,omitempty"` ProductionVersion int `json:"productionVersion,omitempty"` Note string `json:"note,omitempty"` ProductID string `json:"productId,omitempty"` RuleFormat string `json:"ruleFormat",omitempty` CloneFrom *ClonePropertyFrom `json:"cloneFrom"` // contains filtered or unexported fields }
Property represents a PAPI Property
func NewProperty ¶
func NewProperty(parent *Properties) *Property
NewProperty creates a new Property
func (*Property) Activate ¶
func (property *Property) Activate(activation *Activation, acknowledgeWarnings bool) error
Activate activates a given property
If acknowledgeWarnings is true and warnings are returned on the first attempt, a second attempt is made, acknowledging the warnings.
See: Activation.Save() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#activateaproperty Endpoint: POST /papi/v1/properties/{propertyId}/activations/{?contractId,groupId}
func (*Property) Delete ¶
Delete a property
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#removeaproperty Endpoint: DELETE /papi/v1/properties/{propertyId}{?contractId,groupId}
func (*Property) GetActivations ¶
func (property *Property) GetActivations() (*Activations, error)
GetActivations retrieves activation data for a given property
See: Activations.GetActivations() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listactivations Endpoint: GET /papi/v1/properties/{propertyId}/activations/{?contractId,groupId}
func (*Property) GetAvailableBehaviors ¶
func (property *Property) GetAvailableBehaviors() (*AvailableBehaviors, error)
GetAvailableBehaviors retrieves available behaviors for a given property
See: AvailableBehaviors.GetAvailableBehaviors API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listavailablebehaviors Endpoint: GET /papi/v1/properties/{propertyId}/versions/{propertyVersion}/available-behaviors{?contractId,groupId}
func (*Property) GetHostnames ¶
GetHostnames retrieves hostnames assigned to a given property
If no version is given, the latest version is used ¶
See: Hostnames.GetHostnames() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getpropertyversionhostnames Endpoint: GET /papi/v1/properties/{propertyId}/versions/{propertyVersion}/hostnames/{?contractId,groupId}
func (*Property) GetLatestVersion ¶
func (property *Property) GetLatestVersion(activatedOn NetworkValue) (*Version, error)
GetLatestVersion gets the latest active version, optionally of a given network
See: Versions.GetLatestVersion() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getthelatestversion Endpoint: GET /papi/v1/properties/{propertyId}/versions/latest{?contractId,groupId,activatedOn}
func (*Property) GetProperty ¶
GetProperty populates a Property
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getaproperty Endpoint: GET /papi/v1/properties/{propertyId}{?contractId,groupId}
func (*Property) GetRules ¶
GetRules retrieves rules for a property
See: Rules.GetRules API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getaruletree Endpoint: GET /papi/v1/properties/{propertyId}/versions/{propertyVersion}/rules/{?contractId,groupId}
func (*Property) GetRulesDigest ¶
GetRulesDigest fetches the Etag for a rule tree
See: Rules.GetRulesDigest() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getaruletreesdigest Endpoint: HEAD /papi/v1/properties/{propertyId}/versions/{propertyVersion}/rules/{?contractId,groupId}
func (*Property) GetVersions ¶
GetVersions retrieves all versions for a a given property
See: Versions.GetVersions() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listversions Endpoint: GET /papi/v1/properties/{propertyId}/versions/{?contractId,groupId}
func (*Property) PostUnmarshalJSON ¶
PostUnmarshalJSON is called after JSON unmarshaling into EdgeHostnames
See: jsonhooks-v1/jsonhooks.Unmarshal()
func (*Property) PreMarshalJSON ¶
PreMarshalJSON is called before JSON marshaling
See: jsonhooks-v1/json.Marshal()
func (*Property) Save ¶
Save will create a property, optionally cloned from another property
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#createorcloneaproperty Endpoint: POST /papi/v1/properties/{?contractId,groupId}
type Rule ¶
type Rule struct { client.Resource Depth int `json:"-"` Name string `json:"name"` Criteria []*Criteria `json:"criteria,omitempty"` Behaviors []*Behavior `json:"behaviors,omitempty"` Children []*Rule `json:"children,omitempty"` Comments string `json:"comments,omitempty"` CriteriaLocked bool `json:"criteriaLocked,omitempty"` CriteriaMustSatisfy RuleCriteriaMustSatisfyValue `json:"criteriaMustSatisfy,omitempty"` UUID string `json:"uuid,omitempty"` Variables []*Variable `json:"variables,omitempty"` AdvancedOverride string `json:"advancedOverride,omitempty"` Options struct { IsSecure bool `json:"is_secure,omitempty"` } `json:"options,omitempty"` CustomOverride *CustomOverride `json:"customOverride,omitempty"` }
Rule represents a property rule resource
func (*Rule) AddBehavior ¶
AddBehavior adds a behavior to the rule
If the behavior already exists it is replaced with the given behavior
func (*Rule) AddChildRule ¶
AddChildRule adds a rule as a child of this rule
If the rule already exists, it is replaced by the given rule.
func (*Rule) AddCriteria ¶
AddCriteria add a criteria to a rule
If the criteria already exists, it is replaced with the given criteria.
func (*Rule) AddVariable ¶ added in v0.5.0
AddVariable adds a variable as a child of this rule
If the rule already exists, it is replaced by the given rule.
func (*Rule) MergeBehavior ¶ added in v0.5.0
MergeBehavior merges a behavior into a rule
If the behavior already exists, it's options are merged with the existing options.
func (*Rule) MergeChildRule ¶ added in v0.5.0
MergeChildRule adds a child rule to this rule
If the rule already exists, criteria, behaviors, and child rules are added to the existing rule.
func (*Rule) MergeCriteria ¶ added in v0.5.0
MergeCriteria merges a criteria into a rule
If the criteria already exists, it's options are merged with the existing options.
type RuleCriteriaMustSatisfyValue ¶
type RuleCriteriaMustSatisfyValue string
const ( RuleCriteriaMustSatisfyAll RuleCriteriaMustSatisfyValue = "any" RuleCriteriaMustSatisfyAny RuleCriteriaMustSatisfyValue = "all" )
type RuleErrors ¶
type RuleErrors struct { client.Resource Type string `json:"type"` Title string `json:"title"` Detail string `json:"detail"` Instance string `json:"instance"` BehaviorName string `json:"behaviorName"` }
RuleErrors represents an validate error returned for a rule
type RuleFormats ¶
type RuleFormats struct { client.Resource RuleFormats struct { Items []string `json:"items"` } `json:"ruleFormats"` }
RuleFormats is a collection of available rule formats
func (*RuleFormats) GetLatest ¶
func (ruleFormats *RuleFormats) GetLatest() (string, error)
func (*RuleFormats) GetRuleFormats ¶
func (ruleFormats *RuleFormats) GetRuleFormats() error
GetRuleFormats populates RuleFormats
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listruleformats Endpoint: GET /papi/v1/rule-formats
func (*RuleFormats) GetSchema ¶
func (ruleFormats *RuleFormats) GetSchema(product string, ruleFormat string) (*gojsonschema.Schema, error)
GetSchema fetches the schema for a given product and rule format
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getaruleformatsschema Endpoint: /papi/v1/schemas/products/{productId}/{ruleFormat}
type Rules ¶
type Rules struct { client.Resource AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` PropertyID string `json:"propertyId"` PropertyVersion int `json:"propertyVersion"` Etag string `json:"etag"` RuleFormat string `json:"ruleFormat"` Rule *Rule `json:"rules"` Errors []*RuleErrors `json:"errors,omitempty"` }
Rules is a collection of property rules
func (*Rules) FindBehavior ¶
FindBehavior locates a specific behavior by path
func (*Rules) FindCriteria ¶
FindCriteria locates a specific Critieria by path
func (*Rules) FindParentRule ¶
Find the parent rule for a given rule, criteria, or behavior path
func (*Rules) FindVariable ¶ added in v0.5.0
FindVariable locates a specific Variable by path
func (*Rules) GetRules ¶
GetRules populates Rules with rule data for a given property
See: Property.GetRules API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getaruletree Endpoint: GET /papi/v1/properties/{propertyId}/versions/{propertyVersion}/rules/{?contractId,groupId}
func (*Rules) GetRulesDigest ¶
GetRulesDigest fetches the Etag for a rule tree
See: Property.GetRulesDigest() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getaruletreesdigest Endpoint: HEAD /papi/v1/properties/{propertyId}/versions/{propertyVersion}/rules/{?contractId,groupId}
func (*Rules) PreMarshalJSON ¶
PreMarshalJSON is called before JSON marshaling
See: jsonhooks-v1/json.Marshal()
func (*Rules) Save ¶
Save creates/updates a rule tree for a property
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#putpropertyversionrules Endpoint: PUT /papi/v1/properties/{propertyId}/versions/{propertyVersion}/rules{?contractId,groupId}
type SearchResult ¶ added in v0.5.0
type SearchResult struct { Versions struct { Items []struct { UpdatedByUser string `json:"updatedByUser"` StagingStatus string `json:"stagingStatus"` AssetID string `json:"assetId"` PropertyName string `json:"propertyName"` PropertyVersion int `json:"propertyVersion"` UpdatedDate time.Time `json:"updatedDate"` ContractID string `json:"contractId"` AccountID string `json:"accountId"` GroupID string `json:"groupId"` PropertyID string `json:"propertyId"` ProductionStatus string `json:"productionStatus"` } `json:"items"` } `json:"versions"` }
func Search ¶ added in v0.5.0
func Search(searchBy SearchKey, propertyName string) (*SearchResult, error)
Search searches for properties
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#postfindbyvalue Endpoint: POST /papi/v1/search/find-by-value
type StatusValue ¶
type StatusValue string
StatusValue is used to create an "enum" of possible Activation.Status values
type Variable ¶ added in v0.5.0
type Version ¶
type Version struct { client.Resource PropertyVersion int `json:"propertyVersion,omitempty"` UpdatedByUser string `json:"updatedByUser,omitempty"` UpdatedDate time.Time `json:"updatedDate,omitempty"` ProductionStatus StatusValue `json:"productionStatus,omitempty"` StagingStatus StatusValue `json:"stagingStatus,omitempty"` Etag string `json:"etag,omitempty"` ProductID string `json:"productId,omitempty"` Note string `json:"note,omitempty"` CreateFromVersion int `json:"createFromVersion,omitempty"` CreateFromVersionEtag string `json:"createFromVersionEtag,omitempty"` RuleFormat string `json:"ruleFormat,omitempty"` // contains filtered or unexported fields }
Version represents a Property Version
func (*Version) GetVersion ¶
GetVersion populates a Version
Api Docs: https://developer.akamai.com/api/luna/papi/resources.html#getaversion Endpoint: /papi/v1/properties/{propertyId}/versions/{propertyVersion}{?contractId,groupId}
func (*Version) HasBeenActivated ¶
func (version *Version) HasBeenActivated(activatedOn NetworkValue) (bool, error)
HasBeenActivated determines if a given version has been activated, optionally on a specific network
func (*Version) Save ¶
Save creates a new version
API Docs: https://developer.akamai.com/api/luna/papi/resources.html#createanewversion Endpoint: POST /papi/v1/properties/{propertyId}/versions/{?contractId,groupId}
type Versions ¶
type Versions struct { client.Resource PropertyID string `json:"propertyId"` PropertyName string `json:"propertyName"` AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` Versions struct { Items []*Version `json:"items"` } `json:"versions"` RuleFormat string `json:"ruleFormat,omitempty"` }
Versions contains a collection of Property Versions
func GetVersions ¶
GetVersions retrieves all versions for a given property
func (*Versions) AddVersion ¶
AddVersion adds or replaces a version within the collection
func (*Versions) GetLatestVersion ¶
func (versions *Versions) GetLatestVersion(activatedOn NetworkValue) (*Version, error)
GetLatestVersion retrieves the latest Version for a property
See: Property.GetLatestVersion() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#getthelatestversion Endpoint: GET /papi/v1/properties/{propertyId}/versions/latest{?contractId,groupId,activatedOn}
func (*Versions) GetVersions ¶
GetVersions retrieves all versions for a a given property
See: Property.GetVersions() API Docs: https://developer.akamai.com/api/luna/papi/resources.html#listversions Endpoint: GET /papi/v1/properties/{propertyId}/versions/{?contractId,groupId}
func (*Versions) NewVersion ¶
NewVersion creates a new version associated with the Versions collection
func (*Versions) PostUnmarshalJSON ¶
PostUnmarshalJSON is called after JSON unmarshaling into EdgeHostnames
See: jsonhooks-v1/jsonhooks.Unmarshal()