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
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
allowlistRules | array | The allow-list custom alert rules. |
denylistRules | array | The deny-list custom alert rules. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
thresholdRules | array | The list of custom alert threshold rules. |
timeWindowRules | array | The list of custom alert time-window rules. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
allowlistRules | array | The allow-list custom alert rules. |
denylistRules | array | The deny-list custom alert rules. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
thresholdRules | array | The list of custom alert threshold rules. |
timeWindowRules | array | The list of custom alert time-window rules. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_id, device_security_group_name | Use this method to get the device security group for the specified IoT Hub resource. | |
list | select | resource_id | Use this method get the list of device security groups for the specified IoT Hub resource. | |
create_or_update | insert | resource_id, device_security_group_name | Use this method to creates or updates the device security group on a specified IoT Hub resource. | |
create_or_update | replace | resource_id, device_security_group_name | Use this method to creates or updates the device security group on a specified IoT Hub resource. | |
delete | delete | resource_id, device_security_group_name | User this method to deletes the device security group. |
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 |
|---|---|---|
device_security_group_name | string | The name of the device security group. Note that the name of the device security group is case insensitive. Required. |
resource_id | string | The fully qualified Azure Resource manager identifier of the resource. Required. |
SELECT examples
- get
- list
Use this method to get the device security group for the specified IoT Hub resource.
SELECT
id,
name,
allowlistRules,
denylistRules,
systemData,
thresholdRules,
timeWindowRules,
type
FROM azure.security.device_security_groups
WHERE resource_id = '{{ resource_id }}' -- required
AND device_security_group_name = '{{ device_security_group_name }}' -- required
;
Use this method get the list of device security groups for the specified IoT Hub resource.
SELECT
id,
name,
allowlistRules,
denylistRules,
systemData,
thresholdRules,
timeWindowRules,
type
FROM azure.security.device_security_groups
WHERE resource_id = '{{ resource_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Use this method to creates or updates the device security group on a specified IoT Hub resource.
INSERT INTO azure.security.device_security_groups (
properties,
resource_id,
device_security_group_name
)
SELECT
'{{ properties }}',
'{{ resource_id }}',
'{{ device_security_group_name }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: device_security_groups
props:
- name: resource_id
value: "{{ resource_id }}"
description: Required parameter for the device_security_groups resource.
- name: device_security_group_name
value: "{{ device_security_group_name }}"
description: Required parameter for the device_security_groups resource.
- name: properties
description: |
Device Security group data.
value:
thresholdRules:
- displayName: "{{ displayName }}"
description: "{{ description }}"
isEnabled: {{ isEnabled }}
ruleType: "{{ ruleType }}"
minThreshold: {{ minThreshold }}
maxThreshold: {{ maxThreshold }}
timeWindowRules:
- displayName: "{{ displayName }}"
description: "{{ description }}"
isEnabled: {{ isEnabled }}
ruleType: "{{ ruleType }}"
minThreshold: {{ minThreshold }}
maxThreshold: {{ maxThreshold }}
timeWindowSize: "{{ timeWindowSize }}"
allowlistRules:
- displayName: "{{ displayName }}"
description: "{{ description }}"
isEnabled: {{ isEnabled }}
ruleType: "{{ ruleType }}"
valueType: "{{ valueType }}"
allowlistValues: "{{ allowlistValues }}"
denylistRules:
- displayName: "{{ displayName }}"
description: "{{ description }}"
isEnabled: {{ isEnabled }}
ruleType: "{{ ruleType }}"
valueType: "{{ valueType }}"
denylistValues: "{{ denylistValues }}"
REPLACE examples
- create_or_update
Use this method to creates or updates the device security group on a specified IoT Hub resource.
REPLACE azure.security.device_security_groups
SET
properties = '{{ properties }}'
WHERE
resource_id = '{{ resource_id }}' --required
AND device_security_group_name = '{{ device_security_group_name }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
User this method to deletes the device security group.
DELETE FROM azure.security.device_security_groups
WHERE resource_id = '{{ resource_id }}' --required
AND device_security_group_name = '{{ device_security_group_name }}' --required
;