Skip to content

list_inference_recommendations_jobs async

list_inference_recommendations_jobs(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    creation_time_after: Optional[CreationTime] = None,
    creation_time_before: Optional[CreationTime] = None,
    last_modified_time_after: Optional[LastModifiedTime] = None,
    last_modified_time_before: Optional[LastModifiedTime] = None,
    name_contains: Optional[NameContains] = None,
    status_equals: Optional[RecommendationJobStatus] = None,
    sort_by: Optional[ListInferenceRecommendationsJobsSortBy] = None,
    sort_order: Optional[SortOrder] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    model_name_equals: Optional[ModelName] = None,
    model_package_version_arn_equals: Optional[ModelPackageArn] = None,
) -> ListInferenceRecommendationsJobsResponse

Lists recommendation jobs that satisfy various filters.

Parameters:

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

    A filter that returns only jobs created after the specified time (timestamp).

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

    A filter that returns only jobs created before the specified time (timestamp).

  • last_modified_time_after (Optional[LastModifiedTime], default: None ) –

    A filter that returns only jobs that were last modified after the specified time (timestamp).

  • last_modified_time_before (Optional[LastModifiedTime], default: None ) –

    A filter that returns only jobs that were last modified before the specified time (timestamp).

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

    A string in the job name. This filter returns only recommendations whose name contains the specified string.

  • status_equals (Optional[RecommendationJobStatus], default: None ) –

    A filter that retrieves only inference recommendations jobs with a specific status.

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

    The parameter by which to sort the results.

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

    The sort order for the results.

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

    If the response to a previous ListInferenceRecommendationsJobsRequest request was truncated, the response includes a NextToken. To retrieve the next set of recommendations, use the token in the next request.

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

    The maximum number of recommendations to return in the response.

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

    A filter that returns only jobs that were created for this model.

  • model_package_version_arn_equals (Optional[ModelPackageArn], default: None ) –

    A filter that returns only jobs that were created for this versioned model package.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def list_inference_recommendations_jobs(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    creation_time_after: Optional[
        "capo_sagemaker.types.creation_time.CreationTime"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker.types.creation_time.CreationTime"
    ] = None,
    last_modified_time_after: Optional[
        "capo_sagemaker.types.last_modified_time.LastModifiedTime"
    ] = None,
    last_modified_time_before: Optional[
        "capo_sagemaker.types.last_modified_time.LastModifiedTime"
    ] = None,
    name_contains: Optional[
        "capo_sagemaker.types.name_contains.NameContains"
    ] = None,
    status_equals: Optional[
        "capo_sagemaker.types.recommendation_job_status.RecommendationJobStatus"
    ] = None,
    sort_by: Optional[
        "capo_sagemaker.types.list_inference_recommendations_jobs_sort_by.ListInferenceRecommendationsJobsSortBy"
    ] = 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,
    model_name_equals: Optional["capo_sagemaker.types.model_name.ModelName"] = None,
    model_package_version_arn_equals: Optional[
        "capo_sagemaker.types.model_package_arn.ModelPackageArn"
    ] = None,
) -> "capo_sagemaker.types.list_inference_recommendations_jobs_response.ListInferenceRecommendationsJobsResponse":
    """<p>Lists recommendation jobs that satisfy various filters.</p>

    Args:
        creation_time_after: <p>A filter that returns only jobs created after the specified time (timestamp).</p>
        creation_time_before: <p>A filter that returns only jobs created before the specified time (timestamp).</p>
        last_modified_time_after: <p>A filter that returns only jobs that were last modified after the specified time (timestamp).</p>
        last_modified_time_before: <p>A filter that returns only jobs that were last modified before the specified time (timestamp).</p>
        name_contains: <p>A string in the job name. This filter returns only recommendations whose name contains the specified string.</p>
        status_equals: <p>A filter that retrieves only inference recommendations jobs with a specific status.</p>
        sort_by: <p>The parameter by which to sort the results.</p>
        sort_order: <p>The sort order for the results.</p>
        next_token: <p>If the response to a previous <code>ListInferenceRecommendationsJobsRequest</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of recommendations, use the token in the next request.</p>
        max_results: <p>The maximum number of recommendations to return in the response.</p>
        model_name_equals: <p>A filter that returns only jobs that were created for this model.</p>
        model_package_version_arn_equals: <p>A filter that returns only jobs that were created for this versioned model package.</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_inference_recommendations_jobs_request.ListInferenceRecommendationsJobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.list_inference_recommendations_jobs_response.ListInferenceRecommendationsJobsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_inference_recommendations_jobs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListInferenceRecommendationsJobs")
    )
    input_: capo_sagemaker.types.list_inference_recommendations_jobs_request.ListInferenceRecommendationsJobsRequest = {}
    if creation_time_after is not None:
        input_["creation_time_after"] = creation_time_after
    if creation_time_before is not None:
        input_["creation_time_before"] = creation_time_before
    if last_modified_time_after is not None:
        input_["last_modified_time_after"] = last_modified_time_after
    if last_modified_time_before is not None:
        input_["last_modified_time_before"] = last_modified_time_before
    if name_contains is not None:
        input_["name_contains"] = name_contains
    if status_equals is not None:
        input_["status_equals"] = status_equals
    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 model_name_equals is not None:
        input_["model_name_equals"] = model_name_equals
    if model_package_version_arn_equals is not None:
        input_["model_package_version_arn_equals"] = (
            model_package_version_arn_equals
        )

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