Skip to content

start_batch_job

start_batch_job(
    application_id: Identifier,
    batch_job_identifier: BatchJobIdentifier,
    *,
    config_overrides: Optional[m2ClientConfig] = None,
    job_params: Optional[BatchJobParametersMap] = None,
    auth_secrets_manager_arn: Optional[AuthSecretsManagerArn] = None,
) -> StartBatchJobResponse

Starts a batch job and returns the unique identifier of this execution of the batch job. The associated application must be running in order to start the batch job.

Parameters:

  • application_id (Identifier) –

    The unique identifier of the application associated with this batch job.

  • batch_job_identifier (BatchJobIdentifier) –

    The unique identifier of the batch job.

  • job_params (Optional[BatchJobParametersMap], default: None ) –

    The collection of batch job parameters. For details about limits for keys and values, see Coding variables in JCL.

  • auth_secrets_manager_arn (Optional[AuthSecretsManagerArn], default: None ) –

    The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation.

Raises:

Source code in docs_src/capo_m2/_services/m2.py
def start_batch_job(
    self,
    application_id: "capo_m2.types.identifier.Identifier",
    batch_job_identifier: "capo_m2.types.batch_job_identifier.BatchJobIdentifier",
    *,
    config_overrides: Optional[m2ClientConfig] = None,
    job_params: Optional[
        "capo_m2.types.batch_job_parameters_map.BatchJobParametersMap"
    ] = None,
    auth_secrets_manager_arn: Optional[
        "capo_m2.types.auth_secrets_manager_arn.AuthSecretsManagerArn"
    ] = None,
) -> "capo_m2.types.start_batch_job_response.StartBatchJobResponse":
    """<p>Starts a batch job and returns the unique identifier of this execution of the batch job. The associated application must be running in order to start the batch job.</p>

    Args:
        application_id: <p>The unique identifier of the application associated with this batch job.</p>
        batch_job_identifier: <p>The unique identifier of the batch job.</p>
        job_params: <p>The collection of batch job parameters. For details about limits for keys and values, see <a href="https://www.ibm.com/docs/en/workload-automation/9.3.0?topic=zos-coding-variables-in-jcl">Coding variables in JCL</a>.</p>
        auth_secrets_manager_arn: <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Start Batch Job execution operation.</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.conflict_exception.ConflictException: <p>The parameters provided in the request conflict with existing resources.</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.
    """

    def _handler(
        req: "OperationRequest[capo_m2.types.start_batch_job_request.StartBatchJobRequest]",
    ) -> OperationResponse[
        "capo_m2.types.start_batch_job_response.StartBatchJobResponse"
    ]:
        import capo_m2._operations.aws_supernova_control_plane_service.start_batch_job

        output, http_response = (
            capo_m2._operations.aws_supernova_control_plane_service.start_batch_job.start_batch_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartBatchJob")
    )
    input_: capo_m2.types.start_batch_job_request.StartBatchJobRequest = {
        "application_id": application_id,
        "batch_job_identifier": batch_job_identifier,
    }
    if job_params is not None:
        input_["job_params"] = job_params
    if auth_secrets_manager_arn is not None:
        input_["auth_secrets_manager_arn"] = auth_secrets_manager_arn

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