aws_acm
- Components
- Code examples
Managing certificates
--- installs the aws_account module
SELECT * FROM iasql_install('aws_account');
--- adds a new certificate
INSERT INTO certificate (domain_name)
VALUES ('<domainName>');
--- check adds new certificate
SELECT *
FROM certificate
WHERE domain_name = '<domainName>';
--- check adds new certificate
SELECT *
FROM certificate
WHERE domain_name = '<domainName>';
--- uninstalls the acm module
SELECT * FROM iasql_uninstall('<modules>');
Importing a certificate
--- installs the acm module
SELECT * FROM iasql_install('<modules>');
--- adds a new certificate to import
SELECT * FROM certificate_import('<cert>', '<key>', '<region>', '{}', '{ "toUpdate": "value", "toDelete": "value2" }');
--- updates a certificate tags
UPDATE certificate
SET tags = '{ "toUpdate": "value2", "newTag": "value3" }'
WHERE domain_name = '<domainName>';
--- deletes a certificate imported
DELETE FROM certificate
WHERE domain_name = '<domainName>';
--- import a certificate in non-default region
SELECT * FROM certificate_import('<cert>', '<key>', 'us-east-1', '{}');
--- verifies the certificate in the non-default region is created
SELECT *
FROM certificate
WHERE domain_name = '<domainName>';
Requesting a certificate
--- installs the aws_account module
SELECT * FROM iasql_install('aws_account');
--- installs the acm module alone
SELECT * FROM iasql_install('aws_acm');
--- adds a new certificate to request
SELECT * FROM certificate_request('<domainName>', 'DNS', '<region>', '{}', '{ "toUpdate": "value", "toDelete": "value2" }');
--- check new certificate added and validated
SELECT *
FROM certificate
WHERE domain_name = '<domainName>' AND status='ISSUED';
--- updates a certificate tags
UPDATE certificate
SET tags = '{ "toUpdate": "value2", "newTag": "value3" }'
WHERE domain_name = '<domainName>';
--- deletes a certificate requested
DELETE FROM certificate
WHERE domain_name = '<domainName>';
--- creates a certificate request in non-default region
SELECT * FROM certificate_request('<domainName>', 'DNS', 'us-east-1', '{}');
--- checks the certificate in non-default region is created and validated
SELECT *
FROM certificate
WHERE domain_name = '<domainName>'
AND status = 'ISSUED'
AND region = 'us-east-1';