Skip to content

list_models async

list_models(
    *,
    config_overrides: Optional[AsyncLookoutEquipmentClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    status: Optional[ModelStatus] = None,
    model_name_begins_with: Optional[ModelName] = None,
    dataset_name_begins_with: Optional[DatasetName] = None,
) -> ListModelsResponse

Generates a list of all models in the account, including model name and ARN, dataset, and status.

Parameters:

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

    An opaque pagination token indicating where to continue the listing of machine learning models.

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

    Specifies the maximum number of machine learning models to list.

  • status (Optional[ModelStatus], default: None ) –

    The status of the machine learning model.

  • model_name_begins_with (Optional[ModelName], default: None ) –

    The beginning of the name of the machine learning models being listed.

  • dataset_name_begins_with (Optional[DatasetName], default: None ) –

    The beginning of the name of the dataset of the machine learning models to be listed.

Raises:

  • AccessDeniedException –

    The request could not be completed because you do not have access to the resource.

  • InternalServerException –

    Processing of the request has failed because of an unknown error, exception or failure.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized.

  • UnknownServiceError –

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

Source code in docs_src/capo_lookoutequipment/_services/async_lookout_equipment.py
async def list_models(
    self,
    *,
    config_overrides: Optional[AsyncLookoutEquipmentClientConfig] = None,
    next_token: Optional["capo_lookoutequipment.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_lookoutequipment.types.max_results.MaxResults"
    ] = None,
    status: Optional["capo_lookoutequipment.types.model_status.ModelStatus"] = None,
    model_name_begins_with: Optional[
        "capo_lookoutequipment.types.model_name.ModelName"
    ] = None,
    dataset_name_begins_with: Optional[
        "capo_lookoutequipment.types.dataset_name.DatasetName"
    ] = None,
) -> "capo_lookoutequipment.types.list_models_response.ListModelsResponse":
    """<p>Generates a list of all models in the account, including model name and ARN, dataset, and status. </p>

    Args:
        next_token: <p> An opaque pagination token indicating where to continue the listing of machine learning models. </p>
        max_results: <p> Specifies the maximum number of machine learning models to list. </p>
        status: <p>The status of the machine learning model. </p>
        model_name_begins_with: <p>The beginning of the name of the machine learning models being listed. </p>
        dataset_name_begins_with: <p>The beginning of the name of the dataset of the machine learning models to be listed. </p>

    Raises:
        capo_lookoutequipment.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have access to the resource. </p>
        capo_lookoutequipment.errors.internal_server_exception.InternalServerException: <p> Processing of the request has failed because of an unknown error, exception or failure. </p>
        capo_lookoutequipment.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_lookoutequipment.errors.validation_exception.ValidationException: <p> The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized. </p>
        capo_lookoutequipment.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_lookoutequipment.types.list_models_request.ListModelsRequest]",
    ) -> AsyncOperationResponse[
        "capo_lookoutequipment.types.list_models_response.ListModelsResponse"
    ]:
        import capo_lookoutequipment._operations.aws_lookout_equipment_frontend_service.list_models

        (
            output,
            http_response,
        ) = await capo_lookoutequipment._operations.aws_lookout_equipment_frontend_service.list_models.async_list_models(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListModels")
    )
    input_: capo_lookoutequipment.types.list_models_request.ListModelsRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if status is not None:
        input_["status"] = status
    if model_name_begins_with is not None:
        input_["model_name_begins_with"] = model_name_begins_with
    if dataset_name_begins_with is not None:
        input_["dataset_name_begins_with"] = dataset_name_begins_with

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