Interface IotDataPlaneAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface IotDataPlaneAsyncClient extends AwsClient
Service client for accessing AWS IoT Data Plane asynchronously. This can be created using the static builder() method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API call. IoT data

IoT data enables secure, bi-directional communication between Internet-connected things (such as sensors, actuators, embedded devices, or smart appliances) and the Amazon Web Services cloud. It implements a broker for applications and things to publish messages over HTTP (Publish) and retrieve, update, and delete shadows. A shadow is a persistent representation of your things and their state in the Amazon Web Services cloud.

Find the endpoint address for actions in IoT data by running this CLI command:

aws iot describe-endpoint --endpoint-type iot:Data-ATS

The service name used by Amazon Web ServicesSignature Version 4 to sign requests is: iotdevicegateway.

  • Field Details

  • Method Details

    • deleteThingShadow

      default CompletableFuture<DeleteThingShadowResponse> deleteThingShadow(DeleteThingShadowRequest deleteThingShadowRequest)

      Deletes the shadow for the specified thing.

      Requires permission to access the DeleteThingShadow action.

      For more information, see DeleteThingShadow in the IoT Developer Guide.

      Parameters:
      deleteThingShadowRequest - The input for the DeleteThingShadow operation.
      Returns:
      A Java Future containing the result of the DeleteThingShadow operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource does not exist.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • UnsupportedDocumentEncodingException The document encoding is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteThingShadow

      default CompletableFuture<DeleteThingShadowResponse> deleteThingShadow(Consumer<DeleteThingShadowRequest.Builder> deleteThingShadowRequest)

      Deletes the shadow for the specified thing.

      Requires permission to access the DeleteThingShadow action.

      For more information, see DeleteThingShadow in the IoT Developer Guide.


      This is a convenience which creates an instance of the DeleteThingShadowRequest.Builder avoiding the need to create one manually via DeleteThingShadowRequest.builder()

      Parameters:
      deleteThingShadowRequest - A Consumer that will call methods on DeleteThingShadowRequest.Builder to create a request. The input for the DeleteThingShadow operation.
      Returns:
      A Java Future containing the result of the DeleteThingShadow operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource does not exist.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • UnsupportedDocumentEncodingException The document encoding is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getRetainedMessage

      default CompletableFuture<GetRetainedMessageResponse> getRetainedMessage(GetRetainedMessageRequest getRetainedMessageRequest)

      Gets the details of a single retained message for the specified topic.

      This action returns the message payload of the retained message, which can incur messaging costs. To list only the topic names of the retained messages, call ListRetainedMessages.

      Requires permission to access the GetRetainedMessage action.

      For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.

      Parameters:
      getRetainedMessageRequest - The input for the GetRetainedMessage operation.
      Returns:
      A Java Future containing the result of the GetRetainedMessage operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException The request is not valid.
      • ResourceNotFoundException The specified resource does not exist.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getRetainedMessage

      default CompletableFuture<GetRetainedMessageResponse> getRetainedMessage(Consumer<GetRetainedMessageRequest.Builder> getRetainedMessageRequest)

      Gets the details of a single retained message for the specified topic.

      This action returns the message payload of the retained message, which can incur messaging costs. To list only the topic names of the retained messages, call ListRetainedMessages.

      Requires permission to access the GetRetainedMessage action.

      For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.


      This is a convenience which creates an instance of the GetRetainedMessageRequest.Builder avoiding the need to create one manually via GetRetainedMessageRequest.builder()

      Parameters:
      getRetainedMessageRequest - A Consumer that will call methods on GetRetainedMessageRequest.Builder to create a request. The input for the GetRetainedMessage operation.
      Returns:
      A Java Future containing the result of the GetRetainedMessage operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException The request is not valid.
      • ResourceNotFoundException The specified resource does not exist.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getThingShadow

      default CompletableFuture<GetThingShadowResponse> getThingShadow(GetThingShadowRequest getThingShadowRequest)

      Gets the shadow for the specified thing.

      Requires permission to access the GetThingShadow action.

      For more information, see GetThingShadow in the IoT Developer Guide.

      Parameters:
      getThingShadowRequest - The input for the GetThingShadow operation.
      Returns:
      A Java Future containing the result of the GetThingShadow operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException The request is not valid.
      • ResourceNotFoundException The specified resource does not exist.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • UnsupportedDocumentEncodingException The document encoding is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getThingShadow

      default CompletableFuture<GetThingShadowResponse> getThingShadow(Consumer<GetThingShadowRequest.Builder> getThingShadowRequest)

      Gets the shadow for the specified thing.

      Requires permission to access the GetThingShadow action.

      For more information, see GetThingShadow in the IoT Developer Guide.


      This is a convenience which creates an instance of the GetThingShadowRequest.Builder avoiding the need to create one manually via GetThingShadowRequest.builder()

      Parameters:
      getThingShadowRequest - A Consumer that will call methods on GetThingShadowRequest.Builder to create a request. The input for the GetThingShadow operation.
      Returns:
      A Java Future containing the result of the GetThingShadow operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException The request is not valid.
      • ResourceNotFoundException The specified resource does not exist.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • UnsupportedDocumentEncodingException The document encoding is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listNamedShadowsForThing

      default CompletableFuture<ListNamedShadowsForThingResponse> listNamedShadowsForThing(ListNamedShadowsForThingRequest listNamedShadowsForThingRequest)

      Lists the shadows for the specified thing.

      Requires permission to access the ListNamedShadowsForThing action.

      Parameters:
      listNamedShadowsForThingRequest -
      Returns:
      A Java Future containing the result of the ListNamedShadowsForThing operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource does not exist.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listNamedShadowsForThing

      default CompletableFuture<ListNamedShadowsForThingResponse> listNamedShadowsForThing(Consumer<ListNamedShadowsForThingRequest.Builder> listNamedShadowsForThingRequest)

      Lists the shadows for the specified thing.

      Requires permission to access the ListNamedShadowsForThing action.


      This is a convenience which creates an instance of the ListNamedShadowsForThingRequest.Builder avoiding the need to create one manually via ListNamedShadowsForThingRequest.builder()

      Parameters:
      listNamedShadowsForThingRequest - A Consumer that will call methods on ListNamedShadowsForThingRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListNamedShadowsForThing operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource does not exist.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listRetainedMessages

      default CompletableFuture<ListRetainedMessagesResponse> listRetainedMessages(ListRetainedMessagesRequest listRetainedMessagesRequest)

      Lists summary information about the retained messages stored for the account.

      This action returns only the topic names of the retained messages. It doesn't return any message payloads. Although this action doesn't return a message payload, it can still incur messaging costs.

      To get the message payload of a retained message, call GetRetainedMessage with the topic name of the retained message.

      Requires permission to access the ListRetainedMessages action.

      For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.

      Parameters:
      listRetainedMessagesRequest -
      Returns:
      A Java Future containing the result of the ListRetainedMessages operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listRetainedMessages

      default CompletableFuture<ListRetainedMessagesResponse> listRetainedMessages(Consumer<ListRetainedMessagesRequest.Builder> listRetainedMessagesRequest)

      Lists summary information about the retained messages stored for the account.

      This action returns only the topic names of the retained messages. It doesn't return any message payloads. Although this action doesn't return a message payload, it can still incur messaging costs.

      To get the message payload of a retained message, call GetRetainedMessage with the topic name of the retained message.

      Requires permission to access the ListRetainedMessages action.

      For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.


      This is a convenience which creates an instance of the ListRetainedMessagesRequest.Builder avoiding the need to create one manually via ListRetainedMessagesRequest.builder()

      Parameters:
      listRetainedMessagesRequest - A Consumer that will call methods on ListRetainedMessagesRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListRetainedMessages operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listRetainedMessagesPaginator

      default ListRetainedMessagesPublisher listRetainedMessagesPaginator(ListRetainedMessagesRequest listRetainedMessagesRequest)

      This is a variant of listRetainedMessages(software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesPublisher publisher = client.listRetainedMessagesPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesPublisher publisher = client.listRetainedMessagesPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listRetainedMessages(software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesRequest) operation.

      Parameters:
      listRetainedMessagesRequest -
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listRetainedMessagesPaginator

      default ListRetainedMessagesPublisher listRetainedMessagesPaginator(Consumer<ListRetainedMessagesRequest.Builder> listRetainedMessagesRequest)

      This is a variant of listRetainedMessages(software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesPublisher publisher = client.listRetainedMessagesPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesPublisher publisher = client.listRetainedMessagesPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listRetainedMessages(software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesRequest) operation.


      This is a convenience which creates an instance of the ListRetainedMessagesRequest.Builder avoiding the need to create one manually via ListRetainedMessagesRequest.builder()

      Parameters:
      listRetainedMessagesRequest - A Consumer that will call methods on ListRetainedMessagesRequest.Builder to create a request.
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • publish

      default CompletableFuture<PublishResponse> publish(PublishRequest publishRequest)

      Publishes an MQTT message.

      Requires permission to access the Publish action.

      For more information about MQTT messages, see MQTT Protocol in the IoT Developer Guide.

      For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.

      Parameters:
      publishRequest - The input for the Publish operation.
      Returns:
      A Java Future containing the result of the Publish operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalFailureException An unexpected error has occurred.
      • InvalidRequestException The request is not valid.
      • UnauthorizedException You are not authorized to perform this operation.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • ThrottlingException The rate exceeds the limit.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • publish

      Publishes an MQTT message.

      Requires permission to access the Publish action.

      For more information about MQTT messages, see MQTT Protocol in the IoT Developer Guide.

      For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.


      This is a convenience which creates an instance of the PublishRequest.Builder avoiding the need to create one manually via PublishRequest.builder()

      Parameters:
      publishRequest - A Consumer that will call methods on PublishRequest.Builder to create a request. The input for the Publish operation.
      Returns:
      A Java Future containing the result of the Publish operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalFailureException An unexpected error has occurred.
      • InvalidRequestException The request is not valid.
      • UnauthorizedException You are not authorized to perform this operation.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • ThrottlingException The rate exceeds the limit.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateThingShadow

      default CompletableFuture<UpdateThingShadowResponse> updateThingShadow(UpdateThingShadowRequest updateThingShadowRequest)

      Updates the shadow for the specified thing.

      Requires permission to access the UpdateThingShadow action.

      For more information, see UpdateThingShadow in the IoT Developer Guide.

      Parameters:
      updateThingShadowRequest - The input for the UpdateThingShadow operation.
      Returns:
      A Java Future containing the result of the UpdateThingShadow operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The specified version does not match the version of the document.
      • RequestEntityTooLargeException The payload exceeds the maximum size allowed.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • UnsupportedDocumentEncodingException The document encoding is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateThingShadow

      default CompletableFuture<UpdateThingShadowResponse> updateThingShadow(Consumer<UpdateThingShadowRequest.Builder> updateThingShadowRequest)

      Updates the shadow for the specified thing.

      Requires permission to access the UpdateThingShadow action.

      For more information, see UpdateThingShadow in the IoT Developer Guide.


      This is a convenience which creates an instance of the UpdateThingShadowRequest.Builder avoiding the need to create one manually via UpdateThingShadowRequest.builder()

      Parameters:
      updateThingShadowRequest - A Consumer that will call methods on UpdateThingShadowRequest.Builder to create a request. The input for the UpdateThingShadow operation.
      Returns:
      A Java Future containing the result of the UpdateThingShadow operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException The specified version does not match the version of the document.
      • RequestEntityTooLargeException The payload exceeds the maximum size allowed.
      • InvalidRequestException The request is not valid.
      • ThrottlingException The rate exceeds the limit.
      • UnauthorizedException You are not authorized to perform this operation.
      • ServiceUnavailableException The service is temporarily unavailable.
      • InternalFailureException An unexpected error has occurred.
      • MethodNotAllowedException The specified combination of HTTP verb and URI is not supported.
      • UnsupportedDocumentEncodingException The document encoding is not supported.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • IotDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • serviceClientConfiguration

      default IotDataPlaneServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      static IotDataPlaneAsyncClient create()
      Create a IotDataPlaneAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a IotDataPlaneAsyncClient.