Skip to main content

device_security_groups

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

Overview

Namedevice_security_groups
TypeResource
Idazure.security.device_security_groups

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
allowlist_rulestextfield from the properties object
denylist_rulestextfield from the properties object
deviceSecurityGroupNametextfield from the properties object
resourceIdtextfield from the properties object
threshold_rulestextfield from the properties object
time_window_rulestextfield from the properties object
typetextResource type

Methods

NameAccessible byRequired ParamsDescription
getSELECTdeviceSecurityGroupName, resourceIdUse this method to get the device security group for the specified IoT Hub resource.
listSELECTresourceIdUse this method get the list of device security groups for the specified IoT Hub resource.
create_or_updateINSERTdeviceSecurityGroupName, resourceIdUse this method to creates or updates the device security group on a specified IoT Hub resource.
deleteDELETEdeviceSecurityGroupName, resourceIdUser this method to deletes the device security group.

SELECT examples

Use this method get the list of device security groups for the specified IoT Hub resource.

SELECT
id,
name,
allowlist_rules,
denylist_rules,
deviceSecurityGroupName,
resourceId,
threshold_rules,
time_window_rules,
type
FROM azure.security.vw_device_security_groups
WHERE resourceId = '{{ resourceId }}';

INSERT example

Use the following StackQL query and manifest file to create a new device_security_groups resource.

/*+ create */
INSERT INTO azure.security.device_security_groups (
deviceSecurityGroupName,
resourceId,
properties
)
SELECT
'{{ deviceSecurityGroupName }}',
'{{ resourceId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified device_security_groups resource.

/*+ delete */
DELETE FROM azure.security.device_security_groups
WHERE deviceSecurityGroupName = '{{ deviceSecurityGroupName }}'
AND resourceId = '{{ resourceId }}';