>>> import boto3
>>> r53d = boto3.client('route53domains', aws_access_key_id='(removed)', aws_secret_access_key='(removed)', region_name='us-east-1')
>>> response = r53d.get_domain_suggestions(DomainName='example', SuggestionCount=5, OnlyAvailable=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/.pyenv/versions/webev.net/lib/python2.7/site-packages/botocore/client.py", line 159, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/user/.pyenv/versions/webev.net/lib/python2.7/site-packages/botocore/client.py", line 494, in _make_api_call
raise ClientError(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidInput) when calling the GetDomainSuggestions operation: Errors: [Give domain name must contain more than 1 label]
谷歌搜索&#34; aws boto route53给予域名必须包含多于1个标签&#34; 或变体不会产生任何结果,我似乎无法找到ClientError异常文档......有什么帮助吗?
编辑:据我所知,我的所有参数都可以根据docs和response = r53d.list_domains()
工作,所以我知道它不是boto3.client
参数。< / p>
答案 0 :(得分:0)
与Boto3 documentation所说的相反,get_domain_suggestions()
期望有效的TLD。传递example.com
应该会返回一些结果。
>>> for val in r53d.get_domain_suggestions(DomainName='google.com', SuggestionCount=5, OnlyAvailable=True)['SuggestionsList']: print val['DomainName']
6oo6l3.com
moveogle.com
googleannounces.com
googleunveils.com
adwordsonline.com