kbt.py 712 B

123456789101112131415
  1. #!/usr/bin/env python
  2. #coding=utf-8
  3. from aliyunsdkcore.client import AcsClient
  4. from aliyunsdkcore.acs_exception.exceptions import ClientException
  5. from aliyunsdkcore.acs_exception.exceptions import ServerException
  6. from aliyunsdkalidns.request.v20150109.AddDomainRecordRequest import AddDomainRecordRequest
  7. from aliyunsdkalidns.request.v20150109.DescribeDomainRecordsRequest import DescribeDomainRecordsRequest
  8. client = AcsClient('LTAI4FrfVTnbzWftNex7RKNB', 'vzosLbzA96VHaoCaGZMCsgNqb5BkyT', 'cn-hangzhou')
  9. request = DescribeDomainRecordsRequest()
  10. request.set_DomainName('zositech.org')
  11. request.set_accept_format('json')
  12. response = client.do_action_with_exception(request)
  13. print(str(response, encoding='utf-8'))