Skip to main content

certificates

Creates, updates, deletes or gets a certificate resource or lists certificates in a region

Overview

Namecertificates
TypeResource
DescriptionUse the AWS::IoT::Certificate resource to declare an AWS IoT X.509 certificate.
Idaws.iot.certificates

Fields

NameDatatypeDescription
ca_certificate_pemstring
certificate_pemstring
certificate_signing_requeststring
certificate_modestring
statusstring
idstring
arnstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTStatus, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all certificates in a region.

SELECT
region,
ca_certificate_pem,
certificate_pem,
certificate_signing_request,
certificate_mode,
status,
id,
arn
FROM aws.iot.certificates
WHERE region = 'us-east-1';

Gets all properties from an individual certificate.

SELECT
region,
ca_certificate_pem,
certificate_pem,
certificate_signing_request,
certificate_mode,
status,
id,
arn
FROM aws.iot.certificates
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

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

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

DELETE example

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

Permissions

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

Create

iot:CreateCertificateFromCsr,
iot:RegisterCertificate,
iot:RegisterCertificateWithoutCA,
iot:DescribeCertificate

Read

iot:DescribeCertificate

Update

iot:UpdateCertificate,
iot:DescribeCertificate

Delete

iot:DeleteCertificate,
iot:UpdateCertificate,
iot:DescribeCertificate

List

iot:ListCertificates