@ThreadSafe public class AWSIotDataClient extends AmazonWebServiceClient implements AWSIotData
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.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Constructor and Description |
---|
AWSIotDataClient()
Constructs a new client to invoke service methods on AWS IoT Data Plane.
|
AWSIotDataClient(AWSCredentials awsCredentials)
Constructs a new client to invoke service methods on AWS IoT Data Plane using the specified AWS account
credentials.
|
AWSIotDataClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT Data Plane using the specified AWS account
credentials and client configuration options.
|
AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new client to invoke service methods on AWS IoT Data Plane using the specified AWS account
credentials provider.
|
AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT Data Plane using the specified AWS account
credentials provider and client configuration options.
|
AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector)
Constructs a new client to invoke service methods on AWS IoT Data Plane using the specified AWS account
credentials provider, client configuration options, and request metric collector.
|
AWSIotDataClient(ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT Data Plane.
|
Modifier and Type | Method and Description |
---|---|
DeleteThingShadowResult |
deleteThingShadow(DeleteThingShadowRequest deleteThingShadowRequest)
Deletes the thing shadow for the specified thing.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful, request, typically used for debugging issues
where a service isn't acting as expected.
|
GetThingShadowResult |
getThingShadow(GetThingShadowRequest getThingShadowRequest)
Gets the thing shadow for the specified thing.
|
PublishResult |
publish(PublishRequest publishRequest)
Publishes state information.
|
UpdateThingShadowResult |
updateThingShadow(UpdateThingShadowRequest updateThingShadowRequest)
Updates the thing shadow for the specified thing.
|
addRequestHandler, addRequestHandler, configureRegion, getEndpointPrefix, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setEndpoint, setRegion, shutdown
public AWSIotDataClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
public AWSIotDataClient(ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
clientConfiguration
- The client configuration options controlling how this client connects to AWS IoT Data Plane (ex: proxy
settings, retry counts, etc.).DefaultAWSCredentialsProviderChain
public AWSIotDataClient(AWSCredentials awsCredentials)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.public AWSIotDataClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWS IoT Data Plane (ex: proxy
settings, retry counts, etc.).public AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.public AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWS IoT Data Plane (ex: proxy
settings, retry counts, etc.).public AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWS IoT Data Plane (ex: proxy
settings, retry counts, etc.).requestMetricCollector
- optional request metric collectorpublic DeleteThingShadowResult deleteThingShadow(DeleteThingShadowRequest deleteThingShadowRequest)
Deletes the thing shadow for the specified thing.
For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
deleteThingShadow
in interface AWSIotData
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.public GetThingShadowResult getThingShadow(GetThingShadowRequest getThingShadowRequest)
Gets the thing shadow for the specified thing.
For more information, see GetThingShadow in the AWS IoT Developer Guide.
getThingShadow
in interface AWSIotData
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.public PublishResult publish(PublishRequest publishRequest)
Publishes state information.
For more information, see HTTP Protocol in the AWS IoT Developer Guide.
publish
in interface AWSIotData
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.public UpdateThingShadowResult updateThingShadow(UpdateThingShadowRequest updateThingShadowRequest)
Updates the thing shadow for the specified thing.
For more information, see UpdateThingShadow in the AWS IoT Developer Guide.
updateThingShadow
in interface AWSIotData
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.public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.
getCachedResponseMetadata
in interface AWSIotData
request
- The originally executed requestCopyright © 2013 Amazon Web Services, Inc. All Rights Reserved.