IotHubConnectionStringBuilder Class

Definition

Builds a connection string for the IoT Hub service based on the properties populated by the user.

public sealed class IotHubConnectionStringBuilder
type IotHubConnectionStringBuilder = class
Public NotInheritable Class IotHubConnectionStringBuilder
Inheritance
System.Object
IotHubConnectionStringBuilder

Properties

AuthenticationMethod

Gets or sets the authentication method to be used with the IoT Hub service.

DeviceId

Gets the device identifier of the device connecting to the service.

GatewayHostName

Gets the optional name of the gateway to connect to

HostName

Gets or sets the value of the fully-qualified DNS hostname of the IoT Hub service.

ModuleId

Gets the module identifier of the module connecting to the service.

SharedAccessKey

Gets the shared access key used to connect to the IoT Hub service.

SharedAccessKeyName

Gets the shared access key name used to connect the device to the IoT Hub service.

SharedAccessSignature

Gets the shared access signature used to connect to the IoT Hub service.

UsingX509Cert

Indicates if the connection string indicates if an x509 certificate is specified for authentication.

Methods

Create(String)

Creates a connection string based on the hostname of the IoT Hub and the authentication method passed as a parameter.

Create(String, IAuthenticationMethod)

Creates a connection string based on the hostname of the IoT Hub and the authentication method passed as a parameter.

Create(String, String, IAuthenticationMethod)

Creates a connection string based on the hostname of the IoT Hub, the hostname of Gateway and the authentication method passed as a parameter.

ToString()

Produces the connection string based on the values of the IotHubConnectionStringBuilder instance properties.

Applies to