Skip to main content

service_template_versions

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

Overview

Nameservice_template_versions
TypeResource
Idaws.proton.service_template_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the version of a service template.
compatible_environment_templatesarrayAn array of compatible environment template names for the major version of a service template.
created_atstring (date-time)The time when the version of a service template was created.
descriptionstringA description of the version of a service template.
last_modified_atstring (date-time)The time when the version of a service template was last modified.
major_versionstringThe latest major version that's associated with the version of a service template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>)
minor_versionstringThe minor version of a service template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>)
recommended_minor_versionstringThe recommended minor version of the service template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>)
schemastringThe schema of the version of a service template.
statusstringThe service template version status. (REGISTRATION_IN_PROGRESS, REGISTRATION_FAILED, DRAFT, PUBLISHED)
status_messagestringA service template version status message.
supported_component_sourcesarrayAn array of supported component sources. Components with supported sources can be attached to service instances based on this service template version. For more information about components, see Proton components in the Proton User Guide.
template_namestringThe name of the version of a service template. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_service_template_versionselectregionGet detailed data for a major or minor version of a service template.
list_service_template_versionsselectregionList major or minor versions of a service template with detail data.
create_service_template_versioninsertregion, compatibleEnvironmentTemplates, source, templateNameCreate a new major or minor version of a service template. A major version of a service template is a version that isn't backward compatible. A minor version of a service template is a version that's backward compatible within its major version.
update_service_template_versionupdateregion, majorVersion, minorVersion, templateNameUpdate a major or minor version of a service template.
delete_service_template_versiondeleteregionIf no other minor versions of a service template exist, delete a major version of the service template if it's not the Recommended version. Delete the Recommended version of the service template if no other major versions or minor versions of the service template exist. A major version of a service template is a version that isn't backwards compatible. Delete a minor version of a service template if it's not the Recommended version. Delete a Recommended minor version of the service template if no other minor versions of the service template exist. A minor version of a service template is a version that's backwards compatible.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Get detailed data for a major or minor version of a service template.

SELECT
arn,
compatible_environment_templates,
created_at,
description,
last_modified_at,
major_version,
minor_version,
recommended_minor_version,
schema,
status,
status_message,
supported_component_sources,
template_name
FROM aws.proton.service_template_versions
WHERE region = '{{ region }}' -- required
;

INSERT examples

Create a new major or minor version of a service template. A major version of a service template is a version that isn't backward compatible. A minor version of a service template is a version that's backward compatible within its major version.

INSERT INTO aws.proton.service_template_versions (
clientToken,
compatibleEnvironmentTemplates,
description,
majorVersion,
source,
supportedComponentSources,
tags,
templateName,
region
)
SELECT
'{{ clientToken }}',
'{{ compatibleEnvironmentTemplates }}' /* required */,
'{{ description }}',
'{{ majorVersion }}',
'{{ source }}' /* required */,
'{{ supportedComponentSources }}',
'{{ tags }}',
'{{ templateName }}' /* required */,
'{{ region }}'
RETURNING
service_template_version
;

UPDATE examples

Update a major or minor version of a service template.

UPDATE aws.proton.service_template_versions
SET
compatibleEnvironmentTemplates = '{{ compatibleEnvironmentTemplates }}',
description = '{{ description }}',
majorVersion = '{{ majorVersion }}',
minorVersion = '{{ minorVersion }}',
status = '{{ status }}',
supportedComponentSources = '{{ supportedComponentSources }}',
templateName = '{{ templateName }}'
WHERE
region = '{{ region }}' --required
AND majorVersion = '{{ majorVersion }}' --required
AND minorVersion = '{{ minorVersion }}' --required
AND templateName = '{{ templateName }}' --required
RETURNING
service_template_version;

DELETE examples

If no other minor versions of a service template exist, delete a major version of the service template if it's not the Recommended version. Delete the Recommended version of the service template if no other major versions or minor versions of the service template exist. A major version of a service template is a version that isn't backwards compatible. Delete a minor version of a service template if it's not the Recommended version. Delete a Recommended minor version of the service template if no other minor versions of the service template exist. A minor version of a service template is a version that's backwards compatible.

DELETE FROM aws.proton.service_template_versions
WHERE region = '{{ region }}' --required
;