Skip to main content

instances

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

Overview

Nameinstances
TypeResource
Idazure.iotoperations.instances

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
componentstextfield from the properties object
extended_locationtextfield from the properties object
identitytextManaged service identity (system assigned and/or user assigned identities)
instanceNametextfield from the properties object
locationtextThe geo-location where the resource lives
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
schema_registry_namespacetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTinstanceName, resourceGroupName, subscriptionIdGet a InstanceResource
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList InstanceResource resources by resource group
list_by_subscriptionSELECTsubscriptionIdList InstanceResource resources by subscription ID
create_or_updateINSERTinstanceName, resourceGroupName, subscriptionId, data__extendedLocationCreate a InstanceResource
deleteDELETEinstanceName, resourceGroupName, subscriptionIdDelete a InstanceResource
updateUPDATEinstanceName, resourceGroupName, subscriptionIdUpdate a InstanceResource

SELECT examples

List InstanceResource resources by subscription ID

SELECT
description,
components,
extended_location,
identity,
instanceName,
location,
provisioning_state,
resourceGroupName,
schema_registry_namespace,
subscriptionId,
tags,
version
FROM azure.iotoperations.vw_instances
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.iotoperations.instances (
instanceName,
resourceGroupName,
subscriptionId,
data__extendedLocation,
properties,
extendedLocation,
identity,
tags,
location
)
SELECT
'{{ instanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__extendedLocation }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ identity }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a instances resource.

/*+ update */
UPDATE azure.iotoperations.instances
SET
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
instanceName = '{{ instanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified instances resource.

/*+ delete */
DELETE FROM azure.iotoperations.instances
WHERE instanceName = '{{ instanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';