Skip to main content

iot_dps_resources

Creates, updates, deletes, gets or lists an iot_dps_resources resource.

Overview

Nameiot_dps_resources
TypeResource
Idazure.iot_hub_device_provisioning.iot_dps_resources

Fields

The following fields are returned by SELECT queries:

Provisioning service description with no keys is included in the response.

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
namestringThe name of the resource
etagstringThe 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.
identityobjectThe managed identities for a provisioning service.
propertiesobjectService specific properties for a provisioning service
skuobjectSku info for a provisioning Service.
systemDataobjectMetadata pertaining to creation and last modification of the resource.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprovisioningServiceName, subscriptionId, resourceGroupNameapi-versionGet the metadata of the provisioning service without SAS keys.
list_by_resource_groupselectsubscriptionId, resourceGroupNameapi-versionGet a list of all provisioning services in the given resource group.
list_by_subscriptionselectsubscriptionIdapi-versionList all the provisioning services for a given subscription id.
create_or_updateinsertsubscriptionId, resourceGroupName, provisioningServiceName, data__sku, data__propertiesapi-versionCreate or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.
updateupdatesubscriptionId, resourceGroupName, provisioningServiceNameapi-versionUpdate an existing provisioning service's tags. to update other fields use the CreateOrUpdate method
deletedeleteprovisioningServiceName, subscriptionId, resourceGroupNameapi-versionDeletes the Provisioning Service.
check_provisioning_service_name_availabilityexecsubscriptionId, nameapi-versionCheck if a provisioning service name is available. This will validate if the name is syntactically valid and if the name is usable

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.

NameDatatypeDescription
provisioningServiceNamestringName of provisioning service to delete.
resourceGroupNamestringResource group identifier.
subscriptionIdstringThe subscription identifier.
api-versionstringThe version of the API.

SELECT examples

Get the metadata of the provisioning service without SAS keys.

SELECT
id,
name,
etag,
identity,
properties,
sku,
systemData,
type
FROM azure.iot_hub_device_provisioning.iot_dps_resources
WHERE provisioningServiceName = '{{ provisioningServiceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND api-version = '{{ api-version }}'
;

INSERT examples

Create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.

INSERT INTO azure.iot_hub_device_provisioning.iot_dps_resources (
data__etag,
data__properties,
data__sku,
data__identity,
subscriptionId,
resourceGroupName,
provisioningServiceName,
api-version
)
SELECT
'{{ etag }}',
'{{ properties }}' /* required */,
'{{ sku }}' /* required */,
'{{ identity }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ provisioningServiceName }}',
'{{ api-version }}'
RETURNING
id,
name,
etag,
identity,
properties,
sku,
systemData,
type
;

UPDATE examples

Update an existing provisioning service's tags. to update other fields use the CreateOrUpdate method

UPDATE azure.iot_hub_device_provisioning.iot_dps_resources
SET
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND provisioningServiceName = '{{ provisioningServiceName }}' --required
AND api-version = '{{ api-version}}'
RETURNING
id,
name,
etag,
identity,
properties,
sku,
systemData,
type;

DELETE examples

Deletes the Provisioning Service.

DELETE FROM azure.iot_hub_device_provisioning.iot_dps_resources
WHERE provisioningServiceName = '{{ provisioningServiceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND api-version = '{{ api-version }}'
;

Lifecycle Methods

Check if a provisioning service name is available. This will validate if the name is syntactically valid and if the name is usable

EXEC azure.iot_hub_device_provisioning.iot_dps_resources.check_provisioning_service_name_availability 
@subscriptionId='{{ subscriptionId }}' --required,
@api-version='{{ api-version }}'
@@json=
'{
"name": "{{ name }}"
}'
;