Struct aws_sdk_iot::client::fluent_builders::CancelJob
source · pub struct CancelJob { /* private fields */ }
Expand description
Fluent builder constructing a request to CancelJob
.
Cancels a job.
Requires permission to access the CancelJob action.
Implementations§
source§impl CancelJob
impl CancelJob
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CancelJob, AwsResponseRetryClassifier>, SdkError<CancelJobError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<CancelJob, AwsResponseRetryClassifier>, SdkError<CancelJobError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(self) -> Result<CancelJobOutput, SdkError<CancelJobError>>
pub async fn send(self) -> Result<CancelJobOutput, SdkError<CancelJobError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn job_id(self, input: impl Into<String>) -> Self
pub fn job_id(self, input: impl Into<String>) -> Self
The unique identifier you assigned to this job when it was created.
sourcepub fn set_job_id(self, input: Option<String>) -> Self
pub fn set_job_id(self, input: Option<String>) -> Self
The unique identifier you assigned to this job when it was created.
sourcepub fn reason_code(self, input: impl Into<String>) -> Self
pub fn reason_code(self, input: impl Into<String>) -> Self
(Optional)A reason code string that explains why the job was canceled.
sourcepub fn set_reason_code(self, input: Option<String>) -> Self
pub fn set_reason_code(self, input: Option<String>) -> Self
(Optional)A reason code string that explains why the job was canceled.
sourcepub fn comment(self, input: impl Into<String>) -> Self
pub fn comment(self, input: impl Into<String>) -> Self
An optional comment string describing why the job was canceled.
sourcepub fn set_comment(self, input: Option<String>) -> Self
pub fn set_comment(self, input: Option<String>) -> Self
An optional comment string describing why the job was canceled.
sourcepub fn force(self, input: bool) -> Self
pub fn force(self, input: bool) -> Self
(Optional) If true
job executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. The default is false
.
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.
sourcepub fn set_force(self, input: Option<bool>) -> Self
pub fn set_force(self, input: Option<bool>) -> Self
(Optional) If true
job executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. The default is false
.
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.