Skip to main content

application_versions

Creates, updates, deletes, gets or lists an application_versions resource.

Overview

Nameapplication_versions
TypeResource
Idaws.elasticbeanstalk.application_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
application_namestringThe name of the application to which the application version belongs.
application_version_arnstringThe Amazon Resource Name (ARN) of the application version.
build_arnstringReference to the artifact from the AWS CodeBuild build.
date_createdstringThe creation date of the application version.
date_updatedstringThe last modified date of the application version.
descriptionstringThe description of the application version.
source_build_informationstringIf the version's source code was retrieved from AWS CodeCommit, the location of the source code for the application version.
source_bundlestringThe storage location of the application version's source bundle in Amazon S3.
statusstringThe processing status of the application version. Reflects the state of the application version during its creation. Many of the values are only applicable if you specified True for the Process parameter of the CreateApplicationVersion action. The following list describes the possible values. Unprocessed – Application version wasn't pre-processed or validated. Elastic Beanstalk will validate configuration files during deployment of the application version to an environment. Processing – Elastic Beanstalk is currently processing the application version. Building – Application version is currently undergoing an AWS CodeBuild build. Processed – Elastic Beanstalk was successfully pre-processed and validated. Failed – Either the AWS CodeBuild build failed or configuration files didn't pass validation. This application version isn't usable.
version_labelstringA unique identifier for the application version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_application_versionsselectregionApplicationName, VersionLabels, MaxRecords, NextTokenRetrieve a list of application versions.
create_application_versioninsertApplicationName, VersionLabel, regionDescription, SourceBuildInformation, SourceBundle, BuildConfiguration, AutoCreateApplication, Process, TagsCreates an application version for the specified application. You can create an application version from a source bundle in Amazon S3, a commit in AWS CodeCommit, or the output of an AWS CodeBuild build as follows: Specify a commit in an AWS CodeCommit repository with SourceBuildInformation. Specify a build in an AWS CodeBuild with SourceBuildInformation and BuildConfiguration. Specify a source bundle in S3 with SourceBundle Omit both SourceBuildInformation and SourceBundle to use the default sample application. After you create an application version with a specified Amazon S3 bucket and key location, you can't change that Amazon S3 location. If you change the Amazon S3 location, you receive an exception when you attempt to launch an environment from the application version.
update_application_versionupdateApplicationName, VersionLabel, regionDescriptionUpdates the specified application version to have the specified properties. If a property (for example, description) is not provided, the value remains unchanged. To clear properties, specify an empty string.
delete_application_versiondeleteApplicationName, VersionLabel, regionDeleteSourceBundleDeletes the specified version from the specified application. You cannot delete an application version that is associated with a running environment.

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
ApplicationNamestringThe name of the application to which the version belongs.
VersionLabelstringThe label of the version to delete.
regionstringAWS region (default: us-east-1)
ApplicationNamestringSpecify an application name to show only application versions for that application.
AutoCreateApplicationbooleanSet to true to create an application with the specified name if it doesn't already exist.
BuildConfigurationobjectSettings for an AWS CodeBuild build.
DeleteSourceBundlebooleanSet to true to delete the source bundle from your storage bucket. Otherwise, the application version is deleted only from Elastic Beanstalk and the source bundle remains in Amazon S3.
DescriptionstringA new description for this version.
MaxRecordsintegerFor a paginated request. Specify a maximum number of application versions to include in each response. If no MaxRecords is specified, all available application versions are retrieved in a single response.
NextTokenstringFor a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request. If no NextToken is specified, the first page is retrieved.
ProcessbooleanPre-processes and validates the environment manifest (env.yaml) and configuration files (*.config files in the .ebextensions folder) in the source bundle. Validating configuration files can identify issues prior to deploying the application version to an environment. You must turn processing on for application versions that you create using AWS CodeBuild or AWS CodeCommit. For application versions built from a source bundle in Amazon S3, processing is optional. The Process option validates Elastic Beanstalk configuration files. It doesn't validate your application's configuration files, like proxy server or Docker configuration.
SourceBuildInformationobjectSpecify a commit in an AWS CodeCommit Git repository to use as the source code for the application version.
SourceBundleobjectThe Amazon S3 bucket and key that identify the location of the source bundle for this version. The Amazon S3 bucket must be in the same region as the environment. Specify a source bundle in S3 or a commit in an AWS CodeCommit repository (with SourceBuildInformation), but not both. If neither SourceBundle nor SourceBuildInformation are provided, Elastic Beanstalk uses a sample application.
TagsarraySpecifies the tags applied to the application version. Elastic Beanstalk applies these tags only to the application version. Environments that use the application version don't inherit the tags.
VersionLabelsarraySpecify a version label to show a specific application version.

SELECT examples

Retrieve a list of application versions.

SELECT
application_name,
application_version_arn,
build_arn,
date_created,
date_updated,
description,
source_build_information,
source_bundle,
status,
version_label
FROM aws.elasticbeanstalk.application_versions
WHERE region = '{{ region }}' -- required
AND ApplicationName = '{{ ApplicationName }}'
AND VersionLabels = '{{ VersionLabels }}'
AND MaxRecords = '{{ MaxRecords }}'
AND NextToken = '{{ NextToken }}'
;

INSERT examples

Creates an application version for the specified application. You can create an application version from a source bundle in Amazon S3, a commit in AWS CodeCommit, or the output of an AWS CodeBuild build as follows: Specify a commit in an AWS CodeCommit repository with SourceBuildInformation. Specify a build in an AWS CodeBuild with SourceBuildInformation and BuildConfiguration. Specify a source bundle in S3 with SourceBundle Omit both SourceBuildInformation and SourceBundle to use the default sample application. After you create an application version with a specified Amazon S3 bucket and key location, you can't change that Amazon S3 location. If you change the Amazon S3 location, you receive an exception when you attempt to launch an environment from the application version.

INSERT INTO aws.elasticbeanstalk.application_versions (
ApplicationName,
VersionLabel,
region,
Description,
SourceBuildInformation,
SourceBundle,
BuildConfiguration,
AutoCreateApplication,
Process,
Tags
)
SELECT
'{{ ApplicationName }}',
'{{ VersionLabel }}',
'{{ region }}',
'{{ Description }}',
'{{ SourceBuildInformation }}',
'{{ SourceBundle }}',
'{{ BuildConfiguration }}',
'{{ AutoCreateApplication }}',
'{{ Process }}',
'{{ Tags }}'
RETURNING
application_name,
application_version_arn,
build_arn,
date_created,
date_updated,
description,
source_build_information,
source_bundle,
status,
version_label
;

UPDATE examples

Updates the specified application version to have the specified properties. If a property (for example, description) is not provided, the value remains unchanged. To clear properties, specify an empty string.

UPDATE aws.elasticbeanstalk.application_versions
SET
-- No updatable properties
WHERE
ApplicationName = '{{ ApplicationName }}' --required
AND VersionLabel = '{{ VersionLabel }}' --required
AND region = '{{ region }}' --required
AND Description = '{{ Description}}'
RETURNING
application_name,
application_version_arn,
build_arn,
date_created,
date_updated,
description,
source_build_information,
source_bundle,
status,
version_label;

DELETE examples

Deletes the specified version from the specified application. You cannot delete an application version that is associated with a running environment.

DELETE FROM aws.elasticbeanstalk.application_versions
WHERE ApplicationName = '{{ ApplicationName }}' --required
AND VersionLabel = '{{ VersionLabel }}' --required
AND region = '{{ region }}' --required
AND DeleteSourceBundle = '{{ DeleteSourceBundle }}'
;