CfnAppProps
- class aws_cdk.aws_amplify.CfnAppProps(*, name, access_token=None, auto_branch_creation_config=None, basic_auth_config=None, build_spec=None, cache_config=None, compute_role_arn=None, custom_headers=None, custom_rules=None, description=None, enable_branch_auto_deletion=None, environment_variables=None, iam_service_role=None, job_config=None, oauth_token=None, platform=None, repository=None, tags=None)
- Bases: - object- Properties for defining a - CfnApp.- Parameters:
- name ( - str) – The name of the Amplify app.
- 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. Use- AccessTokenfor GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use- OauthToken. You must specify either- AccessTokenor- OauthTokenwhen 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 .
- 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 format- user:password.
- build_spec ( - Optional[- str]) – The build specification (build spec) for an Amplify app.
- cache_config ( - Union[- IResolvable,- CacheConfigProperty,- Dict[- str,- Any],- None]) – The cache configuration for the Amplify app. If you don’t specify the cache configuration- type, Amplify uses the default- AMPLIFY_MANAGEDsetting.
- compute_role_arn ( - Optional[- str]) – The Amazon Resource Name (ARN) of the IAM role for an SSR app. The Compute role allows the Amplify Hosting compute service to securely access specific AWS resources based on the role’s permissions. For more information about the SSR Compute role, see Adding an SSR Compute role in the Amplify User Guide .
- custom_headers ( - Optional[- str]) – The custom HTTP headers for an Amplify app.
- 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 of the Amplify app.
- 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 for the Amplify app. For a list of the environment variables that are accessible to Amplify by default, see Amplify Environment variables in the Amplify Hosting User Guide .
- iam_service_role ( - Optional[- str]) – AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app.
- job_config ( - Union[- IResolvable,- JobConfigProperty,- Dict[- str,- Any],- None]) – The configuration details that apply to the jobs for an Amplify app.
- 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 - OauthTokenfor repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use- AccessToken. You must specify either- OauthTokenor- AccessTokenwhen 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 .
- platform ( - Optional[- str]) – 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 to- WEB_COMPUTE. For an app requiring Amplify Hosting’s original SSR support only, set the platform type to- WEB_DYNAMIC. If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to- WEB_COMPUTEand set the artifacts- baseDirectoryto- .nextin the application’s build settings. For an example of the build specification settings, see Amplify build settings for a Next.js 14 SSG application in the Amplify Hosting User Guide .
- repository ( - Optional[- str]) – The Git repository for the Amplify app.
- tags ( - Optional[- Sequence[- Union[- CfnTag,- Dict[- str,- Any]]]]) – The tag for an Amplify app.
 
- See:
- 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. from aws_cdk import 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", cache_config=amplify.CfnApp.CacheConfigProperty( type="type" ), compute_role_arn="computeRoleArn", 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", job_config=amplify.CfnApp.JobConfigProperty( build_compute_type="buildComputeType" ), 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 - AccessTokenfor GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use- OauthToken.- You must specify either - AccessTokenor- OauthTokenwhen 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 . 
 - 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. 
 - cache_config
- The cache configuration for the Amplify app. - If you don’t specify the cache configuration - type, Amplify uses the default- AMPLIFY_MANAGEDsetting.
 - compute_role_arn
- The Amazon Resource Name (ARN) of the IAM role for an SSR app. - The Compute role allows the Amplify Hosting compute service to securely access specific AWS resources based on the role’s permissions. For more information about the SSR Compute role, see Adding an SSR Compute role in the Amplify User Guide . 
 - custom_headers
- The custom HTTP headers for an Amplify app. 
 - custom_rules
- The custom rewrite and redirect rules for an Amplify app. 
 - description
- The description of the Amplify app. 
 - 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 for the Amplify app. - For a list of the environment variables that are accessible to Amplify by default, see Amplify Environment variables in the Amplify Hosting User Guide . 
 - iam_service_role
- AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app. 
 - job_config
- The configuration details that apply to the jobs for an Amplify app. 
 - name
- The name of the Amplify app. 
 - 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 - OauthTokenfor repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use- AccessToken.- You must specify either - OauthTokenor- AccessTokenwhen 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 . 
 - 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 to- WEB_COMPUTE. For an app requiring Amplify Hosting’s original SSR support only, set the platform type to- WEB_DYNAMIC.- If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to - WEB_COMPUTEand set the artifacts- baseDirectoryto- .nextin the application’s build settings. For an example of the build specification settings, see Amplify build settings for a Next.js 14 SSG application in the Amplify Hosting User Guide .
 - repository
- The Git repository for the Amplify app. 
 - tags
- The tag for an Amplify app.