Documentation ¶
Index ¶
- Constants
- type ARecord
- type AaaaRecord
- type CaaRecord
- type Client
- func (c *Client) CreateRecordSet(resourceGroup, zoneName string, recordType RecordType, ...) (*RecordSet, error)
- func (c *Client) CreateZone(resourceGroup, zoneName string, zone Zone) (*Zone, error)
- func (c *Client) DeleteRecordSet(resourceGroup, zoneName string, recordType RecordType, ...) error
- func (c *Client) DeleteZone(resourceGroup, zoneName string) error
- func (c *Client) GetRecordSet(resourceGroup, zoneName string, recordType RecordType, ...) (*RecordSet, *int, error)
- func (c *Client) GetZone(resourceGroup, zoneName string) (*Zone, *int, error)
- func (c *Client) ListRecordSets(resourceGroup, zoneName string, recordType RecordType) (*RecordSetListResult, error)
- func (c *Client) ListZones(resourceGroup string) (*ZoneListResult, error)
- func (c *Client) UpdateRecordSet(resourceGroup, zoneName string, recordType RecordType, ...) (*RecordSet, error)
- func (c *Client) UpdateZone(resourceGroup, zoneName string, zone Zone) (*Zone, error)
- type CloudError
- type CloudErrorBody
- type CnameRecord
- type Interface
- type MxRecord
- type NsRecord
- type PtrRecord
- type RecordSet
- type RecordSetListResult
- type RecordSetListResultIterator
- type RecordSetListResultPage
- type RecordSetProperties
- type RecordSetUpdateParameters
- type RecordType
- type Resource
- type SoaRecord
- type SrvRecord
- type SubResource
- type TxtRecord
- type Zone
- type ZoneListResult
- type ZoneProperties
- type ZoneType
Constants ¶
const (
// BaseURI is the default URI used for compute services.
BaseURI = "https://management.azure.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ARecord ¶
type ARecord struct { // Ipv4Address - The IPv4 address of this A record. Ipv4Address string `json:"ipv4Address,omitempty"` }
ARecord an A record.
type AaaaRecord ¶
type AaaaRecord struct { // Ipv6Address - The IPv6 address of this AAAA record. Ipv6Address string `json:"ipv6Address,omitempty"` }
AaaaRecord an AAAA record.
type CaaRecord ¶
type CaaRecord struct { // Flags - The flags for this CAA record as an integer between 0 and 255. Flags int32 `json:"flags,omitempty"` // Tag - The tag for this CAA record. Tag string `json:"tag,omitempty"` // Value - The value for this CAA record. Value string `json:"value,omitempty"` }
CaaRecord a CAA record.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for interacting with Azure DNS.
Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines.
func (*Client) CreateRecordSet ¶
func (c *Client) CreateRecordSet(resourceGroup, zoneName string, recordType RecordType, relativeRecordSetName string, recordSet RecordSet) (*RecordSet, error)
CreateRecordSet creates a new Azure DNS Record Set with the provided properties. From: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/createorupdate
func (*Client) CreateZone ¶
CreateZone creates a new Azure DNS Zone with the provided properties. From: https://docs.microsoft.com/en-us/rest/api/dns/zones/createorupdate
func (*Client) DeleteRecordSet ¶
func (c *Client) DeleteRecordSet(resourceGroup, zoneName string, recordType RecordType, relativeRecordSetName string) error
DeleteRecordSet deletes an Azure DNS Record Set in the provided resource group with the given zone name. From: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/delete
func (*Client) DeleteZone ¶
DeleteZone deletes an Azure DNS Zone in the provided resource group with the given zone name. From: https://docs.microsoft.com/en-us/rest/api/dns/zones/delete
func (*Client) GetRecordSet ¶
func (c *Client) GetRecordSet(resourceGroup, zoneName string, recordType RecordType, relativeRecordSetName string) (*RecordSet, *int, error)
GetRecordSet gets an Azure DNS Record Set in the provided resource group with the given record set name. From: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/get
func (*Client) GetZone ¶
GetZone gets an Azure DNS Zone in the provided resource group with the given zone name. From: https://docs.microsoft.com/en-us/rest/api/dns/zones/get
func (*Client) ListRecordSets ¶
func (c *Client) ListRecordSets(resourceGroup, zoneName string, recordType RecordType) (*RecordSetListResult, error)
ListRecordSets lists Azure DNS Record Sets, if a record set type is given it will list by a type. From: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/listbydnszone From: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/listbytype
func (*Client) ListZones ¶
func (c *Client) ListZones(resourceGroup string) (*ZoneListResult, error)
ListZones lists Azure DNS Zones, if a resource group is given it will list by resource group. It optionally accepts a resource group name and will filter based off of it if it is not empty. From: https://docs.microsoft.com/en-us/rest/api/dns/zones/list From: https://docs.microsoft.com/en-us/rest/api/dns/zones/listbyresourcegroup
func (*Client) UpdateRecordSet ¶
func (c *Client) UpdateRecordSet(resourceGroup, zoneName string, recordType RecordType, relativeRecordSetName string, recordSet RecordSet) (*RecordSet, error)
UpdateRecordSet updates a Azure DNS Record Set with the provided properties. From: https://docs.microsoft.com/en-us/rest/api/dns/recordsets/createorupdate
func (*Client) UpdateZone ¶
UpdateZone updates a Azure DNS Zone with the provided properties. From: https://docs.microsoft.com/en-us/rest/api/dns/zones/createorupdate
type CloudError ¶
type CloudError struct { // Error - The error message body Error CloudErrorBody `json:"error,omitempty"` }
CloudError an error message
type CloudErrorBody ¶
type CloudErrorBody struct { // Code - The error code Code string `json:"code,omitempty"` // Message - A description of what caused the error Message string `json:"message,omitempty"` // Target - The target resource of the error message Target string `json:"target,omitempty"` // Details - Extra error information Details []CloudErrorBody `json:"details,omitempty"` }
CloudErrorBody the body of an error message
type CnameRecord ¶
type CnameRecord struct { // Cname - The canonical name for this CNAME record. Cname string `json:"cname,omitempty"` }
CnameRecord a CNAME record.
type Interface ¶
type Interface interface { CreateZone(resourceGroup, zoneName string, zone Zone) (*Zone, error) CreateRecordSet(resourceGroup, zoneName string, recordType RecordType, relativeRecordSetName string, recordSet RecordSet) (*RecordSet, error) DeleteZone(resourceGroup, zoneName string) error DeleteRecordSet(resourceGroup, zoneName string, recordType RecordType, relativeRecordSetName string) error GetZone(resourceGroup, zoneName string) (*Zone, *int, error) GetRecordSet(resourceGroup, zoneName string, recordType RecordType, relativeRecordSetName string) (*RecordSet, *int, error) ListZones(resourceGroup string) (*ZoneListResult, error) ListRecordSets(resourceGroup, zoneName string, recordType RecordType) (*RecordSetListResult, error) UpdateZone(resourceGroup, zoneName string, zone Zone) (*Zone, error) UpdateRecordSet(resourceGroup, zoneName string, recordType RecordType, relativeRecordSetName string, recordSet RecordSet) (*RecordSet, error) }
Interface contains the set of methods on the Client type.
type MxRecord ¶
type MxRecord struct { // Preference - The preference value for this MX record. Preference int32 `json:"preference,omitempty"` // Exchange - The domain name of the mail host for this MX record. Exchange string `json:"exchange,omitempty"` }
MxRecord an MX record.
type NsRecord ¶
type NsRecord struct { // Nsdname - The name server name for this NS record. Nsdname string `json:"nsdname,omitempty"` }
NsRecord an NS record.
type PtrRecord ¶
type PtrRecord struct { // Ptrdname - The PTR target domain name for this PTR record. Ptrdname string `json:"ptrdname,omitempty"` }
PtrRecord a PTR record.
type RecordSet ¶
type RecordSet struct { autorest.Response `json:"-"` // ID - The ID of the record set. ID string `json:"id,omitempty"` // Name - The name of the record set. Name string `json:"name,omitempty"` // Type - The type of the record set. Type string `json:"type,omitempty"` // Etag - The etag of the record set. Etag string `json:"etag,omitempty"` // RecordSetProperties - The properties of the record set. RecordSetProperties `json:"properties,omitempty"` }
RecordSet describes a DNS record set (a collection of DNS records with the same name and type).
type RecordSetListResult ¶
type RecordSetListResult struct { autorest.Response `json:"-"` // Value - Information about the record sets in the response. Value []RecordSet `json:"value,omitempty"` // NextLink - The continuation token for the next page of results. NextLink string `json:"nextLink,omitempty"` }
RecordSetListResult the response to a record set List operation.
func (RecordSetListResult) IsEmpty ¶
func (rslr RecordSetListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
type RecordSetListResultIterator ¶
type RecordSetListResultIterator struct {
// contains filtered or unexported fields
}
RecordSetListResultIterator provides access to a complete listing of RecordSet values.
func (*RecordSetListResultIterator) Next ¶
func (iter *RecordSetListResultIterator) Next() error
Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.
func (RecordSetListResultIterator) NotDone ¶
func (iter RecordSetListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (RecordSetListResultIterator) Response ¶
func (iter RecordSetListResultIterator) Response() RecordSetListResult
Response returns the raw server response from the last page request.
func (RecordSetListResultIterator) Value ¶
func (iter RecordSetListResultIterator) Value() RecordSet
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
type RecordSetListResultPage ¶
type RecordSetListResultPage struct {
// contains filtered or unexported fields
}
RecordSetListResultPage contains a page of RecordSet values.
func (*RecordSetListResultPage) Next ¶
func (page *RecordSetListResultPage) Next() error
Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.
func (RecordSetListResultPage) NotDone ¶
func (page RecordSetListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (RecordSetListResultPage) Response ¶
func (page RecordSetListResultPage) Response() RecordSetListResult
Response returns the raw server response from the last page request.
func (RecordSetListResultPage) Values ¶
func (page RecordSetListResultPage) Values() []RecordSet
Values returns the slice of values for the current page or nil if there are no values.
type RecordSetProperties ¶
type RecordSetProperties struct { // Metadata - The metadata attached to the record set. Metadata map[string]string `json:"metadata"` // TTL - The TTL (time-to-live) of the records in the record set. TTL int64 `json:"TTL,omitempty"` // Fqdn - Fully qualified domain name of the record set. Fqdn string `json:"fqdn,omitempty"` // ARecords - The list of A records in the record set. ARecords []ARecord `json:"ARecords,omitempty"` // AaaaRecords - The list of AAAA records in the record set. AaaaRecords []AaaaRecord `json:"AAAARecords,omitempty"` // MxRecords - The list of MX records in the record set. MxRecords []MxRecord `json:"MXRecords,omitempty"` // NsRecords - The list of NS records in the record set. NsRecords []NsRecord `json:"NSRecords,omitempty"` // PtrRecords - The list of PTR records in the record set. PtrRecords []PtrRecord `json:"PTRRecords,omitempty"` // SrvRecords - The list of SRV records in the record set. SrvRecords []SrvRecord `json:"SRVRecords,omitempty"` // TxtRecords - The list of TXT records in the record set. TxtRecords []TxtRecord `json:"TXTRecords,omitempty"` // CnameRecord - The CNAME record in the record set. CnameRecord CnameRecord `json:"CNAMERecord,omitempty"` // SoaRecord - The SOA record in the record set. SoaRecord SoaRecord `json:"SOARecord,omitempty"` // CaaRecords - The list of CAA records in the record set. CaaRecords []CaaRecord `json:"caaRecords,omitempty"` }
RecordSetProperties represents the properties of the records in the record set.
type RecordSetUpdateParameters ¶
type RecordSetUpdateParameters struct { // RecordSet - Specifies information about the record set being updated. RecordSet RecordSet `json:"RecordSet,omitempty"` }
RecordSetUpdateParameters parameters supplied to update a record set.
type RecordType ¶
type RecordType string
RecordType enumerates the values for record type.
const ( // A ... A RecordType = "A" // AAAA ... AAAA RecordType = "AAAA" // CAA ... CAA RecordType = "CAA" // CNAME ... CNAME RecordType = "CNAME" // MX ... MX RecordType = "MX" // NS ... NS RecordType = "NS" // PTR ... PTR RecordType = "PTR" // SOA ... SOA RecordType = "SOA" // SRV ... SRV RecordType = "SRV" // TXT ... TXT RecordType = "TXT" )
func PossibleRecordTypeValues ¶
func PossibleRecordTypeValues() [10]RecordType
PossibleRecordTypeValues returns an array of possible values for the RecordType const type.
type Resource ¶
type Resource struct { // ID - Resource ID. ID string `json:"id,omitempty"` // Name - Resource name. Name string `json:"name,omitempty"` // Type - Resource type. Type string `json:"type,omitempty"` // Location - Resource location. Location string `json:"location,omitempty"` // Tags - Resource tags. Tags map[string]string `json:"tags"` }
Resource common properties of an Azure Resource Manager resource
type SoaRecord ¶
type SoaRecord struct { // Host - The domain name of the authoritative name server for this SOA record. Host string `json:"host,omitempty"` // Email - The email contact for this SOA record. Email string `json:"email,omitempty"` // SerialNumber - The serial number for this SOA record. SerialNumber int64 `json:"serialNumber,omitempty"` // RefreshTime - The refresh value for this SOA record. RefreshTime int64 `json:"refreshTime,omitempty"` // RetryTime - The retry time for this SOA record. RetryTime int64 `json:"retryTime,omitempty"` // ExpireTime - The expire time for this SOA record. ExpireTime int64 `json:"expireTime,omitempty"` // MinimumTTL - The minimum value for this SOA record. By convention this is used to determine the negative caching duration. MinimumTTL int64 `json:"minimumTTL,omitempty"` }
SoaRecord an SOA record.
type SrvRecord ¶
type SrvRecord struct { // Priority - The priority value for this SRV record. Priority int32 `json:"priority,omitempty"` // Weight - The weight value for this SRV record. Weight int32 `json:"weight,omitempty"` // Port - The port value for this SRV record. Port int32 `json:"port,omitempty"` // Target - The target domain name for this SRV record. Target string `json:"target,omitempty"` }
SrvRecord an SRV record.
type SubResource ¶
type SubResource struct { // ID - Resource Id. ID string `json:"id,omitempty"` }
SubResource a reference to a another resource
type TxtRecord ¶
type TxtRecord struct { // Value - The text value of this TXT record. Value []string `json:"value,omitempty"` }
TxtRecord a TXT record.
type Zone ¶
type Zone struct { autorest.Response `json:"-"` // Etag - The etag of the zone. Etag string `json:"etag,omitempty"` // ZoneProperties - The properties of the zone. *ZoneProperties `json:"properties,omitempty"` // ID - Resource ID. ID string `json:"id,omitempty"` // Name - Resource name. Name string `json:"name,omitempty"` // Type - Resource type. Type string `json:"type,omitempty"` // Location - Resource location. Location string `json:"location,omitempty"` // Tags - Resource tags. Tags map[string]string `json:"tags"` }
Zone describes a DNS zone.
type ZoneListResult ¶
type ZoneListResult struct { autorest.Response `json:"-"` // Value - Information about the DNS zones. Value []Zone `json:"value,omitempty"` // NextLink - The continuation token for the next page of results. NextLink string `json:"nextLink,omitempty"` }
ZoneListResult the response to a Zone List or ListAll operation.
type ZoneProperties ¶
type ZoneProperties struct { // MaxNumberOfRecordSets - The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. MaxNumberOfRecordSets int64 `json:"maxNumberOfRecordSets,omitempty"` // NumberOfRecordSets - The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. NumberOfRecordSets int64 `json:"numberOfRecordSets,omitempty"` // NameServers - The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored. NameServers []string `json:"nameServers,omitempty"` // ZoneType - The type of this DNS zone (Public or Private). Possible values include: 'Public', 'Private' ZoneType ZoneType `json:"zoneType,omitempty"` // RegistrationVirtualNetworks - A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private. RegistrationVirtualNetworks []SubResource `json:"registrationVirtualNetworks,omitempty"` // ResolutionVirtualNetworks - A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private. ResolutionVirtualNetworks []SubResource `json:"resolutionVirtualNetworks,omitempty"` }
ZoneProperties represents the properties of the zone.