| 1 |
package dns |
| 2 |
|
| 3 |
import ( |
| 4 |
"log" |
| 5 |
|
| 6 |
"github.com/denverdino/aliyungo/common" |
| 7 |
) |
| 8 |
|
| 9 |
type AddDomainRecordArgs struct { |
| 10 |
DomainName string |
| 11 |
RR string |
| 12 |
Type string |
| 13 |
Value string |
| 14 |
|
| 15 |
|
| 16 |
TTL int32 |
| 17 |
Priority int32 |
| 18 |
Line string |
| 19 |
} |
| 20 |
|
| 21 |
type AddDomainRecordResponse struct { |
| 22 |
common.Response |
| 23 |
InstanceId string |
| 24 |
RecordId string |
| 25 |
} |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
func (client *Client) AddDomainRecord(args *AddDomainRecordArgs) (response *AddDomainRecordResponse, err error) { |
| 31 |
action := "AddDomainRecord" |
| 32 |
response = &AddDomainRecordResponse{} |
| 33 |
err = client.Invoke(action, args, response) |
| 34 |
if err == nil { |
| 35 |
return response, nil |
| 36 |
} else { |
| 37 |
log.Printf("%s error, %v", action, err) |
| 38 |
return response, err |
| 39 |
} |
| 40 |
} |