AWS IoT Device SDK C++ v2  1.34.0
AWS IoT Device SDK C++ v2
Public Member Functions | List of all members
Aws::Iotjobs::IotJobsClient Class Referencefinal

#include <IotJobsClient.h>

Public Member Functions

 IotJobsClient (const std::shared_ptr< Aws::Crt::Mqtt::MqttConnection > &connection)
 
 IotJobsClient (const std::shared_ptr< Aws::Crt::Mqtt5::Mqtt5Client > &mqtt5Client)
 
 operator bool () const noexcept
 
int GetLastError () const noexcept
 
bool SubscribeToDescribeJobExecutionAccepted (const Aws::Iotjobs::DescribeJobExecutionSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToDescribeJobExecutionAcceptedResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool SubscribeToDescribeJobExecutionRejected (const Aws::Iotjobs::DescribeJobExecutionSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToDescribeJobExecutionRejectedResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool SubscribeToGetPendingJobExecutionsAccepted (const Aws::Iotjobs::GetPendingJobExecutionsSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToGetPendingJobExecutionsAcceptedResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool SubscribeToGetPendingJobExecutionsRejected (const Aws::Iotjobs::GetPendingJobExecutionsSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToGetPendingJobExecutionsRejectedResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool SubscribeToJobExecutionsChangedEvents (const Aws::Iotjobs::JobExecutionsChangedSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToJobExecutionsChangedEventsResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool SubscribeToNextJobExecutionChangedEvents (const Aws::Iotjobs::NextJobExecutionChangedSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToNextJobExecutionChangedEventsResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool SubscribeToStartNextPendingJobExecutionAccepted (const Aws::Iotjobs::StartNextPendingJobExecutionSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToStartNextPendingJobExecutionAcceptedResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool SubscribeToStartNextPendingJobExecutionRejected (const Aws::Iotjobs::StartNextPendingJobExecutionSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToStartNextPendingJobExecutionRejectedResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool SubscribeToUpdateJobExecutionAccepted (const Aws::Iotjobs::UpdateJobExecutionSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToUpdateJobExecutionAcceptedResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool SubscribeToUpdateJobExecutionRejected (const Aws::Iotjobs::UpdateJobExecutionSubscriptionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnSubscribeToUpdateJobExecutionRejectedResponse &handler, const OnSubscribeComplete &onSubAck)
 
bool PublishDescribeJobExecution (const Aws::Iotjobs::DescribeJobExecutionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnPublishComplete &onPubAck)
 
bool PublishGetPendingJobExecutions (const Aws::Iotjobs::GetPendingJobExecutionsRequest &request, Aws::Crt::Mqtt::QOS qos, const OnPublishComplete &onPubAck)
 
bool PublishStartNextPendingJobExecution (const Aws::Iotjobs::StartNextPendingJobExecutionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnPublishComplete &onPubAck)
 
bool PublishUpdateJobExecution (const Aws::Iotjobs::UpdateJobExecutionRequest &request, Aws::Crt::Mqtt::QOS qos, const OnPublishComplete &onPubAck)
 

Detailed Description

The AWS IoT jobs service can be used to define a set of remote operations that are sent to and executed on one or more devices connected to AWS IoT.

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#jobs-mqtt-api

Constructor & Destructor Documentation

◆ IotJobsClient() [1/2]

Aws::Iotjobs::IotJobsClient::IotJobsClient ( const std::shared_ptr< Aws::Crt::Mqtt::MqttConnection > &  connection)

◆ IotJobsClient() [2/2]

Aws::Iotjobs::IotJobsClient::IotJobsClient ( const std::shared_ptr< Aws::Crt::Mqtt5::Mqtt5Client > &  mqtt5Client)

Member Function Documentation

◆ GetLastError()

int Aws::Iotjobs::IotJobsClient::GetLastError ( ) const
noexcept

◆ operator bool()

Aws::Iotjobs::IotJobsClient::operator bool ( ) const
noexcept

◆ PublishDescribeJobExecution()

bool Aws::Iotjobs::IotJobsClient::PublishDescribeJobExecution ( const Aws::Iotjobs::DescribeJobExecutionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnPublishComplete onPubAck 
)

Gets detailed information about a job execution.

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution

Publish a DescribeJobExecution message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.

Parameters
requestMessage to be serialized and sent
qosQuality of Service for delivering this message
onPubAckcallback when the publish "completes" (see below)
Returns
true if the message was successfully queued for publication, false if there was an error
  • For QoS 0, completes as soon as the packet is sent.
  • For QoS 1, completes when PUBACK is received.
  • QoS 2 is not supported by AWS IoT.

◆ PublishGetPendingJobExecutions()

bool Aws::Iotjobs::IotJobsClient::PublishGetPendingJobExecutions ( const Aws::Iotjobs::GetPendingJobExecutionsRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnPublishComplete onPubAck 
)

Gets the list of all jobs for a thing that are not in a terminal state.

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions

Publish a GetPendingJobExecutions message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.

Parameters
requestMessage to be serialized and sent
qosQuality of Service for delivering this message
onPubAckcallback when the publish "completes" (see below)
Returns
true if the message was successfully queued for publication, false if there was an error
  • For QoS 0, completes as soon as the packet is sent.
  • For QoS 1, completes when PUBACK is received.
  • QoS 2 is not supported by AWS IoT.

◆ PublishStartNextPendingJobExecution()

bool Aws::Iotjobs::IotJobsClient::PublishStartNextPendingJobExecution ( const Aws::Iotjobs::StartNextPendingJobExecutionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnPublishComplete onPubAck 
)

Gets and starts the next pending job execution for a thing (status IN_PROGRESS or QUEUED).

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution

Publish a StartNextPendingJobExecution message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.

Parameters
requestMessage to be serialized and sent
qosQuality of Service for delivering this message
onPubAckcallback when the publish "completes" (see below)
Returns
true if the message was successfully queued for publication, false if there was an error
  • For QoS 0, completes as soon as the packet is sent.
  • For QoS 1, completes when PUBACK is received.
  • QoS 2 is not supported by AWS IoT.

◆ PublishUpdateJobExecution()

bool Aws::Iotjobs::IotJobsClient::PublishUpdateJobExecution ( const Aws::Iotjobs::UpdateJobExecutionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnPublishComplete onPubAck 
)

Updates the status of a job execution. You can optionally create a step timer by setting a value for the stepTimeoutInMinutes property. If you don't update the value of this property by running UpdateJobExecution again, the job execution times out when the step timer expires.

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution

Publish a UpdateJobExecution message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.

Parameters
requestMessage to be serialized and sent
qosQuality of Service for delivering this message
onPubAckcallback when the publish "completes" (see below)
Returns
true if the message was successfully queued for publication, false if there was an error
  • For QoS 0, completes as soon as the packet is sent.
  • For QoS 1, completes when PUBACK is received.
  • QoS 2 is not supported by AWS IoT.

◆ SubscribeToDescribeJobExecutionAccepted()

bool Aws::Iotjobs::IotJobsClient::SubscribeToDescribeJobExecutionAccepted ( const Aws::Iotjobs::DescribeJobExecutionSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToDescribeJobExecutionAcceptedResponse handler,
const OnSubscribeComplete onSubAck 
)

Subscribes to the accepted topic for the DescribeJobExecution operation

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution

Subscribe to DescribeJobExecutionAccepted messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

◆ SubscribeToDescribeJobExecutionRejected()

bool Aws::Iotjobs::IotJobsClient::SubscribeToDescribeJobExecutionRejected ( const Aws::Iotjobs::DescribeJobExecutionSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToDescribeJobExecutionRejectedResponse handler,
const OnSubscribeComplete onSubAck 
)

Subscribes to the rejected topic for the DescribeJobExecution operation

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution

Subscribe to DescribeJobExecutionRejected messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

◆ SubscribeToGetPendingJobExecutionsAccepted()

bool Aws::Iotjobs::IotJobsClient::SubscribeToGetPendingJobExecutionsAccepted ( const Aws::Iotjobs::GetPendingJobExecutionsSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToGetPendingJobExecutionsAcceptedResponse handler,
const OnSubscribeComplete onSubAck 
)

Subscribes to the accepted topic for the GetPendingJobsExecutions operation

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions

Subscribe to GetPendingJobExecutionsAccepted messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

◆ SubscribeToGetPendingJobExecutionsRejected()

bool Aws::Iotjobs::IotJobsClient::SubscribeToGetPendingJobExecutionsRejected ( const Aws::Iotjobs::GetPendingJobExecutionsSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToGetPendingJobExecutionsRejectedResponse handler,
const OnSubscribeComplete onSubAck 
)

Subscribes to the rejected topic for the GetPendingJobsExecutions operation

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions

Subscribe to GetPendingJobExecutionsRejected messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

◆ SubscribeToJobExecutionsChangedEvents()

bool Aws::Iotjobs::IotJobsClient::SubscribeToJobExecutionsChangedEvents ( const Aws::Iotjobs::JobExecutionsChangedSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToJobExecutionsChangedEventsResponse handler,
const OnSubscribeComplete onSubAck 
)

Subscribes to JobExecutionsChanged notifications for a given IoT thing.

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged

Subscribe to JobExecutionsChangedEvents messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

◆ SubscribeToNextJobExecutionChangedEvents()

bool Aws::Iotjobs::IotJobsClient::SubscribeToNextJobExecutionChangedEvents ( const Aws::Iotjobs::NextJobExecutionChangedSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToNextJobExecutionChangedEventsResponse handler,
const OnSubscribeComplete onSubAck 
)

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged

Subscribe to NextJobExecutionChangedEvents messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

◆ SubscribeToStartNextPendingJobExecutionAccepted()

bool Aws::Iotjobs::IotJobsClient::SubscribeToStartNextPendingJobExecutionAccepted ( const Aws::Iotjobs::StartNextPendingJobExecutionSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToStartNextPendingJobExecutionAcceptedResponse handler,
const OnSubscribeComplete onSubAck 
)

Subscribes to the accepted topic for the StartNextPendingJobExecution operation

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution

Subscribe to StartNextPendingJobExecutionAccepted messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

◆ SubscribeToStartNextPendingJobExecutionRejected()

bool Aws::Iotjobs::IotJobsClient::SubscribeToStartNextPendingJobExecutionRejected ( const Aws::Iotjobs::StartNextPendingJobExecutionSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToStartNextPendingJobExecutionRejectedResponse handler,
const OnSubscribeComplete onSubAck 
)

Subscribes to the rejected topic for the StartNextPendingJobExecution operation

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution

Subscribe to StartNextPendingJobExecutionRejected messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

◆ SubscribeToUpdateJobExecutionAccepted()

bool Aws::Iotjobs::IotJobsClient::SubscribeToUpdateJobExecutionAccepted ( const Aws::Iotjobs::UpdateJobExecutionSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToUpdateJobExecutionAcceptedResponse handler,
const OnSubscribeComplete onSubAck 
)

Subscribes to the accepted topic for the UpdateJobExecution operation

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution

Subscribe to UpdateJobExecutionAccepted messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

◆ SubscribeToUpdateJobExecutionRejected()

bool Aws::Iotjobs::IotJobsClient::SubscribeToUpdateJobExecutionRejected ( const Aws::Iotjobs::UpdateJobExecutionSubscriptionRequest request,
Aws::Crt::Mqtt::QOS  qos,
const OnSubscribeToUpdateJobExecutionRejectedResponse handler,
const OnSubscribeComplete onSubAck 
)

Subscribes to the rejected topic for the UpdateJobExecution operation

https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution

Subscribe to UpdateJobExecutionRejected messages

Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.

Parameters
requestSubscription request configuration
qosMaximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
handlercallback function to invoke with messages received on the subscription topic
onSubAckcallback function invoked on receipt of the SUBACK from the server
Returns
true if the subscribe was successfully queued, false if there was an error doing so

The documentation for this class was generated from the following files: