Iot Hub Resource - List Keys
Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys?api-version={api-version}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
subscriptionId
|
path | True |
|
The subscription identifier. |
|
resourceGroupName
|
path | True |
|
The name of the resource group that contains the IoT hub. |
|
resourceName
|
path | True |
|
The name of the IoT hub. |
|
api-version
|
query | True |
|
The version of the API. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
This is a synchronous operation. The body contains a JSON-serialized array of shared access policies, including keys, that you can use to access the IoT hub endpoints. |
|
| Other Status Codes |
DefaultErrorResponse |
Definitions
| ErrorDetails | |
| SharedAccessSignatureAuthorizationRule |
The properties of an IoT hub shared access policy. |
| SharedAccessSignatureAuthorizationRuleListResult |
| Name | Type | Description |
|---|---|---|
| Code |
|
The error code. |
| Details |
|
The error details. |
| HttpStatusCode |
|
The HTTP status code. |
| Message |
|
The error message. |
The properties of an IoT hub shared access policy.
| Name | Type | Description |
|---|---|---|
| keyName |
|
The name of the shared access policy. |
| primaryKey |
|
The primary key. |
| rights |
|
The permissions assigned to the shared access policy. |
| secondaryKey |
|
The secondary key. |
| Name | Type | Description |
|---|---|---|
| nextLink |
|
The next link. |
| value |
The list of shared access policies. |