public class AWSIotClient extends AmazonWebServiceClient implements AWSIot
AWS IoT
AWS IoT provides secure, bi-directional communication between Internet-connected things (such as sensors, actuators, embedded devices, or smart appliances) and the AWS cloud. You can discover your custom IoT-Data endpoint to communicate with, configure rules for data processing and integration with other services, organize resources associated with each thing (Thing Registry), configure logging, and create and manage policies and credentials to authenticate things.
For more information about how AWS IoT works, see the Developer Guide .
| Modifier and Type | Field and Description |
|---|---|
protected List<com.amazonaws.transform.JsonErrorUnmarshaller> |
jsonErrorUnmarshallers
List of exception unmarshallers for all AWSIot exceptions.
|
client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset| Constructor and Description |
|---|
AWSIotClient()
Deprecated.
|
AWSIotClient(AWSCredentials awsCredentials)
Constructs a new client to invoke service methods on
AWSIot using the specified AWS account credentials.
|
AWSIotClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on
AWSIot using the specified AWS account credentials
and client configuration options.
|
AWSIotClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new client to invoke service methods on
AWSIot using the specified AWS account credentials provider.
|
AWSIotClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on
AWSIot using the specified AWS account credentials
provider and client configuration options.
|
AWSIotClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
HttpClient httpClient)
Constructs a new client to invoke service methods on
AWSIot using the specified AWS account credentials
provider, client configuration options and request metric collector.
|
AWSIotClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector)
Deprecated.
|
AWSIotClient(ClientConfiguration clientConfiguration)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptCertificateTransfer(AcceptCertificateTransferRequest acceptCertificateTransferRequest)
Accepts a pending certificate transfer.
|
void |
attachPrincipalPolicy(AttachPrincipalPolicyRequest attachPrincipalPolicyRequest)
Attaches the specified policy to the specified principal (certificate
or other credential).
|
AttachThingPrincipalResult |
attachThingPrincipal(AttachThingPrincipalRequest attachThingPrincipalRequest)
Attaches the specified principal to the specified thing.
|
void |
cancelCertificateTransfer(CancelCertificateTransferRequest cancelCertificateTransferRequest)
Cancels a pending transfer for the specified certificate.
|
CreateCertificateFromCsrResult |
createCertificateFromCsr(CreateCertificateFromCsrRequest createCertificateFromCsrRequest)
Creates an X.509 certificate using the specified certificate signing
request.
|
CreateKeysAndCertificateResult |
createKeysAndCertificate(CreateKeysAndCertificateRequest createKeysAndCertificateRequest)
Creates a 2048-bit RSA key pair and issues an X.509 certificate using
the issued public key.
|
CreatePolicyResult |
createPolicy(CreatePolicyRequest createPolicyRequest)
Creates an AWS IoT policy.
|
CreatePolicyVersionResult |
createPolicyVersion(CreatePolicyVersionRequest createPolicyVersionRequest)
Creates a new version of the specified AWS IoT policy.
|
CreateThingResult |
createThing(CreateThingRequest createThingRequest)
Creates a thing in the Thing Registry.
|
void |
createTopicRule(CreateTopicRuleRequest createTopicRuleRequest)
Creates a rule.
|
void |
deleteCertificate(DeleteCertificateRequest deleteCertificateRequest)
Deletes the specified certificate.
|
void |
deletePolicy(DeletePolicyRequest deletePolicyRequest)
Deletes the specified policy.
|
void |
deletePolicyVersion(DeletePolicyVersionRequest deletePolicyVersionRequest)
Deletes the specified version of the specified policy.
|
DeleteThingResult |
deleteThing(DeleteThingRequest deleteThingRequest)
Deletes the specified thing from the Thing Registry.
|
void |
deleteTopicRule(DeleteTopicRuleRequest deleteTopicRuleRequest)
Deletes the specified rule.
|
DescribeCertificateResult |
describeCertificate(DescribeCertificateRequest describeCertificateRequest)
Gets information about the specified certificate.
|
DescribeEndpointResult |
describeEndpoint(DescribeEndpointRequest describeEndpointRequest)
Returns a unique endpoint specific to the AWS account making the
call.
|
DescribeThingResult |
describeThing(DescribeThingRequest describeThingRequest)
Gets information about the specified thing.
|
void |
detachPrincipalPolicy(DetachPrincipalPolicyRequest detachPrincipalPolicyRequest)
Removes the specified policy from the specified certificate.
|
DetachThingPrincipalResult |
detachThingPrincipal(DetachThingPrincipalRequest detachThingPrincipalRequest)
Detaches the specified principal from the specified thing.
|
void |
disableTopicRule(DisableTopicRuleRequest disableTopicRuleRequest)
Disables the specified rule.
|
void |
enableTopicRule(EnableTopicRuleRequest enableTopicRuleRequest)
Enables the specified rule.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Deprecated.
ResponseMetadata cache can hold up to 50 requests and
responses in memory and will cause memory issue. This method
now always returns null.
|
GetLoggingOptionsResult |
getLoggingOptions(GetLoggingOptionsRequest getLoggingOptionsRequest)
Gets the logging options.
|
GetPolicyResult |
getPolicy(GetPolicyRequest getPolicyRequest)
Gets information about the specified policy with the policy document
of the default version.
|
GetPolicyVersionResult |
getPolicyVersion(GetPolicyVersionRequest getPolicyVersionRequest)
Gets information about the specified policy version.
|
GetTopicRuleResult |
getTopicRule(GetTopicRuleRequest getTopicRuleRequest)
Gets information about the specified rule.
|
ListCertificatesResult |
listCertificates(ListCertificatesRequest listCertificatesRequest)
Lists your certificates.
|
ListPoliciesResult |
listPolicies(ListPoliciesRequest listPoliciesRequest)
Lists your policies.
|
ListPolicyVersionsResult |
listPolicyVersions(ListPolicyVersionsRequest listPolicyVersionsRequest)
Lists the versions of the specified policy, and identifies the
default version.
|
ListPrincipalPoliciesResult |
listPrincipalPolicies(ListPrincipalPoliciesRequest listPrincipalPoliciesRequest)
Lists the policies attached to the specified principal.
|
ListPrincipalThingsResult |
listPrincipalThings(ListPrincipalThingsRequest listPrincipalThingsRequest)
Lists the things associated with the specified principal.
|
ListThingPrincipalsResult |
listThingPrincipals(ListThingPrincipalsRequest listThingPrincipalsRequest)
Lists the principals associated with the specified thing.
|
ListThingsResult |
listThings(ListThingsRequest listThingsRequest)
Lists your things.
|
ListTopicRulesResult |
listTopicRules(ListTopicRulesRequest listTopicRulesRequest)
Lists the rules for the specific topic.
|
void |
rejectCertificateTransfer(RejectCertificateTransferRequest rejectCertificateTransferRequest)
Rejects a pending certificate transfer.
|
void |
replaceTopicRule(ReplaceTopicRuleRequest replaceTopicRuleRequest)
Replaces the specified rule.
|
void |
setDefaultPolicyVersion(SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest)
Sets the specified version of the specified policy as the policy's
default (operative) version.
|
void |
setEndpoint(String endpoint)
Overrides the default endpoint for this client ("https://iot.us-east-1.amazonaws.com").
|
void |
setEndpoint(String endpoint,
String serviceName,
String regionId) |
void |
setLoggingOptions(SetLoggingOptionsRequest setLoggingOptionsRequest)
Sets the logging options.
|
TransferCertificateResult |
transferCertificate(TransferCertificateRequest transferCertificateRequest)
Transfers the specified certificate to the specified AWS account.
|
void |
updateCertificate(UpdateCertificateRequest updateCertificateRequest)
Updates the status of the specified certificate.
|
UpdateThingResult |
updateThing(UpdateThingRequest updateThingRequest)
Updates the data for a thing.
|
addRequestHandler, addRequestHandler, configSigner, configSigner, createExecutionContext, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setConfiguration, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withTimeOffsetprotected List<com.amazonaws.transform.JsonErrorUnmarshaller> jsonErrorUnmarshallers
@Deprecated public AWSIotClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain@Deprecated public AWSIotClient(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 AWSIot
(ex: proxy settings, retry counts, etc.).DefaultAWSCredentialsProviderChainpublic AWSIotClient(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 AWSIotClient(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 AWSIot
(ex: proxy settings, retry counts, etc.).public AWSIotClient(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 AWSIotClient(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 AWSIot
(ex: proxy settings, retry counts, etc.).@Deprecated public AWSIotClient(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 AWSIot
(ex: proxy settings, retry counts, etc.).requestMetricCollector - optional request metric collectorpublic AWSIotClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, HttpClient httpClient)
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 AWSIot
(ex: proxy settings, retry counts, etc.).httpClient - A http clientpublic void deleteTopicRule(DeleteTopicRuleRequest deleteTopicRuleRequest)
Deletes the specified rule.
deleteTopicRule in interface AWSIotdeleteTopicRuleRequest - Container for the necessary parameters
to execute the DeleteTopicRule service method on AWSIot.InternalExceptionServiceUnavailableExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void acceptCertificateTransfer(AcceptCertificateTransferRequest acceptCertificateTransferRequest)
Accepts a pending certificate transfer. The default state of the certificate is INACTIVE.
To check for pending certificate transfers, call ListCertificates to enumerate your certificates.
acceptCertificateTransfer in interface AWSIotacceptCertificateTransferRequest - Container for the necessary
parameters to execute the AcceptCertificateTransfer service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionTransferAlreadyCompletedExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void deletePolicyVersion(DeletePolicyVersionRequest deletePolicyVersionRequest)
Deletes the specified version of the specified policy. You cannot delete the default version of a policy using this API. To delete the default version of a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions.
deletePolicyVersion in interface AWSIotdeletePolicyVersionRequest - Container for the necessary
parameters to execute the DeletePolicyVersion service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionDeleteConflictExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public AttachThingPrincipalResult attachThingPrincipal(AttachThingPrincipalRequest attachThingPrincipalRequest)
Attaches the specified principal to the specified thing.
attachThingPrincipal in interface AWSIotattachThingPrincipalRequest - Container for the necessary
parameters to execute the AttachThingPrincipal service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public DeleteThingResult deleteThing(DeleteThingRequest deleteThingRequest)
Deletes the specified thing from the Thing Registry.
deleteThing in interface AWSIotdeleteThingRequest - Container for the necessary parameters to
execute the DeleteThing service method on AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public ListPolicyVersionsResult listPolicyVersions(ListPolicyVersionsRequest listPolicyVersionsRequest)
Lists the versions of the specified policy, and identifies the default version.
listPolicyVersions in interface AWSIotlistPolicyVersionsRequest - Container for the necessary
parameters to execute the ListPolicyVersions service method on AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void deleteCertificate(DeleteCertificateRequest deleteCertificateRequest)
Deletes the specified certificate.
A certificate cannot be deleted if it has a policy attached to it or if its status is set to ACTIVE. To delete a certificate, first use the DetachPrincipalPolicy API to detach all policies. Next, use the UpdateCertificate API to set the certificate to the INACTIVE status.
deleteCertificate in interface AWSIotdeleteCertificateRequest - Container for the necessary parameters
to execute the DeleteCertificate service method on AWSIot.CertificateStateExceptionResourceNotFoundExceptionDeleteConflictExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void replaceTopicRule(ReplaceTopicRuleRequest replaceTopicRuleRequest)
Replaces the specified rule. You must specify all parameters for the new rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule.
replaceTopicRule in interface AWSIotreplaceTopicRuleRequest - Container for the necessary parameters
to execute the ReplaceTopicRule service method on AWSIot.InternalExceptionServiceUnavailableExceptionInvalidRequestExceptionUnauthorizedExceptionSqlParseExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public ListThingsResult listThings(ListThingsRequest listThingsRequest)
Lists your things. You can pass an AttributeName or AttributeValue to filter your things (for example, "ListThings where AttributeName=Color and AttributeValue=Red").
listThings in interface AWSIotlistThingsRequest - Container for the necessary parameters to
execute the ListThings service method on AWSIot.ServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void rejectCertificateTransfer(RejectCertificateTransferRequest rejectCertificateTransferRequest)
Rejects a pending certificate transfer. After AWS IoT rejects a certificate transfer, the certificate status changes from PENDING_TRANFER to INACTIVE .
To check for pending certificate transfers, call ListCertificates to enumerate your certificates.
This operation can only be called by the transfer destination. After it is called, the certificate will be returned to the source's account in the INACTIVE state.
rejectCertificateTransfer in interface AWSIotrejectCertificateTransferRequest - Container for the necessary
parameters to execute the RejectCertificateTransfer service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionTransferAlreadyCompletedExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void disableTopicRule(DisableTopicRuleRequest disableTopicRuleRequest)
Disables the specified rule.
disableTopicRule in interface AWSIotdisableTopicRuleRequest - Container for the necessary parameters
to execute the DisableTopicRule service method on AWSIot.InternalExceptionServiceUnavailableExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void deletePolicy(DeletePolicyRequest deletePolicyRequest)
Deletes the specified policy.
A policy cannot be deleted if it has non-default versions or it is attached to any certificate.
To delete a policy, use the DeletePolicyVersion API to delete all non-default versions of the policy; use the DetachPrincipalPolicy API to detach the policy from any certificate; and then use the DeletePolicy API to delete the policy.
When a policy is deleted using DeletePolicy, its default version is deleted with it.
deletePolicy in interface AWSIotdeletePolicyRequest - Container for the necessary parameters to
execute the DeletePolicy service method on AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionDeleteConflictExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public ListCertificatesResult listCertificates(ListCertificatesRequest listCertificatesRequest)
Lists your certificates.
The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.
listCertificates in interface AWSIotlistCertificatesRequest - Container for the necessary parameters
to execute the ListCertificates service method on AWSIot.ServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void detachPrincipalPolicy(DetachPrincipalPolicyRequest detachPrincipalPolicyRequest)
Removes the specified policy from the specified certificate.
detachPrincipalPolicy in interface AWSIotdetachPrincipalPolicyRequest - Container for the necessary
parameters to execute the DetachPrincipalPolicy service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public GetLoggingOptionsResult getLoggingOptions(GetLoggingOptionsRequest getLoggingOptionsRequest)
Gets the logging options.
getLoggingOptions in interface AWSIotgetLoggingOptionsRequest - Container for the necessary parameters
to execute the GetLoggingOptions service method on AWSIot.InternalExceptionServiceUnavailableExceptionInvalidRequestExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public GetPolicyVersionResult getPolicyVersion(GetPolicyVersionRequest getPolicyVersionRequest)
Gets information about the specified policy version.
getPolicyVersion in interface AWSIotgetPolicyVersionRequest - Container for the necessary parameters
to execute the GetPolicyVersion service method on AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public DescribeCertificateResult describeCertificate(DescribeCertificateRequest describeCertificateRequest)
Gets information about the specified certificate.
describeCertificate in interface AWSIotdescribeCertificateRequest - Container for the necessary
parameters to execute the DescribeCertificate service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public ListPrincipalThingsResult listPrincipalThings(ListPrincipalThingsRequest listPrincipalThingsRequest)
Lists the things associated with the specified principal.
listPrincipalThings in interface AWSIotlistPrincipalThingsRequest - Container for the necessary
parameters to execute the ListPrincipalThings service method on
AWSIot.ServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void updateCertificate(UpdateCertificateRequest updateCertificateRequest)
Updates the status of the specified certificate. This operation is idempotent.
Moving a certificate from the ACTIVE state (including REVOKED) will not disconnect currently connected devices, but these devices will be unable to reconnect.
The ACTIVE state is required to authenticate devices connecting to AWS IoT using a certificate.
updateCertificate in interface AWSIotupdateCertificateRequest - Container for the necessary parameters
to execute the UpdateCertificate service method on AWSIot.CertificateStateExceptionResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void setDefaultPolicyVersion(SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest)
Sets the specified version of the specified policy as the policy's default (operative) version. This action affects all certificates to which the policy is attached. To list the principals the policy is attached to, use the ListPrincipalPolicy API.
setDefaultPolicyVersion in interface AWSIotsetDefaultPolicyVersionRequest - Container for the necessary
parameters to execute the SetDefaultPolicyVersion service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public GetTopicRuleResult getTopicRule(GetTopicRuleRequest getTopicRuleRequest)
Gets information about the specified rule.
getTopicRule in interface AWSIotgetTopicRuleRequest - Container for the necessary parameters to
execute the GetTopicRule service method on AWSIot.InternalExceptionServiceUnavailableExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public UpdateThingResult updateThing(UpdateThingRequest updateThingRequest)
Updates the data for a thing.
updateThing in interface AWSIotupdateThingRequest - Container for the necessary parameters to
execute the UpdateThing service method on AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public CreatePolicyVersionResult createPolicyVersion(CreatePolicyVersionRequest createPolicyVersionRequest)
Creates a new version of the specified AWS IoT policy. To update a policy, create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must use DeletePolicyVersion to delete an existing version before you create a new one.
Optionally, you can set the new version as the policy's default version. The default version is the operative version (that is, the version that is in effect for the certificates to which the policy is attached).
createPolicyVersion in interface AWSIotcreatePolicyVersionRequest - Container for the necessary
parameters to execute the CreatePolicyVersion service method on
AWSIot.MalformedPolicyExceptionResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionVersionsLimitExceededExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public CreateKeysAndCertificateResult createKeysAndCertificate(CreateKeysAndCertificateRequest createKeysAndCertificateRequest)
Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued public key.
Note This is the only time AWS IoT issues the private key for this certificate, so it is important to keep it in a secure location.
createKeysAndCertificate in interface AWSIotcreateKeysAndCertificateRequest - Container for the necessary
parameters to execute the CreateKeysAndCertificate service method on
AWSIot.ServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void createTopicRule(CreateTopicRuleRequest createTopicRuleRequest)
Creates a rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule.
createTopicRule in interface AWSIotcreateTopicRuleRequest - Container for the necessary parameters
to execute the CreateTopicRule service method on AWSIot.InternalExceptionResourceAlreadyExistsExceptionServiceUnavailableExceptionInvalidRequestExceptionSqlParseExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public GetPolicyResult getPolicy(GetPolicyRequest getPolicyRequest)
Gets information about the specified policy with the policy document of the default version.
getPolicy in interface AWSIotgetPolicyRequest - Container for the necessary parameters to
execute the GetPolicy service method on AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public DescribeThingResult describeThing(DescribeThingRequest describeThingRequest)
Gets information about the specified thing.
describeThing in interface AWSIotdescribeThingRequest - Container for the necessary parameters to
execute the DescribeThing service method on AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public DetachThingPrincipalResult detachThingPrincipal(DetachThingPrincipalRequest detachThingPrincipalRequest)
Detaches the specified principal from the specified thing.
detachThingPrincipal in interface AWSIotdetachThingPrincipalRequest - Container for the necessary
parameters to execute the DetachThingPrincipal service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public ListPrincipalPoliciesResult listPrincipalPolicies(ListPrincipalPoliciesRequest listPrincipalPoliciesRequest)
Lists the policies attached to the specified principal. If you use an Cognito identity, the ID must be in AmazonCognito Identity format .
listPrincipalPolicies in interface AWSIotlistPrincipalPoliciesRequest - Container for the necessary
parameters to execute the ListPrincipalPolicies service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void setLoggingOptions(SetLoggingOptionsRequest setLoggingOptionsRequest)
Sets the logging options.
setLoggingOptions in interface AWSIotsetLoggingOptionsRequest - Container for the necessary parameters
to execute the SetLoggingOptions service method on AWSIot.InternalExceptionServiceUnavailableExceptionInvalidRequestExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public TransferCertificateResult transferCertificate(TransferCertificateRequest transferCertificateRequest)
Transfers the specified certificate to the specified AWS account.
You can cancel the transfer until it is acknowledged by the recipient.
No notification is sent to the transfer destination's account. It is up to the caller to notify the transfer target.
The certificate being transferred must not be in the ACTIVE state. You can use the UpdateCertificate API to deactivate it.
The certificate must not have any policies attached to it. You can use the DetachPrincipalPolicy API to detach them.
transferCertificate in interface AWSIottransferCertificateRequest - Container for the necessary
parameters to execute the TransferCertificate service method on
AWSIot.CertificateStateExceptionResourceNotFoundExceptionServiceUnavailableExceptionTransferConflictExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public ListTopicRulesResult listTopicRules(ListTopicRulesRequest listTopicRulesRequest)
Lists the rules for the specific topic.
listTopicRules in interface AWSIotlistTopicRulesRequest - Container for the necessary parameters to
execute the ListTopicRules service method on AWSIot.InternalExceptionServiceUnavailableExceptionInvalidRequestExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void enableTopicRule(EnableTopicRuleRequest enableTopicRuleRequest)
Enables the specified rule.
enableTopicRule in interface AWSIotenableTopicRuleRequest - Container for the necessary parameters
to execute the EnableTopicRule service method on AWSIot.InternalExceptionServiceUnavailableExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public ListPoliciesResult listPolicies(ListPoliciesRequest listPoliciesRequest)
Lists your policies.
listPolicies in interface AWSIotlistPoliciesRequest - Container for the necessary parameters to
execute the ListPolicies service method on AWSIot.ServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public DescribeEndpointResult describeEndpoint(DescribeEndpointRequest describeEndpointRequest)
Returns a unique endpoint specific to the AWS account making the call. You specify the following URI when updating state information for your thing: https:// endpoint /things/ thingName /shadow.
describeEndpoint in interface AWSIotdescribeEndpointRequest - Container for the necessary parameters
to execute the DescribeEndpoint service method on AWSIot.InternalFailureExceptionThrottlingExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void attachPrincipalPolicy(AttachPrincipalPolicyRequest attachPrincipalPolicyRequest)
Attaches the specified policy to the specified principal (certificate or other credential).
attachPrincipalPolicy in interface AWSIotattachPrincipalPolicyRequest - Container for the necessary
parameters to execute the AttachPrincipalPolicy service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionLimitExceededExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void cancelCertificateTransfer(CancelCertificateTransferRequest cancelCertificateTransferRequest)
Cancels a pending transfer for the specified certificate.
Note Only the transfer source account can use this operation to cancel a transfer. (Transfer destinations can use RejectCertificateTransfer instead.) After transfer, AWS IoT returns the certificate to the source account in the INACTIVE state. After the destination account has accepted the transfer, the transfer cannot be cancelled.
After a certificate transfer is cancelled, the status of the certificate changes from PENDING_TRANSFER to INACTIVE.
cancelCertificateTransfer in interface AWSIotcancelCertificateTransferRequest - Container for the necessary
parameters to execute the CancelCertificateTransfer service method on
AWSIot.ResourceNotFoundExceptionServiceUnavailableExceptionTransferAlreadyCompletedExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public CreateThingResult createThing(CreateThingRequest createThingRequest)
Creates a thing in the Thing Registry.
createThing in interface AWSIotcreateThingRequest - Container for the necessary parameters to
execute the CreateThing service method on AWSIot.ServiceUnavailableExceptionResourceAlreadyExistsExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public CreatePolicyResult createPolicy(CreatePolicyRequest createPolicyRequest)
Creates an AWS IoT policy.
The created policy is the default version for the policy. This operation creates a policy version with a version identifier of 1 and sets 1 as the policy's default version.
createPolicy in interface AWSIotcreatePolicyRequest - Container for the necessary parameters to
execute the CreatePolicy service method on AWSIot.MalformedPolicyExceptionResourceAlreadyExistsExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public CreateCertificateFromCsrResult createCertificateFromCsr(CreateCertificateFromCsrRequest createCertificateFromCsrRequest)
Creates an X.509 certificate using the specified certificate signing request.
Note Reusing the same certificate signing request (CSR) results in a distinct certificate.
You can create multiple certificates in a batch by creating a directory, copying multiple .csr files into that directory, and then specifying that directory on the command line. The following commands show how to create a batch of certificates given a batch of CSRs.
Assuming a set of CSRs are located inside of the directory my-csr-directory:
>
On Linux and OS X, the command is:
$ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr --certificate-signing-request file://my-csr-directory/{}
This command lists all of the CSRs in my-csr-directory and pipes each CSR file name to the aws iot create-certificate-from-csr AWS CLI command to create a certificate for the corresponding CSR.
The aws iot create-certificate-from-csr part of the command can also be run in parallel to speed up the certificate creation process:
$ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr --certificate-signing-request file://my-csr-directory/{}
On Windows PowerShell, the command to create certificates for all CSRs in my-csr-directory is:
> ls -Name my-csr-directory | %{aws iot create-certificate-from-csr --certificate-signing-request file://my-csr-directory/$_}
On a Windows command prompt, the command to create certificates for all CSRs in my-csr-directory is:
> forfiles /p my-csr-directory /c "cmd /c aws iot create-certificate-from-csr --certificate-signing-request file://@path"
createCertificateFromCsr in interface AWSIotcreateCertificateFromCsrRequest - Container for the necessary
parameters to execute the CreateCertificateFromCsr service method on
AWSIot.ServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public ListThingPrincipalsResult listThingPrincipals(ListThingPrincipalsRequest listThingPrincipalsRequest)
Lists the principals associated with the specified thing.
listThingPrincipals in interface AWSIotlistThingPrincipalsRequest - Container for the necessary
parameters to execute the ListThingPrincipals service method on
AWSIot.ServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIot indicating
either a problem with the data in the request, or a server side issue.public void setEndpoint(String endpoint)
AWSIot
Callers can pass in just the endpoint (ex: "iot.us-east-1.amazonaws.com") or a full
URL, including the protocol (ex: "https://iot.us-east-1.amazonaws.com"). If the
protocol is not specified here, the default protocol from this client's
ClientConfiguration will be used, which by default is HTTPS.
For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912
This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
setEndpoint in interface AWSIotsetEndpoint in class AmazonWebServiceClientendpoint - The endpoint (ex: "iot.us-east-1.amazonaws.com") or a full URL,
including the protocol (ex: "https://iot.us-east-1.amazonaws.com") of
the region specific AWS endpoint this client will communicate
with.public void setEndpoint(String endpoint, String serviceName, String regionId) throws IllegalArgumentException
setEndpoint in class AmazonWebServiceClientIllegalArgumentException@Deprecated 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 AWSIotrequest - The originally executed requestCopyright © 2016. All rights reserved.