Struct aws_sdk_iotjobsdataplane::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }
Expand description
Client for AWS IoT Jobs Data Plane
Client for invoking operations on AWS IoT Jobs Data Plane. Each operation on AWS IoT Jobs Data Plane is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_iotjobsdataplane::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_iotjobsdataplane::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_iotjobsdataplane::Client::from_conf(config);
Implementations
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
Constructs a fluent builder for the DescribeJobExecution
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:The unique identifier assigned to this job when it was created.
thing_name(impl Into<String>)
/set_thing_name(Option<String>)
:The thing name associated with the device the job execution is running on.
include_job_document(bool)
/set_include_job_document(Option<bool>)
:Optional. When set to true, the response contains the job document. The default is false.
execution_number(i64)
/set_execution_number(Option<i64>)
:Optional. A number that identifies a particular job execution on a particular device. If not specified, the latest job execution is returned.
- On success, responds with
DescribeJobExecutionOutput
with field(s):execution(Option<JobExecution>)
:Contains data about a job execution.
- On failure, responds with
SdkError<DescribeJobExecutionError>
Constructs a fluent builder for the GetPendingJobExecutions
operation.
- The fluent builder is configurable:
thing_name(impl Into<String>)
/set_thing_name(Option<String>)
:The name of the thing that is executing the job.
- On success, responds with
GetPendingJobExecutionsOutput
with field(s):in_progress_jobs(Option<Vec<JobExecutionSummary>>)
:A list of JobExecutionSummary objects with status IN_PROGRESS.
queued_jobs(Option<Vec<JobExecutionSummary>>)
:A list of JobExecutionSummary objects with status QUEUED.
- On failure, responds with
SdkError<GetPendingJobExecutionsError>
Constructs a fluent builder for the StartNextPendingJobExecution
operation.
- The fluent builder is configurable:
thing_name(impl Into<String>)
/set_thing_name(Option<String>)
:The name of the thing associated with the device.
status_details(HashMap<String, String>)
/set_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.
step_timeout_in_minutes(i64)
/set_step_timeout_in_minutes(Option<i64>)
:Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by calling
UpdateJobExecution
, setting the status toIN_PROGRESS
and specifying a new timeout value in fieldstepTimeoutInMinutes
) the job execution status will be automatically set toTIMED_OUT
. Note that setting this timeout has no effect on that job execution timeout which may have been specified when the job was created (CreateJob
using fieldtimeoutConfig
).
- On success, responds with
StartNextPendingJobExecutionOutput
with field(s):execution(Option<JobExecution>)
:A JobExecution object.
- On failure, responds with
SdkError<StartNextPendingJobExecutionError>
Constructs a fluent builder for the UpdateJobExecution
operation.
- The fluent builder is configurable:
job_id(impl Into<String>)
/set_job_id(Option<String>)
:The unique identifier assigned to this job when it was created.
thing_name(impl Into<String>)
/set_thing_name(Option<String>)
:The name of the thing associated with the device.
status(JobExecutionStatus)
/set_status(Option<JobExecutionStatus>)
:The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or REJECTED). This must be specified on every update.
status_details(HashMap<String, String>)
/set_status_details(Option<HashMap<String, String>>)
:Optional. A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.
step_timeout_in_minutes(i64)
/set_step_timeout_in_minutes(Option<i64>)
:Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by again calling
UpdateJobExecution
, setting the status toIN_PROGRESS
and specifying a new timeout value in this field) the job execution status will be automatically set toTIMED_OUT
. Note that setting or resetting this timeout has no effect on that job execution timeout which may have been specified when the job was created (CreateJob
using fieldtimeoutConfig
).expected_version(i64)
/set_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.)
include_job_execution_state(bool)
/set_include_job_execution_state(Option<bool>)
:Optional. When included and set to true, the response contains the JobExecutionState data. The default is false.
include_job_document(bool)
/set_include_job_document(Option<bool>)
:Optional. When set to true, the response contains the job document. The default is false.
execution_number(i64)
/set_execution_number(Option<i64>)
:Optional. A number that identifies a particular job execution on a particular device.
- On success, responds with
UpdateJobExecutionOutput
with field(s):execution_state(Option<JobExecutionState>)
:A JobExecutionState object.
job_document(Option<String>)
:The contents of the Job Documents.
- On failure, responds with
SdkError<UpdateJobExecutionError>
Creates a client with the given service config and connector override.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for Client<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for Client<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