Skip to content

get_domain_suggestions async

get_domain_suggestions(
    domain_name: DomainName,
    suggestion_count: Integer,
    only_available: Boolean,
    *,
    config_overrides: Optional[AsyncRoute53DomainsClientConfig] = None,
    only_standard_prices: Optional[Boolean] = None,
) -> GetDomainSuggestionsResponse

The GetDomainSuggestions operation returns a list of suggested domain names.

Parameters:

  • domain_name (DomainName) –

    A domain name that you want to use as the basis for a list of possible domain names. The top-level domain (TLD), such as .com, must be a TLD that Route 53 supports. For a list of supported TLDs, see Domains that You Can Register with Amazon Route 53 in the Amazon Route 53 Developer Guide.

    The domain name can contain only the following characters:

    • Letters a through z. Domain names are not case sensitive.

    • Numbers 0 through 9.

    • Hyphen (-). You can't specify a hyphen at the beginning or end of a label.

    • Period (.) to separate the labels in the name, such as the . in example.com.

    Internationalized domain names are not supported for some top-level domains. To determine whether the TLD that you want to use supports internationalized domain names, see Domains that You Can Register with Amazon Route 53.

  • suggestion_count (Integer) –

    The number of suggested domain names that you want Route 53 to return. Specify a value between 1 and 50. Note that fewer than the requested number might be returned.

  • only_available (Boolean) –

    If OnlyAvailable is true, Route 53 returns only domain names that are available. If OnlyAvailable is false, Route 53 returns domain names without checking whether they're available to be registered. To determine whether the domain is available, call checkDomainAvailability for each suggestion.

    If OnlyAvailable is false, Route 53 does not return pricing information for the suggested domain names.

  • only_standard_prices (Optional[Boolean], default: None ) –

    If true, Route 53 returns only domain names that are priced at the standard registration rate for their TLD. If false, Route 53 includes domain names with premium pricing in the suggestions list. The default is true.

Raises:

  • InvalidInput –

    The requested item is not acceptable. For example, for APIs that accept a domain name, the request might specify a domain name that doesn't belong to the account that submitted the request. For AcceptDomainTransferFromAnotherAwsAccount, the password might be invalid.

  • TLDInMaintenance –

    The top-level domain is currently undergoing maintenance and the request cannot be processed. Try again later.

  • UnsupportedTLD –

    Amazon Route 53 does not support this top-level domain (TLD).

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_route_53_domains/_services/async_route53_domains.py
async def get_domain_suggestions(
    self,
    domain_name: "capo_route_53_domains.types.domain_name.DomainName",
    suggestion_count: "capo_route_53_domains.types.integer.Integer",
    only_available: "capo_route_53_domains.types.boolean.Boolean",
    *,
    config_overrides: Optional[AsyncRoute53DomainsClientConfig] = None,
    only_standard_prices: Optional[
        "capo_route_53_domains.types.boolean.Boolean"
    ] = None,
) -> "capo_route_53_domains.types.get_domain_suggestions_response.GetDomainSuggestionsResponse":
    """<p>The GetDomainSuggestions operation returns a list of suggested domain names.</p>

    Args:
        domain_name: <p>A domain name that you want to use as the basis for a list of possible domain names. The top-level domain (TLD), such as .com, must be a TLD that Route 53 supports. For a list of supported TLDs, see <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html">Domains that You Can Register with Amazon Route 53</a> in the <i>Amazon Route 53 Developer Guide</i>.</p> <p>The domain name can contain only the following characters:</p> <ul> <li> <p>Letters a through z. Domain names are not case sensitive.</p> </li> <li> <p>Numbers 0 through 9.</p> </li> <li> <p>Hyphen (-). You can't specify a hyphen at the beginning or end of a label. </p> </li> <li> <p>Period (.) to separate the labels in the name, such as the <code>.</code> in <code>example.com</code>.</p> </li> </ul> <p>Internationalized domain names are not supported for some top-level domains. To determine whether the TLD that you want to use supports internationalized domain names, see <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html">Domains that You Can Register with Amazon Route 53</a>. </p>
        suggestion_count: <p>The number of suggested domain names that you want Route 53 to return. Specify a value between 1 and 50. Note that fewer than the requested number might be returned.</p>
        only_available: <p>If <code>OnlyAvailable</code> is <code>true</code>, Route 53 returns only domain names that are available. If <code>OnlyAvailable</code> is <code>false</code>, Route 53 returns domain names without checking whether they're available to be registered. To determine whether the domain is available, call <code>checkDomainAvailability</code> for each suggestion.</p> <p>If <code>OnlyAvailable</code> is <code>false</code>, Route 53 does not return pricing information for the suggested domain names.</p>
        only_standard_prices: <p>If <code>true</code>, Route 53 returns only domain names that are priced at the standard registration rate for their TLD. If <code>false</code>, Route 53 includes domain names with premium pricing in the suggestions list. The default is <code>true</code>.</p>

    Raises:
        capo_route_53_domains.errors.invalid_input.InvalidInput: <p>The requested item is not acceptable. For example, for APIs that accept a domain name, the request might specify a domain name that doesn't belong to the account that submitted the request. For <code>AcceptDomainTransferFromAnotherAwsAccount</code>, the password might be invalid.</p>
        capo_route_53_domains.errors.tld_in_maintenance.TLDInMaintenance: <p>The top-level domain is currently undergoing maintenance and the request cannot be processed. Try again later.</p>
        capo_route_53_domains.errors.unsupported_tld.UnsupportedTLD: <p>Amazon Route 53 does not support this top-level domain (TLD).</p>
        capo_route_53_domains.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route_53_domains.types.get_domain_suggestions_request.GetDomainSuggestionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_route_53_domains.types.get_domain_suggestions_response.GetDomainSuggestionsResponse"
    ]:
        import capo_route_53_domains._operations.route53_domains_v20140515.get_domain_suggestions

        (
            output,
            http_response,
        ) = await capo_route_53_domains._operations.route53_domains_v20140515.get_domain_suggestions.async_get_domain_suggestions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDomainSuggestions")
    )
    input_: capo_route_53_domains.types.get_domain_suggestions_request.GetDomainSuggestionsRequest = {
        "domain_name": domain_name,
        "suggestion_count": suggestion_count,
        "only_available": only_available,
    }
    if only_standard_prices is not None:
        input_["only_standard_prices"] = only_standard_prices

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output