#[non_exhaustive]pub struct CancelJobExecutionInput {
pub job_id: Option<String>,
pub thing_name: Option<String>,
pub force: Option<bool>,
pub expected_version: Option<i64>,
pub status_details: Option<HashMap<String, String>>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.job_id: Option<String>
The ID of the job to be canceled.
thing_name: Option<String>
The name of the thing whose execution of the job will be canceled.
force: Option<bool>
(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.
expected_version: Option<i64>
(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.)
status_details: Option<HashMap<String, String>>
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.
Implementations§
source§impl CancelJobExecutionInput
impl CancelJobExecutionInput
sourcepub fn thing_name(&self) -> Option<&str>
pub fn thing_name(&self) -> Option<&str>
The name of the thing whose execution of the job will be canceled.
sourcepub fn force(&self) -> Option<bool>
pub fn force(&self) -> Option<bool>
(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.
sourcepub fn expected_version(&self) -> Option<i64>
pub fn expected_version(&self) -> Option<i64>
(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.)
source§impl CancelJobExecutionInput
impl CancelJobExecutionInput
sourcepub fn builder() -> CancelJobExecutionInputBuilder
pub fn builder() -> CancelJobExecutionInputBuilder
Creates a new builder-style object to manufacture CancelJobExecutionInput
.
Trait Implementations§
source§impl Clone for CancelJobExecutionInput
impl Clone for CancelJobExecutionInput
source§fn clone(&self) -> CancelJobExecutionInput
fn clone(&self) -> CancelJobExecutionInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CancelJobExecutionInput
impl Debug for CancelJobExecutionInput
source§impl PartialEq for CancelJobExecutionInput
impl PartialEq for CancelJobExecutionInput
source§fn eq(&self, other: &CancelJobExecutionInput) -> bool
fn eq(&self, other: &CancelJobExecutionInput) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CancelJobExecutionInput
Auto Trait Implementations§
impl Freeze for CancelJobExecutionInput
impl RefUnwindSafe for CancelJobExecutionInput
impl Send for CancelJobExecutionInput
impl Sync for CancelJobExecutionInput
impl Unpin for CancelJobExecutionInput
impl UnwindSafe for CancelJobExecutionInput
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more