certificates
Creates, updates, deletes or gets a certificate resource or lists certificates in a region
Overview
| Name | certificates |
| Type | Resource |
| Description | Resource Type definition for AWS::Lightsail::Certificate. |
| Id | aws.lightsail.certificates |
Fields
| Name | Datatype | Description |
|---|---|---|
certificate_name | string | The name for the certificate. |
domain_name | string | The domain name (e.g., example.com ) for the certificate. |
subject_alternative_names | array | An array of strings that specify the alternate domains (e.g., example2.com) and subdomains (e.g., blog.example.com) for the certificate. |
certificate_arn | string | |
status | string | The validation status of the certificate. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
For more information, see AWS::Lightsail::Certificate.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | CertificateName, DomainName, 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,
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.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lightsail.certificates (
CertificateName,
DomainName,
region
)
SELECT
'{{ CertificateName }}',
'{{ DomainName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lightsail.certificates (
CertificateName,
DomainName,
SubjectAlternativeNames,
Tags,
region
)
SELECT
'{{ CertificateName }}',
'{{ DomainName }}',
'{{ SubjectAlternativeNames }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: certificate
props:
- name: CertificateName
value: '{{ CertificateName }}'
- name: DomainName
value: '{{ DomainName }}'
- name: SubjectAlternativeNames
value:
- '{{ SubjectAlternativeNames[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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