dns

package
v0.0.0-...-ab98a91 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 13

Documentation

Index

Constants

View Source
const (
	// DNSDefaultEndpoint is the default API endpoint of DNS services
	DNSDefaultEndpoint = "http://dns.aliyuncs.com"
	DNSAPIVersion      = "2015-01-09"

	DNSDefaultEndpointNew = "http://alidns.aliyuncs.com"
)
View Source
const (
	ARecord           = "A"
	NSRecord          = "NS"
	MXRecord          = "MX"
	TXTRecord         = "TXT"
	CNAMERecord       = "CNAME"
	SRVRecord         = "SRV"
	AAAARecord        = "AAAA"
	RedirectURLRecord = "REDIRECT_URL"
	ForwordURLRecord  = "FORWORD_URL"
)

you can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/enum-type&record-format

Variables

This section is empty.

Functions

This section is empty.

Types

type AddDomainArgs

type AddDomainArgs struct {
	DomainName string

	//optional
	GroupId string
}

type AddDomainGroupArgs

type AddDomainGroupArgs struct {
	GroupName string
}

type AddDomainGroupResponse

type AddDomainGroupResponse struct {
	common.Response
	GroupId   string
	GroupName string
}

type AddDomainRecordArgs

type AddDomainRecordArgs struct {
	DomainName string
	RR         string
	Type       string
	Value      string

	//optional
	TTL      int32
	Priority int32
	Line     string
}

type AddDomainRecordResponse

type AddDomainRecordResponse struct {
	common.Response
	InstanceId string
	RecordId   string
}

type AddDomainResponse

type AddDomainResponse struct {
	common.Response
	DomainId   string
	DomainName string
	GroupId    string
	GroupName  string
	PunyCode   string
	DnsServers struct {
		DnsServer []string
	}
}

type ChangeDomainGroupArgs

type ChangeDomainGroupArgs struct {
	DomainName string
	GroupId    string
}

type ChangeDomainGroupResponse

type ChangeDomainGroupResponse struct {
	common.Response
	GroupId   string
	GroupName string
}

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(accessKeyId, accessKeySecret string) *Client

NewClient creates a new instance of DNS client

func NewClientNew

func NewClientNew(accessKeyId, accessKeySecret string) *Client

NewClientNew creates a new instance of DNS client, with http://alidns.aliyuncs.com as default endpoint

func NewClientWithEndpoint

func NewClientWithEndpoint(endpoint string, accessKeyId, accessKeySecret string) *Client

func NewCustomClient

func NewCustomClient(accessKeyId, accessKeySecret string, endpoint string) *Client

NewCustomClient creates a new instance of ECS client with customized API endpoint

func (*Client) AddDomain

func (client *Client) AddDomain(args *AddDomainArgs) (response *AddDomainResponse, err error)

AddDomain

You can read doc at https://help.aliyun.com/document_detail/29749.html?spm=5176.doc29805.6.592.6LMqlG

func (*Client) AddDomainGroup

func (client *Client) AddDomainGroup(args *AddDomainGroupArgs) (response *AddDomainGroupResponse, err error)

AddDomainGroup

You can read doc at https://help.aliyun.com/document_detail/29762.html?spm=5176.doc29749.6.604.PJtwG1

func (*Client) AddDomainRecord

func (client *Client) AddDomainRecord(args *AddDomainRecordArgs) (response *AddDomainRecordResponse, err error)

AddDomainRecord

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&AddDomainRecord

func (*Client) ChangeDomainGroup

func (client *Client) ChangeDomainGroup(args *ChangeDomainGroupArgs) (response *ChangeDomainGroupResponse, err error)

ChangeDomainGroup

You can read doc at https://help.aliyun.com/document_detail/29765.html?spm=5176.doc29764.6.607.WUJQgE

func (*Client) DeleteDomain

func (client *Client) DeleteDomain(args *DeleteDomainArgs) (response *DeleteDomainResponse, err error)

DeleteDomain

You can read doc at https://help.aliyun.com/document_detail/29750.html?spm=5176.doc29766.6.593.eELaZ7

func (*Client) DeleteDomainGroup

func (client *Client) DeleteDomainGroup(args *DeleteDomainGroupArgs) (response *DeleteDomainGroupResponse, err error)

DeleteDomainGroup

You can read doc at https://help.aliyun.com/document_detail/29764.html?spm=5176.doc29763.6.606.Vm3FyC

func (*Client) DeleteDomainRecord

func (client *Client) DeleteDomainRecord(args *DeleteDomainRecordArgs) (response *DeleteDomainRecordResponse, err error)

DeleteDomainRecord

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&DeleteDomainRecord

func (*Client) DeleteSubDomainRecords

func (client *Client) DeleteSubDomainRecords(args *DeleteSubDomainRecordsArgs) (response *DeleteSubDomainRecordsResponse, err error)

DeleteSubDomainRecords

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&DeleteSubDomainRecords

func (*Client) DescribeDomainGroups

func (client *Client) DescribeDomainGroups(args *DescribeDomainGroupsArgs) (groups []DomainGroupType, err error)

DescribeDomainGroups

You can read doc at https://help.aliyun.com/document_detail/29766.html?spm=5176.doc29765.6.608.qcQr2R

func (*Client) DescribeDomainInfo

func (client *Client) DescribeDomainInfo(args *DescribeDomainInfoArgs) (domain DomainType, err error)

DescribeDomainInfo

You can read doc at https://help.aliyun.com/document_detail/29752.html?spm=5176.doc29751.6.595.VJM3Gy

func (*Client) DescribeDomainRecordInfo

func (client *Client) DescribeDomainRecordInfo(args *DescribeDomainRecordInfoArgs) (response *DescribeDomainRecordInfoResponse, err error)

DescribeDomainRecordInfo

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&DescribeDomainRecordInfo

func (*Client) DescribeDomainRecordInfoNew

func (client *Client) DescribeDomainRecordInfoNew(args *DescribeDomainRecordInfoNewArgs) (response *DescribeDomainRecordInfoNewResponse, err error)

DescribeDomainRecordInformation

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&DescribeDomainRecordInfo

func (*Client) DescribeDomainRecords

func (client *Client) DescribeDomainRecords(args *DescribeDomainRecordsArgs) (response *DescribeDomainRecordsResponse, err error)

DescribeDomainRecords

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&DescribeDomainRecords

func (*Client) DescribeDomainRecordsNew

func (client *Client) DescribeDomainRecordsNew(args *DescribeDomainRecordsNewArgs) (response *DescribeDomainRecordsNewResponse, err error)

DescribeDomainRecordsNew

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&DescribeDomainRecords

func (*Client) DescribeDomains

func (client *Client) DescribeDomains(args *DescribeDomainsArgs) (domains []DomainType, err error)

DescribeDomains

You can read doc at https://help.aliyun.com/document_detail/29751.html?spm=5176.doc29750.6.594.dvyRJV

func (*Client) DescribeSubDomainRecords

func (client *Client) DescribeSubDomainRecords(args *DescribeSubDomainRecordsArgs) (response *DescribeSubDomainRecordsResponse, err error)

DescribeSubDomainRecords

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&DescribeSubDomainRecords

func (*Client) GetMainDomainName

func (client *Client) GetMainDomainName(args *GetMainDomainNameArgs) (response *GetMainDomainNameResponse, err error)

GetMainDomainName

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/domain-related&GetMainDomainName

func (*Client) UpdateDomainGroup

func (client *Client) UpdateDomainGroup(args *UpdateDomainGroupArgs) (response *UpdateDomainGroupResponse, err error)

UpdateDomainGroup

You can read doc at https://help.aliyun.com/document_detail/29763.html?spm=5176.doc29762.6.605.iFRKjn

func (*Client) UpdateDomainRecord

func (client *Client) UpdateDomainRecord(args *UpdateDomainRecordArgs) (response *UpdateDomainRecordResponse, err error)

UpdateDomainRecord

You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&UpdateDomainRecord

type DeleteDomainArgs

type DeleteDomainArgs struct {
	DomainName string
}

type DeleteDomainGroupArgs

type DeleteDomainGroupArgs struct {
	GroupId string
}

type DeleteDomainGroupResponse

type DeleteDomainGroupResponse struct {
	common.Response
	GroupName string
}

type DeleteDomainRecordArgs

type DeleteDomainRecordArgs struct {
	RecordId string
}

type DeleteDomainRecordResponse

type DeleteDomainRecordResponse struct {
	common.Response
	InstanceId string
	RecordId   string
}

type DeleteDomainResponse

type DeleteDomainResponse struct {
	common.Response
	DomainName string
}

type DeleteSubDomainRecordsArgs

type DeleteSubDomainRecordsArgs struct {
	DomainName string
	RR         string

	//optional
	Type string
}

type DeleteSubDomainRecordsResponse

type DeleteSubDomainRecordsResponse struct {
	common.Response
	InstanceId string
	RR         string
}

type DescribeDomainGroupsArgs

type DescribeDomainGroupsArgs struct {
	//optional
	common.Pagination
	KeyWord string
}

type DescribeDomainGroupsResponse

type DescribeDomainGroupsResponse struct {
	common.PaginationResult
	DomainGroups struct {
		DomainGroup []DomainGroupType
	}
	// contains filtered or unexported fields
}

type DescribeDomainInfoArgs

type DescribeDomainInfoArgs struct {
	DomainName string
}

type DescribeDomainInfoResponse

type DescribeDomainInfoResponse struct {
	DomainType
	// contains filtered or unexported fields
}

type DescribeDomainRecordInfoArgs

type DescribeDomainRecordInfoArgs struct {
	RecordId string
}

type DescribeDomainRecordInfoNewArgs

type DescribeDomainRecordInfoNewArgs struct {
	RecordId string
}

type DescribeDomainRecordInfoNewResponse

type DescribeDomainRecordInfoNewResponse struct {
	common.Response
	RecordTypeNew
}

type DescribeDomainRecordInfoResponse

type DescribeDomainRecordInfoResponse struct {
	common.Response
	RecordType
}

type DescribeDomainRecordsArgs

type DescribeDomainRecordsArgs struct {
	DomainName string

	//optional
	common.Pagination
	RRKeyWord    string
	TypeKeyWord  string
	ValueKeyWord string
}

type DescribeDomainRecordsNewArgs

type DescribeDomainRecordsNewArgs struct {
	DomainName string

	//optional
	common.Pagination
	RRKeyWord    string
	TypeKeyWord  string
	ValueKeyWord string
}

type DescribeDomainRecordsNewResponse

type DescribeDomainRecordsNewResponse struct {
	common.Response
	common.PaginationResult
	InstanceId    string
	DomainRecords struct {
		Record []RecordTypeNew
	}
}

type DescribeDomainRecordsResponse

type DescribeDomainRecordsResponse struct {
	common.Response
	common.PaginationResult
	InstanceId    string
	DomainRecords struct {
		Record []RecordType
	}
}

type DescribeDomainsArgs

type DescribeDomainsArgs struct {
	// optional
	common.Pagination
	KeyWord string
	GroupId string
}

type DescribeDomainsResponse

type DescribeDomainsResponse struct {
	common.PaginationResult
	Domains struct {
		Domain []DomainType
	}
	// contains filtered or unexported fields
}

type DescribeSubDomainRecordsArgs

type DescribeSubDomainRecordsArgs struct {
	SubDomain string

	//optional
	PageNumber int32
	PageSize   int32
	Type       string
}

type DescribeSubDomainRecordsResponse

type DescribeSubDomainRecordsResponse struct {
	common.Response
	InstanceId    string
	TotalCount    int32
	PageNumber    int32
	PageSize      int32
	DomainRecords struct {
		Record []RecordType
	}
}

type DomainGroupType

type DomainGroupType struct {
	GroupId   string
	GroupName string
}

type DomainType

type DomainType struct {
	DomainId    string
	DomainName  string
	AliDomain   bool
	GroupId     string
	GroupName   string
	InstanceId  string
	VersionCode string
	PunyCode    string
	DnsServers  struct {
		DnsServer []string
	}
}

type GetMainDomainNameArgs

type GetMainDomainNameArgs struct {
	InputString string
}

type GetMainDomainNameResponse

type GetMainDomainNameResponse struct {
	common.Response
	InstanceId  string
	DomainName  string
	RR          string
	DomainLevel int32
}

type RecordType

type RecordType struct {
	DomainName string
	RecordId   string
	RR         string
	Type       string
	Value      string
	TTL        int32
	Priority   int32
	Line       string
	Status     string
	Locked     bool
}

type RecordTypeNew

type RecordTypeNew struct {
	DomainName string
	RecordId   string
	RR         string
	Type       string
	Value      string
	TTL        float64
	Priority   int32
	Line       string
	Status     string
	Locked     bool
}

endpoint change to 'http://alidns.aliyuncs.com' then record ttl and priority change to string

type UpdateDomainGroupArgs

type UpdateDomainGroupArgs struct {
	GroupId   string
	GroupName string
}

type UpdateDomainGroupResponse

type UpdateDomainGroupResponse struct {
	common.Response
	GroupId   string
	GroupName string
}

type UpdateDomainRecordArgs

type UpdateDomainRecordArgs struct {
	RecordId string
	RR       string
	Type     string
	Value    string

	//optional
	TTL      int32
	Priority int32
	Line     string
}

type UpdateDomainRecordResponse

type UpdateDomainRecordResponse struct {
	common.Response
	InstanceId string
	RecordId   string
}

Jump to

Keyboard shortcuts

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