Skip to main content

certificates

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

Overview

Namecertificates
TypeResource
Idazure.iot_hub.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
resourceGroupNametextfield from the properties object
resourceNametextfield from the properties object
subjecttextfield from the properties object
subscriptionIdtextfield from the properties object
thumbprinttextfield from the properties object
typetextThe resource type.
updatedtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcertificateName, resourceGroupName, resourceName, subscriptionIdReturns the certificate.
list_by_iot_hubSELECTresourceGroupName, resourceName, subscriptionIdReturns the list of certificates.
create_or_updateINSERTcertificateName, resourceGroupName, resourceName, subscriptionIdAdds new or replaces existing certificate.
deleteDELETEIf-Match, certificateName, resourceGroupName, resourceName, subscriptionIdDeletes an existing X509 certificate or does nothing if it does not exist.
generate_verification_codeEXECIf-Match, certificateName, resourceGroupName, resourceName, subscriptionIdGenerates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.
verifyEXECIf-Match, certificateName, resourceGroupName, resourceName, subscriptionIdVerifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.

SELECT examples

Returns the list of certificates.

SELECT
id,
name,
certificate,
certificateName,
created,
etag,
expiry,
is_verified,
resourceGroupName,
resourceName,
subject,
subscriptionId,
thumbprint,
type,
updated
FROM azure.iot_hub.vw_certificates
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.iot_hub.certificates (
certificateName,
resourceGroupName,
resourceName,
subscriptionId,
properties
)
SELECT
'{{ certificateName }}',
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified certificates resource.

/*+ delete */
DELETE FROM azure.iot_hub.certificates
WHERE If-Match = '{{ If-Match }}'
AND certificateName = '{{ certificateName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';