Skip to main content

dps_certificates

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

Overview

Namedps_certificates
TypeResource
Idazure.iot_hub_device_provisioning.dps_certificates

Fields

NameDatatypeDescription
idtextThe resource identifier.
nametextThe name of the certificate.
certificatetextfield from the properties object
certificateNametextfield from the properties object
createdtextfield from the properties object
etagtextThe entity tag.
expirytextfield from the properties object
is_verifiedtextfield from the properties object
provisioningServiceNametextfield from the properties object
resourceGroupNametextfield from the properties object
subjecttextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
thumbprinttextfield from the properties object
typetextThe resource type.
updatedtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcertificateName, provisioningServiceName, resourceGroupName, subscriptionIdGet the certificate from the provisioning service.
listSELECTprovisioningServiceName, resourceGroupName, subscriptionIdGet all the certificates tied to the provisioning service.
create_or_updateINSERTcertificateName, provisioningServiceName, resourceGroupName, subscriptionIdAdd new certificate or update an existing certificate.
deleteDELETEIf-Match, certificateName, provisioningServiceName, resourceGroupName, subscriptionIdDeletes the specified certificate associated with the Provisioning Service
generate_verification_codeEXECIf-Match, certificateName, provisioningServiceName, resourceGroupName, subscriptionIdGenerate verification code for Proof of Possession.
verify_certificateEXECIf-Match, certificateName, provisioningServiceName, resourceGroupName, subscriptionIdVerifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.

SELECT examples

Get all the certificates tied to the provisioning service.

SELECT
id,
name,
certificate,
certificateName,
created,
etag,
expiry,
is_verified,
provisioningServiceName,
resourceGroupName,
subject,
subscriptionId,
system_data,
thumbprint,
type,
updated
FROM azure.iot_hub_device_provisioning.vw_dps_certificates
WHERE provisioningServiceName = '{{ provisioningServiceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.iot_hub_device_provisioning.dps_certificates (
certificateName,
provisioningServiceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ certificateName }}',
'{{ provisioningServiceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified dps_certificates resource.

/*+ delete */
DELETE FROM azure.iot_hub_device_provisioning.dps_certificates
WHERE If-Match = '{{ If-Match }}'
AND certificateName = '{{ certificateName }}'
AND provisioningServiceName = '{{ provisioningServiceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';