environment_template_versions
Creates, updates, deletes, gets or lists an environment_template_versions resource.
Overview
| Name | environment_template_versions |
| Type | Resource |
| Id | aws.proton.environment_template_versions |
Fields
The following fields are returned by SELECT queries:
- get_environment_template_version
- list_environment_template_versions
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the version of an environment template. |
created_at | string (date-time) | The time when the version of an environment template was created. |
description | string | A description of the minor version of an environment template. |
last_modified_at | string (date-time) | The time when the version of an environment template was last modified. |
major_version | string | The latest major version that's associated with the version of an environment template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
minor_version | string | The minor version of an environment template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
recommended_minor_version | string | The recommended minor version of the environment template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
schema | string | The schema of the version of an environment template. |
status | string | The status of the version of an environment template. (REGISTRATION_IN_PROGRESS, REGISTRATION_FAILED, DRAFT, PUBLISHED) |
status_message | string | The status message of the version of an environment template. |
template_name | string | The name of the version of an environment 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 an environment template. |
created_at | string (date-time) | The time when the version of an environment template was created. |
description | string | A description of the version of an environment template. |
last_modified_at | string (date-time) | The time when the version of an environment template was last modified. |
major_version | string | The latest major version that's associated with the version of an environment template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
minor_version | string | The version of an environment template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
recommended_minor_version | string | The recommended minor version of the environment template. (pattern: <code>^(0|([1-9]{1}\d*))$</code>) |
status | string | The status of the version of an environment template. (REGISTRATION_IN_PROGRESS, REGISTRATION_FAILED, DRAFT, PUBLISHED) |
status_message | string | The status message of the version of an environment template. |
template_name | string | The name of the environment 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_environment_template_version | select | region | Get detailed data for a major or minor version of an environment template. | |
list_environment_template_versions | select | region | List major or minor versions of an environment template with detail data. | |
create_environment_template_version | insert | region, source, templateName | Create a new major or minor version of an environment template. A major version of an environment template is a version that isn't backwards compatible. A minor version of an environment template is a version that's backwards compatible within its major version. | |
update_environment_template_version | update | region, majorVersion, minorVersion, templateName | Update a major or minor version of an environment template. | |
delete_environment_template_version | delete | region | If no other minor versions of an environment template exist, delete a major version of the environment template if it's not the Recommended version. Delete the Recommended version of the environment template if no other major versions or minor versions of the environment template exist. A major version of an environment template is a version that's not backward compatible. Delete a minor version of an environment template if it isn't the Recommended version. Delete a Recommended minor version of the environment template if no other minor versions of the environment template exist. A minor version of an environment template is a version that's backward 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_environment_template_version
- list_environment_template_versions
Get detailed data for a major or minor version of an environment template.
SELECT
arn,
created_at,
description,
last_modified_at,
major_version,
minor_version,
recommended_minor_version,
schema,
status,
status_message,
template_name
FROM aws.proton.environment_template_versions
WHERE region = '{{ region }}' -- required
;
List major or minor versions of an environment 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.environment_template_versions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_environment_template_version
- Manifest
Create a new major or minor version of an environment template. A major version of an environment template is a version that isn't backwards compatible. A minor version of an environment template is a version that's backwards compatible within its major version.
INSERT INTO aws.proton.environment_template_versions (
clientToken,
description,
majorVersion,
source,
tags,
templateName,
region
)
SELECT
'{{ clientToken }}',
'{{ description }}',
'{{ majorVersion }}',
'{{ source }}' /* required */,
'{{ tags }}',
'{{ templateName }}' /* required */,
'{{ region }}'
RETURNING
environment_template_version
;
# Description fields are for documentation purposes
- name: environment_template_versions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the environment_template_versions resource.
- name: clientToken
value: "{{ clientToken }}"
description: |
When included, if two identical requests are made with the same client token, Proton returns the environment template version that the first request created.
- name: description
value: "{{ description }}"
description: |
A description of the new version of an environment template.
- name: majorVersion
value: "{{ majorVersion }}"
description: |
To create a new minor version of the environment template, include major Version. To create a new major and minor version of the environment template, exclude major Version.
- name: source
description: |
An object that includes the template bundle S3 bucket path and name for the new version of an template.
value:
s3:
bucket: "{{ bucket }}"
key: "{{ key }}"
- name: tags
description: |
An optional list of metadata items that you can associate with the Proton environment 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 environment template.
UPDATE examples
- update_environment_template_version
Update a major or minor version of an environment template.
UPDATE aws.proton.environment_template_versions
SET
description = '{{ description }}',
majorVersion = '{{ majorVersion }}',
minorVersion = '{{ minorVersion }}',
status = '{{ status }}',
templateName = '{{ templateName }}'
WHERE
region = '{{ region }}' --required
AND majorVersion = '{{ majorVersion }}' --required
AND minorVersion = '{{ minorVersion }}' --required
AND templateName = '{{ templateName }}' --required
RETURNING
environment_template_version;
DELETE examples
- delete_environment_template_version
If no other minor versions of an environment template exist, delete a major version of the environment template if it's not the Recommended version. Delete the Recommended version of the environment template if no other major versions or minor versions of the environment template exist. A major version of an environment template is a version that's not backward compatible. Delete a minor version of an environment template if it isn't the Recommended version. Delete a Recommended minor version of the environment template if no other minor versions of the environment template exist. A minor version of an environment template is a version that's backward compatible.
DELETE FROM aws.proton.environment_template_versions
WHERE region = '{{ region }}' --required
;