Skip to main content

services

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

Overview

Nameservices
TypeResource
Idazure_extras.windows_iot.services

Fields

NameDatatypeDescription
admin_domain_nametextfield from the properties object
billing_domain_nametextfield from the properties object
deviceNametextfield from the properties object
etagtextThe Etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention.
locationtextThe Azure Region where the resource lives
notestextfield from the properties object
quantitytextfield from the properties object
resourceGroupNametextfield from the properties object
start_datetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTdeviceName, resourceGroupName, subscriptionIdGet the non-security related metadata of a Windows IoT Device Service.
listSELECTsubscriptionIdGet all the IoT hubs in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGet all the IoT hubs in a resource group.
create_or_updateINSERTdeviceName, resourceGroupName, subscriptionIdCreate or update the metadata of a Windows IoT Device Service. The usual pattern to modify a property is to retrieve the Windows IoT Device Service metadata and security metadata, and then combine them with the modified values in a new body to update the Windows IoT Device Service.
deleteDELETEdeviceName, resourceGroupName, subscriptionIdDelete a Windows IoT Device Service.
updateUPDATEdeviceName, resourceGroupName, subscriptionIdUpdates the metadata of a Windows IoT Device Service. The usual pattern to modify a property is to retrieve the Windows IoT Device Service metadata and security metadata, and then combine them with the modified values in a new body to update the Windows IoT Device Service.
check_device_service_name_availabilityEXECsubscriptionId, data__nameCheck if a Windows IoT Device Service name is available.

SELECT examples

Get all the IoT hubs in a subscription.

SELECT
admin_domain_name,
billing_domain_name,
deviceName,
etag,
location,
notes,
quantity,
resourceGroupName,
start_date,
subscriptionId,
tags
FROM azure_extras.windows_iot.vw_services
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure_extras.windows_iot.services (
deviceName,
resourceGroupName,
subscriptionId,
etag,
properties,
tags,
location
)
SELECT
'{{ deviceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ etag }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a services resource.

/*+ update */
UPDATE azure_extras.windows_iot.services
SET
etag = '{{ etag }}',
properties = '{{ properties }}',
tags = '{{ tags }}',
location = '{{ location }}'
WHERE
deviceName = '{{ deviceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified services resource.

/*+ delete */
DELETE FROM azure_extras.windows_iot.services
WHERE deviceName = '{{ deviceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';