Class IotJobsClient

java.lang.Object
software.amazon.awssdk.iot.iotjobs.IotJobsClient

public class IotJobsClient extends Object
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
  • Constructor Details

    • IotJobsClient

      public IotJobsClient(software.amazon.awssdk.crt.mqtt.MqttClientConnection connection)
      Constructs a new IotJobsClient
      Parameters:
      connection - The connection to use
  • Method Details

    • PublishDescribeJobExecution

      public CompletableFuture<Integer> PublishDescribeJobExecution(DescribeJobExecutionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
      Gets detailed information about a job execution. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
      Parameters:
      request - Message to be serialized and sent
      qos - Quality of Service for delivering this message
      Returns:
      a future containing the MQTT packet id used to perform the publish operation * 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

      public CompletableFuture<Integer> PublishGetPendingJobExecutions(GetPendingJobExecutionsRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
      Gets the list of all jobs for a thing that are not in a terminal state. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
      Parameters:
      request - Message to be serialized and sent
      qos - Quality of Service for delivering this message
      Returns:
      a future containing the MQTT packet id used to perform the publish operation * 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

      public CompletableFuture<Integer> PublishStartNextPendingJobExecution(StartNextPendingJobExecutionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
      Gets and starts the next pending job execution for a thing (status IN_PROGRESS or QUEUED). If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
      Parameters:
      request - Message to be serialized and sent
      qos - Quality of Service for delivering this message
      Returns:
      a future containing the MQTT packet id used to perform the publish operation * 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

      public CompletableFuture<Integer> PublishUpdateJobExecution(UpdateJobExecutionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
      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. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
      Parameters:
      request - Message to be serialized and sent
      qos - Quality of Service for delivering this message
      Returns:
      a future containing the MQTT packet id used to perform the publish operation * 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

      public CompletableFuture<Integer> SubscribeToDescribeJobExecutionAccepted(DescribeJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DescribeJobExecutionResponse> handler, Consumer<Exception> exceptionHandler)
      Subscribes to the accepted topic for the DescribeJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToDescribeJobExecutionAccepted

      public CompletableFuture<Integer> SubscribeToDescribeJobExecutionAccepted(DescribeJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DescribeJobExecutionResponse> handler)
      Subscribes to the accepted topic for the DescribeJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToDescribeJobExecutionRejected

      public CompletableFuture<Integer> SubscribeToDescribeJobExecutionRejected(DescribeJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RejectedError> handler, Consumer<Exception> exceptionHandler)
      Subscribes to the rejected topic for the DescribeJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToDescribeJobExecutionRejected

      public CompletableFuture<Integer> SubscribeToDescribeJobExecutionRejected(DescribeJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RejectedError> handler)
      Subscribes to the rejected topic for the DescribeJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToGetPendingJobExecutionsAccepted

      public CompletableFuture<Integer> SubscribeToGetPendingJobExecutionsAccepted(GetPendingJobExecutionsSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetPendingJobExecutionsResponse> handler, Consumer<Exception> exceptionHandler)
      Subscribes to the accepted topic for the GetPendingJobsExecutions operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToGetPendingJobExecutionsAccepted

      public CompletableFuture<Integer> SubscribeToGetPendingJobExecutionsAccepted(GetPendingJobExecutionsSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetPendingJobExecutionsResponse> handler)
      Subscribes to the accepted topic for the GetPendingJobsExecutions operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToGetPendingJobExecutionsRejected

      public CompletableFuture<Integer> SubscribeToGetPendingJobExecutionsRejected(GetPendingJobExecutionsSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RejectedError> handler, Consumer<Exception> exceptionHandler)
      Subscribes to the rejected topic for the GetPendingJobsExecutions operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToGetPendingJobExecutionsRejected

      public CompletableFuture<Integer> SubscribeToGetPendingJobExecutionsRejected(GetPendingJobExecutionsSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RejectedError> handler)
      Subscribes to the rejected topic for the GetPendingJobsExecutions operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-getpendingjobexecutions
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToJobExecutionsChangedEvents

      public CompletableFuture<Integer> SubscribeToJobExecutionsChangedEvents(JobExecutionsChangedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<JobExecutionsChangedEvent> handler, Consumer<Exception> exceptionHandler)
      Subscribes to JobExecutionsChanged notifications for a given IoT thing. 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToJobExecutionsChangedEvents

      public CompletableFuture<Integer> SubscribeToJobExecutionsChangedEvents(JobExecutionsChangedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<JobExecutionsChangedEvent> handler)
      Subscribes to JobExecutionsChanged notifications for a given IoT thing. 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-jobexecutionschanged
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToNextJobExecutionChangedEvents

      public CompletableFuture<Integer> SubscribeToNextJobExecutionChangedEvents(NextJobExecutionChangedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<NextJobExecutionChangedEvent> handler, Consumer<Exception> exceptionHandler)
      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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToNextJobExecutionChangedEvents

      public CompletableFuture<Integer> SubscribeToNextJobExecutionChangedEvents(NextJobExecutionChangedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<NextJobExecutionChangedEvent> handler)
      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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-nextjobexecutionchanged
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToStartNextPendingJobExecutionAccepted

      public CompletableFuture<Integer> SubscribeToStartNextPendingJobExecutionAccepted(StartNextPendingJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<StartNextJobExecutionResponse> handler, Consumer<Exception> exceptionHandler)
      Subscribes to the accepted topic for the StartNextPendingJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToStartNextPendingJobExecutionAccepted

      public CompletableFuture<Integer> SubscribeToStartNextPendingJobExecutionAccepted(StartNextPendingJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<StartNextJobExecutionResponse> handler)
      Subscribes to the accepted topic for the StartNextPendingJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToStartNextPendingJobExecutionRejected

      public CompletableFuture<Integer> SubscribeToStartNextPendingJobExecutionRejected(StartNextPendingJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RejectedError> handler, Consumer<Exception> exceptionHandler)
      Subscribes to the rejected topic for the StartNextPendingJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToStartNextPendingJobExecutionRejected

      public CompletableFuture<Integer> SubscribeToStartNextPendingJobExecutionRejected(StartNextPendingJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RejectedError> handler)
      Subscribes to the rejected topic for the StartNextPendingJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-startnextpendingjobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToUpdateJobExecutionAccepted

      public CompletableFuture<Integer> SubscribeToUpdateJobExecutionAccepted(UpdateJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateJobExecutionResponse> handler, Consumer<Exception> exceptionHandler)
      Subscribes to the accepted topic for the UpdateJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToUpdateJobExecutionAccepted

      public CompletableFuture<Integer> SubscribeToUpdateJobExecutionAccepted(UpdateJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateJobExecutionResponse> handler)
      Subscribes to the accepted topic for the UpdateJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToUpdateJobExecutionRejected

      public CompletableFuture<Integer> SubscribeToUpdateJobExecutionRejected(UpdateJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RejectedError> handler, Consumer<Exception> exceptionHandler)
      Subscribes to the rejected topic for the UpdateJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      exceptionHandler - callback function to invoke if an exception occurred deserializing a message
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation
    • SubscribeToUpdateJobExecutionRejected

      public CompletableFuture<Integer> SubscribeToUpdateJobExecutionRejected(UpdateJobExecutionSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RejectedError> handler)
      Subscribes to the rejected topic for the UpdateJobExecution operation 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-updatejobexecution
      Parameters:
      request - Subscription request configuration
      qos - Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK
      handler - callback function to invoke with messages received on the subscription topic
      Returns:
      a future containing the MQTT packet id used to perform the subscribe operation