IotHubModuleClient Constructors
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
IotHubModuleClient(String, IotHubClientOptions) |
Creates a disposable |
IotHubModuleClient(String, IAuthenticationMethod, IotHubClientOptions) |
Creates a disposable |
IotHubModuleClient(String, IotHubClientOptions)
Creates a disposable IotHubModuleClient
from the specified connection string.
public IotHubModuleClient (string connectionString, Microsoft.Azure.Devices.Client.IotHubClientOptions options = default);
new Microsoft.Azure.Devices.Client.IotHubModuleClient : string * Microsoft.Azure.Devices.Client.IotHubClientOptions -> Microsoft.Azure.Devices.Client.IotHubModuleClient
Public Sub New (connectionString As String, Optional options As IotHubClientOptions = Nothing)
Parameters
- connectionString
- String
The connection string based on shared access key used in API calls which allows the module to communicate with IoT Hub.
- options
- IotHubClientOptions
The options that allow configuration of the module client instance during initialization.
Exceptions
Either connectionString
is null,
or the IoT hub host name, device Id or module Id in the connection string is null.
Neither shared access key nor shared access signature were presented for authentication.
Applies to
IotHubModuleClient(String, IAuthenticationMethod, IotHubClientOptions)
Creates a disposable IotHubModuleClient
from the specified parameters.
public IotHubModuleClient (string hostName, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.IotHubClientOptions options = default);
new Microsoft.Azure.Devices.Client.IotHubModuleClient : string * Microsoft.Azure.Devices.Client.IAuthenticationMethod * Microsoft.Azure.Devices.Client.IotHubClientOptions -> Microsoft.Azure.Devices.Client.IotHubModuleClient
Public Sub New (hostName As String, authenticationMethod As IAuthenticationMethod, Optional options As IotHubClientOptions = Nothing)
Parameters
- hostName
- String
The fully-qualified DNS host name of IoT hub.
- authenticationMethod
- IAuthenticationMethod
The authentication method that is used. It includes ClientAuthenticationWithSharedAccessKeyRefresh, ClientAuthenticationWithSharedAccessSignature, ClientAuthenticationWithX509Certificate or Microsoft.Azure.Devices.Client.HsmAuthentication.EdgeModuleAuthenticationWithHsm.
- options
- IotHubClientOptions
The options that allow configuration of the module client instance during initialization.
Exceptions
hostName
, device Id, module Id or authenticationMethod
is null.
Either shared access key or shared access signature where presented together with X509 certificates for authentication.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기