Skip to main content

ca_certificates

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

Overview

Nameca_certificates
TypeResource
Idaws.iot.ca_certificates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
certificate_descriptionobjectThe CA certificate description.
registration_configobjectInformation about the registration configuration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_ca_certificateselectca_certificate_id, regionDescribes a registered CA certificate. Requires permission to access the DescribeCACertificate action.
list_ca_certificatesselectregionpageSize, marker, isAscendingOrder, templateNameLists 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_certificateinsertregion, caCertificatesetAsActive, allowAutoRegistrationRegisters 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_certificateupdateca_certificate_id, regionnewStatus, newAutoRegistrationStatusUpdates a registered CA certificate. Requires permission to access the UpdateCACertificate action.
delete_ca_certificatedeleteca_certificate_id, regionDeletes 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.

NameDatatypeDescription
ca_certificate_idstringThe ID of the certificate to delete. (The last part of the certificate ARN contains the certificate ID.)
regionstringAWS region (default: us-east-1)
allowAutoRegistrationbooleanAllows this CA certificate to be used for auto registration of device certificates.
isAscendingOrderbooleanDetermines the order of the results.
markerstringThe marker for the next set of results.
newAutoRegistrationStatusstringThe new value for the auto registration status. Valid values are: "ENABLE" or "DISABLE".
newStatusstringThe updated status of the CA certificate. Note: The status value REGISTER_INACTIVE is deprecated and should not be used.
pageSizeintegerThe result page size.
setAsActivebooleanA boolean value that specifies if the CA certificate is set to active. Valid values: ACTIVE | INACTIVE
templateNamestringThe name of the provisioning template.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;