Skip to main content

ca_certificates

Creates, updates, deletes or gets a ca_certificate resource or lists ca_certificates in a region

Overview

Nameca_certificates
TypeResource
DescriptionRegisters a CA Certificate in IoT.
Idaws.iot.ca_certificates

Fields

NameDatatypeDescription
ca_certificate_pemstring
verification_certificate_pemstringThe private key verification certificate.
statusstring
certificate_modestring
auto_registration_statusstring
remove_auto_registrationboolean
registration_configobject
idstring
arnstring
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTCACertificatePem, Status, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all ca_certificates in a region.

SELECT
region,
ca_certificate_pem,
verification_certificate_pem,
status,
certificate_mode,
auto_registration_status,
remove_auto_registration,
registration_config,
id,
arn,
tags
FROM aws.iot.ca_certificates
WHERE region = 'us-east-1';

Gets all properties from an individual ca_certificate.

SELECT
region,
ca_certificate_pem,
verification_certificate_pem,
status,
certificate_mode,
auto_registration_status,
remove_auto_registration,
registration_config,
id,
arn,
tags
FROM aws.iot.ca_certificates
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

Use the following StackQL query and manifest file to create a new ca_certificate resource, using stack-deploy.

/*+ create */
INSERT INTO aws.iot.ca_certificates (
CACertificatePem,
Status,
region
)
SELECT
'{{ CACertificatePem }}',
'{{ Status }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iot.ca_certificates
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

To operate on the ca_certificates resource, the following permissions are required:

Create

iam:GetRole,
iam:PassRole,
iot:RegisterCACertificate,
iot:DescribeCACertificate,
iot:TagResource,
iot:ListTagsForResource

Read

iot:DescribeCACertificate,
iot:ListTagsForResource

Update

iam:GetRole,
iam:PassRole,
iot:UpdateCACertificate,
iot:DescribeCACertificate,
iot:TagResource,
iot:UntagResource,
iot:ListTagsForResource

Delete

iot:UpdateCACertificate,
iot:DeleteCACertificate,
iot:DescribeCACertificate

List

iot:ListCACertificates