Skip to main content

resource_keys

Creates, updates, deletes, gets or lists a resource_keys resource.

Overview

Nameresource_keys
TypeResource
Idazure.iot_hub.resource_keys

Fields

NameDatatypeDescription
keyNamestringThe name of the shared access policy.
primaryKeystringThe primary key.
rightsstringThe permissions assigned to the shared access policy.
secondaryKeystringThe secondary key.

Methods

NameAccessible byRequired ParamsDescription
listSELECTresourceGroupName, resourceName, subscriptionIdGet the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.

SELECT examples

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 resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';