DeviceProvisioningServiceResource.GetKey(String, CancellationToken) 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 Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesSharedAccessKey> GetKey (string keyName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetKey : string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesSharedAccessKey>
override this.GetKey : string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesSharedAccessKey>
Public Overridable Function GetKey (keyName As String, Optional cancellationToken As CancellationToken = Nothing) As 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.