AddDomainRecord.go 780 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package dns
  2. import (
  3. "log"
  4. "github.com/denverdino/aliyungo/common"
  5. )
  6. type AddDomainRecordArgs struct {
  7. DomainName string
  8. RR string
  9. Type string
  10. Value string
  11. //optional
  12. Line string
  13. }
  14. type AddDomainRecordResponse struct {
  15. common.Response
  16. InstanceId string
  17. RecordId string
  18. }
  19. // AddDomainRecord
  20. //
  21. // You can read doc at https://docs.aliyun.com/#/pub/dns/api-reference/record-related&AddDomainRecord
  22. func (client *Client) AddDomainRecord(args *AddDomainRecordArgs) (response *AddDomainRecordResponse, err error) {
  23. action := "AddDomainRecord"
  24. response = &AddDomainRecordResponse{}
  25. err = client.Invoke(action, args, response)
  26. if err == nil {
  27. return response, nil
  28. } else {
  29. log.Printf("%s error, %v", action, err)
  30. return response, err
  31. }
  32. }