Skip to main content

iot_dps_resource

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

Overview

Nameiot_dps_resource
TypeResource
Idazure.iot_hub_provisioning_services.iot_dps_resource

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
errorobjectError message containing code, description and details.
statusstringcurrent status of a long running operation.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_operation_resultselectoperation_id, resource_group_name, provisioning_service_name, asyncinfoGets the status of a long running operation, such as create, update or delete a provisioning service.
get_private_link_resourcesselectresource_group_name, resource_name, group_id, subscription_idGet the specified private link resource for the given provisioning service.
get_private_endpoint_connectionselectresource_group_name, resource_name, private_endpoint_connection_name, subscription_idGet private endpoint connection properties.
list_keys_for_key_nameselectprovisioning_service_name, key_name, resource_group_nameList primary and secondary keys for a specific key name.
list_private_link_resourcesselectresource_group_name, resource_name, subscription_idList private link resources for the given provisioning service.
getselectprovisioning_service_name, resource_group_nameGet the metadata of the provisioning service without SAS keys.
list_by_resource_groupselectresource_group_name, subscription_idGet a list of all provisioning services in the given resource group.
check_provisioning_service_name_availabilityselectsubscription_idCheck if a provisioning service name is available. Check if a provisioning service name is available. This will validate if the name is syntactically valid and if the name is usable.
list_by_subscriptionselectsubscription_idList all the provisioning services for a given subscription id.
create_or_updateinsertresource_group_name, provisioning_service_name, subscription_id, location, properties, skuCreate 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.
updateupdateresource_group_name, provisioning_service_name, subscription_idUpdate an existing provisioning service's tags. to update other fields use the CreateOrUpdate method.
create_or_updatereplaceresource_group_name, provisioning_service_name, subscription_id, location, properties, skuCreate 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.
deletedeleteprovisioning_service_name, resource_group_nameDeletes the Provisioning Service.
list_valid_skusexecprovisioning_service_name, resource_group_nameGets the list of valid SKUs and tiers for a provisioning service.
list_keysexecprovisioning_service_name, resource_group_nameList the primary and secondary keys for a provisioning service.
list_private_endpoint_connectionsexecresource_group_name, resource_name, subscription_idList private endpoint connection properties.
create_or_update_private_endpoint_connectionexecresource_group_name, resource_name, private_endpoint_connection_name, subscription_id, propertiesCreate or update the status of a private endpoint connection with the specified name.
delete_private_endpoint_connectionexecresource_group_name, resource_name, private_endpoint_connection_name, subscription_idDelete private endpoint connection with the specified name.

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
asyncinfostringAsync header used to poll on the status of the operation, obtained while creating the long running operation. Required.
group_idstringThe name of the private link resource. Required.
key_namestringLogical key name to get key-values for. Required.
operation_idstringOperation id corresponding to long running operation. Use this to poll for the status. Required.
private_endpoint_connection_namestringThe name of the private endpoint connection. Required.
provisioning_service_namestringName of the provisioning service to retrieve. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringName of the provisioning service to retrieve. Required.
subscription_idstring

SELECT examples

Gets the status of a long running operation, such as create, update or delete a provisioning service.

SELECT
error,
status
FROM azure.iot_hub_provisioning_services.iot_dps_resource
WHERE operation_id = '{{ operation_id }}' -- required
AND resource_group_name = '{{ resource_group_name }}' -- required
AND provisioning_service_name = '{{ provisioning_service_name }}' -- required
AND asyncinfo = '{{ asyncinfo }}' -- required
;

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_provisioning_services.iot_dps_resource (
tags,
location,
etag,
resourcegroup,
subscriptionid,
properties,
sku,
identity,
resource_group_name,
provisioning_service_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ etag }}',
'{{ resourcegroup }}',
'{{ subscriptionid }}',
'{{ properties }}' /* required */,
'{{ sku }}' /* required */,
'{{ identity }}',
'{{ resource_group_name }}',
'{{ provisioning_service_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
identity,
location,
properties,
resourcegroup,
sku,
subscriptionid,
systemData,
tags,
type
;

UPDATE examples

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

UPDATE azure.iot_hub_provisioning_services.iot_dps_resource
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND provisioning_service_name = '{{ provisioning_service_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
identity,
location,
properties,
resourcegroup,
sku,
subscriptionid,
systemData,
tags,
type;

REPLACE 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.

REPLACE azure.iot_hub_provisioning_services.iot_dps_resource
SET
tags = '{{ tags }}',
location = '{{ location }}',
etag = '{{ etag }}',
resourcegroup = '{{ resourcegroup }}',
subscriptionid = '{{ subscriptionid }}',
properties = '{{ properties }}',
sku = '{{ sku }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND provisioning_service_name = '{{ provisioning_service_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND properties = '{{ properties }}' --required
AND sku = '{{ sku }}' --required
RETURNING
id,
name,
etag,
identity,
location,
properties,
resourcegroup,
sku,
subscriptionid,
systemData,
tags,
type;

DELETE examples

Deletes the Provisioning Service.

DELETE FROM azure.iot_hub_provisioning_services.iot_dps_resource
WHERE provisioning_service_name = '{{ provisioning_service_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
;

Lifecycle Methods

Gets the list of valid SKUs and tiers for a provisioning service.

EXEC azure.iot_hub_provisioning_services.iot_dps_resource.list_valid_skus 
@provisioning_service_name='{{ provisioning_service_name }}' --required,
@resource_group_name='{{ resource_group_name }}' --required
;