Interface ICfnAppProps
Properties for defining a CfnApp
.
Namespace: Amazon.CDK.AWS.Amplify
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnAppProps
Syntax (vb)
Public Interface ICfnAppProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Amplify;
var cfnAppProps = new CfnAppProps {
Name = "name",
// the properties below are optional
AccessToken = "accessToken",
AutoBranchCreationConfig = new AutoBranchCreationConfigProperty {
AutoBranchCreationPatterns = new [] { "autoBranchCreationPatterns" },
BasicAuthConfig = new BasicAuthConfigProperty {
EnableBasicAuth = false,
Password = "password",
Username = "username"
},
BuildSpec = "buildSpec",
EnableAutoBranchCreation = false,
EnableAutoBuild = false,
EnablePerformanceMode = false,
EnablePullRequestPreview = false,
EnvironmentVariables = new [] { new EnvironmentVariableProperty {
Name = "name",
Value = "value"
} },
Framework = "framework",
PullRequestEnvironmentName = "pullRequestEnvironmentName",
Stage = "stage"
},
BasicAuthConfig = new BasicAuthConfigProperty {
EnableBasicAuth = false,
Password = "password",
Username = "username"
},
BuildSpec = "buildSpec",
CacheConfig = new CacheConfigProperty {
Type = "type"
},
CustomHeaders = "customHeaders",
CustomRules = new [] { new CustomRuleProperty {
Source = "source",
Target = "target",
// the properties below are optional
Condition = "condition",
Status = "status"
} },
Description = "description",
EnableBranchAutoDeletion = false,
EnvironmentVariables = new [] { new EnvironmentVariableProperty {
Name = "name",
Value = "value"
} },
IamServiceRole = "iamServiceRole",
OauthToken = "oauthToken",
Platform = "platform",
Repository = "repository",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Properties
AccessToken | The personal access token for a GitHub repository for an Amplify app. |
AutoBranchCreationConfig | Sets the configuration for your automatic branch creation. |
BasicAuthConfig | The credentials for basic authorization for an Amplify app. |
BuildSpec | The build specification (build spec) for an Amplify app. |
CacheConfig | The cache configuration for the Amplify app. |
CustomHeaders | The custom HTTP headers for an Amplify app. |
CustomRules | The custom rewrite and redirect rules for an Amplify app. |
Description | The description of the Amplify app. |
EnableBranchAutoDeletion | Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository. |
EnvironmentVariables | The environment variables for the Amplify app. |
IamServiceRole | AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app. |
Name | The name of the Amplify app. |
OauthToken | The OAuth token for a third-party source control system for an Amplify app. |
Platform | The platform for the Amplify app. |
Repository | The Git repository for the Amplify app. |
Tags | The tag for an Amplify app. |
Properties
AccessToken
The personal access token for a GitHub repository for an Amplify app.
virtual string AccessToken { get; }
Property Value
System.String
Remarks
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 in the Amplify User Guide .
AutoBranchCreationConfig
Sets the configuration for your automatic branch creation.
virtual object AutoBranchCreationConfig { get; }
Property Value
System.Object
Remarks
BasicAuthConfig
The credentials for basic authorization for an Amplify app.
virtual object BasicAuthConfig { get; }
Property Value
System.Object
Remarks
You must base64-encode the authorization credentials and provide them in the format user:password
.
BuildSpec
The build specification (build spec) for an Amplify app.
virtual string BuildSpec { get; }
Property Value
System.String
Remarks
CacheConfig
The cache configuration for the Amplify app.
virtual object CacheConfig { get; }
Property Value
System.Object
Remarks
If you don't specify the cache configuration type
, Amplify uses the default AMPLIFY_MANAGED
setting.
CustomHeaders
The custom HTTP headers for an Amplify app.
virtual string CustomHeaders { get; }
Property Value
System.String
Remarks
CustomRules
The custom rewrite and redirect rules for an Amplify app.
virtual object CustomRules { get; }
Property Value
System.Object
Remarks
Description
The description of the Amplify app.
virtual string Description { get; }
Property Value
System.String
Remarks
EnableBranchAutoDeletion
Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository.
virtual object EnableBranchAutoDeletion { get; }
Property Value
System.Object
Remarks
EnvironmentVariables
The environment variables for the Amplify app.
virtual object EnvironmentVariables { get; }
Property Value
System.Object
Remarks
For a list of the environment variables that are accessible to Amplify by default, see Amplify Environment variables in the Amplify Hosting User Guide .
IamServiceRole
AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app.
virtual string IamServiceRole { get; }
Property Value
System.String
Remarks
Name
The name of the Amplify app.
string Name { get; }
Property Value
System.String
Remarks
OauthToken
The OAuth token for a third-party source control system for an Amplify app.
virtual string OauthToken { get; }
Property Value
System.String
Remarks
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 in the Amplify User Guide .
Platform
The platform for the Amplify app.
virtual string Platform { get; }
Property Value
System.String
Remarks
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 in the Amplify Hosting User Guide .
Repository
The Git repository for the Amplify app.
virtual string Repository { get; }
Property Value
System.String