CfnAppProps
- class aws_cdk.aws_amplify.CfnAppProps(*, name, access_token=None, auto_branch_creation_config=None, basic_auth_config=None, build_spec=None, custom_headers=None, custom_rules=None, description=None, enable_branch_auto_deletion=None, environment_variables=None, iam_service_role=None, oauth_token=None, platform=None, repository=None, tags=None)
Bases:
object
Properties for defining a
CfnApp
.- Parameters:
name (
str
) – The name for an Amplify app. Length Constraints: Minimum length of 1. Maximum length of 255. Pattern: (?s).+access_token (
Optional
[str
]) – The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored. UseAccessToken
for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, useOauthToken
. You must specify eitherAccessToken
orOauthToken
when you create a new app. Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . Length Constraints: Minimum length of 1. Maximum length of 255.auto_branch_creation_config (
Union
[IResolvable
,AutoBranchCreationConfigProperty
,Dict
[str
,Any
],None
]) – Sets the configuration for your automatic branch creation.basic_auth_config (
Union
[IResolvable
,BasicAuthConfigProperty
,Dict
[str
,Any
],None
]) – The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the formatuser:password
.build_spec (
Optional
[str
]) – The build specification (build spec) for an Amplify app. Length Constraints: Minimum length of 1. Maximum length of 25000. Pattern: (?s).+custom_headers (
Optional
[str
]) – The custom HTTP headers for an Amplify app. Length Constraints: Minimum length of 0. Maximum length of 25000. Pattern: (?s).*custom_rules (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,CustomRuleProperty
,Dict
[str
,Any
]]],None
]) – The custom rewrite and redirect rules for an Amplify app.description (
Optional
[str
]) – The description for an Amplify app. Length Constraints: Maximum length of 1000. Pattern: (?s).*enable_branch_auto_deletion (
Union
[bool
,IResolvable
,None
]) – Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository.environment_variables (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,EnvironmentVariableProperty
,Dict
[str
,Any
]]],None
]) – The environment variables map for an Amplify app.iam_service_role (
Optional
[str
]) – The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app. Length Constraints: Minimum length of 0. Maximum length of 1000. Pattern: (?s).*oauth_token (
Optional
[str
]) –The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored. Use
OauthToken
for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, useAccessToken
. You must specify eitherOauthToken
orAccessToken
when you create a new app. Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . Length Constraints: Maximum length of 1000. Pattern: (?s).*platform (
Optional
[str
]) – The platform for the Amplify app. For a static app, set the platform type toWEB
. For a dynamic server-side rendered (SSR) app, set the platform type toWEB_COMPUTE
. For an app requiring Amplify Hosting’s original SSR support only, set the platform type toWEB_DYNAMIC
.repository (
Optional
[str
]) – The repository for an Amplify app. Pattern: (?s).*tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – The tag for an Amplify app.
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_amplify as amplify cfn_app_props = amplify.CfnAppProps( name="name", # the properties below are optional access_token="accessToken", auto_branch_creation_config=amplify.CfnApp.AutoBranchCreationConfigProperty( auto_branch_creation_patterns=["autoBranchCreationPatterns"], basic_auth_config=amplify.CfnApp.BasicAuthConfigProperty( enable_basic_auth=False, password="password", username="username" ), build_spec="buildSpec", enable_auto_branch_creation=False, enable_auto_build=False, enable_performance_mode=False, enable_pull_request_preview=False, environment_variables=[amplify.CfnApp.EnvironmentVariableProperty( name="name", value="value" )], framework="framework", pull_request_environment_name="pullRequestEnvironmentName", stage="stage" ), basic_auth_config=amplify.CfnApp.BasicAuthConfigProperty( enable_basic_auth=False, password="password", username="username" ), build_spec="buildSpec", custom_headers="customHeaders", custom_rules=[amplify.CfnApp.CustomRuleProperty( source="source", target="target", # the properties below are optional condition="condition", status="status" )], description="description", enable_branch_auto_deletion=False, environment_variables=[amplify.CfnApp.EnvironmentVariableProperty( name="name", value="value" )], iam_service_role="iamServiceRole", oauth_token="oauthToken", platform="platform", repository="repository", tags=[CfnTag( key="key", value="value" )] )
Attributes
- access_token
The personal access token for a GitHub repository for an Amplify app.
The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.
Use
AccessToken
for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, useOauthToken
.You must specify either
AccessToken
orOauthToken
when you create a new app.Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
Length Constraints: Minimum length of 1. Maximum length of 255.
- auto_branch_creation_config
Sets the configuration for your automatic branch creation.
- basic_auth_config
The credentials for basic authorization for an Amplify app.
You must base64-encode the authorization credentials and provide them in the format
user:password
.
- build_spec
The build specification (build spec) for an Amplify app.
Length Constraints: Minimum length of 1. Maximum length of 25000.
Pattern: (?s).+
- custom_headers
The custom HTTP headers for an Amplify app.
Length Constraints: Minimum length of 0. Maximum length of 25000.
Pattern: (?s).*
- custom_rules
The custom rewrite and redirect rules for an Amplify app.
- description
The description for an Amplify app.
Length Constraints: Maximum length of 1000.
Pattern: (?s).*
- enable_branch_auto_deletion
Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository.
- environment_variables
The environment variables map for an Amplify app.
- iam_service_role
The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app.
Length Constraints: Minimum length of 0. Maximum length of 1000.
Pattern: (?s).*
- name
The name for an Amplify app.
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: (?s).+
- oauth_token
The OAuth token for a third-party source control system for an Amplify app.
The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.
Use
OauthToken
for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, useAccessToken
.You must specify either
OauthToken
orAccessToken
when you create a new app.Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .
Length Constraints: Maximum length of 1000.
Pattern: (?s).*
- platform
The platform for the Amplify app.
For a static app, set the platform type to
WEB
. For a dynamic server-side rendered (SSR) app, set the platform type toWEB_COMPUTE
. For an app requiring Amplify Hosting’s original SSR support only, set the platform type toWEB_DYNAMIC
.
- repository
The repository for an Amplify app.
Pattern: (?s).*
- tags
The tag for an Amplify app.