aws python sdk boto3客户端路由53域获取域建议客户端

2024-09-30 05:22:51 发布

您现在位置:Python中文网/ 问答频道 /正文

>>> 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]

谷歌搜索aws boto route53 Give domain name必须包含1个以上的标签“或者变体,我似乎找不到ClientError异常文档。。。有什么帮助吗?在

编辑:据我所知,根据docs,我的所有参数都是正常的,response = r53d.list_domains()起作用,所以我知道它不是boto3.client参数。在


Tags: nameinclientawsapiresponsedomainline
1条回答
网友
1楼 · 发布于 2024-09-30 05:22:51

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

相关问题 更多 >

    热门问题