AppProps

class aws_cdk.aws_amplify_alpha.AppProps(*, app_name=None, auto_branch_creation=None, auto_branch_deletion=None, basic_auth=None, build_spec=None, cache_config_type=None, custom_response_headers=None, custom_rules=None, description=None, environment_variables=None, platform=None, role=None, source_code_provider=None)

Bases: object

(experimental) Properties for an App.

Parameters:
  • app_name (Optional[str]) – (experimental) The name for the application. Default: - a CDK generated name

  • auto_branch_creation (Union[AutoBranchCreation, Dict[str, Any], None]) – (experimental) The auto branch creation configuration. Use this to automatically create branches that match a certain pattern. Default: - no auto branch creation

  • auto_branch_deletion (Optional[bool]) – (experimental) Automatically disconnect a branch in the Amplify Console when you delete a branch from your Git repository. Default: false

  • basic_auth (Optional[BasicAuth]) – (experimental) The Basic Auth configuration. Use this to set password protection at an app level to all your branches. Default: - no password protection

  • build_spec (Optional[BuildSpec]) – (experimental) BuildSpec for the application. Alternatively, add a amplify.yml file to the repository. Default: - no build spec

  • cache_config_type (Optional[CacheConfigType]) – (experimental) The type of cache configuration to use for an Amplify app. Default: CacheConfigType.AMPLIFY_MANAGED

  • custom_response_headers (Optional[Sequence[Union[CustomResponseHeader, Dict[str, Any]]]]) – (experimental) The custom HTTP response headers for an Amplify app. Default: - no custom response headers

  • custom_rules (Optional[Sequence[CustomRule]]) – (experimental) Custom rewrite/redirect rules for the application. Default: - no custom rewrite/redirect rules

  • description (Optional[str]) – (experimental) A description for the application. Default: - no description

  • environment_variables (Optional[Mapping[str, str]]) – (experimental) Environment variables for the application. All environment variables that you add are encrypted to prevent rogue access so you can use them to store secret information. Default: - no environment variables

  • platform (Optional[Platform]) – (experimental) Indicates the hosting platform to use. Set to WEB for static site generated (SSG) apps (i.e. a Create React App or Gatsby) and WEB_COMPUTE for server side rendered (SSR) apps (i.e. NextJS). Default: Platform.WEB

  • role (Optional[IRole]) – (experimental) The IAM service role to associate with the application. The App implements IGrantable. Default: - a new role is created

  • source_code_provider (Optional[ISourceCodeProvider]) – (experimental) The source code provider for this application. Default: - not connected to a source code provider

Stability:

experimental

ExampleMetadata:

infused

Example:

amplify_app = amplify.App(self, "MyApp",
    source_code_provider=amplify.GitHubSourceCodeProvider(
        owner="<user>",
        repository="<repo>",
        oauth_token=SecretValue.secrets_manager("my-github-token")
    ),
    auto_branch_creation=amplify.AutoBranchCreation( # Automatically connect branches that match a pattern set
        patterns=["feature/*", "test/*"]),
    auto_branch_deletion=True
)

Attributes

app_name

(experimental) The name for the application.

Default:
  • a CDK generated name

Stability:

experimental

auto_branch_creation

(experimental) The auto branch creation configuration.

Use this to automatically create branches that match a certain pattern.

Default:
  • no auto branch creation

Stability:

experimental

auto_branch_deletion

(experimental) Automatically disconnect a branch in the Amplify Console when you delete a branch from your Git repository.

Default:

false

Stability:

experimental

basic_auth

(experimental) The Basic Auth configuration.

Use this to set password protection at an app level to all your branches.

Default:
  • no password protection

Stability:

experimental

build_spec

(experimental) BuildSpec for the application.

Alternatively, add a amplify.yml file to the repository.

Default:
  • no build spec

See:

https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html

Stability:

experimental

cache_config_type

(experimental) The type of cache configuration to use for an Amplify app.

Default:

CacheConfigType.AMPLIFY_MANAGED

Stability:

experimental

custom_response_headers

(experimental) The custom HTTP response headers for an Amplify app.

Default:
  • no custom response headers

See:

https://docs.aws.amazon.com/amplify/latest/userguide/custom-headers.html

Stability:

experimental

custom_rules

(experimental) Custom rewrite/redirect rules for the application.

Default:
  • no custom rewrite/redirect rules

Stability:

experimental

description

(experimental) A description for the application.

Default:
  • no description

Stability:

experimental

environment_variables

(experimental) Environment variables for the application.

All environment variables that you add are encrypted to prevent rogue access so you can use them to store secret information.

Default:
  • no environment variables

Stability:

experimental

platform

(experimental) Indicates the hosting platform to use.

Set to WEB for static site generated (SSG) apps (i.e. a Create React App or Gatsby) and WEB_COMPUTE for server side rendered (SSR) apps (i.e. NextJS).

Default:

Platform.WEB

Stability:

experimental

role

(experimental) The IAM service role to associate with the application.

The App implements IGrantable.

Default:
  • a new role is created

Stability:

experimental

source_code_provider

(experimental) The source code provider for this application.

Default:
  • not connected to a source code provider

Stability:

experimental