Documentation ¶
Overview ¶
Package dns provides access to the Akamai DNS V2 APIs
See: https://techdocs.akamai.com/edge-dns/reference/edge-dns-api
Index ¶
- Variables
- type Authorities
- type AuthorityResponse
- type BulkCreateResultResponse
- type BulkDeleteResultResponse
- type BulkFailedZone
- type BulkStatusResponse
- type BulkZonesCreate
- type BulkZonesResponse
- type ChangeListResponse
- type ClientFunc
- type Contract
- type DNS
- type Data
- type Error
- type Group
- type ListGroupRequest
- type ListGroupResponse
- type ListMetadata
- type MetadataH
- type Mock
- func (d *Mock) CreateBulkZones(ctx context.Context, param *BulkZonesCreate, param2 ZoneQueryString) (*BulkZonesResponse, error)
- func (d *Mock) CreateRecord(ctx context.Context, param *RecordBody, param2 string, param3 ...bool) error
- func (d *Mock) CreateRecordsets(ctx context.Context, param *Recordsets, param2 string, param3 ...bool) error
- func (d *Mock) CreateZone(ctx context.Context, param1 *ZoneCreate, param2 ZoneQueryString, ...) error
- func (d *Mock) DeleteBulkZones(ctx context.Context, param *ZoneNameListResponse, param2 ...bool) (*BulkZonesResponse, error)
- func (d *Mock) DeleteRecord(ctx context.Context, param *RecordBody, param2 string, param3 ...bool) error
- func (d *Mock) DeleteTsigKey(ctx context.Context, param1 string) error
- func (d *Mock) DeleteZone(ctx context.Context, param1 *ZoneCreate, param2 ZoneQueryString) error
- func (d *Mock) FullIPv6(ctx context.Context, param1 net.IP) string
- func (d *Mock) GetAuthorities(ctx context.Context, param string) (*AuthorityResponse, error)
- func (d *Mock) GetBulkZoneCreateResult(ctx context.Context, param string) (*BulkCreateResultResponse, error)
- func (d *Mock) GetBulkZoneCreateStatus(ctx context.Context, param string) (*BulkStatusResponse, error)
- func (d *Mock) GetBulkZoneDeleteResult(ctx context.Context, param string) (*BulkDeleteResultResponse, error)
- func (d *Mock) GetBulkZoneDeleteStatus(ctx context.Context, param string) (*BulkStatusResponse, error)
- func (d *Mock) GetChangeList(ctx context.Context, param string) (*ChangeListResponse, error)
- func (d *Mock) GetMasterZoneFile(ctx context.Context, param string) (string, error)
- func (d *Mock) GetNameServerRecordList(ctx context.Context, param string) ([]string, error)
- func (d *Mock) GetRdata(ctx context.Context, param string, param2 string, param3 string) ([]string, error)
- func (d *Mock) GetRecord(ctx context.Context, param string, param2 string, param3 string) (*RecordBody, error)
- func (d *Mock) GetRecordList(ctx context.Context, param string, param2 string, param3 string) (*RecordSetResponse, error)
- func (d *Mock) GetRecordsets(ctx context.Context, param string, param2 ...RecordsetQueryArgs) (*RecordSetResponse, error)
- func (d *Mock) GetTsigKey(ctx context.Context, param string) (*TSIGKeyResponse, error)
- func (d *Mock) GetTsigKeyAliases(ctx context.Context, param string) (*ZoneNameListResponse, error)
- func (d *Mock) GetTsigKeyZones(ctx context.Context, param *TSIGKey) (*ZoneNameListResponse, error)
- func (d *Mock) GetZone(ctx context.Context, name string) (*ZoneResponse, error)
- func (d *Mock) GetZoneNameTypes(ctx context.Context, param1 string, param2 string) (*ZoneNameTypesResponse, error)
- func (d *Mock) GetZoneNames(ctx context.Context, param string) (*ZoneNamesResponse, error)
- func (d *Mock) ListGroups(ctx context.Context, request ListGroupRequest) (*ListGroupResponse, error)
- func (d *Mock) ListTsigKeys(ctx context.Context, param *TSIGQueryString) (*TSIGReportResponse, error)
- func (d *Mock) ListZones(ctx context.Context, query ...ZoneListQueryArgs) (*ZoneListResponse, error)
- func (d *Mock) NewAuthorityResponse(ctx context.Context, param string) *AuthorityResponse
- func (d *Mock) NewChangeListResponse(ctx context.Context, param string) *ChangeListResponse
- func (d *Mock) NewRecordBody(ctx context.Context, param RecordBody) *RecordBody
- func (d *Mock) NewRecordSetResponse(ctx context.Context, param string) *RecordSetResponse
- func (d *Mock) NewTsigKey(ctx context.Context, param string) *TSIGKey
- func (d *Mock) NewTsigQueryString(ctx context.Context) *TSIGQueryString
- func (d *Mock) NewZone(ctx context.Context, params ZoneCreate) *ZoneCreate
- func (d *Mock) NewZoneQueryString(ctx context.Context, param1 string, _ string) *ZoneQueryString
- func (d *Mock) NewZoneResponse(ctx context.Context, param string) *ZoneResponse
- func (d *Mock) PadCoordinates(ctx context.Context, param1 string) string
- func (d *Mock) ParseRData(ctx context.Context, param string, param2 []string) map[string]interface{}
- func (d *Mock) PostMasterZoneFile(ctx context.Context, param string, param2 string) error
- func (d *Mock) ProcessRdata(ctx context.Context, param []string, param2 string) []string
- func (d *Mock) RecordToMap(ctx context.Context, param *RecordBody) map[string]interface{}
- func (d *Mock) SaveChangelist(ctx context.Context, param *ZoneCreate) error
- func (d *Mock) SubmitChangelist(ctx context.Context, param *ZoneCreate) error
- func (d *Mock) TsigKeyBulkUpdate(ctx context.Context, param1 *TSIGKeyBulkPost) error
- func (d *Mock) UpdateRecord(ctx context.Context, param *RecordBody, param2 string, param3 ...bool) error
- func (d *Mock) UpdateRecordsets(ctx context.Context, param *Recordsets, param2 string, param3 ...bool) error
- func (d *Mock) UpdateTsigKey(ctx context.Context, param1 *TSIGKey, param2 string) error
- func (d *Mock) UpdateZone(ctx context.Context, param1 *ZoneCreate, param2 ZoneQueryString) error
- func (d *Mock) ValidateZone(ctx context.Context, param1 *ZoneCreate) error
- type Option
- type RecordBody
- type RecordSetResponse
- type RecordSets
- type Records
- type Recordset
- type RecordsetQueryArgs
- type Recordsets
- type TSIGKey
- type TSIGKeyBulkPost
- type TSIGKeyResponse
- type TSIGKeys
- type TSIGQueryString
- type TSIGReportMeta
- type TSIGReportResponse
- type TSIGZoneAliases
- type ZoneCreate
- type ZoneListQueryArgs
- type ZoneListResponse
- type ZoneNameListResponse
- type ZoneNameTypesResponse
- type ZoneNamesResponse
- type ZoneQueryString
- type ZoneResponse
- type Zones
Constants ¶
This section is empty.
Variables ¶
var ( // ErrBadRequest is returned when a required parameter is missing ErrBadRequest = errors.New("missing argument") )
var ( // ErrListGroups is returned in case an error occurs on ListGroups operation ErrListGroups = errors.New("list groups") )
var ( // ErrStructValidation is returned returned when given struct validation failed ErrStructValidation = errors.New("struct validation") )
Functions ¶
This section is empty.
Types ¶
type Authorities ¶
type Authorities interface { // GetAuthorities provides a list of structured read-only list of name servers. // // See: https://techdocs.akamai.com/edge-dns/reference/get-data-authorities GetAuthorities(context.Context, string) (*AuthorityResponse, error) // GetNameServerRecordList provides a list of name server records. // // See: https://techdocs.akamai.com/edge-dns/reference/get-data-authorities GetNameServerRecordList(context.Context, string) ([]string, error) // NewAuthorityResponse instantiate authority response. NewAuthorityResponse(context.Context, string) *AuthorityResponse }
Authorities contains operations available on Authorities data sources.
type AuthorityResponse ¶
type AuthorityResponse struct {
Contracts []Contract `json:"contracts"`
}
AuthorityResponse contains response with a list of one or more Contracts
type BulkCreateResultResponse ¶
type BulkCreateResultResponse struct { RequestId string `json:"requestId"` SuccessfullyCreatedZones []string `json:"successfullyCreatedZones"` FailedZones []*BulkFailedZone `json:"failedZones"` }
BulkCreateResultResponse contains the response from a completed bulk-create request
type BulkDeleteResultResponse ¶
type BulkDeleteResultResponse struct { RequestId string `json:"requestId"` SuccessfullyDeletedZones []string `json:"successfullyDeletedZones"` FailedZones []*BulkFailedZone `json:"failedZones"` }
BulkDeleteResultResponse contains the response from a completed bulk-delete request
type BulkFailedZone ¶
type BulkFailedZone struct { Zone string `json:"zone"` FailureReason string `json:"failureReason"` }
BulkFailedZone contains information about failed zone
type BulkStatusResponse ¶
type BulkStatusResponse struct { RequestId string `json:"requestId"` ZonesSubmitted int `json:"zonesSubmitted"` SuccessCount int `json:"successCount"` FailureCount int `json:"failureCount"` IsComplete bool `json:"isComplete"` ExpirationDate string `json:"expirationDate"` }
BulkStatusResponse contains current status of a running or completed bulk-create request
type BulkZonesCreate ¶
type BulkZonesCreate struct {
Zones []*ZoneCreate `json:"zones"`
}
BulkZonesCreate contains a list of one or more new Zones to create
type BulkZonesResponse ¶
type BulkZonesResponse struct { RequestId string `json:"requestId"` ExpirationDate string `json:"expirationDate"` }
BulkZonesResponse contains response from bulk-create request
type ChangeListResponse ¶
type ChangeListResponse struct { Zone string `json:"zone,omitempty"` ChangeTag string `json:"changeTag,omitempty"` ZoneVersionID string `json:"zoneVersionId,omitempty"` LastModifiedDate string `json:"lastModifiedDate,omitempty"` Stale bool `json:"stale,omitempty"` }
ChangeListResponse contains metadata about a change list
type ClientFunc ¶
ClientFunc is a dns client new method, this can used for mocking
type Contract ¶
type Contract struct { ContractID string `json:"contractId"` Authorities []string `json:"authorities"` }
Contract contains contractID and a list of currently assigned Akamai authoritative nameservers
type DNS ¶
type DNS interface { Authorities Data RecordSets Records TSIGKeys Zones }
DNS is the dns api interface
type Data ¶ added in v7.6.0
type Data interface { // ListGroups returns group list associated with particular user // // See: https://techdocs.akamai.com/edge-dns/reference/get-data-groups ListGroups(context.Context, ListGroupRequest) (*ListGroupResponse, error) }
Data contains operations available on Data resources.
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:"-"` }
Error is a papi error interface
type Group ¶ added in v7.6.0
type Group struct { GroupID int `json:"groupId"` GroupName string `json:"groupName"` ContractIDs []string `json:"contractIds"` Permissions []string `json:"permissions"` }
Group contain the information of the particular group
type ListGroupRequest ¶ added in v7.6.0
type ListGroupRequest struct {
GroupId string
}
ListGroupRequest is a request struct
type ListGroupResponse ¶ added in v7.6.0
type ListGroupResponse struct {
Groups []Group `json:"groups"`
}
ListGroupResponse lists the groups accessible to the current user
type ListMetadata ¶
type ListMetadata struct { ContractIDs []string `json:"contractIds"` Page int `json:"page"` PageSize int `json:"pageSize"` ShowAll bool `json:"showAll"` TotalElements int `json:"totalElements"` } //`json:"metadata"`
ListMetadata contains metadata for List Zones request
type MetadataH ¶
type MetadataH struct { LastPage int `json:"lastPage"` Page int `json:"page"` PageSize int `json:"pageSize"` ShowAll bool `json:"showAll"` TotalElements int `json:"totalElements"` } //`json:"metadata"`
MetadataH contains metadata of RecordSet response
type Mock ¶
func (*Mock) CreateBulkZones ¶
func (d *Mock) CreateBulkZones(ctx context.Context, param *BulkZonesCreate, param2 ZoneQueryString) (*BulkZonesResponse, error)
func (*Mock) CreateRecord ¶
func (*Mock) CreateRecordsets ¶
func (*Mock) CreateZone ¶
func (d *Mock) CreateZone(ctx context.Context, param1 *ZoneCreate, param2 ZoneQueryString, param3 ...bool) error
func (*Mock) DeleteBulkZones ¶
func (d *Mock) DeleteBulkZones(ctx context.Context, param *ZoneNameListResponse, param2 ...bool) (*BulkZonesResponse, error)
func (*Mock) DeleteRecord ¶
func (*Mock) DeleteZone ¶
func (d *Mock) DeleteZone(ctx context.Context, param1 *ZoneCreate, param2 ZoneQueryString) error
func (*Mock) GetAuthorities ¶
func (*Mock) GetBulkZoneCreateResult ¶
func (*Mock) GetBulkZoneCreateStatus ¶
func (*Mock) GetBulkZoneDeleteResult ¶
func (*Mock) GetBulkZoneDeleteStatus ¶
func (*Mock) GetChangeList ¶
func (*Mock) GetMasterZoneFile ¶
func (*Mock) GetNameServerRecordList ¶
func (*Mock) GetRecordList ¶
func (*Mock) GetRecordsets ¶
func (d *Mock) GetRecordsets(ctx context.Context, param string, param2 ...RecordsetQueryArgs) (*RecordSetResponse, error)
func (*Mock) GetTsigKey ¶
func (*Mock) GetTsigKeyAliases ¶
func (*Mock) GetTsigKeyZones ¶
func (*Mock) GetZoneNameTypes ¶
func (*Mock) GetZoneNames ¶
func (*Mock) ListGroups ¶ added in v7.6.0
func (d *Mock) ListGroups(ctx context.Context, request ListGroupRequest) (*ListGroupResponse, error)
func (*Mock) ListTsigKeys ¶
func (d *Mock) ListTsigKeys(ctx context.Context, param *TSIGQueryString) (*TSIGReportResponse, error)
func (*Mock) ListZones ¶
func (d *Mock) ListZones(ctx context.Context, query ...ZoneListQueryArgs) (*ZoneListResponse, error)
func (*Mock) NewAuthorityResponse ¶
func (d *Mock) NewAuthorityResponse(ctx context.Context, param string) *AuthorityResponse
func (*Mock) NewChangeListResponse ¶
func (d *Mock) NewChangeListResponse(ctx context.Context, param string) *ChangeListResponse
func (*Mock) NewRecordBody ¶
func (d *Mock) NewRecordBody(ctx context.Context, param RecordBody) *RecordBody
func (*Mock) NewRecordSetResponse ¶
func (d *Mock) NewRecordSetResponse(ctx context.Context, param string) *RecordSetResponse
func (*Mock) NewTsigQueryString ¶
func (d *Mock) NewTsigQueryString(ctx context.Context) *TSIGQueryString
func (*Mock) NewZone ¶
func (d *Mock) NewZone(ctx context.Context, params ZoneCreate) *ZoneCreate
func (*Mock) NewZoneQueryString ¶
func (*Mock) NewZoneResponse ¶
func (d *Mock) NewZoneResponse(ctx context.Context, param string) *ZoneResponse
func (*Mock) PadCoordinates ¶
func (*Mock) ParseRData ¶
func (*Mock) PostMasterZoneFile ¶
func (*Mock) ProcessRdata ¶
func (*Mock) RecordToMap ¶
func (d *Mock) RecordToMap(ctx context.Context, param *RecordBody) map[string]interface{}
func (*Mock) SaveChangelist ¶
func (d *Mock) SaveChangelist(ctx context.Context, param *ZoneCreate) error
func (*Mock) SubmitChangelist ¶
func (d *Mock) SubmitChangelist(ctx context.Context, param *ZoneCreate) error
func (*Mock) TsigKeyBulkUpdate ¶
func (d *Mock) TsigKeyBulkUpdate(ctx context.Context, param1 *TSIGKeyBulkPost) error
func (*Mock) UpdateRecord ¶
func (*Mock) UpdateRecordsets ¶
func (*Mock) UpdateTsigKey ¶
func (*Mock) UpdateZone ¶
func (d *Mock) UpdateZone(ctx context.Context, param1 *ZoneCreate, param2 ZoneQueryString) error
func (*Mock) ValidateZone ¶
func (d *Mock) ValidateZone(ctx context.Context, param1 *ZoneCreate) error
type RecordBody ¶
type RecordBody struct { Name string `json:"name,omitempty"` RecordType string `json:"type,omitempty"` TTL int `json:"ttl,omitempty"` // Active field no longer used in v2 Active bool `json:"active,omitempty"` Target []string `json:"rdata,omitempty"` }
RecordBody contains request body for dns record
type RecordSetResponse ¶
type RecordSetResponse struct { Metadata MetadataH `json:"metadata"` Recordsets []Recordset `json:"recordsets"` }
RecordSetResponse contains a response with a list of recordsets
type RecordSets ¶
type RecordSets interface { // NewRecordSetResponse returns new response object. NewRecordSetResponse(context.Context, string) *RecordSetResponse // GetRecordsets retrieves recordsets with Query Args. No formatting of arg values. // // See: See: https://techdocs.akamai.com/edge-dns/reference/get-zones-zone-recordsets GetRecordsets(context.Context, string, ...RecordsetQueryArgs) (*RecordSetResponse, error) // CreateRecordsets creates multiple recordsets. // // See: https://techdocs.akamai.com/edge-dns/reference/post-zones-zone-recordsets CreateRecordsets(context.Context, *Recordsets, string, ...bool) error // UpdateRecordsets replaces list of recordsets. // // See: https://techdocs.akamai.com/edge-dns/reference/put-zones-zone-recordsets UpdateRecordsets(context.Context, *Recordsets, string, ...bool) error }
RecordSets contains operations available on a recordsets.
type Records ¶
type Records interface { // RecordToMap returns a map containing record content. RecordToMap(context.Context, *RecordBody) map[string]interface{} // NewRecordBody returns bare bones tsig key struct. NewRecordBody(context.Context, RecordBody) *RecordBody // GetRecordList retrieves recordset list based on type. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zones-zone-recordsets GetRecordList(context.Context, string, string, string) (*RecordSetResponse, error) // GetRdata retrieves record rdata, e.g. target. GetRdata(context.Context, string, string, string) ([]string, error) // ProcessRdata process rdata. ProcessRdata(context.Context, []string, string) []string // ParseRData parses rdata. returning map. ParseRData(context.Context, string, []string) map[string]interface{} // GetRecord retrieves a recordset and returns as RecordBody. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zone-name-type GetRecord(context.Context, string, string, string) (*RecordBody, error) // CreateRecord creates recordset. // // See: https://techdocs.akamai.com/edge-dns/reference/post-zones-zone-names-name-types-type CreateRecord(context.Context, *RecordBody, string, ...bool) error // DeleteRecord removes recordset. // // See: https://techdocs.akamai.com/edge-dns/reference/delete-zone-name-type DeleteRecord(context.Context, *RecordBody, string, ...bool) error // UpdateRecord replaces the recordset. // // See: https://techdocs.akamai.com/edge-dns/reference/put-zones-zone-names-name-types-type UpdateRecord(context.Context, *RecordBody, string, ...bool) error // FullIPv6 is utility method to convert IP to string. FullIPv6(context.Context, net.IP) string // PadCoordinates is utility method to convert IP to normalize coordinates. PadCoordinates(context.Context, string) string }
Records contains operations available on a Record resource.
type Recordset ¶
type Recordset struct { Name string `json:"name"` Type string `json:"type"` TTL int `json:"ttl"` Rdata []string `json:"rdata"` } //`json:"recordsets"`
Recordset contains recordset metadata
type RecordsetQueryArgs ¶
type RecordsetQueryArgs struct { Page int PageSize int Search string ShowAll bool SortBy string Types string }
RecordsetQueryArgs contains query parameters for recordset request
type Recordsets ¶
type Recordsets struct {
Recordsets []Recordset `json:"recordsets"`
}
Recordsets Struct. Used for Create and Update Recordsets. Contains a list of Recordset objects
type TSIGKey ¶
type TSIGKey struct { Name string `json:"name"` Algorithm string `json:"algorithm,omitempty"` Secret string `json:"secret,omitempty"` }
TSIGKey contains TSIG key POST response
type TSIGKeyBulkPost ¶
TSIGKeyBulkPost contains TSIG key and a list of names of zones that should use the key. Used with update function.
func (*TSIGKeyBulkPost) Validate ¶
func (bulk *TSIGKeyBulkPost) Validate() error
Validate validates TSIGKeyBulkPost
type TSIGKeyResponse ¶
TSIGKeyResponse contains TSIG key GET response
type TSIGKeys ¶
type TSIGKeys interface { // NewTsigKey returns bare bones tsig key struct. NewTsigKey(context.Context, string) *TSIGKey // NewTsigQueryString returns empty query string struct. No elements required. NewTsigQueryString(context.Context) *TSIGQueryString // ListTsigKeys lists the TSIG keys used by zones that you are allowed to manage. // // See: https://techdocs.akamai.com/edge-dns/reference/get-keys ListTsigKeys(context.Context, *TSIGQueryString) (*TSIGReportResponse, error) // GetTsigKeyZones retrieves DNS Zones using tsig key. // // See: https://techdocs.akamai.com/edge-dns/reference/post-keys-used-by GetTsigKeyZones(context.Context, *TSIGKey) (*ZoneNameListResponse, error) // GetTsigKeyAliases retrieves a DNS Zone's aliases. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zones-zone-key-used-by GetTsigKeyAliases(context.Context, string) (*ZoneNameListResponse, error) // TsigKeyBulkUpdate updates Bulk Zones tsig key. // // See: https://techdocs.akamai.com/edge-dns/reference/post-keys-bulk-update TsigKeyBulkUpdate(context.Context, *TSIGKeyBulkPost) error // GetTsigKey retrieves a Tsig key for zone. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zones-zone-key GetTsigKey(context.Context, string) (*TSIGKeyResponse, error) // DeleteTsigKey deletes tsig key for zone. // // See: https://techdocs.akamai.com/edge-dns/reference/delete-zones-zone-key DeleteTsigKey(context.Context, string) error // UpdateTsigKey updates tsig key for zone. // // See: https://techdocs.akamai.com/edge-dns/reference/put-zones-zone-key UpdateTsigKey(context.Context, *TSIGKey, string) error }
TSIGKeys contains operations available on TSIKeyG resource.
type TSIGQueryString ¶
type TSIGQueryString struct { ContractIds []string `json:"contractIds,omitempty"` Search string `json:"search,omitempty"` SortBy []string `json:"sortBy,omitempty"` Gid int64 `json:"gid,omitempty"` }
TSIGQueryString contains TSIG query parameters
type TSIGReportMeta ¶
type TSIGReportMeta struct { TotalElements int64 `json:"totalElements"` Search string `json:"search,omitempty"` Contracts []string `json:"contracts,omitempty"` Gid int64 `json:"gid,omitempty"` SortBy []string `json:"sortBy,omitempty"` }
TSIGReportMeta contains metadata for TSIGReport response
type TSIGReportResponse ¶
type TSIGReportResponse struct { Metadata *TSIGReportMeta `json:"metadata"` Keys []*TSIGKeyResponse `json:"keys,omitempty"` }
TSIGReportResponse contains response with a list of the TSIG keys used by zones.
type TSIGZoneAliases ¶
type TSIGZoneAliases struct {
Aliases []string `json:"aliases"`
}
TSIGZoneAliases contains list of zone aliases
type ZoneCreate ¶
type ZoneCreate struct { Zone string `json:"zone"` Type string `json:"type"` Masters []string `json:"masters,omitempty"` Comment string `json:"comment,omitempty"` SignAndServe bool `json:"signAndServe"` SignAndServeAlgorithm string `json:"signAndServeAlgorithm,omitempty"` TsigKey *TSIGKey `json:"tsigKey,omitempty"` Target string `json:"target,omitempty"` EndCustomerID string `json:"endCustomerId,omitempty"` ContractID string `json:"contractId,omitempty"` }
ZoneCreate contains zone create request
type ZoneListQueryArgs ¶
type ZoneListQueryArgs struct { ContractIDs string Page int PageSize int Search string ShowAll bool SortBy string Types string }
ZoneListQueryArgs contains parameters for List Zones query
type ZoneListResponse ¶
type ZoneListResponse struct { Metadata *ListMetadata `json:"metadata,omitempty"` Zones []*ZoneResponse `json:"zones,omitempty"` }
ZoneListResponse contains response for List Zones request
type ZoneNameListResponse ¶
type ZoneNameListResponse struct { Zones []string `json:"zones"` Aliases []string `json:"aliases,omitempty"` }
ZoneNameListResponse contains response with a list of zone's names and aliases
type ZoneNameTypesResponse ¶
type ZoneNameTypesResponse struct {
Types []string `json:"types"`
}
ZoneNameTypesResponse contains record set types for zone
type ZoneNamesResponse ¶
type ZoneNamesResponse struct {
Names []string `json:"names"`
}
ZoneNamesResponse contains record set names for zone
type ZoneQueryString ¶
ZoneQueryString contains zone query parameters
type ZoneResponse ¶
type ZoneResponse struct { Zone string `json:"zone,omitempty"` Type string `json:"type,omitempty"` Masters []string `json:"masters,omitempty"` Comment string `json:"comment,omitempty"` SignAndServe bool `json:"signAndServe"` SignAndServeAlgorithm string `json:"signAndServeAlgorithm,omitempty"` TsigKey *TSIGKey `json:"tsigKey,omitempty"` Target string `json:"target,omitempty"` EndCustomerID string `json:"endCustomerId,omitempty"` ContractID string `json:"contractId,omitempty"` AliasCount int64 `json:"aliasCount,omitempty"` ActivationState string `json:"activationState,omitempty"` LastActivationDate string `json:"lastActivationDate,omitempty"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` LastModifiedDate string `json:"lastModifiedDate,omitempty"` VersionId string `json:"versionId,omitempty"` }
ZoneResponse contains zone create response
type Zones ¶
type Zones interface { // ListZones retrieves a list of all zones user can access. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zones ListZones(context.Context, ...ZoneListQueryArgs) (*ZoneListResponse, error) // NewZone returns a new ZoneCreate object. NewZone(context.Context, ZoneCreate) *ZoneCreate // NewZoneResponse returns a new ZoneResponse object. NewZoneResponse(context.Context, string) *ZoneResponse // NewChangeListResponse returns a new ChangeListResponse object. NewChangeListResponse(context.Context, string) *ChangeListResponse // NewZoneQueryString returns a new ZoneQueryString object. NewZoneQueryString(context.Context, string, string) *ZoneQueryString // GetZone retrieves Zone metadata. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zone GetZone(context.Context, string) (*ZoneResponse, error) //GetChangeList retrieves Zone changelist. // // See: https://techdocs.akamai.com/edge-dns/reference/get-changelists-zone GetChangeList(context.Context, string) (*ChangeListResponse, error) // GetMasterZoneFile retrieves master zone file. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zones-zone-zone-file GetMasterZoneFile(context.Context, string) (string, error) // PostMasterZoneFile updates master zone file. // // See: https://techdocs.akamai.com/edge-dns/reference/post-zones-zone-zone-file PostMasterZoneFile(context.Context, string, string) error // CreateZone creates new zone. // // See: https://techdocs.akamai.com/edge-dns/reference/post-zone CreateZone(context.Context, *ZoneCreate, ZoneQueryString, ...bool) error // SaveChangelist creates a new Change List based on the most recent version of a zone. // // See: https://techdocs.akamai.com/edge-dns/reference/post-changelists SaveChangelist(context.Context, *ZoneCreate) error // SubmitChangelist submits changelist for the Zone to create default NS SOA records. // // See: https://techdocs.akamai.com/edge-dns/reference/post-changelists-zone-submit SubmitChangelist(context.Context, *ZoneCreate) error // UpdateZone updates zone. // // See: https://techdocs.akamai.com/edge-dns/reference/put-zone UpdateZone(context.Context, *ZoneCreate, ZoneQueryString) error // DeleteZone deletes zone. // // See: N/A DeleteZone(context.Context, *ZoneCreate, ZoneQueryString) error // ValidateZone validates zone metadata based on type. ValidateZone(context.Context, *ZoneCreate) error // GetZoneNames retrieves a list of a zone's record names. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zone-names GetZoneNames(context.Context, string) (*ZoneNamesResponse, error) // GetZoneNameTypes retrieves a zone name's record types. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zone-name-types GetZoneNameTypes(context.Context, string, string) (*ZoneNameTypesResponse, error) // CreateBulkZones submits create bulk zone request. // // See: https://techdocs.akamai.com/edge-dns/reference/post-zones-create-requests CreateBulkZones(context.Context, *BulkZonesCreate, ZoneQueryString) (*BulkZonesResponse, error) // DeleteBulkZones submits delete bulk zone request. // // See: https://techdocs.akamai.com/edge-dns/reference/post-zones-delete-requests DeleteBulkZones(context.Context, *ZoneNameListResponse, ...bool) (*BulkZonesResponse, error) // GetBulkZoneCreateStatus retrieves submit request status. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zones-create-requests-requestid GetBulkZoneCreateStatus(context.Context, string) (*BulkStatusResponse, error) //GetBulkZoneDeleteStatus retrieves submit request status. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zones-delete-requests-requestid GetBulkZoneDeleteStatus(context.Context, string) (*BulkStatusResponse, error) // GetBulkZoneCreateResult retrieves create request result. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zones-create-requests-requestid-result GetBulkZoneCreateResult(ctx context.Context, requestid string) (*BulkCreateResultResponse, error) // GetBulkZoneDeleteResult retrieves delete request result. // // See: https://techdocs.akamai.com/edge-dns/reference/get-zones-delete-requests-requestid-result GetBulkZoneDeleteResult(context.Context, string) (*BulkDeleteResultResponse, error) }
Zones contains operations available on Zone resources.