Class AWSIotClient
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceClient
-
- com.amazonaws.services.iot.AWSIotClient
-
- All Implemented Interfaces:
AWSIot
- Direct Known Subclasses:
AWSIotAsyncClient
@ThreadSafe public class AWSIotClient extends AmazonWebServiceClient implements AWSIot
Client for accessing AWS IoT. All service calls made using this client are blocking, and will not return until the service call completes.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.
-
-
Field Summary
Fields Modifier and Type Field Description protected static ClientConfigurationFactory
configFactory
Client configuration factory providing ClientConfigurations tailored to this client-
Fields inherited from class com.amazonaws.AmazonWebServiceClient
client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset
-
-
Constructor Summary
Constructors Constructor Description AWSIotClient()
Constructs a new client to invoke service methods on AWS IoT.AWSIotClient(AWSCredentials awsCredentials)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials.AWSIotClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials provider.AWSIotClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials provider and client configuration options.AWSIotClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials provider, client configuration options, and request metric collector.AWSIotClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials and client configuration options.AWSIotClient(ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AcceptCertificateTransferResult
acceptCertificateTransfer(AcceptCertificateTransferRequest acceptCertificateTransferRequest)
Accepts a pending certificate transfer.AttachPrincipalPolicyResult
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.CancelCertificateTransferResult
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.CreateTopicRuleResult
createTopicRule(CreateTopicRuleRequest createTopicRuleRequest)
Creates a rule.DeleteCACertificateResult
deleteCACertificate(DeleteCACertificateRequest deleteCACertificateRequest)
Deletes a registered CA certificate.DeleteCertificateResult
deleteCertificate(DeleteCertificateRequest deleteCertificateRequest)
Deletes the specified certificate.DeletePolicyResult
deletePolicy(DeletePolicyRequest deletePolicyRequest)
Deletes the specified policy.DeletePolicyVersionResult
deletePolicyVersion(DeletePolicyVersionRequest deletePolicyVersionRequest)
Deletes the specified version of the specified policy.DeleteRegistrationCodeResult
deleteRegistrationCode(DeleteRegistrationCodeRequest deleteRegistrationCodeRequest)
Deletes a CA certificate registration code.DeleteThingResult
deleteThing(DeleteThingRequest deleteThingRequest)
Deletes the specified thing from the Thing Registry.DeleteTopicRuleResult
deleteTopicRule(DeleteTopicRuleRequest deleteTopicRuleRequest)
Deletes the specified rule.DescribeCACertificateResult
describeCACertificate(DescribeCACertificateRequest describeCACertificateRequest)
Describes a registered CA certificate.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.DetachPrincipalPolicyResult
detachPrincipalPolicy(DetachPrincipalPolicyRequest detachPrincipalPolicyRequest)
Removes the specified policy from the specified certificate.DetachThingPrincipalResult
detachThingPrincipal(DetachThingPrincipalRequest detachThingPrincipalRequest)
Detaches the specified principal from the specified thing.DisableTopicRuleResult
disableTopicRule(DisableTopicRuleRequest disableTopicRuleRequest)
Disables the specified rule.EnableTopicRuleResult
enableTopicRule(EnableTopicRuleRequest enableTopicRuleRequest)
Enables the specified rule.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.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.GetRegistrationCodeResult
getRegistrationCode(GetRegistrationCodeRequest getRegistrationCodeRequest)
Gets a registration code used to register a CA certificate with AWS IoT.GetTopicRuleResult
getTopicRule(GetTopicRuleRequest getTopicRuleRequest)
Gets information about the specified rule.ListCACertificatesResult
listCACertificates(ListCACertificatesRequest listCACertificatesRequest)
Lists the CA certificates registered for your AWS account.ListCertificatesResult
listCertificates(ListCertificatesRequest listCertificatesRequest)
Lists the certificates registered in your AWS account.ListCertificatesByCAResult
listCertificatesByCA(ListCertificatesByCARequest listCertificatesByCARequest)
List the device certificates signed by the specified CA certificate.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.RegisterCACertificateResult
registerCACertificate(RegisterCACertificateRequest registerCACertificateRequest)
Registers a CA certificate with AWS IoT.RegisterCertificateResult
registerCertificate(RegisterCertificateRequest registerCertificateRequest)
Registers a device certificate with AWS IoT.RejectCertificateTransferResult
rejectCertificateTransfer(RejectCertificateTransferRequest rejectCertificateTransferRequest)
Rejects a pending certificate transfer.ReplaceTopicRuleResult
replaceTopicRule(ReplaceTopicRuleRequest replaceTopicRuleRequest)
Replaces the specified rule.SetDefaultPolicyVersionResult
setDefaultPolicyVersion(SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest)
Sets the specified version of the specified policy as the policy's default (operative) version.SetLoggingOptionsResult
setLoggingOptions(SetLoggingOptionsRequest setLoggingOptionsRequest)
Sets the logging options.TransferCertificateResult
transferCertificate(TransferCertificateRequest transferCertificateRequest)
Transfers the specified certificate to the specified AWS account.UpdateCACertificateResult
updateCACertificate(UpdateCACertificateRequest updateCACertificateRequest)
Updates a registered CA certificate.UpdateCertificateResult
updateCertificate(UpdateCertificateRequest updateCertificateRequest)
Updates the status of the specified certificate.UpdateThingResult
updateThing(UpdateThingRequest updateThingRequest)
Updates the data for a thing.-
Methods inherited from class com.amazonaws.AmazonWebServiceClient
addRequestHandler, addRequestHandler, beforeMarshalling, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getEndpointPrefix, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withEndpoint, withRegion, withRegion, withTimeOffset
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.amazonaws.services.iot.AWSIot
setEndpoint, setRegion, shutdown
-
-
-
-
Field Detail
-
configFactory
protected static final ClientConfigurationFactory configFactory
Client configuration factory providing ClientConfigurations tailored to this client
-
-
Constructor Detail
-
AWSIotClient
public AWSIotClient()
Constructs a new client to invoke service methods on AWS IoT. A credentials provider chain will be used that searches for credentials in this order:- Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
- Java System Properties - aws.accessKeyId and aws.secretKey
- Instance profile credentials delivered through the Amazon EC2 metadata service
All service calls made using this new client object are blocking, and will not return until the service call completes.
- See Also:
DefaultAWSCredentialsProviderChain
-
AWSIotClient
public AWSIotClient(ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT. A credentials provider chain will be used that searches for credentials in this order:- Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
- Java System Properties - aws.accessKeyId and aws.secretKey
- Instance profile credentials delivered through the Amazon EC2 metadata service
All service calls made using this new client object are blocking, and will not return until the service call completes.
- Parameters:
clientConfiguration
- The client configuration options controlling how this client connects to AWS IoT (ex: proxy settings, retry counts, etc.).- See Also:
DefaultAWSCredentialsProviderChain
-
AWSIotClient
public AWSIotClient(AWSCredentials awsCredentials)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials.All service calls made using this new client object are blocking, and will not return until the service call completes.
- Parameters:
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
-
AWSIotClient
public AWSIotClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials and client configuration options.All service calls made using this new client object are blocking, and will not return until the service call completes.
- Parameters:
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 (ex: proxy settings, retry counts, etc.).
-
AWSIotClient
public AWSIotClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials provider.All service calls made using this new client object are blocking, and will not return until the service call completes.
- Parameters:
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
-
AWSIotClient
public AWSIotClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials provider and client configuration options.All service calls made using this new client object are blocking, and will not return until the service call completes.
- Parameters:
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 (ex: proxy settings, retry counts, etc.).
-
AWSIotClient
public AWSIotClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials provider, client configuration options, and request metric collector.All service calls made using this new client object are blocking, and will not return until the service call completes.
- Parameters:
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 (ex: proxy settings, retry counts, etc.).requestMetricCollector
- optional request metric collector
-
-
Method Detail
-
acceptCertificateTransfer
public AcceptCertificateTransferResult 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.
- Specified by:
acceptCertificateTransfer
in interfaceAWSIot
- Parameters:
acceptCertificateTransferRequest
- The input for the AcceptCertificateTransfer operation.- Returns:
- Result of the AcceptCertificateTransfer operation returned by the service.
- Throws:
ResourceNotFoundException
- The specified resource does not exist.TransferAlreadyCompletedException
- You can't revert the certificate transfer because the transfer is already complete.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.
-
attachPrincipalPolicy
public AttachPrincipalPolicyResult attachPrincipalPolicy(AttachPrincipalPolicyRequest attachPrincipalPolicyRequest)
Attaches the specified policy to the specified principal (certificate or other credential).
- Specified by:
attachPrincipalPolicy
in interfaceAWSIot
- Parameters:
attachPrincipalPolicyRequest
- The input for the AttachPrincipalPolicy operation.- Returns:
- Result of the AttachPrincipalPolicy operation returned by the service.
- Throws:
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.LimitExceededException
- The number of attached entities exceeds the limit.
-
attachThingPrincipal
public AttachThingPrincipalResult attachThingPrincipal(AttachThingPrincipalRequest attachThingPrincipalRequest)
Attaches the specified principal to the specified thing.
- Specified by:
attachThingPrincipal
in interfaceAWSIot
- Parameters:
attachThingPrincipalRequest
- The input for the AttachThingPrincipal operation.- Returns:
- Result of the AttachThingPrincipal operation returned by the service.
- Throws:
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.
-
cancelCertificateTransfer
public CancelCertificateTransferResult 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.
- Specified by:
cancelCertificateTransfer
in interfaceAWSIot
- Parameters:
cancelCertificateTransferRequest
- The input for the CancelCertificateTransfer operation.- Returns:
- Result of the CancelCertificateTransfer operation returned by the service.
- Throws:
ResourceNotFoundException
- The specified resource does not exist.TransferAlreadyCompletedException
- You can't revert the certificate transfer because the transfer is already complete.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.
-
createCertificateFromCsr
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"
- Specified by:
createCertificateFromCsr
in interfaceAWSIot
- Parameters:
createCertificateFromCsrRequest
- The input for the CreateCertificateFromCsr operation.- Returns:
- Result of the CreateCertificateFromCsr operation returned by the service.
- Throws:
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.
-
createKeysAndCertificate
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.
- Specified by:
createKeysAndCertificate
in interfaceAWSIot
- Parameters:
createKeysAndCertificateRequest
- The input for the CreateKeysAndCertificate operation.- Returns:
- Result of the CreateKeysAndCertificate operation returned by the service.
- Throws:
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.
-
createPolicy
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.
- Specified by:
createPolicy
in interfaceAWSIot
- Parameters:
createPolicyRequest
- The input for the CreatePolicy operation.- Returns:
- Result of the CreatePolicy operation returned by the service.
- Throws:
ResourceAlreadyExistsException
- The resource already exists.MalformedPolicyException
- The policy documentation is not valid.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.
-
createPolicyVersion
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).
- Specified by:
createPolicyVersion
in interfaceAWSIot
- Parameters:
createPolicyVersionRequest
- The input for the CreatePolicyVersion operation.- Returns:
- Result of the CreatePolicyVersion operation returned by the service.
- Throws:
ResourceNotFoundException
- The specified resource does not exist.MalformedPolicyException
- The policy documentation is not valid.VersionsLimitExceededException
- The number of policy versions exceeds the limit.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.
-
createThing
public CreateThingResult createThing(CreateThingRequest createThingRequest)
Creates a thing in the Thing Registry.
- Specified by:
createThing
in interfaceAWSIot
- Parameters:
createThingRequest
- The input for the CreateThing operation.- Returns:
- Result of the CreateThing operation returned by the service.
- Throws:
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.ResourceAlreadyExistsException
- The resource already exists.
-
createTopicRule
public CreateTopicRuleResult 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.
- Specified by:
createTopicRule
in interfaceAWSIot
- Parameters:
createTopicRuleRequest
- The input for the CreateTopicRule operation.- Returns:
- Result of the CreateTopicRule operation returned by the service.
- Throws:
SqlParseException
- The Rule-SQL expression can't be parsed correctly.InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ResourceAlreadyExistsException
- The resource already exists.ServiceUnavailableException
- The service is temporarily unavailable.
-
deleteCACertificate
public DeleteCACertificateResult deleteCACertificate(DeleteCACertificateRequest deleteCACertificateRequest)
Deletes a registered CA certificate.
- Specified by:
deleteCACertificate
in interfaceAWSIot
- Parameters:
deleteCACertificateRequest
- Input for the DeleteCACertificate operation.- Returns:
- Result of the DeleteCACertificate operation returned by the service.
- Throws:
InvalidRequestException
- The request is not valid.CertificateStateException
- The certificate operation is not allowed.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.ResourceNotFoundException
- The specified resource does not exist.
-
deleteCertificate
public DeleteCertificateResult 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.
- Specified by:
deleteCertificate
in interfaceAWSIot
- Parameters:
deleteCertificateRequest
- The input for the DeleteCertificate operation.- Returns:
- Result of the DeleteCertificate operation returned by the service.
- Throws:
CertificateStateException
- The certificate operation is not allowed.DeleteConflictException
- You can't delete the resource because it is attached to one or more resources.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.ResourceNotFoundException
- The specified resource does not exist.
-
deletePolicy
public DeletePolicyResult 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.
- Specified by:
deletePolicy
in interfaceAWSIot
- Parameters:
deletePolicyRequest
- The input for the DeletePolicy operation.- Returns:
- Result of the DeletePolicy operation returned by the service.
- Throws:
DeleteConflictException
- You can't delete the resource because it is attached to one or more resources.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.
-
deletePolicyVersion
public DeletePolicyVersionResult 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.
- Specified by:
deletePolicyVersion
in interfaceAWSIot
- Parameters:
deletePolicyVersionRequest
- The input for the DeletePolicyVersion operation.- Returns:
- Result of the DeletePolicyVersion operation returned by the service.
- Throws:
DeleteConflictException
- You can't delete the resource because it is attached to one or more resources.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.
-
deleteRegistrationCode
public DeleteRegistrationCodeResult deleteRegistrationCode(DeleteRegistrationCodeRequest deleteRegistrationCodeRequest)
Deletes a CA certificate registration code.
- Specified by:
deleteRegistrationCode
in interfaceAWSIot
- Parameters:
deleteRegistrationCodeRequest
- The input for the DeleteRegistrationCode operation.- Returns:
- Result of the DeleteRegistrationCode operation returned by the service.
- Throws:
ThrottlingException
- The rate exceeds the limit.ResourceNotFoundException
- The specified resource does not exist.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.
-
deleteThing
public DeleteThingResult deleteThing(DeleteThingRequest deleteThingRequest)
Deletes the specified thing from the Thing Registry.
- Specified by:
deleteThing
in interfaceAWSIot
- Parameters:
deleteThingRequest
- The input for the DeleteThing operation.- Returns:
- Result of the DeleteThing operation returned by the service.
- Throws:
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.
-
deleteTopicRule
public DeleteTopicRuleResult deleteTopicRule(DeleteTopicRuleRequest deleteTopicRuleRequest)
Deletes the specified rule.
- Specified by:
deleteTopicRule
in interfaceAWSIot
- Parameters:
deleteTopicRuleRequest
- The input for the DeleteTopicRule operation.- Returns:
- Result of the DeleteTopicRule operation returned by the service.
- Throws:
InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.UnauthorizedException
- You are not authorized to perform this operation.
-
describeCACertificate
public DescribeCACertificateResult describeCACertificate(DescribeCACertificateRequest describeCACertificateRequest)
Describes a registered CA certificate.
- Specified by:
describeCACertificate
in interfaceAWSIot
- Parameters:
describeCACertificateRequest
- The input for the DescribeCACertificate operation.- Returns:
- Result of the DescribeCACertificate operation returned by the service.
- Throws:
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.ResourceNotFoundException
- The specified resource does not exist.
-
describeCertificate
public DescribeCertificateResult describeCertificate(DescribeCertificateRequest describeCertificateRequest)
Gets information about the specified certificate.
- Specified by:
describeCertificate
in interfaceAWSIot
- Parameters:
describeCertificateRequest
- The input for the DescribeCertificate operation.- Returns:
- Result of the DescribeCertificate operation returned by the service.
- Throws:
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.ResourceNotFoundException
- The specified resource does not exist.
-
describeEndpoint
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.
- Specified by:
describeEndpoint
in interfaceAWSIot
- Parameters:
describeEndpointRequest
- The input for the DescribeEndpoint operation.- Returns:
- Result of the DescribeEndpoint operation returned by the service.
- Throws:
InternalFailureException
- An unexpected error has occurred.UnauthorizedException
- You are not authorized to perform this operation.ThrottlingException
- The rate exceeds the limit.
-
describeThing
public DescribeThingResult describeThing(DescribeThingRequest describeThingRequest)
Gets information about the specified thing.
- Specified by:
describeThing
in interfaceAWSIot
- Parameters:
describeThingRequest
- The input for the DescribeThing operation.- Returns:
- Result of the DescribeThing operation returned by the service.
- Throws:
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.
-
detachPrincipalPolicy
public DetachPrincipalPolicyResult detachPrincipalPolicy(DetachPrincipalPolicyRequest detachPrincipalPolicyRequest)
Removes the specified policy from the specified certificate.
- Specified by:
detachPrincipalPolicy
in interfaceAWSIot
- Parameters:
detachPrincipalPolicyRequest
- The input for the DetachPrincipalPolicy operation.- Returns:
- Result of the DetachPrincipalPolicy operation returned by the service.
- Throws:
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.
-
detachThingPrincipal
public DetachThingPrincipalResult detachThingPrincipal(DetachThingPrincipalRequest detachThingPrincipalRequest)
Detaches the specified principal from the specified thing.
- Specified by:
detachThingPrincipal
in interfaceAWSIot
- Parameters:
detachThingPrincipalRequest
- The input for the DetachThingPrincipal operation.- Returns:
- Result of the DetachThingPrincipal operation returned by the service.
- Throws:
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.
-
disableTopicRule
public DisableTopicRuleResult disableTopicRule(DisableTopicRuleRequest disableTopicRuleRequest)
Disables the specified rule.
- Specified by:
disableTopicRule
in interfaceAWSIot
- Parameters:
disableTopicRuleRequest
- The input for the DisableTopicRuleRequest operation.- Returns:
- Result of the DisableTopicRule operation returned by the service.
- Throws:
InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.UnauthorizedException
- You are not authorized to perform this operation.
-
enableTopicRule
public EnableTopicRuleResult enableTopicRule(EnableTopicRuleRequest enableTopicRuleRequest)
Enables the specified rule.
- Specified by:
enableTopicRule
in interfaceAWSIot
- Parameters:
enableTopicRuleRequest
- The input for the EnableTopicRuleRequest operation.- Returns:
- Result of the EnableTopicRule operation returned by the service.
- Throws:
InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.UnauthorizedException
- You are not authorized to perform this operation.
-
getLoggingOptions
public GetLoggingOptionsResult getLoggingOptions(GetLoggingOptionsRequest getLoggingOptionsRequest)
Gets the logging options.
- Specified by:
getLoggingOptions
in interfaceAWSIot
- Parameters:
getLoggingOptionsRequest
- The input for the GetLoggingOptions operation.- Returns:
- Result of the GetLoggingOptions operation returned by the service.
- Throws:
InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.
-
getPolicy
public GetPolicyResult getPolicy(GetPolicyRequest getPolicyRequest)
Gets information about the specified policy with the policy document of the default version.
- Specified by:
getPolicy
in interfaceAWSIot
- Parameters:
getPolicyRequest
- The input for the GetPolicy operation.- Returns:
- Result of the GetPolicy operation returned by the service.
- Throws:
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.
-
getPolicyVersion
public GetPolicyVersionResult getPolicyVersion(GetPolicyVersionRequest getPolicyVersionRequest)
Gets information about the specified policy version.
- Specified by:
getPolicyVersion
in interfaceAWSIot
- Parameters:
getPolicyVersionRequest
- The input for the GetPolicyVersion operation.- Returns:
- Result of the GetPolicyVersion operation returned by the service.
- Throws:
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.
-
getRegistrationCode
public GetRegistrationCodeResult getRegistrationCode(GetRegistrationCodeRequest getRegistrationCodeRequest)
Gets a registration code used to register a CA certificate with AWS IoT.
- Specified by:
getRegistrationCode
in interfaceAWSIot
- Parameters:
getRegistrationCodeRequest
- The input to the GetRegistrationCode operation.- Returns:
- Result of the GetRegistrationCode operation returned by the service.
- Throws:
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.
-
getTopicRule
public GetTopicRuleResult getTopicRule(GetTopicRuleRequest getTopicRuleRequest)
Gets information about the specified rule.
- Specified by:
getTopicRule
in interfaceAWSIot
- Parameters:
getTopicRuleRequest
- The input for the GetTopicRule operation.- Returns:
- Result of the GetTopicRule operation returned by the service.
- Throws:
InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.UnauthorizedException
- You are not authorized to perform this operation.
-
listCACertificates
public ListCACertificatesResult listCACertificates(ListCACertificatesRequest listCACertificatesRequest)
Lists the CA certificates registered for your AWS account.
The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.
- Specified by:
listCACertificates
in interfaceAWSIot
- Parameters:
listCACertificatesRequest
- Input for the ListCACertificates operation.- Returns:
- Result of the ListCACertificates operation returned by the service.
- Throws:
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.
-
listCertificates
public ListCertificatesResult listCertificates(ListCertificatesRequest listCertificatesRequest)
Lists the certificates registered in your AWS account.
The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results.
- Specified by:
listCertificates
in interfaceAWSIot
- Parameters:
listCertificatesRequest
- The input for the ListCertificates operation.- Returns:
- Result of the ListCertificates operation returned by the service.
- Throws:
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.
-
listCertificatesByCA
public ListCertificatesByCAResult listCertificatesByCA(ListCertificatesByCARequest listCertificatesByCARequest)
List the device certificates signed by the specified CA certificate.
- Specified by:
listCertificatesByCA
in interfaceAWSIot
- Parameters:
listCertificatesByCARequest
- The input to the ListCertificatesByCA operation.- Returns:
- Result of the ListCertificatesByCA operation returned by the service.
- Throws:
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.
-
listPolicies
public ListPoliciesResult listPolicies(ListPoliciesRequest listPoliciesRequest)
Lists your policies.
- Specified by:
listPolicies
in interfaceAWSIot
- Parameters:
listPoliciesRequest
- The input for the ListPolicies operation.- Returns:
- Result of the ListPolicies operation returned by the service.
- Throws:
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.
-
listPolicyVersions
public ListPolicyVersionsResult listPolicyVersions(ListPolicyVersionsRequest listPolicyVersionsRequest)
Lists the versions of the specified policy, and identifies the default version.
- Specified by:
listPolicyVersions
in interfaceAWSIot
- Parameters:
listPolicyVersionsRequest
- The input for the ListPolicyVersions operation.- Returns:
- Result of the ListPolicyVersions operation returned by the service.
- Throws:
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.
-
listPrincipalPolicies
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.
- Specified by:
listPrincipalPolicies
in interfaceAWSIot
- Parameters:
listPrincipalPoliciesRequest
- The input for the ListPrincipalPolicies operation.- Returns:
- Result of the ListPrincipalPolicies operation returned by the service.
- Throws:
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.
-
listPrincipalThings
public ListPrincipalThingsResult listPrincipalThings(ListPrincipalThingsRequest listPrincipalThingsRequest)
Lists the things associated with the specified principal.
- Specified by:
listPrincipalThings
in interfaceAWSIot
- Parameters:
listPrincipalThingsRequest
- The input for the ListPrincipalThings operation.- Returns:
- Result of the ListPrincipalThings operation returned by the service.
- Throws:
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.
-
listThingPrincipals
public ListThingPrincipalsResult listThingPrincipals(ListThingPrincipalsRequest listThingPrincipalsRequest)
Lists the principals associated with the specified thing.
- Specified by:
listThingPrincipals
in interfaceAWSIot
- Parameters:
listThingPrincipalsRequest
- The input for the ListThingPrincipal operation.- Returns:
- Result of the ListThingPrincipals operation returned by the service.
- Throws:
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.
-
listThings
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").
- Specified by:
listThings
in interfaceAWSIot
- Parameters:
listThingsRequest
- The input for the ListThings operation.- Returns:
- Result of the ListThings operation returned by the service.
- Throws:
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.
-
listTopicRules
public ListTopicRulesResult listTopicRules(ListTopicRulesRequest listTopicRulesRequest)
Lists the rules for the specific topic.
- Specified by:
listTopicRules
in interfaceAWSIot
- Parameters:
listTopicRulesRequest
- The input for the ListTopicRules operation.- Returns:
- Result of the ListTopicRules operation returned by the service.
- Throws:
InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.
-
registerCACertificate
public RegisterCACertificateResult registerCACertificate(RegisterCACertificateRequest registerCACertificateRequest)
Registers a CA certificate with AWS IoT. This CA certificate can then be used to sign device certificates, which can be then registered with AWS IoT. You can register up to 10 CA certificates per AWS account that have the same subject field and public key. This enables you to have up to 10 certificate authorities sign your device certificates. If you have more than one CA certificate registered, make sure you pass the CA certificate when you register your device certificates with the RegisterCertificate API.
- Specified by:
registerCACertificate
in interfaceAWSIot
- Parameters:
registerCACertificateRequest
- The input to the RegisterCACertificate operation.- Returns:
- Result of the RegisterCACertificate operation returned by the service.
- Throws:
ResourceAlreadyExistsException
- The resource already exists.RegistrationCodeValidationException
- The registration code is invalid.InvalidRequestException
- The request is not valid.CertificateValidationException
- The certificate is invalid.ThrottlingException
- The rate exceeds the limit.LimitExceededException
- The number of attached entities exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.
-
registerCertificate
public RegisterCertificateResult registerCertificate(RegisterCertificateRequest registerCertificateRequest)
Registers a device certificate with AWS IoT. If you have more than one CA certificate that has the same subject field, you must specify the CA certificate that was used to sign the device certificate being registered.
- Specified by:
registerCertificate
in interfaceAWSIot
- Parameters:
registerCertificateRequest
- The input to the RegisterCertificate operation.- Returns:
- Result of the RegisterCertificate operation returned by the service.
- Throws:
ResourceAlreadyExistsException
- The resource already exists.InvalidRequestException
- The request is not valid.CertificateValidationException
- The certificate is invalid.CertificateStateException
- The certificate operation is not allowed.CertificateConflictException
- Unable to verify the CA certificate used to sign the device certificate you are attempting to register. This is happens when you have registered more than one CA certificate that has the same subject field and public key.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.
-
rejectCertificateTransfer
public RejectCertificateTransferResult rejectCertificateTransfer(RejectCertificateTransferRequest rejectCertificateTransferRequest)
Rejects a pending certificate transfer. After AWS IoT rejects a certificate transfer, the certificate status changes from PENDING_TRANSFER 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.
- Specified by:
rejectCertificateTransfer
in interfaceAWSIot
- Parameters:
rejectCertificateTransferRequest
- The input for the RejectCertificateTransfer operation.- Returns:
- Result of the RejectCertificateTransfer operation returned by the service.
- Throws:
ResourceNotFoundException
- The specified resource does not exist.TransferAlreadyCompletedException
- You can't revert the certificate transfer because the transfer is already complete.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.
-
replaceTopicRule
public ReplaceTopicRuleResult 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.
- Specified by:
replaceTopicRule
in interfaceAWSIot
- Parameters:
replaceTopicRuleRequest
- The input for the ReplaceTopicRule operation.- Returns:
- Result of the ReplaceTopicRule operation returned by the service.
- Throws:
SqlParseException
- The Rule-SQL expression can't be parsed correctly.InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.UnauthorizedException
- You are not authorized to perform this operation.
-
setDefaultPolicyVersion
public SetDefaultPolicyVersionResult 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.
- Specified by:
setDefaultPolicyVersion
in interfaceAWSIot
- Parameters:
setDefaultPolicyVersionRequest
- The input for the SetDefaultPolicyVersion operation.- Returns:
- Result of the SetDefaultPolicyVersion operation returned by the service.
- Throws:
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.
-
setLoggingOptions
public SetLoggingOptionsResult setLoggingOptions(SetLoggingOptionsRequest setLoggingOptionsRequest)
Sets the logging options.
- Specified by:
setLoggingOptions
in interfaceAWSIot
- Parameters:
setLoggingOptionsRequest
- The input for the SetLoggingOptions operation.- Returns:
- Result of the SetLoggingOptions operation returned by the service.
- Throws:
InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.
-
transferCertificate
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.
- Specified by:
transferCertificate
in interfaceAWSIot
- Parameters:
transferCertificateRequest
- The input for the TransferCertificate operation.- Returns:
- Result of the TransferCertificate operation returned by the service.
- Throws:
InvalidRequestException
- The request is not valid.ResourceNotFoundException
- The specified resource does not exist.CertificateStateException
- The certificate operation is not allowed.TransferConflictException
- You can't transfer the certificate because authorization policies are still attached.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.
-
updateCACertificate
public UpdateCACertificateResult updateCACertificate(UpdateCACertificateRequest updateCACertificateRequest)
Updates a registered CA certificate.
- Specified by:
updateCACertificate
in interfaceAWSIot
- Parameters:
updateCACertificateRequest
- The input to the UpdateCACertificate operation.- Returns:
- Result of the UpdateCACertificate operation returned by the service.
- Throws:
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.
-
updateCertificate
public UpdateCertificateResult 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.
- Specified by:
updateCertificate
in interfaceAWSIot
- Parameters:
updateCertificateRequest
- The input for the UpdateCertificate operation.- Returns:
- Result of the UpdateCertificate operation returned by the service.
- Throws:
ResourceNotFoundException
- The specified resource does not exist.CertificateStateException
- The certificate operation is not 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.
-
updateThing
public UpdateThingResult updateThing(UpdateThingRequest updateThingRequest)
Updates the data for a thing.
- Specified by:
updateThing
in interfaceAWSIot
- Parameters:
updateThingRequest
- The input for the UpdateThing operation.- Returns:
- Result of the UpdateThing operation returned by the service.
- Throws:
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.ResourceNotFoundException
- The specified resource does not exist.
-
getCachedResponseMetadata
public 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. This data isn't considered part of the result data returned by an operation, so it's available through this separate, diagnostic interface.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.
- Specified by:
getCachedResponseMetadata
in interfaceAWSIot
- Parameters:
request
- The originally executed request- Returns:
- The response metadata for the specified request, or null if none is available.
-
-