DeviceClientOptions interface

Options for the Client object. Passed into the <xref:Client.setOptions> function.

Extends
X509

Properties

amqp

Optional object with options specific to the AMQP transport

ca

Public certificate in PEM form for certificate authority being used by the Hub service. This is the CA that the hub is using to secure TLS connections and the client validates the connection using this public cert in order to validate the identity of the hub. If you are connecting to an Azure IoT Hub inside of an Azure data center, you do not need to set this. If you are connecting to some other hub (e.g. an Edge Hub), then you may need to set this to the server cert that the hub uses for TLS.

cert

X509 Certificate.

clientCertEngine

Name of an OpenSSL engine which can provide the client certificate.

http

Optional object with options specific to the HTTP transport

key

Key associated with the X509 certificate.

mqtt

Optional object with options specific to the MQTT transport

passphrase

Passphrase used to decode the key associated with the X509 certificate.

productInfo

Custom user defined information to be appended to existing User Agent information. The User Agent Identification information is used predominantly by Microsoft internally for identifying metadata related to Device Client usage for Azure IoT.

tokenRenewal

Optional object with token renewal values. Only use with authentication that uses pre shared keys.

Property Details

amqp

Optional object with options specific to the AMQP transport

amqp?: AmqpTransportOptions

Property Value

ca

Public certificate in PEM form for certificate authority being used by the Hub service. This is the CA that the hub is using to secure TLS connections and the client validates the connection using this public cert in order to validate the identity of the hub. If you are connecting to an Azure IoT Hub inside of an Azure data center, you do not need to set this. If you are connecting to some other hub (e.g. an Edge Hub), then you may need to set this to the server cert that the hub uses for TLS.

ca?: string

Property Value

string

cert

X509 Certificate.

cert?: string | string[] | Buffer | Buffer[]

Property Value

string | string | Buffer | Buffer[][]

clientCertEngine

Name of an OpenSSL engine which can provide the client certificate.

clientCertEngine?: string

Property Value

string

http

Optional object with options specific to the HTTP transport

http?: HttpTransportOptions

Property Value

key

Key associated with the X509 certificate.

key?: string | Buffer

Property Value

string | Buffer

mqtt

Optional object with options specific to the MQTT transport

mqtt?: MqttTransportOptions

Property Value

passphrase

Passphrase used to decode the key associated with the X509 certificate.

passphrase?: string

Property Value

string

productInfo

Custom user defined information to be appended to existing User Agent information. The User Agent Identification information is used predominantly by Microsoft internally for identifying metadata related to Device Client usage for Azure IoT.

productInfo?: string

Property Value

string

tokenRenewal

Optional object with token renewal values. Only use with authentication that uses pre shared keys.

tokenRenewal?: TokenRenewalValues

Property Value