Skip to content

delete_job_template async

delete_job_template(
    id: ResourceIdString,
    *,
    config_overrides: Optional[AsyncEMRcontainersClientConfig] = None,
) -> DeleteJobTemplateResponse

Deletes a job template. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.

Parameters:

Raises:

Source code in docs_src/capo_emr_containers/_services/async_em_rcontainers.py
async def delete_job_template(
    self,
    id: "capo_emr_containers.types.resource_id_string.ResourceIdString",
    *,
    config_overrides: Optional[AsyncEMRcontainersClientConfig] = None,
) -> "capo_emr_containers.types.delete_job_template_response.DeleteJobTemplateResponse":
    """<p>Deletes a job template. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.</p>

    Args:
        id: <p>The ID of the job template that will be deleted.</p>

    Raises:
        capo_emr_containers.errors.internal_server_exception.InternalServerException: <p>This is an internal server exception.</p>
        capo_emr_containers.errors.validation_exception.ValidationException: <p>There are invalid parameters in the client request.</p>
        capo_emr_containers.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_emr_containers.types.delete_job_template_request.DeleteJobTemplateRequest]",
    ) -> AsyncOperationResponse[
        "capo_emr_containers.types.delete_job_template_response.DeleteJobTemplateResponse"
    ]:
        import capo_emr_containers._operations.aws_chicago_web_service.delete_job_template

        (
            output,
            http_response,
        ) = await capo_emr_containers._operations.aws_chicago_web_service.delete_job_template.async_delete_job_template(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteJobTemplate")
    )
    input_: capo_emr_containers.types.delete_job_template_request.DeleteJobTemplateRequest = {
        "id": id
    }

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