forked from denverdino/aliyungo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddDomain.go
41 lines (35 loc) · 783 Bytes
/
AddDomain.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
package dns
import (
"log"
"github.com/reedchan7/aliyungo/common"
)
type AddDomainArgs struct {
DomainName string
// optional
GroupId string
}
type AddDomainResponse struct {
common.Response
DomainId string
DomainName string
GroupId string
GroupName string
PunyCode string
DnsServers struct {
DnsServer []string
}
}
// AddDomain
//
// You can read doc at https://help.aliyun.com/document_detail/29749.html?spm=5176.doc29805.6.592.6LMqlG
func (client *Client) AddDomain(args *AddDomainArgs) (response *AddDomainResponse, err error) {
action := "AddDomain"
response = &AddDomainResponse{}
err = client.Invoke(action, args, response)
if err == nil {
return response, nil
} else {
log.Printf("%s error, %v", action, err)
return response, err
}
}