Skip to content

list_batch_job_definitions async

list_batch_job_definitions(
    application_id: Identifier,
    *,
    config_overrides: Optional[Asyncm2ClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    prefix: Optional[str] = None,
) -> ListBatchJobDefinitionsResponse

Lists all the available batch job definitions based on the batch job resources uploaded during the application creation. You can use the batch job definitions in the list to start a batch job.

Parameters:

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

    A pagination token returned from a previous call to this operation. This specifies the next item to return. To return to the beginning of the list, exclude this parameter.

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

    The maximum number of batch job definitions to return.

  • application_id (Identifier) –

    The identifier of the application.

  • prefix (Optional[str], default: None ) –

    If the batch job definition is a FileBatchJobDefinition, the prefix allows you to search on the file names of FileBatchJobDefinitions.

Raises:

Source code in docs_src/capo_m2/_services/async_m2.py
async def list_batch_job_definitions(
    self,
    application_id: "capo_m2.types.identifier.Identifier",
    *,
    config_overrides: Optional[Asyncm2ClientConfig] = None,
    next_token: Optional["capo_m2.types.next_token.NextToken"] = None,
    max_results: Optional["capo_m2.types.max_results.MaxResults"] = None,
    prefix: Optional[str] = None,
) -> "capo_m2.types.list_batch_job_definitions_response.ListBatchJobDefinitionsResponse":
    """<p>Lists all the available batch job definitions based on the batch job resources uploaded during the application creation. You can use the batch job definitions in the list to start a batch job.</p>

    Args:
        next_token: <p>A pagination token returned from a previous call to this operation. This specifies the next item to return. To return to the beginning of the list, exclude this parameter.</p>
        max_results: <p>The maximum number of batch job definitions to return.</p>
        application_id: <p>The identifier of the application.</p>
        prefix: <p>If the batch job definition is a FileBatchJobDefinition, the prefix allows you to search on the file names of FileBatchJobDefinitions.</p>

    Raises:
        capo_m2.errors.access_denied_exception.AccessDeniedException: <p>The account or role doesn't have the right permissions to make the request.</p>
        capo_m2.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request.</p>
        capo_m2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_m2.errors.throttling_exception.ThrottlingException: <p>The number of requests made exceeds the limit.</p>
        capo_m2.errors.validation_exception.ValidationException: <p>One or more parameters provided in the request is not valid.</p>
        capo_m2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_m2.types.list_batch_job_definitions_request.ListBatchJobDefinitionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_m2.types.list_batch_job_definitions_response.ListBatchJobDefinitionsResponse"
    ]:
        import capo_m2._operations.aws_supernova_control_plane_service.list_batch_job_definitions

        (
            output,
            http_response,
        ) = await capo_m2._operations.aws_supernova_control_plane_service.list_batch_job_definitions.async_list_batch_job_definitions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBatchJobDefinitions")
    )
    input_: capo_m2.types.list_batch_job_definitions_request.ListBatchJobDefinitionsRequest = {
        "application_id": application_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if prefix is not None:
        input_["prefix"] = prefix

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