Class IotJobsV2Client

java.lang.Object
software.amazon.awssdk.iot.iotjobs.IotJobsV2Client
All Implemented Interfaces:
AutoCloseable

public class IotJobsV2Client extends Object implements AutoCloseable
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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#jobs-mqtt-api
  • Method Details

    • newFromMqtt5

      public static IotJobsV2Client newFromMqtt5(software.amazon.awssdk.crt.mqtt5.Mqtt5Client protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options)
      Constructs a new IotJobsV2Client, using an MQTT5 client as transport
      Parameters:
      protocolClient - the MQTT5 client to use
      options - configuration options to use
    • newFromMqtt311

      public static IotJobsV2Client newFromMqtt311(software.amazon.awssdk.crt.mqtt.MqttClientConnection protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options)
      Constructs a new IotJobsV2Client, using an MQTT311 client as transport
      Parameters:
      protocolClient - the MQTT311 client to use
      options - configuration options to use
    • close

      public void close()
      Releases all resources used by the client. It is not valid to invoke operations on the client after it has been closed.
      Specified by:
      close in interface AutoCloseable
    • describeJobExecution

      Gets detailed information about a job execution. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
      Parameters:
      request - modeled request to perform
      Returns:
      a future that will complete with the corresponding response
    • getPendingJobExecutions

      Gets the list of all jobs for a thing that are not in a terminal state. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
      Parameters:
      request - modeled request to perform
      Returns:
      a future that will complete with the corresponding response
    • startNextPendingJobExecution

      Gets and starts the next pending job execution for a thing (status IN_PROGRESS or QUEUED). AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
      Parameters:
      request - modeled request to perform
      Returns:
      a future that will complete with the corresponding response
    • updateJobExecution

      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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
      Parameters:
      request - modeled request to perform
      Returns:
      a future that will complete with the corresponding response
    • createJobExecutionsChangedStream

      public software.amazon.awssdk.crt.iot.StreamingOperation createJobExecutionsChangedStream(JobExecutionsChangedSubscriptionRequest request, V2ClientStreamOptions<JobExecutionsChangedEvent> options)
      Creates a stream of JobExecutionsChanged notifications for a given IoT thing. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged
      Parameters:
      request - modeled streaming operation subscription configuration
      options - set of callbacks that the operation should invoke in response to related events
      Returns:
      a streaming operation which will invoke a callback every time a message is received on the associated MQTT topic
    • createNextJobExecutionChangedStream

      public software.amazon.awssdk.crt.iot.StreamingOperation createNextJobExecutionChangedStream(NextJobExecutionChangedSubscriptionRequest request, V2ClientStreamOptions<NextJobExecutionChangedEvent> options)
      AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged
      Parameters:
      request - modeled streaming operation subscription configuration
      options - set of callbacks that the operation should invoke in response to related events
      Returns:
      a streaming operation which will invoke a callback every time a message is received on the associated MQTT topic