Skip to content

list_domains async

list_domains(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListDomainsResponse

Lists the domains.

Parameters:

  • next_token (Optional[NextToken], default: None ) –

    If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results.

  • max_results (Optional[MaxResults], default: None ) –

    This parameter defines the maximum number of results that can be return in a single response. The MaxResults parameter is an upper bound, not a target. If there are more results available than the value specified, a NextToken is provided in the response. The NextToken indicates that the user should get the next set of results by providing this token as a part of a subsequent call. The default value for MaxResults is 10.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def list_domains(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
) -> "capo_sagemaker.types.list_domains_response.ListDomainsResponse":
    """<p>Lists the domains.</p>

    Args:
        next_token: <p>If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results.</p>
        max_results: <p>This parameter defines the maximum number of results that can be return in a single response. The <code>MaxResults</code> parameter is an upper bound, not a target. If there are more results available than the value specified, a <code>NextToken</code> is provided in the response. The <code>NextToken</code> indicates that the user should get the next set of results by providing this token as a part of a subsequent call. The default value for <code>MaxResults</code> is 10.</p>

    Raises:
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.list_domains_request.ListDomainsRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.list_domains_response.ListDomainsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_domains

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.list_domains.async_list_domains(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDomains")
    )
    input_: capo_sagemaker.types.list_domains_request.ListDomainsRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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