Skip to content

list_model_customization_jobs async

list_model_customization_jobs(
    *,
    config_overrides: Optional[AsyncBedrockClientConfig] = None,
    creation_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
    status_equals: Optional[FineTuningJobStatus] = None,
    name_contains: Optional[JobName] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
    sort_by: Optional[SortJobsBy] = None,
    sort_order: Optional[SortOrder] = None,
) -> ListModelCustomizationJobsResponse

Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.

For more information, see Custom models in the Amazon Bedrock User Guide.

Parameters:

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

    Return customization jobs created after the specified time.

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

    Return customization jobs created before the specified time.

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

    Return customization jobs with the specified status.

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

    Return customization jobs only if the job name contains these characters.

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

    The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

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

    If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

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

    The field to sort by in the returned list of jobs.

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

    The sort order of the results.

Raises:

Source code in docs_src/capo_bedrock/_services/async_bedrock.py
async def list_model_customization_jobs(
    self,
    *,
    config_overrides: Optional[AsyncBedrockClientConfig] = None,
    creation_time_after: Optional["capo_bedrock.types.timestamp.Timestamp"] = None,
    creation_time_before: Optional["capo_bedrock.types.timestamp.Timestamp"] = None,
    status_equals: Optional[
        "capo_bedrock.types.fine_tuning_job_status.FineTuningJobStatus"
    ] = None,
    name_contains: Optional["capo_bedrock.types.job_name.JobName"] = None,
    max_results: Optional["capo_bedrock.types.max_results.MaxResults"] = None,
    next_token: Optional[
        "capo_bedrock.types.pagination_token.PaginationToken"
    ] = None,
    sort_by: Optional["capo_bedrock.types.sort_jobs_by.SortJobsBy"] = None,
    sort_order: Optional["capo_bedrock.types.sort_order.SortOrder"] = None,
) -> "capo_bedrock.types.list_model_customization_jobs_response.ListModelCustomizationJobsResponse":
    """<p>Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html">Custom models</a> in the <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html">Amazon Bedrock User Guide</a>.</p>

    Args:
        creation_time_after: <p>Return customization jobs created after the specified time. </p>
        creation_time_before: <p>Return customization jobs created before the specified time. </p>
        status_equals: <p>Return customization jobs with the specified status. </p>
        name_contains: <p>Return customization jobs only if the job name contains these characters.</p>
        max_results: <p>The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the <code>nextToken</code> field when making another request to return the next batch of results.</p>
        next_token: <p>If the total number of results is greater than the <code>maxResults</code> value provided in the request, enter the token returned in the <code>nextToken</code> field in the response in this field to return the next batch of results.</p>
        sort_by: <p>The field to sort by in the returned list of jobs.</p>
        sort_order: <p>The sort order of the results.</p>

    Raises:
        capo_bedrock.errors.access_denied_exception.AccessDeniedException: <p>The request is denied because of missing access permissions.</p>
        capo_bedrock.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_bedrock.errors.throttling_exception.ThrottlingException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
        capo_bedrock.errors.validation_exception.ValidationException: <p>Input validation failed. Check your request parameters and retry the request.</p>
        capo_bedrock.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock.types.list_model_customization_jobs_request.ListModelCustomizationJobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock.types.list_model_customization_jobs_response.ListModelCustomizationJobsResponse"
    ]:
        import capo_bedrock._operations.amazon_bedrock_control_plane_service.list_model_customization_jobs

        (
            output,
            http_response,
        ) = await capo_bedrock._operations.amazon_bedrock_control_plane_service.list_model_customization_jobs.async_list_model_customization_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

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