service_template_versions
Creates, updates, deletes, gets or lists a service_template_versions resource.
Overview
| Name | service_template_versions |
| Type | Resource |
| Id | aws.proton.service_template_versions |
Fields
The following fields are returned by SELECT queries:
- get_service_template_version
- list_service_template_versions
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the version of a service template. |
compatible_environment_templates | array | An array of compatible environment template names for the major version of a service template. |
created_at | string (date-time) | The time when the version of a service template was created. |
description | string | A description of the version of a service template. |
last_modified_at | string (date-time) | The time when the version of a service template was last modified. |
major_version | string | The latest major version that's associated with the version of a service template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
minor_version | string | The minor version of a service template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
recommended_minor_version | string | The recommended minor version of the service template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
schema | string | The schema of the version of a service template. |
status | string | The service template version status. (REGISTRATION_IN_PROGRESS, REGISTRATION_FAILED, DRAFT, PUBLISHED) |
status_message | string | A service template version status message. |
supported_component_sources | array | An 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_name | string | The name of the version of a service template. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the version of a service template. |
created_at | string (date-time) | The time when the version of a service template was created. |
description | string | A description of the version of a service template. |
last_modified_at | string (date-time) | The time when the version of a service template was last modified. |
major_version | string | The latest major version that's associated with the version of a service template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
minor_version | string | The minor version of a service template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
recommended_minor_version | string | The recommended minor version of the service template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
status | string | The service template minor version status. (REGISTRATION_IN_PROGRESS, REGISTRATION_FAILED, DRAFT, PUBLISHED) |
status_message | string | A service template minor version status message. |
template_name | string | The name of the service template. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_service_template_version | select | region | Get detailed data for a major or minor version of a service template. | |
list_service_template_versions | select | region | List major or minor versions of a service template with detail data. | |
create_service_template_version | insert | region, compatibleEnvironmentTemplates, source, templateName | 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. | |
update_service_template_version | update | region, majorVersion, minorVersion, templateName | Update a major or minor version of a service template. | |
delete_service_template_version | delete | region | 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. |
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_service_template_version
- list_service_template_versions
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
;
List major or minor versions of a service template with detail data.
SELECT
arn,
created_at,
description,
last_modified_at,
major_version,
minor_version,
recommended_minor_version,
status,
status_message,
template_name
FROM aws.proton.service_template_versions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_service_template_version
- Manifest
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
;
# Description fields are for documentation purposes
- name: service_template_versions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the service_template_versions resource.
- name: clientToken
value: "{{ clientToken }}"
description: |
When included, if two identical requests are made with the same client token, Proton returns the service template version that the first request created.
- name: compatibleEnvironmentTemplates
description: |
An array of environment template objects that are compatible with the new service template version. A service instance based on this service template version can run in environments based on compatible templates.
value:
- majorVersion: "{{ majorVersion }}"
templateName: "{{ templateName }}"
- name: description
value: "{{ description }}"
description: |
A description of the new version of a service template.
- name: majorVersion
value: "{{ majorVersion }}"
description: |
To create a new minor version of the service template, include a major Version. To create a new major and minor version of the service template, exclude major Version.
- name: source
description: |
An object that includes the template bundle S3 bucket path and name for the new version of a service template.
value:
s3:
bucket: "{{ bucket }}"
key: "{{ key }}"
- name: supportedComponentSources
value:
- "{{ supportedComponentSources }}"
description: |
An 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.
- name: tags
description: |
An optional list of metadata items that you can associate with the Proton service template version. A tag is a key-value pair. For more information, see Proton resources and tagging in the Proton User Guide.
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: templateName
value: "{{ templateName }}"
description: |
The name of the service template.
UPDATE examples
- update_service_template_version
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
- delete_service_template_version
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
;