application_versions
Creates, updates, deletes or gets an application_version resource or lists application_versions in a region
Overview
| Name | application_versions |
| Type | Resource |
| Description | Resource Type definition for AWS::ElasticBeanstalk::ApplicationVersion |
| Id | awscc.elasticbeanstalk.application_versions |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
id | string | |
application_name | string | The name of the Elastic Beanstalk application that is associated with this application version. |
description | string | A description of this application version. |
source_bundle | object | The Amazon S3 bucket and key that identify the location of the source bundle for this version. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
application_name | string | The name of the Elastic Beanstalk application that is associated with this application version. |
region | string | AWS region. |
For more information, see AWS::ElasticBeanstalk::ApplicationVersion.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | application_versions | INSERT | ApplicationName, SourceBundle, region |
delete_resource | application_versions | DELETE | Identifier, region |
update_resource | application_versions | UPDATE | Identifier, PatchDocument, region |
list_resources | application_versions_list_only | SELECT | region |
get_resource | application_versions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual application_version.
SELECT
region,
id,
application_name,
description,
source_bundle
FROM awscc.elasticbeanstalk.application_versions
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_name }}|{{ id }}';
Lists all application_versions in a region.
SELECT
region,
application_name,
id
FROM awscc.elasticbeanstalk.application_versions_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new application_version resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.elasticbeanstalk.application_versions (
ApplicationName,
SourceBundle,
region
)
SELECT
'{{ application_name }}',
'{{ source_bundle }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.elasticbeanstalk.application_versions (
ApplicationName,
Description,
SourceBundle,
region
)
SELECT
'{{ application_name }}',
'{{ description }}',
'{{ source_bundle }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: application_version
props:
- name: application_name
value: '{{ application_name }}'
- name: description
value: '{{ description }}'
- name: source_bundle
value:
s3_bucket: '{{ s3_bucket }}'
s3_key: '{{ s3_key }}'
UPDATE example
Use the following StackQL query and manifest file to update a application_version resource, using stack-deploy.
/*+ update */
UPDATE awscc.elasticbeanstalk.application_versions
SET PatchDocument = string('{{ {
"Description": description
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_name }}|{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.elasticbeanstalk.application_versions
WHERE
Identifier = '{{ application_name }}|{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the application_versions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
elasticbeanstalk:CreateApplicationVersion,
elasticbeanstalk:DescribeApplicationVersions,
s3:GetObject,
s3:PutObject
elasticbeanstalk:DescribeApplicationVersions
elasticbeanstalk:UpdateApplicationVersion,
elasticbeanstalk:DescribeApplicationVersions
elasticbeanstalk:DeleteApplicationVersion,
elasticbeanstalk:DescribeApplicationVersions
elasticbeanstalk:DescribeApplicationVersions