certificates
Creates, updates, deletes, gets or lists a certificates
resource.
Overview
Name | certificates |
Type | Resource |
Id | azure.iot_hub.certificates |
Fields
- vw_certificates
- 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 |
resourceGroupName | text | field from the properties object |
resourceName | text | field from the properties object |
subject | text | field from the properties object |
subscriptionId | 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. |
type | string | The resource type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | certificateName, resourceGroupName, resourceName, subscriptionId | Returns the certificate. |
list_by_iot_hub | SELECT | resourceGroupName, resourceName, subscriptionId | Returns the list of certificates. |
create_or_update | INSERT | certificateName, resourceGroupName, resourceName, subscriptionId | Adds new or replaces existing certificate. |
delete | DELETE | If-Match, certificateName, resourceGroupName, resourceName, subscriptionId | Deletes an existing X509 certificate or does nothing if it does not exist. |
generate_verification_code | EXEC | If-Match, certificateName, resourceGroupName, resourceName, subscriptionId | Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate. |
verify | EXEC | If-Match, certificateName, resourceGroupName, resourceName, subscriptionId | Verifies 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.
- vw_certificates
- 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 }}';
SELECT
id,
name,
etag,
properties,
type
FROM azure.iot_hub.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.iot_hub.certificates (
certificateName,
resourceGroupName,
resourceName,
subscriptionId,
properties
)
SELECT
'{{ certificateName }}',
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ 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: created
value: string
- name: updated
value: string
- name: certificate
value: string
- name: id
value: string
- name: name
value: string
- name: etag
value: string
- name: type
value: string
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 }}';