resource_keys
Creates, updates, deletes, gets or lists a resource_keys
resource.
Overview
Name | resource_keys |
Type | Resource |
Id | azure.iot_hub.resource_keys |
Fields
The following fields are returned by SELECT
queries:
- list
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.
Name | Datatype | Description |
---|---|---|
keyName | string | The name of the shared access policy. |
primaryKey | string | The primary key. |
rights | string | The permissions assigned to the shared access policy. |
secondaryKey | string | The secondary key. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | subscriptionId , resourceGroupName , resourceName | api-version | Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
resourceGroupName | string | The name of the resource group that contains the IoT hub. |
resourceName | string | The name of the IoT hub. |
subscriptionId | string | The subscription identifier. |
api-version | string | The version of the API. |
SELECT
examples
- list
Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
SELECT
keyName,
primaryKey,
rights,
secondaryKey
FROM azure.iot_hub.resource_keys
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND api-version = '{{ api-version }}'
;