Condividi tramite


ClientAuthenticationWithSharedAccessKeyRefresh Constructors

Definition

Overloads

ClientAuthenticationWithSharedAccessKeyRefresh(String, TimeSpan, Int32)

Creates an instance of this class.

ClientAuthenticationWithSharedAccessKeyRefresh(String, String, String, TimeSpan, Int32)

Creates an instance of this class.

ClientAuthenticationWithSharedAccessKeyRefresh(String, String, String, String, TimeSpan, Int32)

Creates an instance of this class.

ClientAuthenticationWithSharedAccessKeyRefresh(String, TimeSpan, Int32)

Creates an instance of this class.

public ClientAuthenticationWithSharedAccessKeyRefresh (string connectionString, TimeSpan sasTokenTimeToLive = default, int sasTokenRenewalBuffer = 0);
new Microsoft.Azure.Devices.Client.ClientAuthenticationWithSharedAccessKeyRefresh : string * TimeSpan * int -> Microsoft.Azure.Devices.Client.ClientAuthenticationWithSharedAccessKeyRefresh
Public Sub New (connectionString As String, Optional sasTokenTimeToLive As TimeSpan = Nothing, Optional sasTokenRenewalBuffer As Integer = 0)

Parameters

connectionString
String

The connection string containing the device Id, optional module Id, shared access key name and shared access key to be used for authenticating with IoT hub service.

sasTokenTimeToLive
TimeSpan

The suggested time to live value for the generated SAS tokens. The default value is 1 hour.

sasTokenRenewalBuffer
Int32

The time buffer before expiry when the token should be renewed, expressed as a percentage of the time to live. The default behavior is that the token will be renewed when it has 15% or less of its lifespan left.

Exceptions

Thrown when connectionString is null.

Thrown when connectionString is empty or whitespace.

Applies to

ClientAuthenticationWithSharedAccessKeyRefresh(String, String, String, TimeSpan, Int32)

Creates an instance of this class.

public ClientAuthenticationWithSharedAccessKeyRefresh (string sharedAccessKey, string deviceId, string moduleId = default, TimeSpan sasTokenTimeToLive = default, int sasTokenRenewalBuffer = 0);
new Microsoft.Azure.Devices.Client.ClientAuthenticationWithSharedAccessKeyRefresh : string * string * string * TimeSpan * int -> Microsoft.Azure.Devices.Client.ClientAuthenticationWithSharedAccessKeyRefresh
Public Sub New (sharedAccessKey As String, deviceId As String, Optional moduleId As String = Nothing, Optional sasTokenTimeToLive As TimeSpan = Nothing, Optional sasTokenRenewalBuffer As Integer = 0)

Parameters

sharedAccessKey
String

Shared access key value.

deviceId
String

Device identifier.

moduleId
String

Module identifier.

sasTokenTimeToLive
TimeSpan

The suggested time to live value for the generated SAS tokens. The default value is 1 hour.

sasTokenRenewalBuffer
Int32

The time buffer before expiry when the token should be renewed, expressed as a percentage of the time to live. The default behavior is that the token will be renewed when it has 15% or less of its lifespan left.

Exceptions

Thrown when sharedAccessKey is null.

Thrown when sharedAccessKey is empty or whitespace.

Applies to

ClientAuthenticationWithSharedAccessKeyRefresh(String, String, String, String, TimeSpan, Int32)

Creates an instance of this class.

public ClientAuthenticationWithSharedAccessKeyRefresh (string sharedAccessKey, string sharedAccessKeyName, string deviceId, string moduleId = default, TimeSpan sasTokenTimeToLive = default, int sasTokenRenewalBuffer = 0);
new Microsoft.Azure.Devices.Client.ClientAuthenticationWithSharedAccessKeyRefresh : string * string * string * string * TimeSpan * int -> Microsoft.Azure.Devices.Client.ClientAuthenticationWithSharedAccessKeyRefresh
Public Sub New (sharedAccessKey As String, sharedAccessKeyName As String, deviceId As String, Optional moduleId As String = Nothing, Optional sasTokenTimeToLive As TimeSpan = Nothing, Optional sasTokenRenewalBuffer As Integer = 0)

Parameters

sharedAccessKey
String

Shared access key value.

sharedAccessKeyName
String

Shared access key name.

deviceId
String

Device identifier.

moduleId
String

Module identifier.

sasTokenTimeToLive
TimeSpan

The suggested time to live value for the generated SAS tokens. The default value is 1 hour.

sasTokenRenewalBuffer
Int32

The time buffer before expiry when the token should be renewed, expressed as a percentage of the time to live. The default behavior is that the token will be renewed when it has 15% or less of its lifespan left.

Exceptions

Thrown when sharedAccessKey or sharedAccessKeyName is null.

Thrown when sharedAccessKey or sharedAccessKeyName is empty or whitespace.

Applies to