다음을 통해 공유


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
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