ca_certificates
Creates, updates, deletes or gets a ca_certificate
resource or lists ca_certificates
in a region
Overview
Name | ca_certificates |
Type | Resource |
Description | Registers a CA Certificate in IoT. |
Id | aws.iot.ca_certificates |
Fields
Name | Datatype | Description |
---|---|---|
ca_certificate_pem | string | |
verification_certificate_pem | string | The private key verification certificate. |
status | string | |
certificate_mode | string | |
auto_registration_status | string | |
remove_auto_registration | boolean | |
registration_config | object | |
id | string | |
arn | string | |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | CACertificatePem, 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 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iot.ca_certificates (
CACertificatePem,
Status,
region
)
SELECT
'{{ CACertificatePem }}',
'{{ Status }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iot.ca_certificates (
CACertificatePem,
VerificationCertificatePem,
Status,
CertificateMode,
AutoRegistrationStatus,
RemoveAutoRegistration,
RegistrationConfig,
Tags,
region
)
SELECT
'{{ CACertificatePem }}',
'{{ VerificationCertificatePem }}',
'{{ Status }}',
'{{ CertificateMode }}',
'{{ AutoRegistrationStatus }}',
'{{ RemoveAutoRegistration }}',
'{{ RegistrationConfig }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ca_certificate
props:
- name: CACertificatePem
value: '{{ CACertificatePem }}'
- name: VerificationCertificatePem
value: '{{ VerificationCertificatePem }}'
- name: Status
value: '{{ Status }}'
- name: CertificateMode
value: '{{ CertificateMode }}'
- name: AutoRegistrationStatus
value: '{{ AutoRegistrationStatus }}'
- name: RemoveAutoRegistration
value: '{{ RemoveAutoRegistration }}'
- name: RegistrationConfig
value:
TemplateBody: '{{ TemplateBody }}'
RoleArn: '{{ RoleArn }}'
TemplateName: '{{ TemplateName }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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