ca_certificates
Creates, updates, deletes, gets or lists a ca_certificates resource.
Overview
| Name | ca_certificates |
| Type | Resource |
| Id | aws.iot.ca_certificates |
Fields
The following fields are returned by SELECT queries:
- describe_ca_certificate
- list_ca_certificates
| Name | Datatype | Description |
|---|---|---|
certificate_description | object | The CA certificate description. |
registration_config | object | Information about the registration configuration. |
| Name | Datatype | Description |
|---|---|---|
certificate_arn | string | The ARN of the CA certificate. |
certificate_id | string | The ID of the CA certificate. (pattern: <code>(0x)?[a-fA-F0-9]+</code>) |
creation_date | string (date-time) | The date the CA certificate was created. |
status | string | The status of the CA certificate. The status value REGISTER_INACTIVE is deprecated and should not be used. (ACTIVE, INACTIVE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_ca_certificate | select | ca_certificate_id, region | Describes a registered CA certificate. Requires permission to access the DescribeCACertificate action. | |
list_ca_certificates | select | region | pageSize, marker, isAscendingOrder, templateName | Lists the CA certificates registered for your Amazon Web Services account. The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results. Requires permission to access the ListCACertificates action. |
register_ca_certificate | insert | region, caCertificate | setAsActive, allowAutoRegistration | Registers a CA certificate with Amazon Web Services IoT Core. There is no limit to the number of CA certificates you can register in your Amazon Web Services account. You can register up to 10 CA certificates with the same CA subject field per Amazon Web Services account. Requires permission to access the RegisterCACertificate action. |
update_ca_certificate | update | ca_certificate_id, region | newStatus, newAutoRegistrationStatus | Updates a registered CA certificate. Requires permission to access the UpdateCACertificate action. |
delete_ca_certificate | delete | ca_certificate_id, region | Deletes a registered CA certificate. Requires permission to access the DeleteCACertificate action. |
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.
| Name | Datatype | Description |
|---|---|---|
ca_certificate_id | string | The ID of the certificate to delete. (The last part of the certificate ARN contains the certificate ID.) |
region | string | AWS region (default: us-east-1) |
allowAutoRegistration | boolean | Allows this CA certificate to be used for auto registration of device certificates. |
isAscendingOrder | boolean | Determines the order of the results. |
marker | string | The marker for the next set of results. |
newAutoRegistrationStatus | string | The new value for the auto registration status. Valid values are: "ENABLE" or "DISABLE". |
newStatus | string | The updated status of the CA certificate. Note: The status value REGISTER_INACTIVE is deprecated and should not be used. |
pageSize | integer | The result page size. |
setAsActive | boolean | A boolean value that specifies if the CA certificate is set to active. Valid values: ACTIVE | INACTIVE |
templateName | string | The name of the provisioning template. |
SELECT examples
- describe_ca_certificate
- list_ca_certificates
Describes a registered CA certificate. Requires permission to access the DescribeCACertificate action.
SELECT
certificate_description,
registration_config
FROM aws.iot.ca_certificates
WHERE ca_certificate_id = '{{ ca_certificate_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the CA certificates registered for your Amazon Web Services account. The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional results. Requires permission to access the ListCACertificates action.
SELECT
certificate_arn,
certificate_id,
creation_date,
status
FROM aws.iot.ca_certificates
WHERE region = '{{ region }}' -- required
AND pageSize = '{{ pageSize }}'
AND marker = '{{ marker }}'
AND isAscendingOrder = '{{ isAscendingOrder }}'
AND templateName = '{{ templateName }}'
;
INSERT examples
- register_ca_certificate
- Manifest
Registers a CA certificate with Amazon Web Services IoT Core. There is no limit to the number of CA certificates you can register in your Amazon Web Services account. You can register up to 10 CA certificates with the same CA subject field per Amazon Web Services account. Requires permission to access the RegisterCACertificate action.
INSERT INTO aws.iot.ca_certificates (
caCertificate,
verificationCertificate,
registrationConfig,
tags,
certificateMode,
region,
setAsActive,
allowAutoRegistration
)
SELECT
'{{ caCertificate }}' /* required */,
'{{ verificationCertificate }}',
'{{ registrationConfig }}',
'{{ tags }}',
'{{ certificateMode }}',
'{{ region }}',
'{{ setAsActive }}',
'{{ allowAutoRegistration }}'
RETURNING
certificate_arn,
certificate_id
;
# Description fields are for documentation purposes
- name: ca_certificates
props:
- name: region
value: "{{ region }}"
description: Required parameter for the ca_certificates resource.
- name: caCertificate
value: "{{ caCertificate }}"
description: |
The PEM of a certificate.
- name: verificationCertificate
value: "{{ verificationCertificate }}"
description: |
The PEM of a certificate.
- name: registrationConfig
description: |
The registration configuration.
value:
templateBody: "{{ templateBody }}"
roleArn: "{{ roleArn }}"
templateName: "{{ templateName }}"
- name: tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: certificateMode
value: "{{ certificateMode }}"
valid_values: ['DEFAULT', 'SNI_ONLY']
- name: setAsActive
value: {{ setAsActive }}
description: A boolean value that specifies if the CA certificate is set to active. Valid values: ACTIVE | INACTIVE
description: A boolean value that specifies if the CA certificate is set to active. Valid values: ACTIVE | INACTIVE
- name: allowAutoRegistration
value: {{ allowAutoRegistration }}
description: Allows this CA certificate to be used for auto registration of device certificates.
description: Allows this CA certificate to be used for auto registration of device certificates.
UPDATE examples
- update_ca_certificate
Updates a registered CA certificate. Requires permission to access the UpdateCACertificate action.
UPDATE aws.iot.ca_certificates
SET
registrationConfig = '{{ registrationConfig }}',
removeAutoRegistration = {{ removeAutoRegistration }}
WHERE
ca_certificate_id = '{{ ca_certificate_id }}' --required
AND region = '{{ region }}' --required
AND newStatus = '{{ newStatus}}'
AND newAutoRegistrationStatus = '{{ newAutoRegistrationStatus}}';
DELETE examples
- delete_ca_certificate
Deletes a registered CA certificate. Requires permission to access the DeleteCACertificate action.
DELETE FROM aws.iot.ca_certificates
WHERE ca_certificate_id = '{{ ca_certificate_id }}' --required
AND region = '{{ region }}' --required
;