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 | aws.amplify.apps |
Fields
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 | |
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 | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all apps
in a region.
SELECT
region,
access_token,
app_id,
app_name,
arn,
auto_branch_creation_config,
basic_auth_config,
build_spec,
custom_headers,
custom_rules,
default_domain,
description,
enable_branch_auto_deletion,
environment_variables,
iam_service_role,
name,
oauth_token,
platform,
repository,
tags
FROM aws.amplify.apps
WHERE region = 'us-east-1';
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,
custom_headers,
custom_rules,
default_domain,
description,
enable_branch_auto_deletion,
environment_variables,
iam_service_role,
name,
oauth_token,
platform,
repository,
tags
FROM aws.amplify.apps
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
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 aws.amplify.apps (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.amplify.apps (
AccessToken,
AutoBranchCreationConfig,
BasicAuthConfig,
BuildSpec,
CustomHeaders,
CustomRules,
Description,
EnableBranchAutoDeletion,
EnvironmentVariables,
IAMServiceRole,
Name,
OauthToken,
Platform,
Repository,
Tags,
region
)
SELECT
'{{ AccessToken }}',
'{{ AutoBranchCreationConfig }}',
'{{ BasicAuthConfig }}',
'{{ BuildSpec }}',
'{{ CustomHeaders }}',
'{{ CustomRules }}',
'{{ Description }}',
'{{ EnableBranchAutoDeletion }}',
'{{ EnvironmentVariables }}',
'{{ IAMServiceRole }}',
'{{ Name }}',
'{{ OauthToken }}',
'{{ Platform }}',
'{{ Repository }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: app
props:
- name: AccessToken
value: '{{ AccessToken }}'
- name: AutoBranchCreationConfig
value:
AutoBranchCreationPatterns:
- '{{ AutoBranchCreationPatterns[0] }}'
BasicAuthConfig:
EnableBasicAuth: '{{ EnableBasicAuth }}'
Username: '{{ Username }}'
Password: '{{ Password }}'
BuildSpec: '{{ BuildSpec }}'
EnableAutoBranchCreation: '{{ EnableAutoBranchCreation }}'
EnableAutoBuild: '{{ EnableAutoBuild }}'
EnablePerformanceMode: '{{ EnablePerformanceMode }}'
EnablePullRequestPreview: '{{ EnablePullRequestPreview }}'
EnvironmentVariables:
- Name: '{{ Name }}'
Value: '{{ Value }}'
Framework: '{{ Framework }}'
PullRequestEnvironmentName: '{{ PullRequestEnvironmentName }}'
Stage: '{{ Stage }}'
- name: BasicAuthConfig
value: null
- name: BuildSpec
value: '{{ BuildSpec }}'
- name: CustomHeaders
value: '{{ CustomHeaders }}'
- name: CustomRules
value:
- Condition: '{{ Condition }}'
Status: '{{ Status }}'
Target: '{{ Target }}'
Source: '{{ Source }}'
- name: Description
value: '{{ Description }}'
- name: EnableBranchAutoDeletion
value: '{{ EnableBranchAutoDeletion }}'
- name: EnvironmentVariables
value:
- null
- name: IAMServiceRole
value: '{{ IAMServiceRole }}'
- name: Name
value: '{{ Name }}'
- name: OauthToken
value: '{{ OauthToken }}'
- name: Platform
value: '{{ Platform }}'
- name: Repository
value: '{{ Repository }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.amplify.apps
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the apps
resource, the following permissions are required:
Create
amplify:GetApp,
amplify:CreateApp,
amplify:TagResource,
codecommit:GetRepository,
codecommit:PutRepositoryTriggers,
codecommit:GetRepositoryTriggers,
sns:CreateTopic,
sns:Subscribe,
iam:PassRole
Delete
amplify:GetApp,
amplify:DeleteApp,
codecommit:GetRepository,
codecommit:GetRepositoryTriggers,
codecommit:PutRepositoryTriggers,
sns:Unsubscribe,
iam:PassRole
List
amplify:GetApp,
amplify:ListApps,
amplify:ListTagsForResource,
iam:PassRole
Read
amplify:GetApp,
amplify:ListTagsForResource,
codecommit:GetRepository,
codecommit:GetRepositoryTriggers,
iam:PassRole
Update
amplify:GetApp,
amplify:UpdateApp,
amplify:ListTagsForResource,
amplify:TagResource,
amplify:UntagResource,
codecommit:GetRepository,
codecommit:PutRepositoryTriggers,
codecommit:GetRepositoryTriggers,
sns:CreateTopic,
sns:Subscribe,
sns:Unsubscribe,
iam:PassRole