forked from denverdino/aliyungo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DescribeDomainInfo.go
46 lines (38 loc) · 925 Bytes
/
DescribeDomainInfo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package dns
import (
"log"
"github.com/denverdino/aliyungo/common"
)
type DomainType struct {
DomainId string
DomainName string
AliDomain bool
GroupId string
GroupName string
InstanceId string
VersionCode string
PunyCode string
DnsServers struct {
DnsServer []string
}
}
type DescribeDomainInfoArgs struct {
DomainName string
}
type DescribeDomainInfoResponse struct {
response common.Response
DomainType
}
// DescribeDomainInfo
//
// You can read doc at https://help.aliyun.com/document_detail/29752.html?spm=5176.doc29751.6.595.VJM3Gy
func (client *Client) DescribeDomainInfo(args *DescribeDomainInfoArgs) (domain DomainType, err error) {
action := "DescribeDomainInfo"
response := &DescribeDomainInfoResponse{}
err = client.Invoke(action, args, response)
if err != nil {
log.Printf("%s error, %v", action, err)
return DomainType{}, err
}
return response.DomainType, nil
}