Skip to main content

cloud_formation_templates

Creates, updates, deletes, gets or lists a cloud_formation_templates resource.

Overview

Namecloud_formation_templates
TypeResource
Idaws.serverlessrepo.cloud_formation_templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
application_idstringThe application Amazon Resource Name (ARN).
creation_timestringThe date and time this resource was created.
expiration_timestringThe date and time this template expires. Templates expire 1 hour after creation.
semantic_versionstringThe semantic version of the application: https:​//semver.org/
statusstringStatus of the template creation workflow. Possible values: PREPARING | ACTIVE | EXPIRED (PREPARING, ACTIVE, EXPIRED)
template_idstringThe UUID returned by CreateCloudFormationTemplate. Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}
template_urlstringA link to the template that can be used to deploy the application using AWS CloudFormation.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_cloud_formation_templateselectapplication_id, template_id, regionGets the specified AWS CloudFormation template.
create_cloud_formation_templateinsertapplication_id, regionCreates an AWS CloudFormation template.

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.

NameDatatypeDescription
application_idstringThe Amazon Resource Name (ARN) of the application.
regionstringAWS region (default: us-east-1)
template_idstringThe UUID returned by CreateCloudFormationTemplate. Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}

SELECT examples

Gets the specified AWS CloudFormation template.

SELECT
application_id,
creation_time,
expiration_time,
semantic_version,
status,
template_id,
template_url
FROM aws.serverlessrepo.cloud_formation_templates
WHERE application_id = '{{ application_id }}' -- required
AND template_id = '{{ template_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an AWS CloudFormation template.

INSERT INTO aws.serverlessrepo.cloud_formation_templates (
SemanticVersion,
application_id,
region
)
SELECT
'{{ SemanticVersion }}',
'{{ application_id }}',
'{{ region }}'
RETURNING
application_id,
creation_time,
expiration_time,
semantic_version,
status,
template_id,
template_url
;