Skip to content

copy_job_template

copy_job_template(
    farm_id: FarmId,
    queue_id: QueueId,
    job_id: JobId,
    target_s3_location: S3Location,
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
) -> CopyJobTemplateResponse

Copies a job template to an Amazon S3 bucket.

Parameters:

  • farm_id (FarmId) –

    The farm ID to copy.

  • queue_id (QueueId) –

    The queue ID to copy.

  • job_id (JobId) –

    The job ID to copy.

  • target_s3_location (S3Location) –

    The Amazon S3 bucket name and key where you would like to add a copy of the job template.

Raises:

Source code in docs_src/capo_deadline/_services/deadline.py
def copy_job_template(
    self,
    farm_id: "capo_deadline.types.farm_id.FarmId",
    queue_id: "capo_deadline.types.queue_id.QueueId",
    job_id: "capo_deadline.types.job_id.JobId",
    target_s3_location: "capo_deadline.types.s3_location.S3Location",
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
) -> "capo_deadline.types.copy_job_template_response.CopyJobTemplateResponse":
    """<p>Copies a job template to an Amazon S3 bucket.</p>

    Args:
        farm_id: <p>The farm ID to copy.</p>
        queue_id: <p>The queue ID to copy.</p>
        job_id: <p>The job ID to copy.</p>
        target_s3_location: <p>The Amazon S3 bucket name and key where you would like to add a copy of the job template.</p>

    Raises:
        capo_deadline.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
        capo_deadline.errors.internal_server_error_exception.InternalServerErrorException: <p>Deadline Cloud can't process your request right now. Try again later.</p>
        capo_deadline.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_deadline.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota.</p>
        capo_deadline.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
        capo_deadline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_deadline.types.copy_job_template_request.CopyJobTemplateRequest]",
    ) -> OperationResponse[
        "capo_deadline.types.copy_job_template_response.CopyJobTemplateResponse"
    ]:
        import capo_deadline._operations.deadline.copy_job_template

        output, http_response = (
            capo_deadline._operations.deadline.copy_job_template.copy_job_template(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CopyJobTemplate")
    )
    input_: capo_deadline.types.copy_job_template_request.CopyJobTemplateRequest = {
        "farm_id": farm_id,
        "queue_id": queue_id,
        "job_id": job_id,
        "target_s3_location": target_s3_location,
    }

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