Class IotIdentityV2Client
java.lang.Object
software.amazon.awssdk.iot.iotidentity.IotIdentityV2Client
- All Implemented Interfaces:
AutoCloseable
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
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases all resources used by the client.Creates a certificate from a certificate signing request (CSR).Creates new keys and a certificate.static IotIdentityV2ClientnewFromMqtt311(software.amazon.awssdk.crt.mqtt.MqttClientConnection protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options) Constructs a new IotIdentityV2Client, using an MQTT311 client as transportstatic IotIdentityV2ClientnewFromMqtt5(software.amazon.awssdk.crt.mqtt5.Mqtt5Client protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options) Constructs a new IotIdentityV2Client, using an MQTT5 client as transportregisterThing(RegisterThingRequest request) Provisions an AWS IoT thing using a pre-defined template.
-
Method Details
-
newFromMqtt5
public static IotIdentityV2Client newFromMqtt5(software.amazon.awssdk.crt.mqtt5.Mqtt5Client protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options) Constructs a new IotIdentityV2Client, using an MQTT5 client as transport- Parameters:
protocolClient- the MQTT5 client to useoptions- configuration options to use
-
newFromMqtt311
public static IotIdentityV2Client newFromMqtt311(software.amazon.awssdk.crt.mqtt.MqttClientConnection protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options) Constructs a new IotIdentityV2Client, using an MQTT311 client as transport- Parameters:
protocolClient- the MQTT311 client to useoptions- configuration options to use
-
close
public void close()Releases all resources used by the client. It is not valid to invoke operations on the client after it has been closed.- Specified by:
closein interfaceAutoCloseable
-
createCertificateFromCsr
public CompletableFuture<CreateCertificateFromCsrResponse> createCertificateFromCsr(CreateCertificateFromCsrRequest request) 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request- modeled request to perform- Returns:
- a future that will complete with the corresponding response
-
createKeysAndCertificate
public CompletableFuture<CreateKeysAndCertificateResponse> createKeysAndCertificate(CreateKeysAndCertificateRequest request) 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. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request- modeled request to perform- Returns:
- a future that will complete with the corresponding response
-
registerThing
Provisions an AWS IoT thing using a pre-defined template. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html#fleet-provision-api- Parameters:
request- modeled request to perform- Returns:
- a future that will complete with the corresponding response
-