AWS IoT Device SDK C: Jobs
AWS IoT Jobs library
Return to main page ↑
AwsIotJobsUpdateInfo_t Struct Reference

Information on a Job update for AwsIotJobs_StartNextAsync and AwsIotJobs_UpdateAsync. These functions modify a Job's state. More...

#include <aws_iot_jobs_types.h>

Data Fields

AwsIotJobState_t newStatus
 The new status to report as a Job execution update. More...
 
uint32_t expectedVersion
 The expected current version of job execution. More...
 
int32_t executionNumber
 An application-defined value that identifies a Job execution on a specific device. More...
 
int32_t stepTimeoutInMinutes
 The amount of time (in minutes) before a new Job update must be reported. More...
 
bool includeJobExecutionState
 Whether the Job response document should contain the JobExecutionState. More...
 
bool includeJobDocument
 Whether the Job response document should contain the JobDocument. More...
 
const char * pStatusDetails
 An application-defined set of JSON name-value pairs that describe the status of Job execution. More...
 
size_t statusDetailsLength
 Length of AwsIotJobsUpdateInfo_t.pStatusDetails.
 

Detailed Description

Information on a Job update for AwsIotJobs_StartNextAsync and AwsIotJobs_UpdateAsync. These functions modify a Job's state.

Parameter for: AwsIotJobs_StartNextAsync, AwsIotJobs_StartNextSync, AwsIotJobs_UpdateAsync, and AwsIotJobs_UpdateSync.

All instances of AwsIotJobsUpdateInfo_t should be initialized with AWS_IOT_JOBS_UPDATE_INFO_INITIALIZER.

Field Documentation

◆ newStatus

AwsIotJobState_t AwsIotJobsUpdateInfo_t::newStatus

The new status to report as a Job execution update.

Valid values are:

This parameter is ignored for calls to AwsIotJobs_StartNextAsync and AwsIotJobs_StartNextSync. These functions always set the state to AWS_IOT_JOB_STATE_IN_PROGRESS.

◆ expectedVersion

uint32_t AwsIotJobsUpdateInfo_t::expectedVersion

The expected current version of job execution.

Each time a Job update is sent (for the same JobId), the version stored on the AWS IoT Jobs service is updated. If this value does not match the value stored by the Jobs service, the Job update is rejected with the code AWS_IOT_JOBS_VERSION_MISMATCH.

This value is useful for ensuring the order of Job updates, i.e. that the Jobs service does not overwrite a later update with a previous one. If not needed, it can be set to AWS_IOT_JOBS_NO_VERSION.

This parameter is ignored for calls to AwsIotJobs_StartNextAsync and AwsIotJobs_StartNextSync.

◆ executionNumber

int32_t AwsIotJobsUpdateInfo_t::executionNumber

An application-defined value that identifies a Job execution on a specific device.

The Jobs service provides commands for tracking the status of Job execution on a specific target. Therefore, this value is used to provide a unique identifier of a specific Job execution on a specific target.

This value is optional. It may be set to AWS_IOT_JOBS_NO_EXECUTION_NUMBER if not needed.

This parameter is ignored for calls to AwsIotJobs_StartNextAsync and AwsIotJobs_StartNextSync.

◆ stepTimeoutInMinutes

int32_t AwsIotJobsUpdateInfo_t::stepTimeoutInMinutes

The amount of time (in minutes) before a new Job update must be reported.

If this timeout expires without a new Job update being reported (for the same jobId), the Job's status is set to AWS_IOT_JOB_STATE_TIMED_OUT. Sending a new Job update will reset this step timeout; a value of AWS_IOT_JOBS_NO_TIMEOUT will clear any previous step timeout.

Valid values are between 1 and 10,080 (7 days). This value is optional. It may be set to AWS_IOT_JOBS_NO_TIMEOUT if not needed.

◆ includeJobExecutionState

bool AwsIotJobsUpdateInfo_t::includeJobExecutionState

Whether the Job response document should contain the JobExecutionState.

The default value is false.

This parameter is ignored for calls to AwsIotJobs_StartNextAsync and AwsIotJobs_StartNextSync.

◆ includeJobDocument

bool AwsIotJobsUpdateInfo_t::includeJobDocument

Whether the Job response document should contain the JobDocument.

The default value is false.

This parameter is ignored for calls to AwsIotJobs_StartNextAsync and AwsIotJobs_StartNextSync.

◆ pStatusDetails

const char* AwsIotJobsUpdateInfo_t::pStatusDetails

An application-defined set of JSON name-value pairs that describe the status of Job execution.

This value is optional. It may be set to AWS_IOT_JOBS_NO_STATUS_DETAILS if not needed.


The documentation for this struct was generated from the following file: