-
Notifications
You must be signed in to change notification settings - Fork 17
/
awsamplify_BranchOptions.go
71 lines (68 loc) · 2.78 KB
/
awsamplify_BranchOptions.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package awsamplify
import (
"github.com/aws/aws-cdk-go/awscdk/awscodebuild"
"github.com/aws/aws-cdk-go/awscdk/awss3assets"
)
// Options to add a branch to an application.
//
// Example:
// var amplifyApp app
//
//
// master := amplifyApp.addBranch(jsii.String("master")) // `id` will be used as repo branch name
// dev := amplifyApp.addBranch(jsii.String("dev"), &branchOptions{
// performanceMode: jsii.Boolean(true),
// })
// dev.addEnvironment(jsii.String("STAGE"), jsii.String("dev"))
//
// Experimental.
type BranchOptions struct {
// Asset for deployment.
//
// The Amplify app must not have a sourceCodeProvider configured as this resource uses Amplify's
// startDeployment API to initiate and deploy a S3 asset onto the App.
// Experimental.
Asset awss3assets.Asset `field:"optional" json:"asset" yaml:"asset"`
// Whether to enable auto building for the branch.
// Experimental.
AutoBuild *bool `field:"optional" json:"autoBuild" yaml:"autoBuild"`
// The Basic Auth configuration.
//
// Use this to set password protection for
// the branch.
// Experimental.
BasicAuth BasicAuth `field:"optional" json:"basicAuth" yaml:"basicAuth"`
// The name of the branch.
// Experimental.
BranchName *string `field:"optional" json:"branchName" yaml:"branchName"`
// BuildSpec for the branch.
// See: https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html
//
// Experimental.
BuildSpec awscodebuild.BuildSpec `field:"optional" json:"buildSpec" yaml:"buildSpec"`
// A description for the branch.
// Experimental.
Description *string `field:"optional" json:"description" yaml:"description"`
// Environment variables for the branch.
//
// All environment variables that you add are encrypted to prevent rogue
// access so you can use them to store secret information.
// Experimental.
EnvironmentVariables *map[string]*string `field:"optional" json:"environmentVariables" yaml:"environmentVariables"`
// 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.
// Experimental.
PerformanceMode *bool `field:"optional" json:"performanceMode" yaml:"performanceMode"`
// The dedicated backend environment for the pull request previews.
// Experimental.
PullRequestEnvironmentName *string `field:"optional" json:"pullRequestEnvironmentName" yaml:"pullRequestEnvironmentName"`
// Whether to enable pull request preview for the branch.
// Experimental.
PullRequestPreview *bool `field:"optional" json:"pullRequestPreview" yaml:"pullRequestPreview"`
// Stage for the branch.
// Experimental.
Stage *string `field:"optional" json:"stage" yaml:"stage"`
}