device_security_groups
Creates, updates, deletes, gets or lists a device_security_groups
resource.
Overview
Name | device_security_groups |
Type | Resource |
Id | azure.security.device_security_groups |
Fields
- vw_device_security_groups
- device_security_groups
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
allowlist_rules | text | field from the properties object |
denylist_rules | text | field from the properties object |
deviceSecurityGroupName | text | field from the properties object |
resourceId | text | field from the properties object |
threshold_rules | text | field from the properties object |
time_window_rules | text | field from the properties object |
type | text | Resource type |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
properties | object | describes properties of a security group. |
type | string | Resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | deviceSecurityGroupName, resourceId | Use this method to get the device security group for the specified IoT Hub resource. |
list | SELECT | resourceId | Use this method get the list of device security groups for the specified IoT Hub resource. |
create_or_update | INSERT | deviceSecurityGroupName, resourceId | Use this method to creates or updates the device security group on a specified IoT Hub resource. |
delete | DELETE | deviceSecurityGroupName, resourceId | User 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.
- vw_device_security_groups
- device_security_groups
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 }}';
SELECT
id,
name,
properties,
type
FROM azure.security.device_security_groups
WHERE resourceId = '{{ resourceId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new device_security_groups
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.security.device_security_groups (
deviceSecurityGroupName,
resourceId,
properties
)
SELECT
'{{ deviceSecurityGroupName }}',
'{{ resourceId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: thresholdRules
value:
- - name: displayName
value: string
- name: description
value: string
- name: isEnabled
value: boolean
- name: ruleType
value: string
- name: minThreshold
value: integer
- name: maxThreshold
value: integer
- name: timeWindowRules
value:
- - name: minThreshold
value: integer
- name: maxThreshold
value: integer
- name: timeWindowSize
value: string
- name: allowlistRules
value:
- - name: valueType
value: string
- name: allowlistValues
value:
- string
- name: denylistRules
value:
- - name: valueType
value: string
- name: denylistValues
value:
- string
- name: id
value: string
- name: name
value: string
- name: type
value: string
DELETE
example
Deletes the specified device_security_groups
resource.
/*+ delete */
DELETE FROM azure.security.device_security_groups
WHERE deviceSecurityGroupName = '{{ deviceSecurityGroupName }}'
AND resourceId = '{{ resourceId }}';