DeviceClient.CreateFromConnectionString Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateFromConnectionString(String, String, TransportType, ClientOptions) |
Creates a disposable DeviceClient from the specified connection string using the specified transport type |
CreateFromConnectionString(String, String, ITransportSettings[], ClientOptions) |
Creates a disposable DeviceClient from the specified connection string using the prioritized list of transports |
CreateFromConnectionString(String, String, TransportType) |
Creates a disposable DeviceClient from the specified connection string using the specified transport type |
CreateFromConnectionString(String, String, ClientOptions) |
Creates a disposable DeviceClient using AMQP transport from the specified connection string |
CreateFromConnectionString(String, TransportType, ClientOptions) |
Creates a disposable DeviceClient from the specified connection string using the specified transport type |
CreateFromConnectionString(String, ITransportSettings[], ClientOptions) |
Create a disposable DeviceClient from the specified connection string using a prioritized list of transports |
CreateFromConnectionString(String, TransportType) |
Creates a disposable DeviceClient from the specified connection string using the specified transport type |
CreateFromConnectionString(String, ClientOptions) |
Creates a disposable DeviceClient using AMQP transport from the specified connection string |
CreateFromConnectionString(String) |
Creates a disposable DeviceClient using Amqp transport from the specified connection string |
CreateFromConnectionString(String, String) |
Creates a disposable DeviceClient using Amqp transport from the specified connection string |
CreateFromConnectionString(String, String, TransportType, ClientOptions)
Creates a disposable DeviceClient from the specified connection string using the specified transport type
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString, string deviceId, Microsoft.Azure.Devices.Client.TransportType transportType, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member CreateFromConnectionString : string * string * Microsoft.Azure.Devices.Client.TransportType * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String, deviceId As String, transportType As TransportType, Optional options As ClientOptions = Nothing) As DeviceClient
Parameters
- connectionString
- String
IoT hub-Scope Connection string for the IoT hub (without DeviceId)
- deviceId
- String
Id of the device
- transportType
- TransportType
The transportType used (Http1, AMQP or MQTT), TransportType
- options
- ClientOptions
The options that allow configuration of the device client instance during initialization.
Returns
A disposable DeviceClient instance
Applies to
CreateFromConnectionString(String, String, ITransportSettings[], ClientOptions)
Creates a disposable DeviceClient from the specified connection string using the prioritized list of transports
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString, string deviceId, Microsoft.Azure.Devices.Client.ITransportSettings[] transportSettings, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member CreateFromConnectionString : string * string * Microsoft.Azure.Devices.Client.ITransportSettings[] * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String, deviceId As String, transportSettings As ITransportSettings(), Optional options As ClientOptions = Nothing) As DeviceClient
Parameters
- connectionString
- String
Connection string for the IoT hub (without DeviceId)
- deviceId
- String
Id of the device
- transportSettings
- ITransportSettings[]
Prioritized list of transportTypes and their settings
- options
- ClientOptions
The options that allow configuration of the device client instance during initialization.
Returns
A disposable DeviceClient instance
Applies to
CreateFromConnectionString(String, String, TransportType)
Creates a disposable DeviceClient from the specified connection string using the specified transport type
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString, string deviceId, Microsoft.Azure.Devices.Client.TransportType transportType);
static member CreateFromConnectionString : string * string * Microsoft.Azure.Devices.Client.TransportType -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String, deviceId As String, transportType As TransportType) As DeviceClient
Parameters
- connectionString
- String
IoT Hub-Scope Connection string for the IoT hub (without DeviceId)
- deviceId
- String
Id of the device
- transportType
- TransportType
The transportType used (Http1 or Amqp)
Returns
A disposable DeviceClient instance
Applies to
CreateFromConnectionString(String, String, ClientOptions)
Creates a disposable DeviceClient using AMQP transport from the specified connection string
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString, string deviceId, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member CreateFromConnectionString : string * string * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String, deviceId As String, Optional options As ClientOptions = Nothing) As DeviceClient
Parameters
- connectionString
- String
IoT hub-Scope Connection string for the IoT hub (without DeviceId)
- deviceId
- String
Id of the Device
- options
- ClientOptions
The options that allow configuration of the device client instance during initialization.
Returns
A disposable DeviceClient instance
Applies to
CreateFromConnectionString(String, TransportType, ClientOptions)
Creates a disposable DeviceClient from the specified connection string using the specified transport type
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString, Microsoft.Azure.Devices.Client.TransportType transportType, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member CreateFromConnectionString : string * Microsoft.Azure.Devices.Client.TransportType * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String, transportType As TransportType, Optional options As ClientOptions = Nothing) As DeviceClient
Parameters
- connectionString
- String
Connection string for the IoT hub (including DeviceId)
- transportType
- TransportType
Specifies whether Http1, AMQP or MQTT transport is used, TransportType
- options
- ClientOptions
The options that allow configuration of the device client instance during initialization.
Returns
A disposable DeviceClient instance
Applies to
CreateFromConnectionString(String, ITransportSettings[], ClientOptions)
Create a disposable DeviceClient from the specified connection string using a prioritized list of transports
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString, Microsoft.Azure.Devices.Client.ITransportSettings[] transportSettings, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member CreateFromConnectionString : string * Microsoft.Azure.Devices.Client.ITransportSettings[] * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String, transportSettings As ITransportSettings(), Optional options As ClientOptions = Nothing) As DeviceClient
Parameters
- connectionString
- String
Connection string for the IoT hub (with DeviceId)
- transportSettings
- ITransportSettings[]
Prioritized list of transports and their settings
- options
- ClientOptions
The options that allow configuration of the device client instance during initialization.
Returns
A disposable DeviceClient instance
Applies to
CreateFromConnectionString(String, TransportType)
Creates a disposable DeviceClient from the specified connection string using the specified transport type
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString, Microsoft.Azure.Devices.Client.TransportType transportType);
static member CreateFromConnectionString : string * Microsoft.Azure.Devices.Client.TransportType -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String, transportType As TransportType) As DeviceClient
Parameters
- connectionString
- String
Connection string for the IoT hub (including DeviceId)
- transportType
- TransportType
Specifies whether Amqp or Http transport is used
Returns
A disposable DeviceClient instance
Applies to
CreateFromConnectionString(String, ClientOptions)
Creates a disposable DeviceClient using AMQP transport from the specified connection string
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member CreateFromConnectionString : string * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String, Optional options As ClientOptions = Nothing) As DeviceClient
Parameters
- connectionString
- String
Connection string for the IoT hub (including DeviceId)
- options
- ClientOptions
The options that allow configuration of the device client instance during initialization.
Returns
A disposable DeviceClient instance
Applies to
CreateFromConnectionString(String)
Creates a disposable DeviceClient using Amqp transport from the specified connection string
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString);
static member CreateFromConnectionString : string -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String) As DeviceClient
Parameters
- connectionString
- String
Connection string for the IoT hub (including DeviceId)
Returns
A disposable DeviceClient instance
Applies to
CreateFromConnectionString(String, String)
Creates a disposable DeviceClient using Amqp transport from the specified connection string
public static Microsoft.Azure.Devices.Client.DeviceClient CreateFromConnectionString (string connectionString, string deviceId);
static member CreateFromConnectionString : string * string -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function CreateFromConnectionString (connectionString As String, deviceId As String) As DeviceClient
Parameters
- connectionString
- String
IoT Hub-Scope Connection string for the IoT hub (without DeviceId)
- deviceId
- String
Id of the Device
Returns
A disposable DeviceClient instance