Class IotIdentityClient
- java.lang.Object
-
- software.amazon.awssdk.iot.iotidentity.IotIdentityClient
-
public class IotIdentityClient extends Object
An AWS IoT service that assists with provisioning a device and installing unique client certificates on it AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html
-
-
Constructor Summary
Constructors Constructor Description IotIdentityClient(software.amazon.awssdk.crt.mqtt.MqttClientConnection connection)
Constructs a new IotIdentityClient
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Integer>
PublishCreateCertificateFromCsr(CreateCertificateFromCsrRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
Creates a certificate from a certificate signing request (CSR).CompletableFuture<Integer>
PublishCreateKeysAndCertificate(CreateKeysAndCertificateRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
Creates new keys and a certificate.CompletableFuture<Integer>
PublishRegisterThing(RegisterThingRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
Provisions an AWS IoT thing using a pre-defined template.CompletableFuture<Integer>
SubscribeToCreateCertificateFromCsrAccepted(CreateCertificateFromCsrSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<CreateCertificateFromCsrResponse> handler)
Subscribes to the accepted topic of the CreateCertificateFromCsr operation.CompletableFuture<Integer>
SubscribeToCreateCertificateFromCsrAccepted(CreateCertificateFromCsrSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<CreateCertificateFromCsrResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the accepted topic of the CreateCertificateFromCsr operation.CompletableFuture<Integer>
SubscribeToCreateCertificateFromCsrRejected(CreateCertificateFromCsrSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler)
Subscribes to the rejected topic of the CreateCertificateFromCsr operation.CompletableFuture<Integer>
SubscribeToCreateCertificateFromCsrRejected(CreateCertificateFromCsrSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the rejected topic of the CreateCertificateFromCsr operation.CompletableFuture<Integer>
SubscribeToCreateKeysAndCertificateAccepted(CreateKeysAndCertificateSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<CreateKeysAndCertificateResponse> handler)
Subscribes to the accepted topic of the CreateKeysAndCertificate operation.CompletableFuture<Integer>
SubscribeToCreateKeysAndCertificateAccepted(CreateKeysAndCertificateSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<CreateKeysAndCertificateResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the accepted topic of the CreateKeysAndCertificate operation.CompletableFuture<Integer>
SubscribeToCreateKeysAndCertificateRejected(CreateKeysAndCertificateSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler)
Subscribes to the rejected topic of the CreateKeysAndCertificate operation.CompletableFuture<Integer>
SubscribeToCreateKeysAndCertificateRejected(CreateKeysAndCertificateSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the rejected topic of the CreateKeysAndCertificate operation.CompletableFuture<Integer>
SubscribeToRegisterThingAccepted(RegisterThingSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RegisterThingResponse> handler)
Subscribes to the accepted topic of the RegisterThing operation.CompletableFuture<Integer>
SubscribeToRegisterThingAccepted(RegisterThingSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RegisterThingResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the accepted topic of the RegisterThing operation.CompletableFuture<Integer>
SubscribeToRegisterThingRejected(RegisterThingSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler)
Subscribes to the rejected topic of the RegisterThing operation.CompletableFuture<Integer>
SubscribeToRegisterThingRejected(RegisterThingSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the rejected topic of the RegisterThing operation.
-
-
-
Method Detail
-
PublishCreateCertificateFromCsr
public CompletableFuture<Integer> PublishCreateCertificateFromCsr(CreateCertificateFromCsrRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
Creates a certificate from a certificate signing request (CSR). AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Message to be serialized and sentqos
- Quality of Service for delivering this message- Returns:
- a future containing the MQTT packet id used to perform the publish operation * For QoS 0, completes as soon as the packet is sent. * For QoS 1, completes when PUBACK is received. * QoS 2 is not supported by AWS IoT.
-
PublishCreateKeysAndCertificate
public CompletableFuture<Integer> PublishCreateKeysAndCertificate(CreateKeysAndCertificateRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
Creates new keys and a certificate. AWS IoT provides client certificates that are signed by the Amazon Root certificate authority (CA). The new certificate has a PENDING_ACTIVATION status. When you call RegisterThing to provision a thing with this certificate, the certificate status changes to ACTIVE or INACTIVE as described in the template. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Message to be serialized and sentqos
- Quality of Service for delivering this message- Returns:
- a future containing the MQTT packet id used to perform the publish operation * For QoS 0, completes as soon as the packet is sent. * For QoS 1, completes when PUBACK is received. * QoS 2 is not supported by AWS IoT.
-
PublishRegisterThing
public CompletableFuture<Integer> PublishRegisterThing(RegisterThingRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos)
Provisions an AWS IoT thing using a pre-defined template. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Message to be serialized and sentqos
- Quality of Service for delivering this message- Returns:
- a future containing the MQTT packet id used to perform the publish operation * For QoS 0, completes as soon as the packet is sent. * For QoS 1, completes when PUBACK is received. * QoS 2 is not supported by AWS IoT.
-
SubscribeToCreateCertificateFromCsrAccepted
public CompletableFuture<Integer> SubscribeToCreateCertificateFromCsrAccepted(CreateCertificateFromCsrSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<CreateCertificateFromCsrResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the accepted topic of the CreateCertificateFromCsr operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topicexceptionHandler
- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToCreateCertificateFromCsrAccepted
public CompletableFuture<Integer> SubscribeToCreateCertificateFromCsrAccepted(CreateCertificateFromCsrSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<CreateCertificateFromCsrResponse> handler)
Subscribes to the accepted topic of the CreateCertificateFromCsr operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToCreateCertificateFromCsrRejected
public CompletableFuture<Integer> SubscribeToCreateCertificateFromCsrRejected(CreateCertificateFromCsrSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the rejected topic of the CreateCertificateFromCsr operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topicexceptionHandler
- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToCreateCertificateFromCsrRejected
public CompletableFuture<Integer> SubscribeToCreateCertificateFromCsrRejected(CreateCertificateFromCsrSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler)
Subscribes to the rejected topic of the CreateCertificateFromCsr operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToCreateKeysAndCertificateAccepted
public CompletableFuture<Integer> SubscribeToCreateKeysAndCertificateAccepted(CreateKeysAndCertificateSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<CreateKeysAndCertificateResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the accepted topic of the CreateKeysAndCertificate operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topicexceptionHandler
- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToCreateKeysAndCertificateAccepted
public CompletableFuture<Integer> SubscribeToCreateKeysAndCertificateAccepted(CreateKeysAndCertificateSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<CreateKeysAndCertificateResponse> handler)
Subscribes to the accepted topic of the CreateKeysAndCertificate operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToCreateKeysAndCertificateRejected
public CompletableFuture<Integer> SubscribeToCreateKeysAndCertificateRejected(CreateKeysAndCertificateSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the rejected topic of the CreateKeysAndCertificate operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topicexceptionHandler
- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToCreateKeysAndCertificateRejected
public CompletableFuture<Integer> SubscribeToCreateKeysAndCertificateRejected(CreateKeysAndCertificateSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler)
Subscribes to the rejected topic of the CreateKeysAndCertificate operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToRegisterThingAccepted
public CompletableFuture<Integer> SubscribeToRegisterThingAccepted(RegisterThingSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RegisterThingResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the accepted topic of the RegisterThing operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topicexceptionHandler
- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToRegisterThingAccepted
public CompletableFuture<Integer> SubscribeToRegisterThingAccepted(RegisterThingSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<RegisterThingResponse> handler)
Subscribes to the accepted topic of the RegisterThing operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToRegisterThingRejected
public CompletableFuture<Integer> SubscribeToRegisterThingRejected(RegisterThingSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler)
Subscribes to the rejected topic of the RegisterThing operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topicexceptionHandler
- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToRegisterThingRejected
public CompletableFuture<Integer> SubscribeToRegisterThingRejected(RegisterThingSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler)
Subscribes to the rejected topic of the RegisterThing operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request
- Subscription request configurationqos
- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler
- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
-