load_balancer_tls_certificates
Creates, updates, deletes or gets a load_balancer_tls_certificate resource or lists load_balancer_tls_certificates in a region
Overview
| Name | load_balancer_tls_certificates |
| Type | Resource |
| Description | Resource Type definition for AWS::Lightsail::LoadBalancerTlsCertificate |
| Id | awscc.lightsail.load_balancer_tls_certificates |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
load_balancer_name | string | The name of your load balancer. |
certificate_name | string | The SSL/TLS certificate name. |
certificate_domain_name | string | The domain name (e.g., example.com ) for your SSL/TLS certificate. |
certificate_alternative_names | array | An array of strings listing alternative domains and subdomains for your SSL/TLS certificate. |
load_balancer_tls_certificate_arn | string | |
is_attached | boolean | When true, the SSL/TLS certificate is attached to the Lightsail load balancer. |
https_redirection_enabled | boolean | A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer. |
status | string | The validation status of the SSL/TLS certificate. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
load_balancer_name | string | The name of your load balancer. |
certificate_name | string | The SSL/TLS certificate name. |
region | string | AWS region. |
For more information, see AWS::Lightsail::LoadBalancerTlsCertificate.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | load_balancer_tls_certificates | INSERT | LoadBalancerName, CertificateName, CertificateDomainName, region |
delete_resource | load_balancer_tls_certificates | DELETE | Identifier, region |
update_resource | load_balancer_tls_certificates | UPDATE | Identifier, PatchDocument, region |
list_resources | load_balancer_tls_certificates_list_only | SELECT | region |
get_resource | load_balancer_tls_certificates | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual load_balancer_tls_certificate.
SELECT
region,
load_balancer_name,
certificate_name,
certificate_domain_name,
certificate_alternative_names,
load_balancer_tls_certificate_arn,
is_attached,
https_redirection_enabled,
status
FROM awscc.lightsail.load_balancer_tls_certificates
WHERE
region = '{{ region }}' AND
Identifier = '{{ certificate_name }}|{{ load_balancer_name }}';
Lists all load_balancer_tls_certificates in a region.
SELECT
region,
certificate_name,
load_balancer_name
FROM awscc.lightsail.load_balancer_tls_certificates_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new load_balancer_tls_certificate resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.lightsail.load_balancer_tls_certificates (
LoadBalancerName,
CertificateName,
CertificateDomainName,
region
)
SELECT
'{{ load_balancer_name }}',
'{{ certificate_name }}',
'{{ certificate_domain_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.lightsail.load_balancer_tls_certificates (
LoadBalancerName,
CertificateName,
CertificateDomainName,
CertificateAlternativeNames,
IsAttached,
HttpsRedirectionEnabled,
region
)
SELECT
'{{ load_balancer_name }}',
'{{ certificate_name }}',
'{{ certificate_domain_name }}',
'{{ certificate_alternative_names }}',
'{{ is_attached }}',
'{{ https_redirection_enabled }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: load_balancer_tls_certificate
props:
- name: load_balancer_name
value: '{{ load_balancer_name }}'
- name: certificate_name
value: '{{ certificate_name }}'
- name: certificate_domain_name
value: '{{ certificate_domain_name }}'
- name: certificate_alternative_names
value:
- '{{ certificate_alternative_names[0] }}'
- name: is_attached
value: '{{ is_attached }}'
- name: https_redirection_enabled
value: '{{ https_redirection_enabled }}'
UPDATE example
Use the following StackQL query and manifest file to update a load_balancer_tls_certificate resource, using stack-deploy.
/*+ update */
UPDATE awscc.lightsail.load_balancer_tls_certificates
SET PatchDocument = string('{{ {
"IsAttached": is_attached,
"HttpsRedirectionEnabled": https_redirection_enabled
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ certificate_name }}|{{ load_balancer_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.lightsail.load_balancer_tls_certificates
WHERE
Identifier = '{{ certificate_name }}|{{ load_balancer_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the load_balancer_tls_certificates resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
lightsail:CreateLoadBalancerTlsCertificate,
lightsail:GetLoadBalancerTlsCertificates,
lightsail:GetLoadBalancer,
lightsail:AttachLoadBalancerTlsCertificate,
lightsail:UpdateLoadBalancerAttribute
lightsail:GetLoadBalancerTlsCertificates,
lightsail:GetLoadBalancer
lightsail:AttachLoadBalancerTlsCertificate,
lightsail:GetLoadBalancerTlsCertificates,
lightsail:GetLoadBalancer,
lightsail:UpdateLoadBalancerAttribute
lightsail:DeleteLoadBalancerTlsCertificate,
lightsail:GetLoadBalancerTlsCertificates,
lightsail:GetLoadBalancer
lightsail:GetLoadBalancerTlsCertificates,
lightsail:GetLoadBalancer