Documentation ¶
Overview ¶
Package papi provides access to the Akamai Property APIs
Package papi provides access to the Akamai Property APIs
Index ¶
- Constants
- Variables
- func ResponseLinkParse(link string) (string, error)
- type Activation
- type ActivationFallbackInfo
- type ActivationNetwork
- type ActivationStatus
- type ActivationType
- type Activations
- type ActivationsItems
- type AvailableFeature
- type AvailableFeatureItems
- type CPCode
- type CPCodeContract
- type CPCodeDetailResponse
- type CPCodeItems
- type CPCodeProduct
- type CPCodeTimeZone
- type CPCodes
- type CancelActivationRequest
- type CancelActivationResponse
- type CertStatusItem
- type ClientFunc
- type ClientSettings
- type ClientSettingsBody
- type Contract
- type Contracts
- type ContractsItems
- type CreateActivationRequest
- type CreateActivationResponse
- type CreateCPCode
- type CreateCPCodeRequest
- type CreateCPCodeResponse
- type CreateEdgeHostnameRequest
- type CreateEdgeHostnameResponse
- type CreatePropertyRequest
- type CreatePropertyResponse
- type CreatePropertyVersionRequest
- type CreatePropertyVersionResponse
- type EdgeHostnameCreate
- type EdgeHostnameGetItem
- type EdgeHostnameItems
- type EdgeHostnames
- type Error
- type GetActivationRequest
- type GetActivationResponse
- type GetActivationsRequest
- type GetActivationsResponse
- type GetCPCodeRequest
- type GetCPCodesRequest
- type GetCPCodesResponse
- type GetContractsResponse
- type GetEdgeHostnameRequest
- type GetEdgeHostnamesRequest
- type GetEdgeHostnamesResponse
- type GetFeaturesCriteriaResponse
- type GetFeaturesRequest
- type GetGroupsResponse
- type GetLatestVersionRequest
- type GetProductsRequest
- type GetProductsResponse
- type GetPropertiesRequest
- type GetPropertiesResponse
- type GetPropertyRequest
- type GetPropertyResponse
- type GetPropertyVersionHostnamesRequest
- type GetPropertyVersionHostnamesResponse
- type GetPropertyVersionRequest
- type GetPropertyVersionsRequest
- type GetPropertyVersionsResponse
- type GetRuleFormatsResponse
- type GetRuleTreeRequest
- type GetRuleTreeResponse
- type Group
- type GroupItems
- type Groups
- type Hostname
- type HostnameCnameType
- type HostnameResponseItems
- type Option
- type PAPI
- type ProductItem
- type Products
- type ProductsItems
- type Properties
- type PropertiesItems
- type Property
- type PropertyCloneFrom
- type PropertyCreate
- type PropertyRules
- type PropertyVersionCreate
- type PropertyVersionGetItem
- type PropertyVersionHostnames
- type PropertyVersionItems
- type PropertyVersions
- type RemovePropertyRequest
- type RemovePropertyResponse
- type Response
- type RuleBehavior
- type RuleCriteriaMustSatisfy
- type RuleCustomOverride
- type RuleError
- type RuleFormatItems
- type RuleFormats
- type RuleOptions
- type RuleOptionsMap
- type RuleVariable
- type Rules
- type RulesUpdate
- type Search
- type SearchItem
- type SearchItems
- type SearchRequest
- type SearchResponse
- type StatusItem
- type UpdateCPCodeRequest
- type UpdatePropertyVersionHostnamesRequest
- type UpdatePropertyVersionHostnamesResponse
- type UpdateRulesRequest
- type UpdateRulesResponse
- type UseCase
- type ValidationCname
- type VersionStatus
Constants ¶
const ( // ActivationTypeActivate is used for creating a new activation ActivationTypeActivate ActivationType = "ACTIVATE" // ActivationTypeDeactivate is used for creating a new de-activation ActivationTypeDeactivate ActivationType = "DEACTIVATE" // ActivationStatusActive is an activation that is currently serving traffic ActivationStatusActive ActivationStatus = "ACTIVE" // ActivationStatusInactive is an activation that has been superceded by another ActivationStatusInactive ActivationStatus = "INACTIVE" // ActivationStatusNew is a not yet active activation ActivationStatusNew ActivationStatus = "NEW" // ActivationStatusPending is the pending status ActivationStatusPending ActivationStatus = "PENDING" // ActivationStatusAborted is returned when a PENDING activation is successfully canceled ActivationStatusAborted ActivationStatus = "ABORTED" // ActivationStatusFailed is returned when an activation fails downstream from the api ActivationStatusFailed ActivationStatus = "FAILED" // ActivationStatusZone1 is not yet active ActivationStatusZone1 ActivationStatus = "ZONE_1" // ActivationStatusZone2 is not yet active ActivationStatusZone2 ActivationStatus = "ZONE_2" // ActivationStatusZone3 is not yet active ActivationStatusZone3 ActivationStatus = "ZONE_3" // ActivationStatusDeactivating is pending deactivation ActivationStatusDeactivating ActivationStatus = "PENDING_DEACTIVATION" // ActivationStatusDeactivated is deactivated ActivationStatusDeactivated ActivationStatus = "DEACTIVATED" // ActivationNetworkStaging is the staging network ActivationNetworkStaging ActivationNetwork = "STAGING" // ActivationNetworkProduction is the production network ActivationNetworkProduction ActivationNetwork = "PRODUCTION" )
const ( // EHSecureNetworkStandardTLS constant EHSecureNetworkStandardTLS = "STANDARD_TLS" 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" )
const ( // RuleValidateModeFast const RuleValidateModeFast = "fast" // RuleValidateModeFull const RuleValidateModeFull = "full" // RuleCriteriaMustSatisfyAll const RuleCriteriaMustSatisfyAll RuleCriteriaMustSatisfy = "all" //RuleCriteriaMustSatisfyAny const RuleCriteriaMustSatisfyAny RuleCriteriaMustSatisfy = "any" )
const ( // SearchKeyEdgeHostname search request key SearchKeyEdgeHostname = "edgeHostname" // SearchKeyHostname search request key SearchKeyHostname = "hostname" // SearchKeyPropertyName search request key SearchKeyPropertyName = "propertyName" )
Variables ¶
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") )
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") )
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") )
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") )
var ( // ErrStructValidation is returned returned when given struct validation failed ErrStructValidation = errors.New("struct validation") // ErrNotFound is returned when requested resource was not found ErrNotFound = errors.New("resource not found") )
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") )
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") )
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") )
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") )
var ( // ErrGetContracts represents error when fetching contracts fails ErrGetContracts = errors.New("fetching contracts") )
var ( // ErrGetGroups represents error when fetching groups fails ErrGetGroups = errors.New("fetching groups") )
var ( // ErrGetProducts represents error when fetching products fails ErrGetProducts = errors.New("fetching products") )
var ( // ErrGetRuleFormats represents error when fetching rule formats fails ErrGetRuleFormats = errors.New("fetching rule formats") )
var ( // ErrInvalidResponseLink is returned when there was an error while fetching ID from location response object ErrInvalidResponseLink = errors.New("response link URL is invalid") )
var ( // ErrSearchProperties represents error when searching for properties fails ErrSearchProperties = errors.New("searching for properties") )
Functions ¶
func ResponseLinkParse ¶
ResponseLinkParse parse the link and returns the id
Types ¶
type Activation ¶
type Activation struct { AccountID string `json:"accountId,omitempty"` ActivationID string `json:"activationId,omitempty"` ActivationType ActivationType `json:"activationType,omitempty"` UseFastFallback bool `json:"useFastFallback"` FallbackInfo *ActivationFallbackInfo `json:"fallbackInfo,omitempty"` AcknowledgeWarnings []string `json:"acknowledgeWarnings,omitempty"` AcknowledgeAllWarnings bool `json:"acknowledgeAllWarnings"` FastPush bool `json:"fastPush,omitempty"` FMAActivationState string `json:"fmaActivationState,omitempty"` GroupID string `json:"groupId,omitempty"` IgnoreHTTPErrors bool `json:"ignoreHttpErrors,omitempty"` PropertyName string `json:"propertyName,omitempty"` PropertyID string `json:"propertyId,omitempty"` PropertyVersion int `json:"propertyVersion"` Network ActivationNetwork `json:"network"` Status ActivationStatus `json:"status,omitempty"` SubmitDate string `json:"submitDate,omitempty"` UpdateDate string `json:"updateDate,omitempty"` Note string `json:"note,omitempty"` NotifyEmails []string `json:"notifyEmails"` }
Activation represents a property activation resource
type ActivationFallbackInfo ¶
type ActivationFallbackInfo struct { FastFallbackAttempted bool `json:"fastFallbackAttempted"` FallbackVersion int `json:"fallbackVersion"` CanFastFallback bool `json:"canFastFallback"` SteadyStateTime int `json:"steadyStateTime"` FastFallbackExpirationTime int `json:"fastFallbackExpirationTime"` FastFallbackRecoveryState *string `json:"fastFallbackRecoveryState,omitempty"` }
ActivationFallbackInfo encapsulates information about fast fallback, which may allow you to fallback to a previous activation when POSTing an activation with useFastFallback enabled.
type ActivationNetwork ¶
type ActivationNetwork string
ActivationNetwork is the activation network value
type Activations ¶
type Activations interface { // CreateActivation creates a new activation or deactivation request // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#postpropertyactivations CreateActivation(context.Context, CreateActivationRequest) (*CreateActivationResponse, error) // GetActivations returns a list of the property activations // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyactivations GetActivations(ctx context.Context, params GetActivationsRequest) (*GetActivationsResponse, error) // GetActivation gets details about an activation // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyactivation GetActivation(context.Context, GetActivationRequest) (*GetActivationResponse, error) // CancelActivation allows for canceling an activation while it is still PENDING // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#deletepropertyactivation CancelActivation(context.Context, CancelActivationRequest) (*CancelActivationResponse, error) }
Activations contains operations available on Activation resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#propertyactivationsgroup
type ActivationsItems ¶
type ActivationsItems struct {
Items []*Activation `json:"items"`
}
ActivationsItems are the activation items array from a response
type AvailableFeature ¶
AvailableFeature represents details of a single feature (behavior or criteria available for selected property version
type AvailableFeatureItems ¶
type AvailableFeatureItems struct {
Items []AvailableFeature `json:"items"`
}
AvailableFeatureItems contains a slice of AvailableFeature items
type CPCode ¶
type CPCode struct { ID string `json:"cpcodeId"` Name string `json:"cpcodeName"` CreatedDate string `json:"createdDate"` ProductIDs []string `json:"productIds"` }
CPCode contains CP code resource data
type CPCodeContract ¶ added in v2.11.0
type CPCodeContract struct { ContractID string `json:"contractId"` Status string `json:"status,omitempty"` }
CPCodeContract contains contract data used in CPRG API calls
func (CPCodeContract) Validate ¶ added in v2.11.0
func (contract CPCodeContract) Validate() error
Validate validates CPCodeContract
type CPCodeDetailResponse ¶ added in v2.11.0
type CPCodeDetailResponse struct { ID int `json:"cpcodeId"` Name string `json:"cpcodeName"` Purgeable bool `json:"purgeable"` AccountID string `json:"accountId"` DefaultTimeZone string `json:"defaultTimezone"` OverrideTimeZone CPCodeTimeZone `json:"overrideTimezone"` Type string `json:"type"` Contracts []CPCodeContract `json:"contracts"` Products []CPCodeProduct `json:"products"` }
CPCodeDetailResponse is a response returned while fetching CP code details using CPRG API call
type CPCodeItems ¶
type CPCodeItems struct {
Items []CPCode `json:"items"`
}
CPCodeItems contains a list of CPCode items
type CPCodeProduct ¶ added in v2.11.0
type CPCodeProduct struct { ProductID string `json:"productId"` ProductName string `json:"productName,omitempty"` }
CPCodeProduct contains product data used in CPRG API calls
func (CPCodeProduct) Validate ¶ added in v2.11.0
func (product CPCodeProduct) Validate() error
Validate validates CPCodeProduct
type CPCodeTimeZone ¶ added in v2.11.0
type CPCodeTimeZone struct { TimeZoneID string `json:"timezoneId"` TimeZoneValue string `json:"timezoneValue,omitempty"` }
CPCodeTimeZone contains time zone data used in CPRG API calls
func (CPCodeTimeZone) Validate ¶ added in v2.11.0
func (timeZone CPCodeTimeZone) Validate() error
Validate validates CPCodeTimeZone
type CPCodes ¶
type CPCodes interface { // GetCPCodes lists all available CP codes // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getcpcodes GetCPCodes(context.Context, GetCPCodesRequest) (*GetCPCodesResponse, error) // GetCPCode gets the CP code with provided ID // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getcpcode GetCPCode(context.Context, GetCPCodeRequest) (*GetCPCodesResponse, error) // GetCPCodeDetail lists detailed information about a specific CP code // See: https://techdocs.akamai.com/cp-codes/reference/get-cpcode GetCPCodeDetail(context.Context, int) (*CPCodeDetailResponse, error) // CreateCPCode creates a new CP code // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#postcpcodes CreateCPCode(context.Context, CreateCPCodeRequest) (*CreateCPCodeResponse, error) // UpdateCPCode modifies a specific CP code. You should only modify a CP code's name, time zone, and purgeable member // See: https://techdocs.akamai.com/cp-codes/reference/put-cpcode UpdateCPCode(context.Context, UpdateCPCodeRequest) (*CPCodeDetailResponse, error) }
CPCodes contains operations available on CPCode resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#cpcodesgroup
type CancelActivationRequest ¶
type CancelActivationRequest struct { PropertyID string ActivationID string ContractID string GroupID string }
CancelActivationRequest is used to delete a PENDING activation
func (CancelActivationRequest) Validate ¶
func (v CancelActivationRequest) Validate() error
Validate validate CancelActivationRequest
type CancelActivationResponse ¶
type CancelActivationResponse struct {
Activations ActivationsItems `json:"activations"`
}
CancelActivationResponse is a response from deleting a PENDING activation
type CertStatusItem ¶ added in v2.4.0
type CertStatusItem struct { ValidationCname ValidationCname `json:"validationCname,omitempty"` Staging []StatusItem `json:"staging,omitempty"` Production []StatusItem `json:"production,omitempty"` }
CertStatusItem contains information about certificate status for specific Hostname
type ClientFunc ¶
ClientFunc is a papi client new method, this can used for mocking
type ClientSettings ¶
type ClientSettings interface { // GetClientSettings returns client's settings. // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getclientsettings GetClientSettings(context.Context) (*ClientSettingsBody, error) // UpdateClientSettings updates client's settings. // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#putclientsettings UpdateClientSettings(context.Context, ClientSettingsBody) (*ClientSettingsBody, error) }
ClientSettings contains operations available on ClientSettings resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#clientsettingsgroup
type ClientSettingsBody ¶
type ClientSettingsBody struct { RuleFormat string `json:"ruleFormat"` UsePrefixes bool `json:"usePrefixes"` }
ClientSettingsBody represents both the request and response bodies for operating on client settings resource
type Contract ¶
type Contract struct { ContractID string `json:"contractId"` ContractTypeName string `json:"contractTypeName"` }
Contract represents a property contract resource
type Contracts ¶
type Contracts interface { // GetContract provides a read-only list of contract names and identifiers // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getcontracts GetContracts(context.Context) (*GetContractsResponse, error) }
Contracts contains operations available on Contract resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#contractsgroup
type ContractsItems ¶
type ContractsItems struct {
Items []*Contract `json:"items"`
}
ContractsItems is the response items array
type CreateActivationRequest ¶
type CreateActivationRequest struct { PropertyID string ContractID string GroupID string Activation Activation }
CreateActivationRequest is the request parameters for a new activation or deactivation request
func (CreateActivationRequest) Validate ¶
func (v CreateActivationRequest) Validate() error
Validate validates CreateActivationRequest
type CreateActivationResponse ¶
type CreateActivationResponse struct { Response ActivationID string ActivationLink string `json:"activationLink"` }
CreateActivationResponse is the response for a new activation or deactivation
type CreateCPCode ¶
type CreateCPCode struct { ProductID string `json:"productId"` CPCodeName string `json:"cpcodeName"` }
CreateCPCode contains the request body for CP code creation
func (CreateCPCode) Validate ¶
func (cp CreateCPCode) Validate() error
Validate validates CreateCPCode
type CreateCPCodeRequest ¶
type CreateCPCodeRequest struct { ContractID string GroupID string CPCode CreateCPCode }
CreateCPCodeRequest contains data required to create CP code (both request body and group/contract information
func (CreateCPCodeRequest) Validate ¶
func (cp CreateCPCodeRequest) Validate() error
Validate validates CreateCPCodeRequest
type CreateCPCodeResponse ¶
type CreateCPCodeResponse struct { CPCodeLink string `json:"cpcodeLink"` CPCodeID string `json:"-"` }
CreateCPCodeResponse contains the response from CP code creation as well as the ID of created resource
type CreateEdgeHostnameRequest ¶
type CreateEdgeHostnameRequest struct { ContractID string GroupID string Options []string EdgeHostname EdgeHostnameCreate }
CreateEdgeHostnameRequest contains query params and body required for creation of new edge hostname
func (CreateEdgeHostnameRequest) Validate ¶
func (eh CreateEdgeHostnameRequest) Validate() error
Validate validates CreateEdgeHostnameRequest
type CreateEdgeHostnameResponse ¶
type CreateEdgeHostnameResponse struct { EdgeHostnameLink string `json:"edgeHostnameLink"` EdgeHostnameID string `json:"-"` }
CreateEdgeHostnameResponse contains a link returned after creating new edge hostname and DI of this hostname
type CreatePropertyRequest ¶
type CreatePropertyRequest struct { ContractID string GroupID string Property PropertyCreate }
CreatePropertyRequest is passed to CreateProperty
func (CreatePropertyRequest) Validate ¶
func (v CreatePropertyRequest) Validate() error
Validate validates CreatePropertyRequest
type CreatePropertyResponse ¶
type CreatePropertyResponse struct { Response PropertyID string PropertyLink string `json:"propertyLink"` }
CreatePropertyResponse is returned by CreateProperty
type CreatePropertyVersionRequest ¶
type CreatePropertyVersionRequest struct { PropertyID string ContractID string GroupID string Version PropertyVersionCreate }
CreatePropertyVersionRequest contains path and query params, as well as request body required to execute POST /versions request
func (CreatePropertyVersionRequest) Validate ¶
func (v CreatePropertyVersionRequest) Validate() error
Validate validates CreatePropertyVersionRequest
type CreatePropertyVersionResponse ¶
type CreatePropertyVersionResponse struct { VersionLink string `json:"versionLink"` PropertyVersion int }
CreatePropertyVersionResponse contains a link returned after creating new property version and version number of this version
type EdgeHostnameCreate ¶
type EdgeHostnameCreate struct { ProductID string `json:"productId"` DomainPrefix string `json:"domainPrefix"` DomainSuffix string `json:"domainSuffix"` Secure bool `json:"secure,omitempty"` SecureNetwork string `json:"secureNetwork,omitempty"` SlotNumber int `json:"slotNumber,omitempty"` IPVersionBehavior string `json:"ipVersionBehavior"` CertEnrollmentID int `json:"certEnrollmentId,omitempty"` UseCases []UseCase `json:"useCases,omitempty"` }
EdgeHostnameCreate contains body of edge hostname POST request
func (EdgeHostnameCreate) Validate ¶
func (eh EdgeHostnameCreate) Validate() error
Validate validates EdgeHostnameCreate
type EdgeHostnameGetItem ¶
type EdgeHostnameGetItem struct { ID string `json:"edgeHostnameId"` Domain string `json:"edgeHostnameDomain"` ProductID string `json:"productId"` DomainPrefix string `json:"domainPrefix"` DomainSuffix string `json:"domainSuffix"` Status string `json:"status,omitempty"` Secure bool `json:"secure"` IPVersionBehavior string `json:"ipVersionBehavior"` UseCases []UseCase `json:"useCases,omitempty"` }
EdgeHostnameGetItem contains GET details for edge hostname
type EdgeHostnameItems ¶
type EdgeHostnameItems struct {
Items []EdgeHostnameGetItem `json:"items"`
}
EdgeHostnameItems contains a list of EdgeHostnames
type EdgeHostnames ¶
type EdgeHostnames interface { // GetEdgeHostnames fetches a list of edge hostnames // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getedgehostnames GetEdgeHostnames(context.Context, GetEdgeHostnamesRequest) (*GetEdgeHostnamesResponse, error) // GetEdgeHostname fetches edge hostname with given ID // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getedgehostname GetEdgeHostname(context.Context, GetEdgeHostnameRequest) (*GetEdgeHostnamesResponse, error) // CreateEdgeHostname creates a new edge hostname // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#postedgehostnames CreateEdgeHostname(context.Context, CreateEdgeHostnameRequest) (*CreateEdgeHostnameResponse, error) }
EdgeHostnames contains operations available on EdgeHostnames resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#edgehostnamesgroup
type Error ¶
type Error struct { Type string `json:"type"` Title string `json:"title"` Detail string `json:"detail"` Instance string `json:"instance,omitempty"` BehaviorName string `json:"behaviorName,omitempty"` ErrorLocation string `json:"errorLocation,omitempty"` StatusCode int `json:"statusCode,omitempty"` Errors json.RawMessage `json:"errors,omitempty"` Warnings json.RawMessage `json:"warnings,omitempty"` LimitKey string `json:"limitKey"` Limit int `json:"limit"` Remaining int `json:"remaining"` }
Error is a papi error interface
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 ¶
GetActivationsRequest is the get activation request
func (GetActivationsRequest) Validate ¶
func (v GetActivationsRequest) Validate() error
Validate validates GetActivationsRequest
type GetActivationsResponse ¶
type GetActivationsResponse struct { Response Activations ActivationsItems `json:"activations"` // RetryAfter is the value of the Retry-After header. // For activations whose status is PENDING, a Retry-After header provides an estimate for when it’s likely to change. RetryAfter int `json:"-"` }
GetActivationsResponse is the get activation response
type GetCPCodeRequest ¶
GetCPCodeRequest gets details about a CP code.
func (GetCPCodeRequest) Validate ¶
func (cp GetCPCodeRequest) Validate() error
Validate validates GetCPCodeRequest
type GetCPCodesRequest ¶
GetCPCodesRequest contains parameters required to list/create CP codes GroupID and ContractID are required as part of every CP code operation, ID is required only for operating on specific CP code
func (GetCPCodesRequest) Validate ¶
func (cp GetCPCodesRequest) Validate() error
Validate validates GetCPCodesRequest
type GetCPCodesResponse ¶
type GetCPCodesResponse struct { AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` CPCodes CPCodeItems `json:"cpcodes"` CPCode CPCode }
GetCPCodesResponse is a response returned while fetching CP codes
type GetContractsResponse ¶
type GetContractsResponse struct { AccountID string `json:"accountId"` Contracts ContractsItems `json:"contracts"` }
GetContractsResponse represents a collection of property manager contracts This is the reponse to the /papi/v1/contracts request
type GetEdgeHostnameRequest ¶
type GetEdgeHostnameRequest struct { EdgeHostnameID string ContractID string GroupID string Options []string }
GetEdgeHostnameRequest contains path and query params used to fetch specific edge hostname
func (GetEdgeHostnameRequest) Validate ¶
func (eh GetEdgeHostnameRequest) Validate() error
Validate validates GetEdgeHostnameRequest
type GetEdgeHostnamesRequest ¶
GetEdgeHostnamesRequest contains query params used for listing edge hostnames
func (GetEdgeHostnamesRequest) Validate ¶
func (eh GetEdgeHostnamesRequest) Validate() error
Validate validates GetEdgeHostnamesRequest
type GetEdgeHostnamesResponse ¶
type GetEdgeHostnamesResponse struct { AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` EdgeHostnames EdgeHostnameItems `json:"edgeHostnames"` EdgeHostname EdgeHostnameGetItem }
GetEdgeHostnamesResponse contains data received by calling GetEdgeHostnames or GetEdgeHostname
type GetFeaturesCriteriaResponse ¶
type GetFeaturesCriteriaResponse struct { ContractID string `json:"contractId"` GroupID string `json:"groupId"` ProductID string `json:"productId"` RuleFormat string `json:"ruleFormat"` AvailableBehaviors AvailableFeatureItems `json:"availableBehaviors"` }
GetFeaturesCriteriaResponse contains response received when fetching both available behaviors and available criteria for a property
type GetFeaturesRequest ¶
type GetFeaturesRequest struct { PropertyID string PropertyVersion int ContractID string GroupID string }
GetFeaturesRequest contains path and query params required to fetch both available behaviors and available criteria for a property
func (GetFeaturesRequest) Validate ¶
func (v GetFeaturesRequest) Validate() error
Validate validates GetFeaturesRequest
type GetGroupsResponse ¶
type GetGroupsResponse struct { AccountID string `json:"accountId"` AccountName string `json:"accountName"` Groups GroupItems `json:"groups"` }
GetGroupsResponse represents a collection of groups This is the response to the /papi/v1/groups request
type GetLatestVersionRequest ¶
type GetLatestVersionRequest struct { PropertyID string ActivatedOn string ContractID string GroupID string }
GetLatestVersionRequest contains path and query params required to fetch latest property version
func (GetLatestVersionRequest) Validate ¶
func (v GetLatestVersionRequest) Validate() error
Validate validates GetLatestVersionRequest
type GetProductsRequest ¶
type GetProductsRequest struct {
ContractID string
}
GetProductsRequest contains data required to list products associated to a contract
func (GetProductsRequest) Validate ¶
func (pr GetProductsRequest) Validate() error
Validate validates GetProductsRequest
type GetProductsResponse ¶
type GetProductsResponse struct { AccountID string `json:"accountId"` ContractID string `json:"contractId"` Products ProductsItems `json:"products"` }
GetProductsResponse contains details about all products associated to a contract
type GetPropertiesRequest ¶
GetPropertiesRequest is the argument for GetProperties
func (GetPropertiesRequest) Validate ¶
func (v GetPropertiesRequest) Validate() error
Validate validates GetPropertiesRequest
type GetPropertiesResponse ¶
type GetPropertiesResponse struct {
Properties PropertiesItems `json:"properties"`
}
GetPropertiesResponse is the response for GetProperties
type GetPropertyRequest ¶
GetPropertyRequest is the argument for GetProperty
func (GetPropertyRequest) Validate ¶
func (v GetPropertyRequest) Validate() error
Validate validates GetPropertyRequest
type GetPropertyResponse ¶
type GetPropertyResponse struct { Response Properties PropertiesItems `json:"properties"` Property *Property `json:"-"` }
GetPropertyResponse is the response for GetProperty
type GetPropertyVersionHostnamesRequest ¶
type GetPropertyVersionHostnamesRequest struct { PropertyID string PropertyVersion int ContractID string GroupID string ValidateHostnames bool IncludeCertStatus bool }
GetPropertyVersionHostnamesRequest contains parameters required to list property version hostnames
func (GetPropertyVersionHostnamesRequest) Validate ¶
func (ph GetPropertyVersionHostnamesRequest) Validate() error
Validate validates GetPropertyVersionHostnamesRequest
type GetPropertyVersionHostnamesResponse ¶
type GetPropertyVersionHostnamesResponse struct { AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` PropertyID string `json:"propertyId"` PropertyVersion int `json:"propertyVersion"` Etag string `json:"etag"` Hostnames HostnameResponseItems `json:"hostnames"` }
GetPropertyVersionHostnamesResponse contains all property version hostnames associated to the given parameters
type GetPropertyVersionRequest ¶
type GetPropertyVersionRequest struct { PropertyID string PropertyVersion int ContractID string GroupID string }
GetPropertyVersionRequest contains path and query params used for fetching specific property version
func (GetPropertyVersionRequest) Validate ¶
func (v GetPropertyVersionRequest) Validate() error
Validate validates GetPropertyVersionRequest
type GetPropertyVersionsRequest ¶
type GetPropertyVersionsRequest struct { PropertyID string ContractID string GroupID string Limit int Offset int }
GetPropertyVersionsRequest contains path and query params used for listing property versions
func (GetPropertyVersionsRequest) Validate ¶
func (v GetPropertyVersionsRequest) Validate() error
Validate validates GetPropertyVersionsRequest
type GetPropertyVersionsResponse ¶
type GetPropertyVersionsResponse struct { PropertyID string `json:"propertyId"` PropertyName string `json:"propertyName"` AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` AssetID string `json:"assetId"` Versions PropertyVersionItems `json:"versions"` Version PropertyVersionGetItem }
GetPropertyVersionsResponse contains GET response returned while fetching property versions or specific version
type GetRuleFormatsResponse ¶
type GetRuleFormatsResponse struct {
RuleFormats RuleFormatItems `json:"ruleFormats"`
}
GetRuleFormatsResponse contains the response body of GET /rule-formats request
type GetRuleTreeRequest ¶
type GetRuleTreeRequest struct { PropertyID string PropertyVersion int ContractID string GroupID string ValidateMode string ValidateRules bool RuleFormat string }
GetRuleTreeRequest contains path and query params necessary to perform GET /rules request
func (GetRuleTreeRequest) Validate ¶
func (r GetRuleTreeRequest) Validate() error
Validate validates GetRuleTreeRequest struct
type GetRuleTreeResponse ¶
type GetRuleTreeResponse struct { Response PropertyID string `json:"propertyId"` PropertyVersion int `json:"propertyVersion"` Etag string `json:"etag"` RuleFormat string `json:"ruleFormat"` Rules Rules `json:"rules"` Comments string `json:"comments,omitempty"` }
GetRuleTreeResponse contains data returned by performing GET /rules request
type Group ¶
type Group struct { GroupID string `json:"groupId"` GroupName string `json:"groupName"` ParentGroupID string `json:"parentGroupId,omitempty"` ContractIDs []string `json:"contractIds"` }
Group represents a property group resource
type GroupItems ¶
type GroupItems struct {
Items []*Group `json:"items"`
}
GroupItems represents sub-component of the group response
type Groups ¶
type Groups interface { // GetGroups provides a read-only list of groups, which may contain properties. // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getgroups GetGroups(context.Context) (*GetGroupsResponse, error) }
Groups contains operations available on Group resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#groupsgroup
type Hostname ¶
type Hostname struct { CnameType HostnameCnameType `json:"cnameType"` EdgeHostnameID string `json:"edgeHostnameId,omitempty"` CnameFrom string `json:"cnameFrom"` CnameTo string `json:"cnameTo,omitempty"` CertProvisioningType string `json:"certProvisioningType"` CertStatus CertStatusItem `json:"certStatus,omitempty"` }
Hostname contains information about each of the HostnameResponseItems
type HostnameCnameType ¶
type HostnameCnameType string
HostnameCnameType represents HostnameCnameType enum
const ( // HostnameCnameTypeEdgeHostname const HostnameCnameTypeEdgeHostname HostnameCnameType = "EDGE_HOSTNAME" )
type HostnameResponseItems ¶
type HostnameResponseItems struct {
Items []Hostname `json:"items"`
}
HostnameResponseItems contains the response body for GetPropertyVersionHostnamesResponse
type Option ¶
type Option func(*papi)
Option defines a PAPI option
func WithUsePrefixes ¶
WithUsePrefixes sets the `PAPI-Use-Prefixes` header on requests See: https://developer.akamai.com/api/core_features/property_manager/v1.html#prefixes
type PAPI ¶
type PAPI interface { Groups Contracts Activations CPCodes Properties PropertyVersions EdgeHostnames Products Search PropertyVersionHostnames ClientSettings PropertyRules RuleFormats }
PAPI is the papi api interface
type ProductItem ¶
type ProductItem struct { ProductName string `json:"productName"` ProductID string `json:"productId"` }
ProductItem contains product resource data
type Products ¶
type Products interface { // GetProducts lists all available Products // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#productsgroup GetProducts(context.Context, GetProductsRequest) (*GetProductsResponse, error) }
Products contains operations available on Products resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#productsgroup
type ProductsItems ¶
type ProductsItems struct {
Items []ProductItem `json:"items"`
}
ProductsItems contains a list of ProductItem
type Properties ¶
type Properties interface { GetProperties(ctx context.Context, r GetPropertiesRequest) (*GetPropertiesResponse, error) CreateProperty(ctx context.Context, params CreatePropertyRequest) (*CreatePropertyResponse, error) GetProperty(ctx context.Context, params GetPropertyRequest) (*GetPropertyResponse, error) RemoveProperty(ctx context.Context, params RemovePropertyRequest) (*RemovePropertyResponse, error) }
Properties contains operations available on Property resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#propertiesgroup
type PropertiesItems ¶
type PropertiesItems struct {
Items []*Property `json:"items"`
}
PropertiesItems is an array of properties
type Property ¶
type Property struct { AccountID string `json:"accountId"` AssetID string `json:"assetId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` LatestVersion int `json:"latestVersion"` Note string `json:"note"` ProductID string `json:"productId"` ProductionVersion *int `json:"productionVersion,omitempty"` PropertyID string `json:"propertyId"` PropertyName string `json:"propertyName"` RuleFormat string `json:"ruleFormat"` StagingVersion *int `json:"stagingVersion,omitempty"` }
Property contains configuration data to apply to edge content.
type PropertyCloneFrom ¶
type PropertyCloneFrom struct { CloneFromVersionEtag string `json:"cloneFromVersionEtag,omitempty"` CopyHostnames bool `json:"copyHostnames,omitempty"` PropertyID string `json:"propertyId"` Version int `json:"version"` }
PropertyCloneFrom optionally identifies another property instance to clone when making a POST request to create a new property
func (PropertyCloneFrom) Validate ¶
func (c PropertyCloneFrom) Validate() error
Validate validates PropertyCloneFrom
type PropertyCreate ¶
type PropertyCreate struct { CloneFrom *PropertyCloneFrom `json:"cloneFrom,omitempty"` ProductID string `json:"productId"` PropertyName string `json:"propertyName"` RuleFormat string `json:"ruleFormat,omitempty"` }
PropertyCreate represents a POST /property request body
func (PropertyCreate) Validate ¶
func (p PropertyCreate) Validate() error
Validate validates PropertyCreate
type PropertyRules ¶
type PropertyRules interface { // GetRuleTree lists all available CP codes // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyversionrules GetRuleTree(context.Context, GetRuleTreeRequest) (*GetRuleTreeResponse, error) // UpdateRuleTree lists all available CP codes // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#putpropertyversionrules UpdateRuleTree(context.Context, UpdateRulesRequest) (*UpdateRulesResponse, error) }
PropertyRules contains operations available on PropertyRule resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#propertyversionrulesgroup
type PropertyVersionCreate ¶
type PropertyVersionCreate struct { CreateFromVersion int `json:"createFromVersion"` CreateFromVersionEtag string `json:"createFromVersionEtag,omitempty"` }
PropertyVersionCreate contains request body used in POST /versions request
func (PropertyVersionCreate) Validate ¶
func (v PropertyVersionCreate) Validate() error
Validate validates PropertyVersionCreate
type PropertyVersionGetItem ¶
type PropertyVersionGetItem struct { Etag string `json:"etag"` Note string `json:"note"` ProductID string `json:"productId"` ProductionStatus VersionStatus `json:"productionStatus"` PropertyVersion int `json:"propertyVersion"` RuleFormat string `json:"ruleFormat"` StagingStatus VersionStatus `json:"stagingStatus"` UpdatedByUser string `json:"updatedByUser"` UpdatedDate string `json:"updatedDate"` }
PropertyVersionGetItem contains detailed information about specific property version returned in GET
type PropertyVersionHostnames ¶
type PropertyVersionHostnames interface { // GetPropertyVersionHostnames lists all the hostnames assigned to a property version // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyversionhostnames GetPropertyVersionHostnames(context.Context, GetPropertyVersionHostnamesRequest) (*GetPropertyVersionHostnamesResponse, error) // CreatePropertyVersionHostnames lists all the hostnames assigned to a property version // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#putpropertyversionhostnames UpdatePropertyVersionHostnames(context.Context, UpdatePropertyVersionHostnamesRequest) (*UpdatePropertyVersionHostnamesResponse, error) }
PropertyVersionHostnames contains operations available on PropertyVersionHostnames resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#propertyversionhostnamesgroup
type PropertyVersionItems ¶
type PropertyVersionItems struct {
Items []PropertyVersionGetItem `json:"items"`
}
PropertyVersionItems contains collection of property version details
type PropertyVersions ¶
type PropertyVersions interface { // GetPropertyVersions fetches available property versions // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyversions GetPropertyVersions(context.Context, GetPropertyVersionsRequest) (*GetPropertyVersionsResponse, error) // GetPropertyVersion fetches specific property version // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getpropertyversion GetPropertyVersion(context.Context, GetPropertyVersionRequest) (*GetPropertyVersionsResponse, error) // CreatePropertyVersion creates a new property version // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#postpropertyversions CreatePropertyVersion(context.Context, CreatePropertyVersionRequest) (*CreatePropertyVersionResponse, error) // GetLatestVersion fetches latest property version // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getlatestversion GetLatestVersion(context.Context, GetLatestVersionRequest) (*GetPropertyVersionsResponse, error) // GetAvailableBehaviors fetches a list of behaviors applied to property version // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getavailablebehaviors GetAvailableBehaviors(context.Context, GetFeaturesRequest) (*GetFeaturesCriteriaResponse, error) // GetAvailableCriteria fetches a list of criteria applied to property version // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getavailablecriteria GetAvailableCriteria(context.Context, GetFeaturesRequest) (*GetFeaturesCriteriaResponse, error) }
PropertyVersions contains operations available on PropertyVersions resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#propertyversionsgroup
type RemovePropertyRequest ¶
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 ¶
RuleCustomOverride represents customOverride field from Rule resource
func (RuleCustomOverride) Validate ¶
func (co RuleCustomOverride) Validate() error
Validate validates RuleCustomOverride struct
type RuleError ¶
type RuleError struct { Type string `json:"type"` Title string `json:"title"` Detail string `json:"detail"` Instance string `json:"instance"` BehaviorName string `json:"behaviorName"` }
RuleError represents and entry in error field from PUT /rules response body
type RuleFormatItems ¶
type RuleFormatItems struct {
Items []string `json:"items"`
}
RuleFormatItems contains a list of rule formats
type RuleFormats ¶
type RuleFormats interface { // GetRuleFormats provides a list of rule formats // See: https://developer.akamai.com/api/core_features/property_manager/v1.html#getruleformats GetRuleFormats(context.Context) (*GetRuleFormatsResponse, error) }
RuleFormats contains operations available on RuleFormat resource See: https://developer.akamai.com/api/core_features/property_manager/v1.html#ruleformatsgroup
type RuleOptions ¶
type RuleOptions struct {
IsSecure bool `json:"is_secure,omitempty"`
}
RuleOptions represents options field from Rule resource
type RuleOptionsMap ¶
type RuleOptionsMap map[string]interface{}
RuleOptionsMap is a type wrapping map[string]interface{} used for adding rule options
type RuleVariable ¶
type RuleVariable struct { Description string `json:"description,omitempty"` Hidden bool `json:"hidden"` Name string `json:"name"` Sensitive bool `json:"sensitive"` Value string `json:"value,omitempty"` }
RuleVariable represents and entry in variables field from Rule resource
func (RuleVariable) Validate ¶
func (v RuleVariable) Validate() error
Validate validates RuleVariable struct
type Rules ¶
type Rules struct { AdvancedOverride string `json:"advancedOverride,omitempty"` Behaviors []RuleBehavior `json:"behaviors,omitempty"` Children []Rules `json:"children,omitempty"` Comments string `json:"comments,omitempty"` Criteria []RuleBehavior `json:"criteria,omitempty"` CriteriaLocked bool `json:"criteriaLocked,omitempty"` CustomOverride *RuleCustomOverride `json:"customOverride,omitempty"` Name string `json:"name"` Options RuleOptions `json:"options,omitempty"` UUID string `json:"uuid,omitempty"` TemplateUuid string `json:"templateUuid,omitempty"` TemplateLink string `json:"templateLink,omitempty"` Variables []RuleVariable `json:"variables,omitempty"` CriteriaMustSatisfy RuleCriteriaMustSatisfy `json:"criteriaMustSatisfy,omitempty"` }
Rules contains Rule object
type RulesUpdate ¶
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 ¶
type Search interface { // Search earches properties by name, or by the hostname or edge hostname for which it’s currently active // https://developer.akamai.com/api/core_features/property_manager/v1.html#postfindbyvalue SearchProperties(context.Context, SearchRequest) (*SearchResponse, error) }
Search contains SearchProperty method used for fetching properties https://developer.akamai.com/api/core_features/property_manager/v1.html#searchgroup
type SearchItem ¶
type SearchItem struct { AccountID string `json:"accountId"` AssetID string `json:"assetId"` ContractID string `json:"contractId"` EdgeHostname string `json:"edgeHostname"` GroupID string `json:"groupId"` Hostname string `json:"hostname"` ProductionStatus string `json:"productionStatus"` PropertyID string `json:"propertyId"` PropertyName string `json:"propertyName"` PropertyVersion int `json:"propertyVersion"` StagingStatus string `json:"stagingStatus"` UpdatedByUser string `json:"updatedByUser"` UpdatedDate string `json:"updatedDate"` }
SearchItem contains details of a search result
type SearchItems ¶
type SearchItems struct {
Items []SearchItem `json:"items"`
}
SearchItems contains a list of search results
type SearchRequest ¶
SearchRequest contains key-value pair for search request Key must have one of three values: "edgeHostname", "hostname" or "propertyName"
func (SearchRequest) Validate ¶
func (s SearchRequest) Validate() error
Validate validate SearchRequest struct
type SearchResponse ¶
type SearchResponse struct {
Versions SearchItems `json:"versions"`
}
SearchResponse contains response body of POST /search request
type StatusItem ¶ added in v2.4.0
type StatusItem struct {
Status string `json:"status,omitempty"`
}
StatusItem determines whether a hostname is capable of serving secure content over the staging or production network.
type UpdateCPCodeRequest ¶ added in v2.11.0
type UpdateCPCodeRequest struct { ID int `json:"cpcodeId"` Name string `json:"cpcodeName"` Purgeable *bool `json:"purgeable,omitempty"` OverrideTimeZone *CPCodeTimeZone `json:"overrideTimezone,omitempty"` Contracts []CPCodeContract `json:"contracts"` Products []CPCodeProduct `json:"products"` }
UpdateCPCodeRequest contains parameters required to update CP code, using CPRG API call
func (UpdateCPCodeRequest) Validate ¶ added in v2.11.0
func (cp UpdateCPCodeRequest) Validate() error
Validate validates UpdateCPCodeRequest
type UpdatePropertyVersionHostnamesRequest ¶
type UpdatePropertyVersionHostnamesRequest struct { PropertyID string PropertyVersion int ContractID string GroupID string ValidateHostnames bool IncludeCertStatus bool Hostnames []Hostname }
UpdatePropertyVersionHostnamesRequest contains parameters required to update the set of hostname entries for a property version
func (UpdatePropertyVersionHostnamesRequest) Validate ¶
func (ch UpdatePropertyVersionHostnamesRequest) Validate() error
Validate validates UpdatePropertyVersionHostnamesRequest
type UpdatePropertyVersionHostnamesResponse ¶
type UpdatePropertyVersionHostnamesResponse struct { AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` PropertyID string `json:"propertyId"` PropertyVersion int `json:"propertyVersion"` Etag string `json:"etag"` Hostnames HostnameResponseItems `json:"hostnames"` }
UpdatePropertyVersionHostnamesResponse contains information about each of the HostnameRequestItems
type UpdateRulesRequest ¶
type UpdateRulesRequest struct { PropertyID string PropertyVersion int ContractID string DryRun bool GroupID string ValidateMode string ValidateRules bool Rules RulesUpdate }
UpdateRulesRequest contains path and query params, as well as request body necessary to perform PUT /rules request
func (UpdateRulesRequest) Validate ¶
func (r UpdateRulesRequest) Validate() error
Validate validates UpdateRulesRequest struct
type UpdateRulesResponse ¶
type UpdateRulesResponse struct { AccountID string `json:"accountId"` ContractID string `json:"contractId"` Comments string `json:"comments,omitempty"` GroupID string `json:"groupId"` PropertyID string `json:"propertyId"` PropertyVersion int `json:"propertyVersion"` Etag string `json:"etag"` RuleFormat string `json:"ruleFormat"` Rules Rules `json:"rules"` Errors []RuleError `json:"errors"` }
UpdateRulesResponse contains data returned by performing PUT /rules request
type UseCase ¶
type UseCase struct { Option string `json:"option"` Type string `json:"type"` UseCase string `json:"useCase"` }
UseCase contains UseCase data
type ValidationCname ¶ added in v2.4.0
type ValidationCname struct { Hostname string `json:"hostname,omitempty"` Target string `json:"target,omitempty"` }
ValidationCname is the CNAME record used to validate the certificate’s domain
type VersionStatus ¶
type VersionStatus string
VersionStatus represents ProductionVersion and StagingVersion of a Version struct
const ( // VersionStatusActive const VersionStatusActive VersionStatus = "ACTIVE" // VersionStatusInactive const VersionStatusInactive VersionStatus = "INACTIVE" // VersionStatusPending const VersionStatusPending VersionStatus = "PENDING" // VersionStatusDeactivated const VersionStatusDeactivated VersionStatus = "DEACTIVATED" // VersionProduction const VersionProduction = "PRODUCTION" // VersionStaging const VersionStaging = "STAGING" )