2016-10-30 27 views
2
>>> 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] 

のGoogle検索やバリエーションのものが得られていない、と私はClientErrorを見つけることができないように「のAWSのbotoのroute53がドメイン名を付け以上1つのラベルを含んでいなければなりません」例外のドキュメント...どんな助け?AWSのpython SDK boto3クライアントroute53domainsのget_domain_suggestions ClientError

EDIT:docsによると、すべてのパラメータがOKで、response = r53d.list_domains()が有効なので、boto3.clientパラメータではないことがわかります。

+0

はバグのようです。 'get_domain_suggestions()'はTLDを要求します。したがって、 'DomainName'に複数のラベルを付ける必要があります。 – helloV

+0

@helloV docsの状態**"トップレベルドメインが指定されている(または指定されていない)文字列 "**および' DomainName = 'example''または 'DomainName =' example.com 'は同じ結果を返します。それは私が把握しようとしているものです。なぜなら、 'DomainName'のために複数のラベルを付けることは... – lscstu22

+0

なぜそれはバグだと言いましたか?コードとドキュメントは同期していません。これを行うには、TLD(特別ラベル)を提供する必要があります。 – helloV

答えて

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 
関連する問題