Skip to content

list_model_quality_job_definitions async

list_model_quality_job_definitions(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    endpoint_name: Optional[EndpointName] = None,
    sort_by: Optional[MonitoringJobDefinitionSortKey] = None,
    sort_order: Optional[SortOrder] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    name_contains: Optional[NameContains] = None,
    creation_time_before: Optional[Timestamp] = None,
    creation_time_after: Optional[Timestamp] = None,
) -> ListModelQualityJobDefinitionsResponse

Gets a list of model quality monitoring job definitions in your account.

Parameters:

  • endpoint_name (Optional[EndpointName], default: None ) –

    A filter that returns only model quality monitoring job definitions that are associated with the specified endpoint.

  • sort_by (Optional[MonitoringJobDefinitionSortKey], default: None ) –

    The field to sort results by. The default is CreationTime.

  • sort_order (Optional[SortOrder], default: None ) –

    Whether to sort the results in Ascending or Descending order. The default is Descending.

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

    If the result of the previous ListModelQualityJobDefinitions request was truncated, the response includes a NextToken. To retrieve the next set of model quality monitoring job definitions, use the token in the next request.

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

    The maximum number of results to return in a call to ListModelQualityJobDefinitions.

  • name_contains (Optional[NameContains], default: None ) –

    A string in the transform job name. This filter returns only model quality monitoring job definitions whose name contains the specified string.

  • creation_time_before (Optional[Timestamp], default: None ) –

    A filter that returns only model quality monitoring job definitions created before the specified time.

  • creation_time_after (Optional[Timestamp], default: None ) –

    A filter that returns only model quality monitoring job definitions created after the specified time.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def list_model_quality_job_definitions(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    endpoint_name: Optional[
        "capo_sagemaker.types.endpoint_name.EndpointName"
    ] = None,
    sort_by: Optional[
        "capo_sagemaker.types.monitoring_job_definition_sort_key.MonitoringJobDefinitionSortKey"
    ] = None,
    sort_order: Optional["capo_sagemaker.types.sort_order.SortOrder"] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
    name_contains: Optional[
        "capo_sagemaker.types.name_contains.NameContains"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    creation_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
) -> "capo_sagemaker.types.list_model_quality_job_definitions_response.ListModelQualityJobDefinitionsResponse":
    """<p>Gets a list of model quality monitoring job definitions in your account.</p>

    Args:
        endpoint_name: <p>A filter that returns only model quality monitoring job definitions that are associated with the specified endpoint.</p>
        sort_by: <p>The field to sort results by. The default is <code>CreationTime</code>.</p>
        sort_order: <p>Whether to sort the results in <code>Ascending</code> or <code>Descending</code> order. The default is <code>Descending</code>.</p>
        next_token: <p>If the result of the previous <code>ListModelQualityJobDefinitions</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of model quality monitoring job definitions, use the token in the next request.</p>
        max_results: <p>The maximum number of results to return in a call to <code>ListModelQualityJobDefinitions</code>.</p>
        name_contains: <p>A string in the transform job name. This filter returns only model quality monitoring job definitions whose name contains the specified string.</p>
        creation_time_before: <p>A filter that returns only model quality monitoring job definitions created before the specified time.</p>
        creation_time_after: <p>A filter that returns only model quality monitoring job definitions created after the specified time.</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_model_quality_job_definitions_request.ListModelQualityJobDefinitionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.list_model_quality_job_definitions_response.ListModelQualityJobDefinitionsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_model_quality_job_definitions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListModelQualityJobDefinitions")
    )
    input_: capo_sagemaker.types.list_model_quality_job_definitions_request.ListModelQualityJobDefinitionsRequest = {}
    if endpoint_name is not None:
        input_["endpoint_name"] = endpoint_name
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if name_contains is not None:
        input_["name_contains"] = name_contains
    if creation_time_before is not None:
        input_["creation_time_before"] = creation_time_before
    if creation_time_after is not None:
        input_["creation_time_after"] = creation_time_after

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