| 1 |
package dns |
| 2 |
|
| 3 |
import ( |
| 4 |
"log" |
| 5 |
|
| 6 |
"github.com/denverdino/aliyungo/common" |
| 7 |
) |
| 8 |
|
| 9 |
type AddDomainArgs struct { |
| 10 |
DomainName string |
| 11 |
|
| 12 |
|
| 13 |
GroupId string |
| 14 |
} |
| 15 |
|
| 16 |
type AddDomainResponse struct { |
| 17 |
common.Response |
| 18 |
DomainId string |
| 19 |
DomainName string |
| 20 |
GroupId string |
| 21 |
GroupName string |
| 22 |
PunyCode string |
| 23 |
DnsServers struct { |
| 24 |
DnsServer []string |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
func (client *Client) AddDomain(args *AddDomainArgs) (response *AddDomainResponse, err error) { |
| 32 |
action := "AddDomain" |
| 33 |
response = &AddDomainResponse{} |
| 34 |
err = client.Invoke(action, args, response) |
| 35 |
if err == nil { |
| 36 |
return response, nil |
| 37 |
} else { |
| 38 |
log.Printf("%s error, %v", action, err) |
| 39 |
return response, err |
| 40 |
} |
| 41 |
} |