Skip to main content

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

Nameload_balancer_tls_certificates
TypeResource
DescriptionResource Type definition for AWS::Lightsail::LoadBalancerTlsCertificate
Idawscc.lightsail.load_balancer_tls_certificates

Fields

NameDatatypeDescription
load_balancer_namestringThe name of your load balancer.
certificate_namestringThe SSL/TLS certificate name.
certificate_domain_namestringThe domain name (e.g., example.com ) for your SSL/TLS certificate.
certificate_alternative_namesarrayAn array of strings listing alternative domains and subdomains for your SSL/TLS certificate.
load_balancer_tls_certificate_arnstring
is_attachedbooleanWhen true, the SSL/TLS certificate is attached to the Lightsail load balancer.
https_redirection_enabledbooleanA Boolean value that indicates whether HTTPS redirection is enabled for the load balancer.
statusstringThe validation status of the SSL/TLS certificate.
regionstringAWS region.

For more information, see AWS::Lightsail::LoadBalancerTlsCertificate.

Methods

NameResourceAccessible byRequired Params
create_resourceload_balancer_tls_certificatesINSERTLoadBalancerName, CertificateName, CertificateDomainName, region
delete_resourceload_balancer_tls_certificatesDELETEIdentifier, region
update_resourceload_balancer_tls_certificatesUPDATEIdentifier, PatchDocument, region
list_resourcesload_balancer_tls_certificates_list_onlySELECTregion
get_resourceload_balancer_tls_certificatesSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

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

/*+ 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
;

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:

ParameterDescription
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:

lightsail:CreateLoadBalancerTlsCertificate,
lightsail:GetLoadBalancerTlsCertificates,
lightsail:GetLoadBalancer,
lightsail:AttachLoadBalancerTlsCertificate,
lightsail:UpdateLoadBalancerAttribute