Skip to main content

device_groups

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

Overview

Namedevice_groups
TypeResource
Idazure.sphere.device_groups

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
allow_crash_dumps_collectiontextfield from the properties object
catalogNametextfield from the properties object
deviceGroupNametextfield from the properties object
has_deploymenttextfield from the properties object
os_feed_typetextfield from the properties object
productNametextfield from the properties object
provisioning_statetextfield from the properties object
regional_data_boundarytextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
update_policytextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcatalogName, deviceGroupName, productName, resourceGroupName, subscriptionIdGet a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.
list_by_productSELECTcatalogName, productName, resourceGroupName, subscriptionIdList DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.
create_or_updateINSERTcatalogName, deviceGroupName, productName, resourceGroupName, subscriptionIdCreate a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.
deleteDELETEcatalogName, deviceGroupName, productName, resourceGroupName, subscriptionIdDelete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.
updateUPDATEcatalogName, deviceGroupName, productName, resourceGroupName, subscriptionIdUpdate a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.
claim_devicesEXECcatalogName, deviceGroupName, productName, resourceGroupName, subscriptionId, data__deviceIdentifiersBulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only.
count_devicesEXECcatalogName, deviceGroupName, productName, resourceGroupName, subscriptionIdCounts 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.

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 }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sphere.device_groups (
catalogName,
deviceGroupName,
productName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ catalogName }}',
'{{ deviceGroupName }}',
'{{ productName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

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 }}';