certificates
Creates, updates, deletes or gets a certificate
resource or lists certificates
in a region
Overview
Name | certificates |
Type | Resource |
Description | Use the AWS::IoT::Certificate resource to declare an AWS IoT X.509 certificate. |
Id | aws.iot.certificates |
Fields
Name | Datatype | Description |
---|---|---|
ca_certificate_pem | string | |
certificate_pem | string | |
certificate_signing_request | string | |
certificate_mode | string | |
status | string | |
id | string | |
arn | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Status, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iot.certificates (
Status,
region
)
SELECT
'{{ Status }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iot.certificates (
CACertificatePem,
CertificatePem,
CertificateSigningRequest,
CertificateMode,
Status,
region
)
SELECT
'{{ CACertificatePem }}',
'{{ CertificatePem }}',
'{{ CertificateSigningRequest }}',
'{{ CertificateMode }}',
'{{ Status }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: certificate
props:
- name: CACertificatePem
value: '{{ CACertificatePem }}'
- name: CertificatePem
value: '{{ CertificatePem }}'
- name: CertificateSigningRequest
value: '{{ CertificateSigningRequest }}'
- name: CertificateMode
value: '{{ CertificateMode }}'
- name: Status
value: '{{ Status }}'
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