Skip to content

list_ai_benchmark_jobs

list_ai_benchmark_jobs(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    name_contains: Optional[NameContains] = None,
    status_equals: Optional[AIBenchmarkJobStatus] = None,
    creation_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
    sort_by: Optional[ListAIBenchmarkJobsSortBy] = None,
    sort_order: Optional[SortOrder] = None,
) -> ListAIBenchmarkJobsResponse

Returns a list of AI benchmark jobs in your account. You can filter the results by name, status, and creation time, and sort the results. The response is paginated.

Parameters:

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

    The maximum number of benchmark jobs to return in the response.

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

    If the previous call to ListAIBenchmarkJobs didn't return the full set of jobs, the call returns a token for getting the next set.

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

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

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

    A filter that returns only benchmark jobs with the specified status.

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

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

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

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

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

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

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

    The sort order for results. The default is Descending.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_ai_benchmark_jobs(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    name_contains: Optional[
        "capo_sagemaker.types.name_contains.NameContains"
    ] = None,
    status_equals: Optional[
        "capo_sagemaker.types.ai_benchmark_job_status.AIBenchmarkJobStatus"
    ] = None,
    creation_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    sort_by: Optional[
        "capo_sagemaker.types.list_ai_benchmark_jobs_sort_by.ListAIBenchmarkJobsSortBy"
    ] = None,
    sort_order: Optional["capo_sagemaker.types.sort_order.SortOrder"] = None,
) -> "capo_sagemaker.types.list_ai_benchmark_jobs_response.ListAIBenchmarkJobsResponse":
    """<p>Returns a list of AI benchmark jobs in your account. You can filter the results by name, status, and creation time, and sort the results. The response is paginated.</p>

    Args:
        max_results: <p>The maximum number of benchmark jobs to return in the response.</p>
        next_token: <p>If the previous call to <code>ListAIBenchmarkJobs</code> didn't return the full set of jobs, the call returns a token for getting the next set.</p>
        name_contains: <p>A string in the job name. This filter returns only jobs whose name contains the specified string.</p>
        status_equals: <p>A filter that returns only benchmark jobs with the specified status.</p>
        creation_time_after: <p>A filter that returns only jobs created after the specified time.</p>
        creation_time_before: <p>A filter that returns only jobs created before the specified time.</p>
        sort_by: <p>The field to sort results by. The default is <code>CreationTime</code>.</p>
        sort_order: <p>The sort order for results. The default is <code>Descending</code>.</p>

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

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_ai_benchmark_jobs_request.ListAIBenchmarkJobsRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_ai_benchmark_jobs_response.ListAIBenchmarkJobsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_ai_benchmark_jobs

        output, http_response = (
            capo_sagemaker._operations.sage_maker.list_ai_benchmark_jobs.list_ai_benchmark_jobs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAIBenchmarkJobs")
    )
    input_: capo_sagemaker.types.list_ai_benchmark_jobs_request.ListAIBenchmarkJobsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if name_contains is not None:
        input_["name_contains"] = name_contains
    if status_equals is not None:
        input_["status_equals"] = status_equals
    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 sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order

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