aws-iot-device-sdk-v2
Version:
NodeJS API for the AWS IoT service
86 lines (85 loc) • 3.85 kB
TypeScript
/**
* @packageDocumentation
* @module identity
*/
import { mqtt, mqtt5 } from 'aws-crt';
import { mqtt_request_response as mqtt_rr_internal } from 'aws-crt';
import * as model from './model';
/**
* 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
*
* @category IotIdentity
*/
export declare class IotIdentityClientv2 {
private rrClient;
private serviceModel;
private constructor();
/**
* Creates a new service client that will use an SDK MQTT 311 client as transport.
*
* @param protocolClient the MQTT 311 client to use for transport
* @param options additional service client configuration options
*
* @return a new service client
*
*/
static newFromMqtt311(protocolClient: mqtt.MqttClientConnection, options: mqtt_rr_internal.RequestResponseClientOptions): IotIdentityClientv2;
/**
* Creates a new service client that will use an SDK MQTT 5 client as transport.
*
* @param protocolClient the MQTT 5 client to use for transport
* @param options additional service client configuration options
*
* @return a new service client
*
*/
static newFromMqtt5(protocolClient: mqtt5.Mqtt5Client, options: mqtt_rr_internal.RequestResponseClientOptions): IotIdentityClientv2;
/**
* Triggers cleanup of all resources associated with the service client. Closing a client will fail
* all incomplete requests and close all unclosed streaming operations.
*
* This must be called when finished with a client; otherwise, native resources will leak.
*/
close(): void;
/**
* 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
*
* @param request operation to perform
*
* @return Promise which resolves into the response to the request
*
* @category IotIdentity
*/
createCertificateFromCsr(request: model.CreateCertificateFromCsrRequest): Promise<model.CreateCertificateFromCsrResponse>;
/**
* 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
*
* @param request operation to perform
*
* @return Promise which resolves into the response to the request
*
* @category IotIdentity
*/
createKeysAndCertificate(request: model.CreateKeysAndCertificateRequest): Promise<model.CreateKeysAndCertificateResponse>;
/**
* 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
*
* @param request operation to perform
*
* @return Promise which resolves into the response to the request
*
* @category IotIdentity
*/
registerThing(request: model.RegisterThingRequest): Promise<model.RegisterThingResponse>;
}