DeviceClientOptions interface
Options for the Client object. Passed into the setOptions function.
Example
var options = {
cert: myX509Certificate,
key: myX509Key,
http: {
receivePolicy: {
interval: 10
}
}
}
client.setOptions(options, callback);
- 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. |
http | Optional object with options specific to the HTTP transport |
keepalive | Keepalive interval in numeric format (seconds). This controls the keepalive ping for MQTT specifically. If you are using AMQP or HTTP, this will do nothing. |
model |
!!Digital Twin Use Only!! String used in MQTT username setting the Digital Twin modelId. |
mqtt | Optional object with options specific to the MQTT transport |
product |
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. |
token |
Optional object with token renewal values. Only use with authentication that uses pre shared keys. |
Inherited Properties
cert | X509 Certificate. |
client |
Name of an OpenSSL engine which can provide the client certificate. |
key | Key associated with the X509 certificate. |
passphrase | Passphrase used to decode the key associated with the X509 certificate. |
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
http
Optional object with options specific to the HTTP transport
http?: HttpTransportOptions
Property Value
keepalive
Keepalive interval in numeric format (seconds). This controls the keepalive ping for MQTT specifically. If you are using AMQP or HTTP, this will do nothing.
keepalive?: number
Property Value
number
modelId
!!Digital Twin Use Only!! String used in MQTT username setting the Digital Twin modelId.
modelId?: string
Property Value
string
mqtt
Optional object with options specific to the MQTT transport
mqtt?: MqttTransportOptions
Property Value
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
TokenRenewalValues
Inherited Property Details
cert
X509 Certificate.
cert?: string | Buffer | string[] | Buffer[]
Property Value
string | Buffer | string[] | Buffer[]
Inherited From X509.cert
clientCertEngine
Name of an OpenSSL engine which can provide the client certificate.
clientCertEngine?: string
Property Value
string
Inherited From X509.clientCertEngine
key
Key associated with the X509 certificate.
key?: string | Buffer
Property Value
string | Buffer
Inherited From X509.key
passphrase
Passphrase used to decode the key associated with the X509 certificate.
passphrase?: string
Property Value
string
Inherited From X509.passphrase