1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CancelJob`](crate::operation::cancel_job::builders::CancelJobFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`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 unique identifier you assigned to this job when it was created.</p><br>
    ///   - [`reason_code(impl Into<String>)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::reason_code) / [`set_reason_code(Option<String>)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::set_reason_code):<br>required: **false**<br><p>(Optional)A reason code string that explains why the job was canceled.</p><br>
    ///   - [`comment(impl Into<String>)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::comment) / [`set_comment(Option<String>)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::set_comment):<br>required: **false**<br><p>An optional comment string describing why the job was canceled.</p><br>
    ///   - [`force(bool)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::force) / [`set_force(Option<bool>)`](crate::operation::cancel_job::builders::CancelJobFluentBuilder::set_force):<br>required: **false**<br><p>(Optional) If <code>true</code> job executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. The default is <code>false</code>.</p> <p>Canceling a job which is "IN_PROGRESS", will cause a device which is executing the job to be unable to update the job execution status. Use caution and ensure that each device executing a job which is canceled is able to recover to a valid state.</p><br>
    /// - On success, responds with [`CancelJobOutput`](crate::operation::cancel_job::CancelJobOutput) with field(s):
    ///   - [`job_arn(Option<String>)`](crate::operation::cancel_job::CancelJobOutput::job_arn): <p>The job ARN.</p>
    ///   - [`job_id(Option<String>)`](crate::operation::cancel_job::CancelJobOutput::job_id): <p>The unique identifier you assigned to this job when it was created.</p>
    ///   - [`description(Option<String>)`](crate::operation::cancel_job::CancelJobOutput::description): <p>A short text description of the job.</p>
    /// - On failure, responds with [`SdkError<CancelJobError>`](crate::operation::cancel_job::CancelJobError)
    pub fn cancel_job(&self) -> crate::operation::cancel_job::builders::CancelJobFluentBuilder {
        crate::operation::cancel_job::builders::CancelJobFluentBuilder::new(self.handle.clone())
    }
}