Condividi tramite


RegistryManager.Create Method

Definition

Overloads

Create(String, AzureSasCredential, HttpTransportSettings)

Creates RegistryManager using a shared access signature provided and refreshed as necessary by the caller.

Create(String, TokenCredential, HttpTransportSettings)

Creates RegistryManager, authenticating using an identity in Azure Active Directory (AAD).

Create(String, AzureSasCredential, HttpTransportSettings)

Creates RegistryManager using a shared access signature provided and refreshed as necessary by the caller.

public static Microsoft.Azure.Devices.RegistryManager Create (string hostName, Azure.AzureSasCredential credential, Microsoft.Azure.Devices.HttpTransportSettings transportSettings = default);
static member Create : string * Azure.AzureSasCredential * Microsoft.Azure.Devices.HttpTransportSettings -> Microsoft.Azure.Devices.RegistryManager
Public Shared Function Create (hostName As String, credential As AzureSasCredential, Optional transportSettings As HttpTransportSettings = Nothing) As RegistryManager

Parameters

hostName
String

IoT hub host name.

credential
AzureSasCredential

Credential that generates a SAS token to authenticate with IoT hub. See AzureSasCredential.

transportSettings
HttpTransportSettings

The HTTP transport settings.

Returns

A RegistryManager instance.

Remarks

Users may wish to build their own shared access signature (SAS) tokens rather than give the shared key to the SDK and let it manage signing and renewal. The AzureSasCredential object gives the SDK access to the SAS token, while the caller can update it as necessary using the Update(String) method.

Applies to

Create(String, TokenCredential, HttpTransportSettings)

Creates RegistryManager, authenticating using an identity in Azure Active Directory (AAD).

public static Microsoft.Azure.Devices.RegistryManager Create (string hostName, Azure.Core.TokenCredential credential, Microsoft.Azure.Devices.HttpTransportSettings transportSettings = default);
static member Create : string * Azure.Core.TokenCredential * Microsoft.Azure.Devices.HttpTransportSettings -> Microsoft.Azure.Devices.RegistryManager
Public Shared Function Create (hostName As String, credential As TokenCredential, Optional transportSettings As HttpTransportSettings = Nothing) As RegistryManager

Parameters

hostName
String

IoT hub host name.

credential
TokenCredential

Azure Active Directory (AAD) credentials to authenticate with IoT hub.

transportSettings
HttpTransportSettings

The HTTP transport settings.

Returns

A RegistryManager instance.

Remarks

For more about information on the options of authenticating using a derived instance of TokenCredential, see https://docs.microsoft.com/dotnet/api/overview/azure/identity-readme. For more information on configuring IoT hub with Azure Active Directory, see https://docs.microsoft.com/azure/iot-hub/iot-hub-dev-guide-azure-ad-rbac

Applies to