DescribeDomainInfo.go 927 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package dns
  2. import (
  3. "log"
  4. "github.com/denverdino/aliyungo/common"
  5. )
  6. type DomainType struct {
  7. DomainId string
  8. DomainName string
  9. AliDomain bool
  10. GroupId string
  11. GroupName string
  12. InstanceId string
  13. VersionCode string
  14. PunyCode string
  15. DnsServers struct {
  16. DnsServer []string
  17. }
  18. }
  19. type DescribeDomainInfoArgs struct {
  20. DomainName string
  21. }
  22. type DescribeDomainInfoResponse struct {
  23. response common.Response
  24. DomainType
  25. }
  26. // DescribeDomainInfo
  27. //
  28. // You can read doc at https://help.aliyun.com/document_detail/29752.html?spm=5176.doc29751.6.595.VJM3Gy
  29. func (client *Client) DescribeDomainInfo(args *DescribeDomainInfoArgs) (domain DomainType, err error) {
  30. action := "DescribeDomainInfo"
  31. response := &DescribeDomainInfoResponse{}
  32. err = client.Invoke(action, args, response)
  33. if err != nil {
  34. log.Printf("%s error, %v", action, err)
  35. return DomainType{}, err
  36. }
  37. return response.DomainType, nil
  38. }