Skip to main content

certificates

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

Overview

Namecertificates
TypeResource
DescriptionAn example resource schema demonstrating some basic constructs and validation rules.
Idaws.lightsail.certificates

Fields

NameDatatypeDescription
certificate_namestringThe name for the certificate.
domain_namestringThe domain name (e.g., example.com ) for the certificate.
subject_alternative_namesarrayAn array of strings that specify the alternate domains (e.g., example2.com) and subdomains (e.g., blog.example.com) for the certificate.
certificate_arnstring
statusstringThe validation status of the certificate.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTCertificateName, DomainName, 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,
certificate_name,
domain_name,
subject_alternative_names,
certificate_arn,
status,
tags
FROM aws.lightsail.certificates
WHERE region = 'us-east-1';

Gets all properties from an individual certificate.

SELECT
region,
certificate_name,
domain_name,
subject_alternative_names,
certificate_arn,
status,
tags
FROM aws.lightsail.certificates
WHERE region = 'us-east-1' AND data__Identifier = '<CertificateName>';

INSERT example

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

/*+ create */
INSERT INTO aws.lightsail.certificates (
CertificateName,
DomainName,
region
)
SELECT
'{{ CertificateName }}',
'{{ DomainName }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

lightsail:CreateCertificate,
lightsail:GetCertificates,
lightsail:TagResource,
lightsail:UntagResource

Read

lightsail:GetCertificates

Update

lightsail:GetCertificates,
lightsail:TagResource,
lightsail:UntagResource

Delete

lightsail:DeleteCertificate,
lightsail:GetCertificates

List

lightsail:GetCertificates