Interface ICfnAppProps
Properties for defining a CfnApp
.
Namespace: Amazon.CDK.AWS.Amplify
Assembly: Amazon.CDK.AWS.Amplify.dll
Syntax (csharp)
public interface ICfnAppProps
Syntax (vb)
Public Interface ICfnAppProps
Remarks
Link: 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",
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. |
CustomHeaders | The custom HTTP headers for an Amplify app. |
CustomRules | The custom rewrite and redirect rules for an Amplify app. |
Description | The description for an Amplify app. |
EnableBranchAutoDeletion | Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository. |
EnvironmentVariables | The environment variables map for an Amplify app. |
IamServiceRole | The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name (ARN) of the Amplify app. |
Name | The name for an 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 repository for an 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 .
Length Constraints: Minimum length of 1. Maximum length of 255.
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
Length Constraints: Minimum length of 1. Maximum length of 25000.
Pattern: (?s).+
CustomHeaders
The custom HTTP headers for an Amplify app.
virtual string CustomHeaders { get; }
Property Value
System.String
Remarks
Length Constraints: Minimum length of 0. Maximum length of 25000.
Pattern: (?s).*
CustomRules
The custom rewrite and redirect rules for an Amplify app.
virtual object CustomRules { get; }
Property Value
System.Object
Remarks
Description
The description for an Amplify app.
virtual string Description { get; }
Property Value
System.String
Remarks
Length Constraints: Maximum length of 1000.
Pattern: (?s).*
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 map for an Amplify app.
virtual object EnvironmentVariables { get; }
Property Value
System.Object
Remarks
IamServiceRole
The 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
Length Constraints: Minimum length of 0. Maximum length of 1000.
Pattern: (?s).*
Name
The name for an Amplify app.
string Name { get; }
Property Value
System.String
Remarks
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: (?s).+
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 .
Length Constraints: Maximum length of 1000.
Pattern: (?s).*
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
.
Repository
The repository for an Amplify app.
virtual string Repository { get; }
Property Value
System.String