dps_certificates
Creates, updates, deletes, gets or lists a dps_certificates
resource.
Overview
Name | dps_certificates |
Type | Resource |
Id | azure.iot_hub_device_provisioning.dps_certificates |
Fields
- vw_dps_certificates
- dps_certificates
Name | Datatype | Description |
---|---|---|
id | text | The resource identifier. |
name | text | The name of the certificate. |
certificate | text | field from the properties object |
certificateName | text | field from the properties object |
created | text | field from the properties object |
etag | text | The entity tag. |
expiry | text | field from the properties object |
is_verified | text | field from the properties object |
provisioningServiceName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subject | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
thumbprint | text | field from the properties object |
type | text | The resource type. |
updated | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | The resource identifier. |
name | string | The name of the certificate. |
etag | string | The entity tag. |
properties | object | The description of an X509 CA Certificate. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The resource type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | certificateName, provisioningServiceName, resourceGroupName, subscriptionId | Get the certificate from the provisioning service. |
list | SELECT | provisioningServiceName, resourceGroupName, subscriptionId | Get all the certificates tied to the provisioning service. |
create_or_update | INSERT | certificateName, provisioningServiceName, resourceGroupName, subscriptionId | Add new certificate or update an existing certificate. |
delete | DELETE | If-Match, certificateName, provisioningServiceName, resourceGroupName, subscriptionId | Deletes the specified certificate associated with the Provisioning Service |
generate_verification_code | EXEC | If-Match, certificateName, provisioningServiceName, resourceGroupName, subscriptionId | Generate verification code for Proof of Possession. |
verify_certificate | EXEC | If-Match, certificateName, provisioningServiceName, resourceGroupName, subscriptionId | Verifies 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.
- vw_dps_certificates
- dps_certificates
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 }}';
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.iot_hub_device_provisioning.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.iot_hub_device_provisioning.dps_certificates (
certificateName,
provisioningServiceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ certificateName }}',
'{{ provisioningServiceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: subject
value: string
- name: expiry
value: string
- name: thumbprint
value: string
- name: isVerified
value: boolean
- name: certificate
value: string
- name: created
value: string
- name: updated
value: string
- name: id
value: string
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
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 }}';