DeviceProvisioningServiceResource.GetKeyAsync 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.
List primary and secondary keys for a specific key name
- Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/keys/{keyName}/listkeys
- Operation Id: IotDpsResource_ListKeysForKeyName
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesSharedAccessKey>> GetKeyAsync (string keyName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetKeyAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesSharedAccessKey>>
override this.GetKeyAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesSharedAccessKey>>
Public Overridable Function GetKeyAsync (keyName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of DeviceProvisioningServicesSharedAccessKey))
Parameters
- keyName
- String
Logical key name to get key-values for.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
keyName
is an empty string, and was expected to be non-empty.
keyName
is null.