public class AWSIotClient extends AmazonWebServiceClient implements AWSIot
AWS IoT is in beta and is subject to change
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.JsonErrorUnmarshallerV2> |
jsonErrorUnmarshallers
List of exception unmarshallers for all AWS IoT exceptions.
|
client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset
Constructor and 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(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(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(ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on AWS IoT.
|
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 URL 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.
|
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.
|
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 policy version as the default for the specified
policy.
|
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, beforeMarshalling, configSigner, configSigner, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withEndpoint, withRegion, withRegion, withTimeOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setEndpoint, setRegion, shutdown
protected List<com.amazonaws.transform.JsonErrorUnmarshallerV2> jsonErrorUnmarshallers
public AWSIotClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
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 AWS IoT (ex: proxy settings, retry counts, etc.).DefaultAWSCredentialsProviderChain
public 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 AWS IoT (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 AWS IoT (ex: proxy settings, retry counts, etc.).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 AWS IoT (ex: proxy settings, retry counts, etc.).requestMetricCollector
- optional request metric collectorpublic 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 AWSIot
acceptCertificateTransferRequest
- The input for the AcceptCertificateTransfer operation.ResourceNotFoundException
- The specified resource does not exist.TransferAlreadyCompletedException
- You can't revert the certificate transfer because it has already
completed.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.public void attachPrincipalPolicy(AttachPrincipalPolicyRequest attachPrincipalPolicyRequest)
Attaches the specified policy to the specified principal (certificate or other credential).
attachPrincipalPolicy
in interface AWSIot
attachPrincipalPolicyRequest
- The input for the AttachPrincipalPolicy operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.LimitExceededException
- The number of attached entities exceeds the limit.public AttachThingPrincipalResult attachThingPrincipal(AttachThingPrincipalRequest attachThingPrincipalRequest)
Attaches the specified principal to the specified thing.
attachThingPrincipal
in interface AWSIot
attachThingPrincipalRequest
- The input for the AttachThingPrincipal operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.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. Once the destination account has accepted the transfer, the transfer may no longer be cancelled.
After a certificate transfer is cancelled, the status of the certificate changes from PENDING_TRANSFER to INACTIVE.
cancelCertificateTransfer
in interface AWSIot
cancelCertificateTransferRequest
- The input for the CancelCertificateTransfer operation.ResourceNotFoundException
- The specified resource does not exist.TransferAlreadyCompletedException
- You can't revert the certificate transfer because it has already
completed.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.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.
createCertificateFromCsr
in interface AWSIot
createCertificateFromCsrRequest
- The input for the CreateCertificateFromCsr operation.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.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. It is important to keep track of the private key.
createKeysAndCertificate
in interface AWSIot
createKeysAndCertificateRequest
- The input for the CreateKeysAndCertificate operation.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.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 AWSIot
createPolicyRequest
- The input for the CreatePolicy operation.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.public CreatePolicyVersionResult createPolicyVersion(CreatePolicyVersionRequest createPolicyVersionRequest)
Creates a new version of the specified AWS IoT policy.
createPolicyVersion
in interface AWSIot
createPolicyVersionRequest
- The input for the CreatePolicyVersion operation.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.public CreateThingResult createThing(CreateThingRequest createThingRequest)
Creates a thing in the thing registry.
createThing
in interface AWSIot
createThingRequest
- The input for the CreateThing operation.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.public void createTopicRule(CreateTopicRuleRequest createTopicRuleRequest)
Creates a rule.
createTopicRule
in interface AWSIot
createTopicRuleRequest
- The input for the CreateTopicRule operation.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.public void deleteCertificate(DeleteCertificateRequest deleteCertificateRequest)
Deletes the specified certificate.
A certificate cannot be deleted if it has a policy attached to it. To delete a certificate, first detach all policies using the DetachPrincipalPolicy operation.
In addition, a certificate cannot be deleted if it is in ACTIVE status. To delete a certificate, first change the status to INACTIVE using the UpdateCertificate operation.
deleteCertificate
in interface AWSIot
deleteCertificateRequest
- The input for the DeleteCertificate operation.DeleteConflictException
- You can't delete the resource because it is attached to one or
more resources.ResourceNotFoundException
- The specified resource does not exist.CertificateStateException
- The certificate operation is not allowed.public void deletePolicy(DeletePolicyRequest deletePolicyRequest)
Deletes the specified policy.
A policy cannot be deleted if:
- it has non-default versions
- it is attached to any certificate
To delete a policy:
- First delete all the non-default versions of the policy using the DeletePolicyVersion API.
- Detach it from any certificate using the DetachPrincipalPolicy API.
When a policy is deleted, its default version is deleted with it.
deletePolicy
in interface AWSIot
deletePolicyRequest
- The input for the DeletePolicy operation.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.public void deletePolicyVersion(DeletePolicyVersionRequest deletePolicyVersionRequest)
Deletes the specified version of the specified policy. The default version of the policy cannot be deleted.
To delete the default version use the DeletePolicy API or mark the policy as non-default and then delete it.
deletePolicyVersion
in interface AWSIot
deletePolicyVersionRequest
- The input for the DeletePolicyVersion operation.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.public DeleteThingResult deleteThing(DeleteThingRequest deleteThingRequest)
Deletes the specified thing from the Thing Registry.
deleteThing
in interface AWSIot
deleteThingRequest
- The input for the DeleteThing operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.public void deleteTopicRule(DeleteTopicRuleRequest deleteTopicRuleRequest)
Deletes the specified rule.
deleteTopicRule
in interface AWSIot
deleteTopicRuleRequest
- The input for the DeleteTopicRule operation.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.public DescribeCertificateResult describeCertificate(DescribeCertificateRequest describeCertificateRequest)
Gets information about the specified certificate.
describeCertificate
in interface AWSIot
describeCertificateRequest
- The input for the DescribeCertificate operation.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.public DescribeEndpointResult describeEndpoint(DescribeEndpointRequest describeEndpointRequest)
Returns a unique URL specific to the AWS account making the call. The URL points to the AWS IoT data plane endpoint. The customer-specific endpoint should be provided to all data plane operations.
describeEndpoint
in interface AWSIot
describeEndpointRequest
- The input for the DescribeEndpoint operation.InternalFailureException
- An unexpected error has occurred.UnauthorizedException
- You are not authorized to perform this operation.public DescribeThingResult describeThing(DescribeThingRequest describeThingRequest)
Gets information about the specified thing.
describeThing
in interface AWSIot
describeThingRequest
- The input for the DescribeThing operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.public void detachPrincipalPolicy(DetachPrincipalPolicyRequest detachPrincipalPolicyRequest)
Removes the specified policy from the specified certificate.
detachPrincipalPolicy
in interface AWSIot
detachPrincipalPolicyRequest
- The input for the DetachPrincipalPolicy operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.public DetachThingPrincipalResult detachThingPrincipal(DetachThingPrincipalRequest detachThingPrincipalRequest)
Detaches the specified principal from the specified thing.
detachThingPrincipal
in interface AWSIot
detachThingPrincipalRequest
- The input for the DetachThingPrincipal operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.public GetLoggingOptionsResult getLoggingOptions(GetLoggingOptionsRequest getLoggingOptionsRequest)
Gets the logging options.
getLoggingOptions
in interface AWSIot
getLoggingOptionsRequest
- The input for the GetLoggingOptions operation.InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.public GetPolicyResult getPolicy(GetPolicyRequest getPolicyRequest)
Gets information about the specified policy with the policy document of the default version.
getPolicy
in interface AWSIot
getPolicyRequest
- The input for the GetPolicy operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.public GetPolicyVersionResult getPolicyVersion(GetPolicyVersionRequest getPolicyVersionRequest)
Gets information about the specified policy version.
getPolicyVersion
in interface AWSIot
getPolicyVersionRequest
- The input for the GetPolicyVersion operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.public GetTopicRuleResult getTopicRule(GetTopicRuleRequest getTopicRuleRequest)
Gets information about the specified rule.
getTopicRule
in interface AWSIot
getTopicRuleRequest
- The input for the GetTopicRule operation.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.public ListCertificatesResult listCertificates(ListCertificatesRequest listCertificatesRequest)
Lists your certificates.
The results are paginated with a default page size of 25. You can retrieve additional results using the returned marker.
listCertificates
in interface AWSIot
listCertificatesRequest
- The input for the ListCertificates operation.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.public ListPoliciesResult listPolicies(ListPoliciesRequest listPoliciesRequest)
Lists your policies.
listPolicies
in interface AWSIot
listPoliciesRequest
- The input for the ListPolicies operation.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.public ListPolicyVersionsResult listPolicyVersions(ListPolicyVersionsRequest listPolicyVersionsRequest)
Lists the versions of the specified policy, and identifies the default version.
listPolicyVersions
in interface AWSIot
listPolicyVersionsRequest
- The input for the ListPolicyVersions operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.public ListPrincipalPoliciesResult listPrincipalPolicies(ListPrincipalPoliciesRequest listPrincipalPoliciesRequest)
Lists the policies attached to the specified principal. If you use an Amazon Cognito identity, the ID needs to be in Amazon Cognito Identity format.
listPrincipalPolicies
in interface AWSIot
listPrincipalPoliciesRequest
- The input for the ListPrincipalPolicies operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.public ListPrincipalThingsResult listPrincipalThings(ListPrincipalThingsRequest listPrincipalThingsRequest)
Lists the things associated with the specified principal.
listPrincipalThings
in interface AWSIot
listPrincipalThingsRequest
- The input for the ListPrincipalThings operation.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.public ListThingPrincipalsResult listThingPrincipals(ListThingPrincipalsRequest listThingPrincipalsRequest)
Lists the principals associated with the specified thing.
listThingPrincipals
in interface AWSIot
listThingPrincipalsRequest
- The input for the ListThingPrincipal operation.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.public ListThingsResult listThings(ListThingsRequest listThingsRequest)
Lists your things. You can pass an AttributeName and/or AttributeValue to filter your things. For example: "ListThings where AttributeName=Color and AttributeValue=Red"
listThings
in interface AWSIot
listThingsRequest
- The input for the ListThings operation.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.public ListTopicRulesResult listTopicRules(ListTopicRulesRequest listTopicRulesRequest)
Lists the rules for the specific topic.
listTopicRules
in interface AWSIot
listTopicRulesRequest
- The input for the ListTopicRules operation.InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.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. Once called, the certificate will be returned to the source's account in the INACTIVE state.
rejectCertificateTransfer
in interface AWSIot
rejectCertificateTransferRequest
- The input for the RejectCertificateTransfer operation.ResourceNotFoundException
- The specified resource does not exist.TransferAlreadyCompletedException
- You can't revert the certificate transfer because it has already
completed.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.public void replaceTopicRule(ReplaceTopicRuleRequest replaceTopicRuleRequest)
Replaces the specified rule. You must specify all parameters for the new rule.
replaceTopicRule
in interface AWSIot
replaceTopicRuleRequest
- The input for the ReplaceTopicRule operation.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.public void setDefaultPolicyVersion(SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest)
Sets the specified policy version as the default for the specified policy.
setDefaultPolicyVersion
in interface AWSIot
setDefaultPolicyVersionRequest
- The input for the SetDefaultPolicyVersion operation.ResourceNotFoundException
- The specified resource does not exist.InvalidRequestException
- The request is not valid.ThrottlingException
- The rate exceeds the limit.UnauthorizedException
- You are not authorized to perform this operation.ServiceUnavailableException
- The service is temporarily unavailable.InternalFailureException
- An unexpected error has occurred.public void setLoggingOptions(SetLoggingOptionsRequest setLoggingOptionsRequest)
Sets the logging options.
setLoggingOptions
in interface AWSIot
setLoggingOptionsRequest
- The input for the SetLoggingOptions operation.InternalException
- An unexpected error has occurred.InvalidRequestException
- The request is not valid.ServiceUnavailableException
- The service is temporarily unavailable.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. It can be deactivated using the UpdateCertificate API.
The certificate must not have any policies attached to it. These can be detached using the DetachPrincipalPolicy API.
transferCertificate
in interface AWSIot
transferCertificateRequest
- The input for the TransferCertificate operation.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 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.public void updateCertificate(UpdateCertificateRequest updateCertificateRequest)
Updates the status of the specified certificate. This operation is idempotent.
Moving a cert from the ACTIVE state (including REVOKED) will NOT disconnect currently-connected devices, although 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 AWSIot
updateCertificateRequest
- The input for the UpdateCertificate operation.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.public UpdateThingResult updateThing(UpdateThingRequest updateThingRequest)
Updates the data for a thing.
updateThing
in interface AWSIot
updateThingRequest
- The input for the UpdateThing operation.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.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 AWSIot
request
- The originally executed requestCopyright © 2015. All rights reserved.