Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IotIdentityClient

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

Hierarchy

  • IotIdentityClient

Index

Constructors

constructor

IotIdentity Methods

publishCreateCertificateFromCsr

  • 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

    Returns Promise<MqttRequest>

    Promise which returns a mqtt.MqttRequest which will contain the packet id of the PUBLISH packet.

    • 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

  • 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

    Returns Promise<MqttRequest>

    Promise which returns a mqtt.MqttRequest which will contain the packet id of the PUBLISH packet.

    • 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

  • 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: RegisterThingRequest

      Message to be serialized and sent

    • qos: QoS

      Quality of Service for delivering this message

    Returns Promise<MqttRequest>

    Promise which returns a mqtt.MqttRequest which will contain the packet id of the PUBLISH packet.

    • 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

  • Subscribes to the accepted topic of the CreateCertificateFromCsr operation.

    subscribeToCreateCertificateFromCsrAccepted may be called while the device is offline, though the async operation cannot complete successfully until the connection resumes.

    Once subscribed, messageHandler 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: CreateCertificateFromCsrSubscriptionRequest

      Subscription request configuration

    • qos: QoS

      Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK

    • messageHandler: (error?: IotIdentityError, response?: model.CreateCertificateFromCsrResponse) => void

      Callback invoked when message or error is received from the server.

        • (error?: IotIdentityError, response?: model.CreateCertificateFromCsrResponse): void
        • Parameters

          • Optional error: IotIdentityError
          • Optional response: model.CreateCertificateFromCsrResponse

          Returns void

    Returns Promise<MqttSubscribeRequest>

    Promise which returns a mqtt.MqttSubscribeRequest which will contain the result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned from the server or is rejected when an exception occurs.

subscribeToCreateCertificateFromCsrRejected

  • Subscribes to the rejected topic of the CreateCertificateFromCsr operation.

    subscribeToCreateCertificateFromCsrRejected may be called while the device is offline, though the async operation cannot complete successfully until the connection resumes.

    Once subscribed, messageHandler 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: CreateCertificateFromCsrSubscriptionRequest

      Subscription request configuration

    • qos: QoS

      Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK

    • messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void

      Callback invoked when message or error is received from the server.

        • Parameters

          Returns void

    Returns Promise<MqttSubscribeRequest>

    Promise which returns a mqtt.MqttSubscribeRequest which will contain the result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned from the server or is rejected when an exception occurs.

subscribeToCreateKeysAndCertificateAccepted

  • Subscribes to the accepted topic of the CreateKeysAndCertificate operation.

    subscribeToCreateKeysAndCertificateAccepted may be called while the device is offline, though the async operation cannot complete successfully until the connection resumes.

    Once subscribed, messageHandler 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: CreateKeysAndCertificateSubscriptionRequest

      Subscription request configuration

    • qos: QoS

      Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK

    • messageHandler: (error?: IotIdentityError, response?: model.CreateKeysAndCertificateResponse) => void

      Callback invoked when message or error is received from the server.

        • (error?: IotIdentityError, response?: model.CreateKeysAndCertificateResponse): void
        • Parameters

          • Optional error: IotIdentityError
          • Optional response: model.CreateKeysAndCertificateResponse

          Returns void

    Returns Promise<MqttSubscribeRequest>

    Promise which returns a mqtt.MqttSubscribeRequest which will contain the result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned from the server or is rejected when an exception occurs.

subscribeToCreateKeysAndCertificateRejected

  • Subscribes to the rejected topic of the CreateKeysAndCertificate operation.

    subscribeToCreateKeysAndCertificateRejected may be called while the device is offline, though the async operation cannot complete successfully until the connection resumes.

    Once subscribed, messageHandler 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: CreateKeysAndCertificateSubscriptionRequest

      Subscription request configuration

    • qos: QoS

      Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK

    • messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void

      Callback invoked when message or error is received from the server.

        • Parameters

          Returns void

    Returns Promise<MqttSubscribeRequest>

    Promise which returns a mqtt.MqttSubscribeRequest which will contain the result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned from the server or is rejected when an exception occurs.

subscribeToRegisterThingAccepted

  • Subscribes to the accepted topic of the RegisterThing operation.

    subscribeToRegisterThingAccepted may be called while the device is offline, though the async operation cannot complete successfully until the connection resumes.

    Once subscribed, messageHandler 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: RegisterThingSubscriptionRequest

      Subscription request configuration

    • qos: QoS

      Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK

    • messageHandler: (error?: IotIdentityError, response?: model.RegisterThingResponse) => void

      Callback invoked when message or error is received from the server.

        • Parameters

          • Optional error: IotIdentityError
          • Optional response: model.RegisterThingResponse

          Returns void

    Returns Promise<MqttSubscribeRequest>

    Promise which returns a mqtt.MqttSubscribeRequest which will contain the result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned from the server or is rejected when an exception occurs.

subscribeToRegisterThingRejected

  • Subscribes to the rejected topic of the RegisterThing operation.

    subscribeToRegisterThingRejected may be called while the device is offline, though the async operation cannot complete successfully until the connection resumes.

    Once subscribed, messageHandler 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: RegisterThingSubscriptionRequest

      Subscription request configuration

    • qos: QoS

      Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK

    • messageHandler: (error?: IotIdentityError, response?: model.ErrorResponse) => void

      Callback invoked when message or error is received from the server.

        • Parameters

          Returns void

    Returns Promise<MqttSubscribeRequest>

    Promise which returns a mqtt.MqttSubscribeRequest which will contain the result of the SUBSCRIBE. The Promise resolves when a SUBACK is returned from the server or is rejected when an exception occurs.

Generated using TypeDoc