JobClient.Create Method
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
Create(String, AzureSasCredential, HttpTransportSettings) |
Creates JobClient using a shared access signature provided and refreshed as necessary by the caller. |
Create(String, TokenCredential, HttpTransportSettings) |
Creates JobClient, authenticating using an identity in Azure Active Directory (AAD). |
Create(String, AzureSasCredential, HttpTransportSettings)
Creates JobClient using a shared access signature provided and refreshed as necessary by the caller.
public static Microsoft.Azure.Devices.JobClient 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.JobClient
Public Shared Function Create (hostName As String, credential As AzureSasCredential, Optional transportSettings As HttpTransportSettings = Nothing) As JobClient
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 JobClient 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 JobClient, authenticating using an identity in Azure Active Directory (AAD).
public static Microsoft.Azure.Devices.JobClient 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.JobClient
Public Shared Function Create (hostName As String, credential As TokenCredential, Optional transportSettings As HttpTransportSettings = Nothing) As JobClient
Parameters
- hostName
- String
IoT hub host name.
- credential
- TokenCredential
Azure Active Directory (AAD) credentials to authenticate with IoT hub. See TokenCredential
- transportSettings
- HttpTransportSettings
The HTTP transport settings.
Returns
A JobClient 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
Azure SDK for .NET