@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface IotDataPlaneClient extends SdkClient
builder() method.
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static IotDataPlaneClientBuilder |
builder()
Create a builder that can be used to configure and create a
IotDataPlaneClient. |
static IotDataPlaneClient |
create()
Create a
IotDataPlaneClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default DeleteThingShadowResponse |
deleteThingShadow(Consumer<DeleteThingShadowRequest.Builder> deleteThingShadowRequest)
Deletes the shadow for the specified thing.
|
default DeleteThingShadowResponse |
deleteThingShadow(DeleteThingShadowRequest deleteThingShadowRequest)
Deletes the shadow for the specified thing.
|
default GetRetainedMessageResponse |
getRetainedMessage(Consumer<GetRetainedMessageRequest.Builder> getRetainedMessageRequest)
Gets the details of a single retained message for the specified topic.
|
default GetRetainedMessageResponse |
getRetainedMessage(GetRetainedMessageRequest getRetainedMessageRequest)
Gets the details of a single retained message for the specified topic.
|
default GetThingShadowResponse |
getThingShadow(Consumer<GetThingShadowRequest.Builder> getThingShadowRequest)
Gets the shadow for the specified thing.
|
default GetThingShadowResponse |
getThingShadow(GetThingShadowRequest getThingShadowRequest)
Gets the shadow for the specified thing.
|
default ListNamedShadowsForThingResponse |
listNamedShadowsForThing(Consumer<ListNamedShadowsForThingRequest.Builder> listNamedShadowsForThingRequest)
Lists the shadows for the specified thing.
|
default ListNamedShadowsForThingResponse |
listNamedShadowsForThing(ListNamedShadowsForThingRequest listNamedShadowsForThingRequest)
Lists the shadows for the specified thing.
|
default ListRetainedMessagesResponse |
listRetainedMessages(Consumer<ListRetainedMessagesRequest.Builder> listRetainedMessagesRequest)
Lists summary information about the retained messages stored for the account.
|
default ListRetainedMessagesResponse |
listRetainedMessages(ListRetainedMessagesRequest listRetainedMessagesRequest)
Lists summary information about the retained messages stored for the account.
|
default ListRetainedMessagesIterable |
listRetainedMessagesPaginator(Consumer<ListRetainedMessagesRequest.Builder> listRetainedMessagesRequest)
Lists summary information about the retained messages stored for the account.
|
default ListRetainedMessagesIterable |
listRetainedMessagesPaginator(ListRetainedMessagesRequest listRetainedMessagesRequest)
Lists summary information about the retained messages stored for the account.
|
default PublishResponse |
publish(Consumer<PublishRequest.Builder> publishRequest)
Publishes an MQTT message.
|
default PublishResponse |
publish(PublishRequest publishRequest)
Publishes an MQTT message.
|
static ServiceMetadata |
serviceMetadata() |
default UpdateThingShadowResponse |
updateThingShadow(Consumer<UpdateThingShadowRequest.Builder> updateThingShadowRequest)
Updates the shadow for the specified thing.
|
default UpdateThingShadowResponse |
updateThingShadow(UpdateThingShadowRequest updateThingShadowRequest)
Updates the shadow for the specified thing.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.static IotDataPlaneClient create()
IotDataPlaneClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static IotDataPlaneClientBuilder builder()
IotDataPlaneClient.default DeleteThingShadowResponse deleteThingShadow(DeleteThingShadowRequest deleteThingShadowRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, UnsupportedDocumentEncodingException, AwsServiceException, SdkClientException, IotDataPlaneException
Deletes the shadow for the specified thing.
Requires permission to access the DeleteThingShadow action.
For more information, see DeleteThingShadow in the IoT Developer Guide.
deleteThingShadowRequest - The input for the DeleteThingShadow operation.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.AwsServiceExceptiondefault DeleteThingShadowResponse deleteThingShadow(Consumer<DeleteThingShadowRequest.Builder> deleteThingShadowRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, UnsupportedDocumentEncodingException, AwsServiceException, SdkClientException, IotDataPlaneException
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()
deleteThingShadowRequest - A Consumer that will call methods on DeleteThingShadowRequest.Builder to create a request.
The input for the DeleteThingShadow operation.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.AwsServiceExceptiondefault GetRetainedMessageResponse getRetainedMessage(GetRetainedMessageRequest getRetainedMessageRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
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 IoT Core pricing - Messaging.
getRetainedMessageRequest - The input for the GetRetainedMessage operation.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.AwsServiceExceptiondefault GetRetainedMessageResponse getRetainedMessage(Consumer<GetRetainedMessageRequest.Builder> getRetainedMessageRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
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 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()
getRetainedMessageRequest - A Consumer that will call methods on GetRetainedMessageRequest.Builder to create a
request. The input for the GetRetainedMessage operation.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.AwsServiceExceptiondefault GetThingShadowResponse getThingShadow(GetThingShadowRequest getThingShadowRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, UnsupportedDocumentEncodingException, AwsServiceException, SdkClientException, IotDataPlaneException
Gets the shadow for the specified thing.
Requires permission to access the GetThingShadow action.
For more information, see GetThingShadow in the IoT Developer Guide.
getThingShadowRequest - The input for the GetThingShadow operation.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.AwsServiceExceptiondefault GetThingShadowResponse getThingShadow(Consumer<GetThingShadowRequest.Builder> getThingShadowRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, UnsupportedDocumentEncodingException, AwsServiceException, SdkClientException, IotDataPlaneException
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()
getThingShadowRequest - A Consumer that will call methods on GetThingShadowRequest.Builder to create a request.
The input for the GetThingShadow operation.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.AwsServiceExceptiondefault ListNamedShadowsForThingResponse listNamedShadowsForThing(ListNamedShadowsForThingRequest listNamedShadowsForThingRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
Lists the shadows for the specified thing.
Requires permission to access the ListNamedShadowsForThing action.
listNamedShadowsForThingRequest - 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.AwsServiceExceptiondefault ListNamedShadowsForThingResponse listNamedShadowsForThing(Consumer<ListNamedShadowsForThingRequest.Builder> listNamedShadowsForThingRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
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()
listNamedShadowsForThingRequest - A Consumer that will call methods on ListNamedShadowsForThingRequest.Builder to create a
request.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.AwsServiceExceptiondefault ListRetainedMessagesResponse listRetainedMessages(ListRetainedMessagesRequest listRetainedMessagesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
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 IoT Core pricing - Messaging.
listRetainedMessagesRequest - 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.AwsServiceExceptiondefault ListRetainedMessagesResponse listRetainedMessages(Consumer<ListRetainedMessagesRequest.Builder> listRetainedMessagesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
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 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()
listRetainedMessagesRequest - A Consumer that will call methods on ListRetainedMessagesRequest.Builder to create a
request.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.AwsServiceExceptiondefault ListRetainedMessagesIterable listRetainedMessagesPaginator(ListRetainedMessagesRequest listRetainedMessagesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
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 IoT Core pricing - Messaging.
This is a variant of
listRetainedMessages(software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesIterable responses = client.listRetainedMessagesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesIterable responses = client
.listRetainedMessagesPaginator(request);
for (software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesIterable responses = client.listRetainedMessagesPaginator(request);
responses.iterator().forEachRemaining(....);
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.
listRetainedMessagesRequest - 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.AwsServiceExceptiondefault ListRetainedMessagesIterable listRetainedMessagesPaginator(Consumer<ListRetainedMessagesRequest.Builder> listRetainedMessagesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
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 IoT Core pricing - Messaging.
This is a variant of
listRetainedMessages(software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesIterable responses = client.listRetainedMessagesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesIterable responses = client
.listRetainedMessagesPaginator(request);
for (software.amazon.awssdk.services.iotdataplane.model.ListRetainedMessagesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.iotdataplane.paginators.ListRetainedMessagesIterable responses = client.listRetainedMessagesPaginator(request);
responses.iterator().forEachRemaining(....);
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()
listRetainedMessagesRequest - A Consumer that will call methods on ListRetainedMessagesRequest.Builder to create a
request.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.AwsServiceExceptiondefault PublishResponse publish(PublishRequest publishRequest) throws InternalFailureException, InvalidRequestException, UnauthorizedException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
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 IoT Core pricing - Messaging.
publishRequest - The input for the Publish operation.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.AwsServiceExceptiondefault PublishResponse publish(Consumer<PublishRequest.Builder> publishRequest) throws InternalFailureException, InvalidRequestException, UnauthorizedException, MethodNotAllowedException, AwsServiceException, SdkClientException, IotDataPlaneException
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 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()
publishRequest - A Consumer that will call methods on PublishRequest.Builder to create a request. The input
for the Publish operation.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.AwsServiceExceptiondefault UpdateThingShadowResponse updateThingShadow(UpdateThingShadowRequest updateThingShadowRequest) throws ConflictException, RequestEntityTooLargeException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, UnsupportedDocumentEncodingException, AwsServiceException, SdkClientException, IotDataPlaneException
Updates the shadow for the specified thing.
Requires permission to access the UpdateThingShadow action.
For more information, see UpdateThingShadow in the IoT Developer Guide.
updateThingShadowRequest - The input for the UpdateThingShadow operation.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.AwsServiceExceptiondefault UpdateThingShadowResponse updateThingShadow(Consumer<UpdateThingShadowRequest.Builder> updateThingShadowRequest) throws ConflictException, RequestEntityTooLargeException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, MethodNotAllowedException, UnsupportedDocumentEncodingException, AwsServiceException, SdkClientException, IotDataPlaneException
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()
updateThingShadowRequest - A Consumer that will call methods on UpdateThingShadowRequest.Builder to create a request.
The input for the UpdateThingShadow operation.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.AwsServiceExceptionstatic ServiceMetadata serviceMetadata()
Copyright © 2021. All rights reserved.