apps
Creates, updates, deletes or gets an app resource or lists apps in a region
Overview
| Name | apps |
| Type | Resource |
| Description | The AWS::Amplify::App resource creates Apps in the Amplify Console. An App is a collection of branches. |
| Id | awscc.amplify.apps |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
access_token | string | |
app_id | string | |
app_name | string | |
arn | string | |
auto_branch_creation_config | object | |
basic_auth_config | object | |
build_spec | string | |
cache_config | object | |
compute_role_arn | string | |
custom_headers | string | |
custom_rules | array | |
default_domain | string | |
description | string | |
enable_branch_auto_deletion | boolean | |
environment_variables | array | |
iam_service_role | string | |
name | string | |
oauth_token | string | |
platform | string | |
repository | string | |
tags | array | |
job_config | object | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | |
region | string | AWS region. |
For more information, see AWS::Amplify::App.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | apps | INSERT | Name, region |
delete_resource | apps | DELETE | Identifier, region |
update_resource | apps | UPDATE | Identifier, PatchDocument, region |
list_resources | apps_list_only | SELECT | region |
get_resource | apps | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual app.
SELECT
region,
access_token,
app_id,
app_name,
arn,
auto_branch_creation_config,
basic_auth_config,
build_spec,
cache_config,
compute_role_arn,
custom_headers,
custom_rules,
default_domain,
description,
enable_branch_auto_deletion,
environment_variables,
iam_service_role,
name,
oauth_token,
platform,
repository,
tags,
job_config
FROM awscc.amplify.apps
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all apps in a region.
SELECT
region,
arn
FROM awscc.amplify.apps_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new app resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.amplify.apps (
Name,
region
)
SELECT
'{{ name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.amplify.apps (
AccessToken,
AutoBranchCreationConfig,
BasicAuthConfig,
BuildSpec,
CacheConfig,
ComputeRoleArn,
CustomHeaders,
CustomRules,
Description,
EnableBranchAutoDeletion,
EnvironmentVariables,
IAMServiceRole,
Name,
OauthToken,
Platform,
Repository,
Tags,
JobConfig,
region
)
SELECT
'{{ access_token }}',
'{{ auto_branch_creation_config }}',
'{{ basic_auth_config }}',
'{{ build_spec }}',
'{{ cache_config }}',
'{{ compute_role_arn }}',
'{{ custom_headers }}',
'{{ custom_rules }}',
'{{ description }}',
'{{ enable_branch_auto_deletion }}',
'{{ environment_variables }}',
'{{ iam_service_role }}',
'{{ name }}',
'{{ oauth_token }}',
'{{ platform }}',
'{{ repository }}',
'{{ tags }}',
'{{ job_config }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: app
props:
- name: access_token
value: '{{ access_token }}'
- name: auto_branch_creation_config
value:
auto_branch_creation_patterns:
- '{{ auto_branch_creation_patterns[0] }}'
basic_auth_config:
enable_basic_auth: '{{ enable_basic_auth }}'
username: '{{ username }}'
password: '{{ password }}'
build_spec: '{{ build_spec }}'
enable_auto_branch_creation: '{{ enable_auto_branch_creation }}'
enable_auto_build: '{{ enable_auto_build }}'
enable_performance_mode: '{{ enable_performance_mode }}'
enable_pull_request_preview: '{{ enable_pull_request_preview }}'
environment_variables:
- name: '{{ name }}'
value: '{{ value }}'
framework: '{{ framework }}'
pull_request_environment_name: '{{ pull_request_environment_name }}'
stage: '{{ stage }}'
- name: basic_auth_config
value: null
- name: build_spec
value: '{{ build_spec }}'
- name: cache_config
value:
type: '{{ type }}'
- name: compute_role_arn
value: '{{ compute_role_arn }}'
- name: custom_headers
value: '{{ custom_headers }}'
- name: custom_rules
value:
- condition: '{{ condition }}'
status: '{{ status }}'
target: '{{ target }}'
source: '{{ source }}'
- name: description
value: '{{ description }}'
- name: enable_branch_auto_deletion
value: '{{ enable_branch_auto_deletion }}'
- name: environment_variables
value:
- null
- name: iam_service_role
value: '{{ iam_service_role }}'
- name: name
value: '{{ name }}'
- name: oauth_token
value: '{{ oauth_token }}'
- name: platform
value: '{{ platform }}'
- name: repository
value: '{{ repository }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: job_config
value:
build_compute_type: '{{ build_compute_type }}'
UPDATE example
Use the following StackQL query and manifest file to update a app resource, using stack-deploy.
/*+ update */
UPDATE awscc.amplify.apps
SET PatchDocument = string('{{ {
"AccessToken": access_token,
"AutoBranchCreationConfig": auto_branch_creation_config,
"BasicAuthConfig": basic_auth_config,
"BuildSpec": build_spec,
"CacheConfig": cache_config,
"ComputeRoleArn": compute_role_arn,
"CustomHeaders": custom_headers,
"CustomRules": custom_rules,
"Description": description,
"EnableBranchAutoDeletion": enable_branch_auto_deletion,
"EnvironmentVariables": environment_variables,
"IAMServiceRole": iam_service_role,
"Name": name,
"OauthToken": oauth_token,
"Platform": platform,
"Repository": repository,
"Tags": tags,
"JobConfig": job_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.amplify.apps
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the apps resource, the following permissions are required:
- Create
- Delete
- List
- Read
- Update
amplify:GetApp,
amplify:CreateApp,
amplify:TagResource,
codecommit:GetRepository,
codecommit:PutRepositoryTriggers,
codecommit:GetRepositoryTriggers,
sns:CreateTopic,
sns:Subscribe,
iam:PassRole
amplify:GetApp,
amplify:DeleteApp,
codecommit:GetRepository,
codecommit:GetRepositoryTriggers,
codecommit:PutRepositoryTriggers,
sns:Unsubscribe,
iam:PassRole
amplify:GetApp,
amplify:ListApps,
amplify:ListTagsForResource,
iam:PassRole
amplify:GetApp,
amplify:ListTagsForResource,
codecommit:GetRepository,
codecommit:GetRepositoryTriggers,
iam:PassRole
amplify:GetApp,
amplify:UpdateApp,
amplify:ListTagsForResource,
amplify:TagResource,
amplify:UntagResource,
codecommit:GetRepository,
codecommit:PutRepositoryTriggers,
codecommit:GetRepositoryTriggers,
sns:CreateTopic,
sns:Subscribe,
sns:Unsubscribe,
iam:PassRole