Struct aws_sdk_iot::client::fluent_builders::CancelJobExecution [−][src]
pub struct CancelJobExecution<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* fields omitted */ }
Expand description
Fluent builder constructing a request to CancelJobExecution
.
Cancels the execution of a job for a given thing.
Requires permission to access the CancelJobExecution action.
Implementations
impl<C, M, R> CancelJobExecution<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> CancelJobExecution<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<CancelJobExecutionOutput, SdkError<CancelJobExecutionError>> where
R::Policy: SmithyRetryPolicy<CancelJobExecutionInputOperationOutputAlias, CancelJobExecutionOutput, CancelJobExecutionError, CancelJobExecutionInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<CancelJobExecutionOutput, SdkError<CancelJobExecutionError>> where
R::Policy: SmithyRetryPolicy<CancelJobExecutionInputOperationOutputAlias, CancelJobExecutionOutput, CancelJobExecutionError, CancelJobExecutionInputOperationRetryAlias>,
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.
The ID of the job to be canceled.
The name of the thing whose execution of the job will be canceled.
The name of the thing whose execution of the job will be canceled.
(Optional) If true
the job execution will be canceled if it has status
IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status
QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set
force
to true
, then an InvalidStateTransitionException
will be thrown. The default is false
.
Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.
(Optional) If true
the job execution will be canceled if it has status
IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status
QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set
force
to true
, then an InvalidStateTransitionException
will be thrown. The default is false
.
Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.
(Optional) The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)
(Optional) The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)
Adds a key-value pair to statusDetails
.
To override the contents of this collection use set_status_details
.
A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. You can specify at most 10 name/value pairs.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for CancelJobExecution<C, M, R>
impl<C, M, R> Send for CancelJobExecution<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for CancelJobExecution<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for CancelJobExecution<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for CancelJobExecution<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more