All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.iotdataplane.IotDataPlaneAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Iot Data Plane Service module holds the client classes that are used for communicating with AWS IoT Data Plane Service

The newest version!
/*
 * Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.iotdataplane;

import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.services.iotdataplane.model.DeleteThingShadowRequest;
import software.amazon.awssdk.services.iotdataplane.model.DeleteThingShadowResponse;
import software.amazon.awssdk.services.iotdataplane.model.GetThingShadowRequest;
import software.amazon.awssdk.services.iotdataplane.model.GetThingShadowResponse;
import software.amazon.awssdk.services.iotdataplane.model.PublishRequest;
import software.amazon.awssdk.services.iotdataplane.model.PublishResponse;
import software.amazon.awssdk.services.iotdataplane.model.UpdateThingShadowRequest;
import software.amazon.awssdk.services.iotdataplane.model.UpdateThingShadowResponse;

/**
 * Service client for accessing null asynchronously. This can be created using the static {@link #builder()} method.
 *
 * AWS IoT
 * 

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

*/ @Generated("software.amazon.awssdk:codegen") public interface IotDataPlaneAsyncClient extends SdkClient { String SERVICE_NAME = "iotdata"; /** * Create a {@link IotDataPlaneAsyncClient} with the region loaded from the * {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the * {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}. */ static IotDataPlaneAsyncClient create() { return builder().build(); } /** * Create a builder that can be used to configure and create a {@link IotDataPlaneAsyncClient}. */ static IotDataPlaneAsyncClientBuilder builder() { return new DefaultIotDataPlaneAsyncClientBuilder(); } /** *

* Deletes the thing shadow for the specified thing. *

*

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

* * @param deleteThingShadowRequest * The input for the DeleteThingShadow operation. * @return 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. *
    *
  • 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.
  • *
* @sample IotDataPlaneAsyncClient.DeleteThingShadow */ default CompletableFuture deleteThingShadow(DeleteThingShadowRequest deleteThingShadowRequest) { throw new UnsupportedOperationException(); } /** *

* Deletes the thing shadow for the specified thing. *

*

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

*
*

* This is a convenience which creates an instance of the {@link DeleteThingShadowRequest.Builder} avoiding the need * to create one manually via {@link DeleteThingShadowRequest#builder()} *

* * @param deleteThingShadowRequest * A {@link Consumer} that will call methods on {@link DeleteThingShadowRequest.Builder} to create a request. * The input for the DeleteThingShadow operation. * @return 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. *
    *
  • 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.
  • *
* @sample IotDataPlaneAsyncClient.DeleteThingShadow */ default CompletableFuture deleteThingShadow( Consumer deleteThingShadowRequest) { return deleteThingShadow(DeleteThingShadowRequest.builder().applyMutation(deleteThingShadowRequest).build()); } /** *

* Gets the thing shadow for the specified thing. *

*

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

* * @param getThingShadowRequest * The input for the GetThingShadow operation. * @return 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. *
    *
  • 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.
  • *
* @sample IotDataPlaneAsyncClient.GetThingShadow */ default CompletableFuture getThingShadow(GetThingShadowRequest getThingShadowRequest) { throw new UnsupportedOperationException(); } /** *

* Gets the thing shadow for the specified thing. *

*

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

*
*

* This is a convenience which creates an instance of the {@link GetThingShadowRequest.Builder} avoiding the need to * create one manually via {@link GetThingShadowRequest#builder()} *

* * @param getThingShadowRequest * A {@link Consumer} that will call methods on {@link GetThingShadowRequest.Builder} to create a request. * The input for the GetThingShadow operation. * @return 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. *
    *
  • 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.
  • *
* @sample IotDataPlaneAsyncClient.GetThingShadow */ default CompletableFuture getThingShadow(Consumer getThingShadowRequest) { return getThingShadow(GetThingShadowRequest.builder().applyMutation(getThingShadowRequest).build()); } /** *

* Publishes state information. *

*

* For more information, see HTTP * Protocol in the AWS IoT Developer Guide. *

* * @param publishRequest * The input for the Publish operation. * @return 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. *
    *
  • 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.
  • *
  • 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.
  • *
* @sample IotDataPlaneAsyncClient.Publish */ default CompletableFuture publish(PublishRequest publishRequest) { throw new UnsupportedOperationException(); } /** *

* Publishes state information. *

*

* For more information, see HTTP * Protocol in the AWS IoT Developer Guide. *

*
*

* This is a convenience which creates an instance of the {@link PublishRequest.Builder} avoiding the need to create * one manually via {@link PublishRequest#builder()} *

* * @param publishRequest * A {@link Consumer} that will call methods on {@link PublishRequest.Builder} to create a request. The input * for the Publish operation. * @return 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. *
    *
  • 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.
  • *
  • 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.
  • *
* @sample IotDataPlaneAsyncClient.Publish */ default CompletableFuture publish(Consumer publishRequest) { return publish(PublishRequest.builder().applyMutation(publishRequest).build()); } /** *

* Updates the thing shadow for the specified thing. *

*

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

* * @param updateThingShadowRequest * The input for the UpdateThingShadow operation. * @return 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. *
    *
  • 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.
  • *
* @sample IotDataPlaneAsyncClient.UpdateThingShadow */ default CompletableFuture updateThingShadow(UpdateThingShadowRequest updateThingShadowRequest) { throw new UnsupportedOperationException(); } /** *

* Updates the thing shadow for the specified thing. *

*

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

*
*

* This is a convenience which creates an instance of the {@link UpdateThingShadowRequest.Builder} avoiding the need * to create one manually via {@link UpdateThingShadowRequest#builder()} *

* * @param updateThingShadowRequest * A {@link Consumer} that will call methods on {@link UpdateThingShadowRequest.Builder} to create a request. * The input for the UpdateThingShadow operation. * @return 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. *
    *
  • 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.
  • *
* @sample IotDataPlaneAsyncClient.UpdateThingShadow */ default CompletableFuture updateThingShadow( Consumer updateThingShadowRequest) { return updateThingShadow(UpdateThingShadowRequest.builder().applyMutation(updateThingShadowRequest).build()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy