Class IotIdentityV2Client
- java.lang.Object
-
- software.amazon.awssdk.iot.iotidentity.IotIdentityV2Client
-
- All Implemented Interfaces:
AutoCloseable
public class IotIdentityV2Client extends Object implements 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Releases all resources used by the client.CompletableFuture<CreateCertificateFromCsrResponse>
createCertificateFromCsr(CreateCertificateFromCsrRequest request)
Creates a certificate from a certificate signing request (CSR).CompletableFuture<CreateKeysAndCertificateResponse>
createKeysAndCertificate(CreateKeysAndCertificateRequest request)
Creates new keys and a certificate.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 transportstatic 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 transportCompletableFuture<RegisterThingResponse>
registerThing(RegisterThingRequest request)
Provisions an AWS IoT thing using a pre-defined template.
-
-
-
Method Detail
-
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:
close
in 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
public CompletableFuture<RegisterThingResponse> registerThing(RegisterThingRequest request)
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
-
-