device_groups
Creates, updates, deletes, gets or lists a device_groups
resource.
Overview
Name | device_groups |
Type | Resource |
Id | azure.sphere.device_groups |
Fields
- vw_device_groups
- device_groups
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
allow_crash_dumps_collection | text | field from the properties object |
catalogName | text | field from the properties object |
deviceGroupName | text | field from the properties object |
has_deployment | text | field from the properties object |
os_feed_type | text | field from the properties object |
productName | text | field from the properties object |
provisioning_state | text | field from the properties object |
regional_data_boundary | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
update_policy | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The properties of deviceGroup |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | catalogName, deviceGroupName, productName, resourceGroupName, subscriptionId | Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. |
list_by_product | SELECT | catalogName, productName, resourceGroupName, subscriptionId | List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. |
create_or_update | INSERT | catalogName, deviceGroupName, productName, resourceGroupName, subscriptionId | Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. |
delete | DELETE | catalogName, deviceGroupName, productName, resourceGroupName, subscriptionId | Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. |
update | UPDATE | catalogName, deviceGroupName, productName, resourceGroupName, subscriptionId | Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. |
claim_devices | EXEC | catalogName, deviceGroupName, productName, resourceGroupName, subscriptionId, data__deviceIdentifiers | Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only. |
count_devices | EXEC | catalogName, deviceGroupName, productName, resourceGroupName, subscriptionId | Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. |
SELECT
examples
List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
- vw_device_groups
- device_groups
SELECT
description,
allow_crash_dumps_collection,
catalogName,
deviceGroupName,
has_deployment,
os_feed_type,
productName,
provisioning_state,
regional_data_boundary,
resourceGroupName,
subscriptionId,
update_policy
FROM azure.sphere.vw_device_groups
WHERE catalogName = '{{ catalogName }}'
AND productName = '{{ productName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.sphere.device_groups
WHERE catalogName = '{{ catalogName }}'
AND productName = '{{ productName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new device_groups
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sphere.device_groups (
catalogName,
deviceGroupName,
productName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ catalogName }}',
'{{ deviceGroupName }}',
'{{ productName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: description
value: string
- name: osFeedType
value: []
- name: updatePolicy
value: []
- name: allowCrashDumpsCollection
value: []
- name: regionalDataBoundary
value: []
- name: hasDeployment
value: boolean
- name: provisioningState
value: []
UPDATE
example
Updates a device_groups
resource.
/*+ update */
UPDATE azure.sphere.device_groups
SET
properties = '{{ properties }}'
WHERE
catalogName = '{{ catalogName }}'
AND deviceGroupName = '{{ deviceGroupName }}'
AND productName = '{{ productName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified device_groups
resource.
/*+ delete */
DELETE FROM azure.sphere.device_groups
WHERE catalogName = '{{ catalogName }}'
AND deviceGroupName = '{{ deviceGroupName }}'
AND productName = '{{ productName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';