Skip to content

list_domains

list_domains(
    *,
    config_overrides: Optional[Route53DomainsClientConfig] = None,
    filter_conditions: Optional[FilterConditions] = None,
    sort_condition: Optional[SortCondition] = None,
    marker: Optional[PageMarker] = None,
    max_items: Optional[PageMaxItems] = None,
) -> ListDomainsResponse

This operation returns all the domain names registered with Amazon Route 53 for the current Amazon Web Services account if no filtering conditions are used.

Parameters:

  • filter_conditions (Optional[FilterConditions], default: None ) –

    A complex type that contains information about the filters applied during the ListDomains request. The filter conditions can include domain name and domain expiration.

  • sort_condition (Optional[SortCondition], default: None ) –

    A complex type that contains information about the requested ordering of domains in the returned list.

  • marker (Optional[PageMarker], default: None ) –

    For an initial request for a list of domains, omit this element. If the number of domains that are associated with the current Amazon Web Services account is greater than the value that you specified for MaxItems, you can use Marker to return additional domains. Get the value of NextPageMarker from the previous response, and submit another request that includes the value of NextPageMarker in the Marker element.

    Constraints: The marker must match the value specified in the previous request.

  • max_items (Optional[PageMaxItems], default: None ) –

    Number of domains to be returned.

    Default: 20

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.

  • UnknownServiceError –

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

Source code in docs_src/capo_route_53_domains/_services/route53_domains.py
def list_domains(
    self,
    *,
    config_overrides: Optional[Route53DomainsClientConfig] = None,
    filter_conditions: Optional[
        "capo_route_53_domains.types.filter_conditions.FilterConditions"
    ] = None,
    sort_condition: Optional[
        "capo_route_53_domains.types.sort_condition.SortCondition"
    ] = None,
    marker: Optional["capo_route_53_domains.types.page_marker.PageMarker"] = None,
    max_items: Optional[
        "capo_route_53_domains.types.page_max_items.PageMaxItems"
    ] = None,
) -> "capo_route_53_domains.types.list_domains_response.ListDomainsResponse":
    """<p>This operation returns all the domain names registered with Amazon Route 53 for the current Amazon Web Services account if no filtering conditions are used.</p>

    Args:
        filter_conditions: <p>A complex type that contains information about the filters applied during the <code>ListDomains</code> request. The filter conditions can include domain name and domain expiration.</p>
        sort_condition: <p>A complex type that contains information about the requested ordering of domains in the returned list.</p>
        marker: <p>For an initial request for a list of domains, omit this element. If the number of domains that are associated with the current Amazon Web Services account is greater than the value that you specified for <code>MaxItems</code>, you can use <code>Marker</code> to return additional domains. Get the value of <code>NextPageMarker</code> from the previous response, and submit another request that includes the value of <code>NextPageMarker</code> in the <code>Marker</code> element.</p> <p>Constraints: The marker must match the value specified in the previous request.</p>
        max_items: <p>Number of domains to be returned.</p> <p>Default: 20</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route_53_domains.types.list_domains_request.ListDomainsRequest]",
    ) -> OperationResponse[
        "capo_route_53_domains.types.list_domains_response.ListDomainsResponse"
    ]:
        import capo_route_53_domains._operations.route53_domains_v20140515.list_domains

        output, http_response = (
            capo_route_53_domains._operations.route53_domains_v20140515.list_domains.list_domains(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDomains")
    )
    input_: capo_route_53_domains.types.list_domains_request.ListDomainsRequest = {}
    if filter_conditions is not None:
        input_["filter_conditions"] = filter_conditions
    if sort_condition is not None:
        input_["sort_condition"] = sort_condition
    if marker is not None:
        input_["marker"] = marker
    if max_items is not None:
        input_["max_items"] = max_items

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output