certificates
Creates, updates, deletes, gets or lists a certificates resource.
Overview
| Name | certificates |
| Type | Resource |
| Id | aws.lightsail.certificates |
Fields
The following fields are returned by SELECT queries:
- get_certificates
| Name | Datatype | Description |
|---|---|---|
certificates | array | An object that describes certificates. |
next_page_token | string | If NextPageToken is returned there are more results available. The value of NextPageToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_certificates | select | region | Returns information about one or more Amazon Lightsail SSL/TLS certificates. To get a summary of a certificate, omit includeCertificateDetails from your request. The response will include only the certificate Amazon Resource Name (ARN), certificate name, domain name, and tags. | |
create_certificate | insert | region, certificateName, domainName | Creates an SSL/TLS certificate for an Amazon Lightsail content delivery network (CDN) distribution and a container service. After the certificate is valid, use the AttachCertificateToDistribution action to use the certificate and its domains with your distribution. Or use the UpdateContainerService action to use the certificate and its domains with your container service. Only certificates created in the us-east-1 Amazon Web Services Region can be attached to Lightsail distributions. Lightsail distributions are global resources that can reference an origin in any Amazon Web Services Region, and distribute its content globally. However, all distributions are located in the us-east-1 Region. | |
delete_certificate | delete | region | Deletes an SSL/TLS certificate for your Amazon Lightsail content delivery network (CDN) distribution. Certificates that are currently attached to a distribution cannot be deleted. Use the DetachCertificateFromDistribution action to detach a certificate from a distribution. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_certificates
Returns information about one or more Amazon Lightsail SSL/TLS certificates. To get a summary of a certificate, omit includeCertificateDetails from your request. The response will include only the certificate Amazon Resource Name (ARN), certificate name, domain name, and tags.
SELECT
certificates,
next_page_token
FROM aws.lightsail.certificates
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_certificate
- Manifest
Creates an SSL/TLS certificate for an Amazon Lightsail content delivery network (CDN) distribution and a container service. After the certificate is valid, use the AttachCertificateToDistribution action to use the certificate and its domains with your distribution. Or use the UpdateContainerService action to use the certificate and its domains with your container service. Only certificates created in the us-east-1 Amazon Web Services Region can be attached to Lightsail distributions. Lightsail distributions are global resources that can reference an origin in any Amazon Web Services Region, and distribute its content globally. However, all distributions are located in the us-east-1 Region.
INSERT INTO aws.lightsail.certificates (
certificateName,
domainName,
subjectAlternativeNames,
tags,
region
)
SELECT
'{{ certificateName }}' /* required */,
'{{ domainName }}' /* required */,
'{{ subjectAlternativeNames }}',
'{{ tags }}',
'{{ region }}'
RETURNING
certificate,
operations
;
# Description fields are for documentation purposes
- name: certificates
props:
- name: region
value: "{{ region }}"
description: Required parameter for the certificates resource.
- name: certificateName
value: "{{ certificateName }}"
description: |
The name for the certificate.
- name: domainName
value: "{{ domainName }}"
description: |
The domain name (example.com) for the certificate.
- name: subjectAlternativeNames
value:
- "{{ subjectAlternativeNames }}"
description: |
An array of strings that specify the alternate domains (example2.com) and subdomains (blog.example.com) for the certificate. You can specify a maximum of nine alternate domains (in addition to the primary domain name). Wildcard domain entries (*.example.com) are not supported.
- name: tags
description: |
The tag keys and optional values to add to the certificate during create. Use the TagResource action to tag a resource after it's created.
value:
- key: "{{ key }}"
value: "{{ value }}"
DELETE examples
- delete_certificate
Deletes an SSL/TLS certificate for your Amazon Lightsail content delivery network (CDN) distribution. Certificates that are currently attached to a distribution cannot be deleted. Use the DetachCertificateFromDistribution action to detach a certificate from a distribution.
DELETE FROM aws.lightsail.certificates
WHERE region = '{{ region }}' --required
;