applications
Creates, updates, deletes or gets an application resource or lists applications in a region
Overview
| Name | applications |
| Type | Resource |
| Description | The AWS::ElasticBeanstalk::Application resource specifies an Elastic Beanstalk application. |
| Id | awscc.elasticbeanstalk.applications |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
application_name | string | A name for the Elastic Beanstalk application. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the application name. |
description | string | Your description of the application. |
resource_lifecycle_config | object | Specifies an application resource lifecycle configuration to prevent your application from accumulating too many versions. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
application_name | string | A name for the Elastic Beanstalk application. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the application name. |
region | string | AWS region. |
For more information, see AWS::ElasticBeanstalk::Application.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | applications | INSERT | region |
delete_resource | applications | DELETE | Identifier, region |
update_resource | applications | UPDATE | Identifier, PatchDocument, region |
list_resources | applications_list_only | SELECT | region |
get_resource | applications | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual application.
SELECT
region,
application_name,
description,
resource_lifecycle_config
FROM awscc.elasticbeanstalk.applications
WHERE
region = 'us-east-1' AND
Identifier = '{{ application_name }}';
Lists all applications in a region.
SELECT
region,
application_name
FROM awscc.elasticbeanstalk.applications_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new application resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.elasticbeanstalk.applications (
ApplicationName,
Description,
ResourceLifecycleConfig,
region
)
SELECT
'{{ application_name }}',
'{{ description }}',
'{{ resource_lifecycle_config }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.elasticbeanstalk.applications (
ApplicationName,
Description,
ResourceLifecycleConfig,
region
)
SELECT
'{{ application_name }}',
'{{ description }}',
'{{ resource_lifecycle_config }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: application
props:
- name: application_name
value: '{{ application_name }}'
- name: description
value: '{{ description }}'
- name: resource_lifecycle_config
value:
service_role: '{{ service_role }}'
version_lifecycle_config:
max_age_rule:
delete_source_from_s3: '{{ delete_source_from_s3 }}'
enabled: '{{ enabled }}'
max_age_in_days: '{{ max_age_in_days }}'
max_count_rule:
delete_source_from_s3: '{{ delete_source_from_s3 }}'
enabled: '{{ enabled }}'
max_count: '{{ max_count }}'
UPDATE example
Use the following StackQL query and manifest file to update a application resource, using stack-deploy.
/*+ update */
UPDATE awscc.elasticbeanstalk.applications
SET PatchDocument = string('{{ {
"Description": description,
"ResourceLifecycleConfig": resource_lifecycle_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.elasticbeanstalk.applications
WHERE
Identifier = '{{ application_name }}' AND
region = 'us-east-1';
Permissions
To operate on the applications resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
elasticbeanstalk:CreateApplication,
elasticbeanstalk:DescribeApplications,
s3:CreateBucket,
s3:PutBucketAcl,
s3:PutBucketObjectLockConfiguration,
s3:PutBucketVersioning,
s3:PutBucketOwnershipControls,
s3:PutBucketPolicy,
s3:PutBucketPublicAccessBlock,
s3:PutObject,
s3:ListBucket,
s3:GetObject,
s3:GetBucketLocation,
s3:GetBucketPolicy,
iam:PassRole
elasticbeanstalk:DescribeApplications
elasticbeanstalk:UpdateApplication,
elasticbeanstalk:UpdateApplicationResourceLifecycle,
elasticbeanstalk:DescribeApplications,
iam:PassRole
elasticbeanstalk:DeleteApplication,
elasticbeanstalk:DescribeApplications,
s3:ListBucket
elasticbeanstalk:DescribeApplications