aws_sdk_batch/client/cancel_job.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CancelJob`](crate::operation::cancel_job::builders::CancelJobFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`job_id(impl Into<String>)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::job_id) / [`set_job_id(Option<String>)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::set_job_id):<br>required: **true**<br><p>The Batch job ID of the job to cancel.</p><br>
7 /// - [`reason(impl Into<String>)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::reason) / [`set_reason(Option<String>)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::set_reason):<br>required: **true**<br><p>A message to attach to the job that explains the reason for canceling it. This message is returned by future <code>DescribeJobs</code> operations on the job. It is also recorded in the Batch activity logs.</p> <p>This parameter has as limit of 1024 characters.</p><br>
8 /// - On success, responds with [`CancelJobOutput`](crate::operation::cancel_job::CancelJobOutput)
9 /// - On failure, responds with [`SdkError<CancelJobError>`](crate::operation::cancel_job::CancelJobError)
10 pub fn cancel_job(&self) -> crate::operation::cancel_job::builders::CancelJobFluentBuilder {
11 crate::operation::cancel_job::builders::CancelJobFluentBuilder::new(self.handle.clone())
12 }
13}