Skip to main content

resource_keys_for_key_names

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

Overview

Nameresource_keys_for_key_names
TypeResource
Idazure.iot_hub.resource_keys_for_key_names

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
getSELECTkeyName, resourceGroupName, resourceName, subscriptionIdGet a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.

SELECT examples

Get a shared access policy by name from 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_for_key_names
WHERE keyName = '{{ keyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';