UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1,107 lines 66.7 kB
import * as cdk from "../../core/lib"; import * as constructs from "constructs"; import * as cfn_parse from "../../core/lib/helpers-internal"; import { aws_iam as iamRefs } from "../../interfaces"; import { AppReference, BranchReference, DomainReference, IAppRef, IBranchRef, IDomainRef } from "../../interfaces/generated/aws-amplify-interfaces.generated"; /** * The AWS::Amplify::App resource specifies Apps in Amplify Hosting. * * An App is a collection of branches. * * @cloudformationResource AWS::Amplify::App * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html */ export declare class CfnApp extends cdk.CfnResource implements cdk.IInspectable, IAppRef, cdk.ITaggable { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnApp from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnApp; /** * Checks whether the given object is a CfnApp */ static isCfnApp(x: any): x is CfnApp; static arnForApp(resource: IAppRef): string; /** * The personal access token for a GitHub repository for an Amplify app. */ private _accessToken?; /** * Sets the configuration for your automatic branch creation. */ private _autoBranchCreationConfig?; /** * The credentials for basic authorization for an Amplify app. */ private _basicAuthConfig?; /** * The build specification (build spec) for an Amplify app. */ private _buildSpec?; /** * The cache configuration for the Amplify app. */ private _cacheConfig?; /** * The Amazon Resource Name (ARN) of the IAM role for an SSR app. */ private _computeRoleArn?; /** * The custom HTTP headers for an Amplify app. */ private _customHeaders?; /** * The custom rewrite and redirect rules for an Amplify app. */ private _customRules?; /** * The description of the Amplify app. */ private _description?; /** * Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository. */ private _enableBranchAutoDeletion?; /** * The environment variables for the Amplify app. */ private _environmentVariables?; /** * AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app. */ private _iamServiceRole?; /** * The configuration details that apply to the jobs for an Amplify app. */ private _jobConfig?; /** * The name of the Amplify app. */ private _name; /** * The OAuth token for a third-party source control system for an Amplify app. */ private _oauthToken?; /** * The platform for the Amplify app. */ private _platform?; /** * The Git repository for the Amplify app. */ private _repository?; /** * Tag Manager which manages the tags for this resource */ readonly tags: cdk.TagManager; /** * The tag for an Amplify app. */ private _tagsRaw?; /** * Create a new `AWS::Amplify::App`. * * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnAppProps); get appRef(): AppReference; /** * The personal access token for a GitHub repository for an Amplify app. */ get accessToken(): string | undefined; /** * The personal access token for a GitHub repository for an Amplify app. */ set accessToken(value: string | undefined); /** * Sets the configuration for your automatic branch creation. */ get autoBranchCreationConfig(): CfnApp.AutoBranchCreationConfigProperty | cdk.IResolvable | undefined; /** * Sets the configuration for your automatic branch creation. */ set autoBranchCreationConfig(value: CfnApp.AutoBranchCreationConfigProperty | cdk.IResolvable | undefined); /** * The credentials for basic authorization for an Amplify app. */ get basicAuthConfig(): CfnApp.BasicAuthConfigProperty | cdk.IResolvable | undefined; /** * The credentials for basic authorization for an Amplify app. */ set basicAuthConfig(value: CfnApp.BasicAuthConfigProperty | cdk.IResolvable | undefined); /** * The build specification (build spec) for an Amplify app. */ get buildSpec(): string | undefined; /** * The build specification (build spec) for an Amplify app. */ set buildSpec(value: string | undefined); /** * The cache configuration for the Amplify app. */ get cacheConfig(): CfnApp.CacheConfigProperty | cdk.IResolvable | undefined; /** * The cache configuration for the Amplify app. */ set cacheConfig(value: CfnApp.CacheConfigProperty | cdk.IResolvable | undefined); /** * The Amazon Resource Name (ARN) of the IAM role for an SSR app. */ get computeRoleArn(): string | undefined; /** * The Amazon Resource Name (ARN) of the IAM role for an SSR app. */ set computeRoleArn(value: string | undefined); /** * The custom HTTP headers for an Amplify app. */ get customHeaders(): string | undefined; /** * The custom HTTP headers for an Amplify app. */ set customHeaders(value: string | undefined); /** * The custom rewrite and redirect rules for an Amplify app. */ get customRules(): Array<CfnApp.CustomRuleProperty | cdk.IResolvable> | cdk.IResolvable | undefined; /** * The custom rewrite and redirect rules for an Amplify app. */ set customRules(value: Array<CfnApp.CustomRuleProperty | cdk.IResolvable> | cdk.IResolvable | undefined); /** * The description of the Amplify app. */ get description(): string | undefined; /** * The description of the Amplify app. */ set description(value: string | undefined); /** * Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository. */ get enableBranchAutoDeletion(): boolean | cdk.IResolvable | undefined; /** * Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository. */ set enableBranchAutoDeletion(value: boolean | cdk.IResolvable | undefined); /** * The environment variables for the Amplify app. */ get environmentVariables(): Array<CfnApp.EnvironmentVariableProperty | cdk.IResolvable> | cdk.IResolvable | undefined; /** * The environment variables for the Amplify app. */ set environmentVariables(value: Array<CfnApp.EnvironmentVariableProperty | cdk.IResolvable> | cdk.IResolvable | undefined); /** * AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app. */ get iamServiceRole(): string | undefined; /** * AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app. */ set iamServiceRole(value: string | undefined); /** * The configuration details that apply to the jobs for an Amplify app. */ get jobConfig(): cdk.IResolvable | CfnApp.JobConfigProperty | undefined; /** * The configuration details that apply to the jobs for an Amplify app. */ set jobConfig(value: cdk.IResolvable | CfnApp.JobConfigProperty | undefined); /** * The name of the Amplify app. */ get name(): string; /** * The name of the Amplify app. */ set name(value: string); /** * The OAuth token for a third-party source control system for an Amplify app. */ get oauthToken(): string | undefined; /** * The OAuth token for a third-party source control system for an Amplify app. */ set oauthToken(value: string | undefined); /** * The platform for the Amplify app. */ get platform(): string | undefined; /** * The platform for the Amplify app. */ set platform(value: string | undefined); /** * The Git repository for the Amplify app. */ get repository(): string | undefined; /** * The Git repository for the Amplify app. */ set repository(value: string | undefined); /** * The tag for an Amplify app. */ get tagsRaw(): Array<cdk.CfnTag> | undefined; /** * The tag for an Amplify app. */ set tagsRaw(value: Array<cdk.CfnTag> | undefined); /** * Unique Id for the Amplify App. * * @cloudformationAttribute AppId */ get attrAppId(): string; /** * Name for the Amplify App. * * @cloudformationAttribute AppName */ get attrAppName(): string; /** * ARN for the Amplify App. * * @cloudformationAttribute Arn */ get attrArn(): string; /** * Default domain for the Amplify App. * * @cloudformationAttribute DefaultDomain */ get attrDefaultDomain(): string; protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnApp { /** * Use the AutoBranchCreationConfig property type to automatically create branches that match a certain pattern. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html */ interface AutoBranchCreationConfigProperty { /** * Automated branch creation glob patterns for the Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-autobranchcreationpatterns */ readonly autoBranchCreationPatterns?: Array<string>; /** * Sets password protection for your auto created branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-basicauthconfig */ readonly basicAuthConfig?: CfnApp.BasicAuthConfigProperty | cdk.IResolvable; /** * The build specification (build spec) for the autocreated branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-buildspec */ readonly buildSpec?: string; /** * Enables automated branch creation for the Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-enableautobranchcreation */ readonly enableAutoBranchCreation?: boolean | cdk.IResolvable; /** * Enables auto building for the auto created branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-enableautobuild */ readonly enableAutoBuild?: boolean | cdk.IResolvable; /** * Enables performance mode for the branch. * * Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-enableperformancemode */ readonly enablePerformanceMode?: boolean | cdk.IResolvable; /** * Sets whether pull request previews are enabled for each branch that Amplify Hosting automatically creates for your app. * * Amplify creates previews by deploying your app to a unique URL whenever a pull request is opened for the branch. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch. * * To provide backend support for your preview, Amplify Hosting automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the `PullRequestEnvironmentName` property. * * For more information, see [Web Previews](https://docs.aws.amazon.com/amplify/latest/userguide/pr-previews.html) in the *AWS Amplify Hosting User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-enablepullrequestpreview */ readonly enablePullRequestPreview?: boolean | cdk.IResolvable; /** * The environment variables for the autocreated branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-environmentvariables */ readonly environmentVariables?: Array<CfnApp.EnvironmentVariableProperty | cdk.IResolvable> | cdk.IResolvable; /** * The framework for the autocreated branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-framework */ readonly framework?: string; /** * If pull request previews are enabled, you can use this property to specify a dedicated backend environment for your previews. * * For example, you could specify an environment named `prod` , `test` , or `dev` that you initialized with the Amplify CLI. * * To enable pull request previews, set the `EnablePullRequestPreview` property to `true` . * * If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify deletes this environment when the pull request is closed. * * For more information about creating backend environments, see [Feature Branch Deployments and Team Workflows](https://docs.aws.amazon.com/amplify/latest/userguide/multi-environments.html) in the *AWS Amplify Hosting User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-pullrequestenvironmentname */ readonly pullRequestEnvironmentName?: string; /** * Stage for the auto created branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-stage */ readonly stage?: string; } /** * Environment variables are key-value pairs that are available at build time. * * Set environment variables for all branches in your app. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-environmentvariable.html */ interface EnvironmentVariableProperty { /** * The environment variable name. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-environmentvariable.html#cfn-amplify-app-environmentvariable-name */ readonly name: string; /** * The environment variable value. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-environmentvariable.html#cfn-amplify-app-environmentvariable-value */ readonly value: string; } /** * Use the BasicAuthConfig property type to set password protection at an app level to all your branches. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-basicauthconfig.html */ interface BasicAuthConfigProperty { /** * Enables basic authorization for the Amplify app's branches. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-basicauthconfig.html#cfn-amplify-app-basicauthconfig-enablebasicauth */ readonly enableBasicAuth?: boolean | cdk.IResolvable; /** * The password for basic authorization. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-basicauthconfig.html#cfn-amplify-app-basicauthconfig-password */ readonly password?: string; /** * The user name for basic authorization. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-basicauthconfig.html#cfn-amplify-app-basicauthconfig-username */ readonly username?: string; } /** * The CustomRule property type allows you to specify redirects, rewrites, and reverse proxies. * * Redirects enable a web app to reroute navigation from one URL to another. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html */ interface CustomRuleProperty { /** * The condition for a URL rewrite or redirect rule, such as a country code. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html#cfn-amplify-app-customrule-condition */ readonly condition?: string; /** * The source pattern for a URL rewrite or redirect rule. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html#cfn-amplify-app-customrule-source */ readonly source: string; /** * The status code for a URL rewrite or redirect rule. * * - **200** - Represents a 200 rewrite rule. * - **301** - Represents a 301 (moved pemanently) redirect rule. This and all future requests should be directed to the target URL. * - **302** - Represents a 302 temporary redirect rule. * - **404** - Represents a 404 redirect rule. * - **404-200** - Represents a 404 rewrite rule. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html#cfn-amplify-app-customrule-status */ readonly status?: string; /** * The target pattern for a URL rewrite or redirect rule. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html#cfn-amplify-app-customrule-target */ readonly target: string; } /** * Describes the cache configuration for an Amplify app. * * For more information about how Amplify applies an optimal cache configuration for your app based on the type of content that is being served, see [Managing cache configuration](https://docs.aws.amazon.com/amplify/latest/userguide/managing-cache-configuration) in the *Amplify User guide* . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-cacheconfig.html */ interface CacheConfigProperty { /** * The type of cache configuration to use for an Amplify app. * * The `AMPLIFY_MANAGED` cache configuration automatically applies an optimized cache configuration for your app based on its platform, routing rules, and rewrite rules. * * The `AMPLIFY_MANAGED_NO_COOKIES` cache configuration type is the same as `AMPLIFY_MANAGED` , except that it excludes all cookies from the cache key. This is the default setting. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-cacheconfig.html#cfn-amplify-app-cacheconfig-type */ readonly type?: string; } /** * Describes the configuration details that apply to the jobs for an Amplify app. * * Use `JobConfig` to apply configuration to jobs, such as customizing the build instance size when you create or update an Amplify app. For more information about customizable build instances, see [Custom build instances](https://docs.aws.amazon.com/amplify/latest/userguide/custom-build-instance.html) in the *Amplify User Guide* . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-jobconfig.html */ interface JobConfigProperty { /** * Specifies the size of the build instance. * * Amplify supports three instance sizes: `STANDARD_8GB` , `LARGE_16GB` , and `XLARGE_72GB` . If you don't specify a value, Amplify uses the `STANDARD_8GB` default. * * The following list describes the CPU, memory, and storage capacity for each build instance type: * * - **STANDARD_8GB** - - vCPUs: 4 * - Memory: 8 GiB * - Disk space: 128 GB * - **LARGE_16GB** - - vCPUs: 8 * - Memory: 16 GiB * - Disk space: 128 GB * - **XLARGE_72GB** - - vCPUs: 36 * - Memory: 72 GiB * - Disk space: 256 GB * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-jobconfig.html#cfn-amplify-app-jobconfig-buildcomputetype */ readonly buildComputeType: string; } } /** * Properties for defining a `CfnApp` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html */ export interface CfnAppProps { /** * 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, use `OauthToken` . * * You must specify either `AccessToken` or `OauthToken` 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](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-accesstoken */ readonly accessToken?: string; /** * Sets the configuration for your automatic branch creation. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-autobranchcreationconfig */ readonly autoBranchCreationConfig?: CfnApp.AutoBranchCreationConfigProperty | cdk.IResolvable; /** * The credentials for basic authorization for an Amplify app. * * You must base64-encode the authorization credentials and provide them in the format `user:password` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-basicauthconfig */ readonly basicAuthConfig?: CfnApp.BasicAuthConfigProperty | cdk.IResolvable; /** * The build specification (build spec) for an Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-buildspec */ readonly buildSpec?: string; /** * The cache configuration for the Amplify app. * * If you don't specify the cache configuration `type` , Amplify uses the default `AMPLIFY_MANAGED` setting. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-cacheconfig */ readonly cacheConfig?: CfnApp.CacheConfigProperty | cdk.IResolvable; /** * 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](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html) in the *Amplify User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-computerolearn */ readonly computeRoleArn?: string; /** * The custom HTTP headers for an Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-customheaders */ readonly customHeaders?: string; /** * The custom rewrite and redirect rules for an Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-customrules */ readonly customRules?: Array<CfnApp.CustomRuleProperty | cdk.IResolvable> | cdk.IResolvable; /** * The description of the Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-description */ readonly description?: string; /** * Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-enablebranchautodeletion */ readonly enableBranchAutoDeletion?: boolean | cdk.IResolvable; /** * 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](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html) in the *Amplify Hosting User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-environmentvariables */ readonly environmentVariables?: Array<CfnApp.EnvironmentVariableProperty | cdk.IResolvable> | cdk.IResolvable; /** * AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-iamservicerole */ readonly iamServiceRole?: iamRefs.IRoleRef | string; /** * The configuration details that apply to the jobs for an Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-jobconfig */ readonly jobConfig?: cdk.IResolvable | CfnApp.JobConfigProperty; /** * The name of the Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-name */ readonly name: string; /** * 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, use `AccessToken` . * * You must specify either `OauthToken` or `AccessToken` 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](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-oauthtoken */ readonly oauthToken?: string; /** * 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_COMPUTE` and set the artifacts `baseDirectory` to `.next` in the application's build settings. For an example of the build specification settings, see [Amplify build settings for a Next.js 14 SSG application](https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection-ssg-14) in the *Amplify Hosting User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-platform */ readonly platform?: string; /** * The Git repository for the Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-repository */ readonly repository?: string; /** * The tag for an Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-tags */ readonly tags?: Array<cdk.CfnTag>; } /** * The AWS::Amplify::Branch resource specifies a new branch within an app. * * @cloudformationResource AWS::Amplify::Branch * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html */ export declare class CfnBranch extends cdk.CfnResource implements cdk.IInspectable, IBranchRef, cdk.ITaggable { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnBranch from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnBranch; /** * Checks whether the given object is a CfnBranch */ static isCfnBranch(x: any): x is CfnBranch; static arnForBranch(resource: IBranchRef): string; /** * The unique ID for an Amplify app. */ private _appId; /** * The backend for a `Branch` of an Amplify app. Use for a backend created from an CloudFormation stack. */ private _backend?; /** * The basic authorization credentials for a branch of an Amplify app. */ private _basicAuthConfig?; /** * The name for the branch. */ private _branchName; /** * The build specification (build spec) for the branch. */ private _buildSpec?; /** * The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. */ private _computeRoleArn?; /** * The description for the branch that is part of an Amplify app. */ private _description?; /** * Enables auto building for the branch. */ private _enableAutoBuild?; /** * Enables performance mode for the branch. */ private _enablePerformanceMode?; /** * Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. */ private _enablePullRequestPreview?; /** * Specifies whether the skew protection feature is enabled for the branch. */ private _enableSkewProtection?; /** * The environment variables for the branch. */ private _environmentVariables?; /** * The framework for the branch. */ private _framework?; /** * If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. */ private _pullRequestEnvironmentName?; /** * Describes the current stage for the branch. */ private _stage?; /** * Tag Manager which manages the tags for this resource */ readonly tags: cdk.TagManager; /** * The tag for the branch. */ private _tagsRaw?; /** * Create a new `AWS::Amplify::Branch`. * * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnBranchProps); get branchRef(): BranchReference; /** * The unique ID for an Amplify app. */ get appId(): string; /** * The unique ID for an Amplify app. */ set appId(value: string); /** * The backend for a `Branch` of an Amplify app. Use for a backend created from an CloudFormation stack. */ get backend(): CfnBranch.BackendProperty | cdk.IResolvable | undefined; /** * The backend for a `Branch` of an Amplify app. Use for a backend created from an CloudFormation stack. */ set backend(value: CfnBranch.BackendProperty | cdk.IResolvable | undefined); /** * The basic authorization credentials for a branch of an Amplify app. */ get basicAuthConfig(): CfnBranch.BasicAuthConfigProperty | cdk.IResolvable | undefined; /** * The basic authorization credentials for a branch of an Amplify app. */ set basicAuthConfig(value: CfnBranch.BasicAuthConfigProperty | cdk.IResolvable | undefined); /** * The name for the branch. */ get branchName(): string; /** * The name for the branch. */ set branchName(value: string); /** * The build specification (build spec) for the branch. */ get buildSpec(): string | undefined; /** * The build specification (build spec) for the branch. */ set buildSpec(value: string | undefined); /** * The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. */ get computeRoleArn(): string | undefined; /** * The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. */ set computeRoleArn(value: string | undefined); /** * The description for the branch that is part of an Amplify app. */ get description(): string | undefined; /** * The description for the branch that is part of an Amplify app. */ set description(value: string | undefined); /** * Enables auto building for the branch. */ get enableAutoBuild(): boolean | cdk.IResolvable | undefined; /** * Enables auto building for the branch. */ set enableAutoBuild(value: boolean | cdk.IResolvable | undefined); /** * Enables performance mode for the branch. */ get enablePerformanceMode(): boolean | cdk.IResolvable | undefined; /** * Enables performance mode for the branch. */ set enablePerformanceMode(value: boolean | cdk.IResolvable | undefined); /** * Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. */ get enablePullRequestPreview(): boolean | cdk.IResolvable | undefined; /** * Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. */ set enablePullRequestPreview(value: boolean | cdk.IResolvable | undefined); /** * Specifies whether the skew protection feature is enabled for the branch. */ get enableSkewProtection(): boolean | cdk.IResolvable | undefined; /** * Specifies whether the skew protection feature is enabled for the branch. */ set enableSkewProtection(value: boolean | cdk.IResolvable | undefined); /** * The environment variables for the branch. */ get environmentVariables(): Array<CfnBranch.EnvironmentVariableProperty | cdk.IResolvable> | cdk.IResolvable | undefined; /** * The environment variables for the branch. */ set environmentVariables(value: Array<CfnBranch.EnvironmentVariableProperty | cdk.IResolvable> | cdk.IResolvable | undefined); /** * The framework for the branch. */ get framework(): string | undefined; /** * The framework for the branch. */ set framework(value: string | undefined); /** * If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. */ get pullRequestEnvironmentName(): string | undefined; /** * If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. */ set pullRequestEnvironmentName(value: string | undefined); /** * Describes the current stage for the branch. */ get stage(): string | undefined; /** * Describes the current stage for the branch. */ set stage(value: string | undefined); /** * The tag for the branch. */ get tagsRaw(): Array<cdk.CfnTag> | undefined; /** * The tag for the branch. */ set tagsRaw(value: Array<cdk.CfnTag> | undefined); /** * ARN for a branch, part of an Amplify App. * * @cloudformationAttribute Arn */ get attrArn(): string; /** * Name for a branch, part of an Amplify App. * * @cloudformationAttribute BranchName */ get attrBranchName(): string; protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnBranch { /** * The EnvironmentVariable property type sets environment variables for a specific branch. * * Environment variables are key-value pairs that are available at build time. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-environmentvariable.html */ interface EnvironmentVariableProperty { /** * The environment variable name. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-environmentvariable.html#cfn-amplify-branch-environmentvariable-name */ readonly name: string; /** * The environment variable value. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-environmentvariable.html#cfn-amplify-branch-environmentvariable-value */ readonly value: string; } /** * Use the BasicAuthConfig property type to set password protection for a specific branch. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html */ interface BasicAuthConfigProperty { /** * Enables basic authorization for the branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html#cfn-amplify-branch-basicauthconfig-enablebasicauth */ readonly enableBasicAuth?: boolean | cdk.IResolvable; /** * The password for basic authorization. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html#cfn-amplify-branch-basicauthconfig-password */ readonly password: string; /** * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html#cfn-amplify-branch-basicauthconfig-username */ readonly username: string; } /** * Describes the backend associated with an Amplify `Branch` . * * This property is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-backend.html */ interface BackendProperty { /** * The Amazon Resource Name (ARN) for the CloudFormation stack. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-backend.html#cfn-amplify-branch-backend-stackarn */ readonly stackArn?: string; } } /** * Properties for defining a `CfnBranch` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html */ export interface CfnBranchProps { /** * The unique ID for an Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-appid */ readonly appId: string; /** * The backend for a `Branch` of an Amplify app. Use for a backend created from an CloudFormation stack. * * This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-backend */ readonly backend?: CfnBranch.BackendProperty | cdk.IResolvable; /** * The basic authorization credentials for a branch of an Amplify app. * * You must base64-encode the authorization credentials and provide them in the format `user:password` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-basicauthconfig */ readonly basicAuthConfig?: CfnBranch.BasicAuthConfigProperty | cdk.IResolvable; /** * The name for the branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-branchname */ readonly branchName: string; /** * The build specification (build spec) for the branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-buildspec */ readonly buildSpec?: string; /** * The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. * * The SSR 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](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html) in the *Amplify User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-computerolearn */ readonly computeRoleArn?: string; /** * The description for the branch that is part of an Amplify app. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-description */ readonly description?: string; /** * Enables auto building for the branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-enableautobuild */ readonly enableAutoBuild?: boolean | cdk.IResolvable; /** * Enables performance mode for the branch. * * Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-enableperformancemode */ readonly enablePerformanceMode?: boolean | cdk.IResolvable; /** * Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. * * If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch. * * To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the `PullRequestEnvironmentName` property. * * For more information, see [Web Previews](https://docs.aws.amazon.com/amplify/latest/userguide/pr-previews.html) in the *AWS Amplify Hosting User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-enablepullrequestpreview */ readonly enablePullRequestPreview?: boolean | cdk.IResolvable; /** * Specifies whether the skew protection feature is enabled for the branch. * * Deployment skew protection is available to Amplify applications to eliminate version skew issues between client and servers in web applications. When you apply skew protection to a branch, you can ensure that your clients always interact with the correct version of server-side assets, regardless of when a deployment occurs. For more information about skew protection, see [Skew protection for Amplify deployments](https://docs.aws.amazon.com/amplify/latest/userguide/skew-protection.html) in the *Amplify User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-enableskewprotection */ readonly enableSkewProtection?: boolean | cdk.IResolvable; /** * The environment variables for the branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-environmentvariables */ readonly environmentVariables?: Array<CfnBranch.EnvironmentVariableProperty | cdk.IResolvable> | cdk.IResolvable; /** * The framework for the branch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-framework */ readonly framework?: string; /** * If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. * * For example, you could specify an environment named `prod` , `test` , or `dev` that you initialized with the Amplify CLI and mapped to this branch. * * To enable pull request previews, set the `EnablePullRequestPreview` property to `true` . * * If you don't specify an environment, Amplify Hosting provides backend support f