IotHubConnectionCredentials 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
IotHubConnectionCredentials(String) |
Creates an instance of this class using a connection string. |
IotHubConnectionCredentials(IAuthenticationMethod, String, String) |
Creates an instance of this class based on an authentication method, the host name of the IoT hub and an optional gateway host name. |
IotHubConnectionCredentials(String)
Creates an instance of this class using a connection string.
public IotHubConnectionCredentials (string iotHubConnectionString);
new Microsoft.Azure.Devices.Client.IotHubConnectionCredentials : string -> Microsoft.Azure.Devices.Client.IotHubConnectionCredentials
Public Sub New (iotHubConnectionString As String)
Parameters
- iotHubConnectionString
- String
The IoT hub device connection string.
Exceptions
iotHubConnectionString
, IoT hub host name or device Id is null.
iotHubConnectionString
, IoT hub host name or device Id are an empty string or consist only of white-space characters.
Either shared access key or shared access signature where presented together with X509 certificates for authentication.
Applies to
IotHubConnectionCredentials(IAuthenticationMethod, String, String)
Creates an instance of this class based on an authentication method, the host name of the IoT hub and an optional gateway host name.
public IotHubConnectionCredentials (Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, string iotHubHostName, string gatewayHostName = default);
new Microsoft.Azure.Devices.Client.IotHubConnectionCredentials : Microsoft.Azure.Devices.Client.IAuthenticationMethod * string * string -> Microsoft.Azure.Devices.Client.IotHubConnectionCredentials
Public Sub New (authenticationMethod As IAuthenticationMethod, iotHubHostName As String, Optional gatewayHostName As String = Nothing)
Parameters
- authenticationMethod
- IAuthenticationMethod
The authentication method that is used. It includes ClientAuthenticationWithSharedAccessKeyRefresh, ClientAuthenticationWithSharedAccessSignature, ClientAuthenticationWithX509Certificate or Microsoft.Azure.Devices.Client.HsmAuthentication.EdgeModuleAuthenticationWithHsm.
- iotHubHostName
- String
The fully-qualified DNS host name of IoT hub.
- gatewayHostName
- String
The fully-qualified DNS host name of the gateway (optional).
Exceptions
iotHubHostName
, device Id or authenticationMethod
is null.
CertificateChain is used over a protocol other than MQTT over TCP or AMQP over TCP.
Either shared access key or shared access signature where presented together with X509 certificates for authentication.
CertificateChain could not be installed.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기