Class: AWSCDK::Amplify::CfnApp::AutoBranchCreationConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Amplify::CfnApp::AutoBranchCreationConfigProperty
- Defined in:
- amplify/cfn_app.rb
Overview
Use the AutoBranchCreationConfig property type to automatically create branches that match a certain pattern.
Instance Attribute Summary collapse
-
#auto_branch_creation_patterns ⇒ Array<String>?
readonly
Automated branch creation glob patterns for the Amplify app.
-
#basic_auth_config ⇒ AWSCDK::IResolvable, ...
readonly
Sets password protection for your auto created branch.
-
#build_spec ⇒ String?
readonly
The build specification (build spec) for the autocreated branch.
-
#enable_auto_branch_creation ⇒ Boolean, ...
readonly
Enables automated branch creation for the Amplify app.
-
#enable_auto_build ⇒ Boolean, ...
readonly
Enables auto building for the auto created branch.
-
#enable_performance_mode ⇒ Boolean, ...
readonly
Enables performance mode for the branch.
-
#enable_pull_request_preview ⇒ Boolean, ...
readonly
Sets whether pull request previews are enabled for each branch that Amplify Hosting automatically creates for your app.
-
#environment_variables ⇒ AWSCDK::IResolvable, ...
readonly
The environment variables for the autocreated branch.
-
#framework ⇒ String?
readonly
The framework for the autocreated branch.
-
#pull_request_environment_name ⇒ String?
readonly
If pull request previews are enabled, you can use this property to specify a dedicated backend environment for your previews.
-
#stage ⇒ String?
readonly
Stage for the auto created branch.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auto_branch_creation_patterns: nil, basic_auth_config: nil, build_spec: nil, enable_auto_branch_creation: nil, enable_auto_build: nil, enable_performance_mode: nil, enable_pull_request_preview: nil, environment_variables: nil, framework: nil, pull_request_environment_name: nil, stage: nil) ⇒ AutoBranchCreationConfigProperty
constructor
A new instance of AutoBranchCreationConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auto_branch_creation_patterns: nil, basic_auth_config: nil, build_spec: nil, enable_auto_branch_creation: nil, enable_auto_build: nil, enable_performance_mode: nil, enable_pull_request_preview: nil, environment_variables: nil, framework: nil, pull_request_environment_name: nil, stage: nil) ⇒ AutoBranchCreationConfigProperty
Returns a new instance of AutoBranchCreationConfigProperty.
778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
# File 'amplify/cfn_app.rb', line 778 def initialize(auto_branch_creation_patterns: nil, basic_auth_config: nil, build_spec: nil, enable_auto_branch_creation: nil, enable_auto_build: nil, enable_performance_mode: nil, enable_pull_request_preview: nil, environment_variables: nil, framework: nil, pull_request_environment_name: nil, stage: nil) @auto_branch_creation_patterns = auto_branch_creation_patterns Jsii::Type.check_type(@auto_branch_creation_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "autoBranchCreationPatterns") unless @auto_branch_creation_patterns.nil? @basic_auth_config = basic_auth_config.is_a?(Hash) ? ::AWSCDK::Amplify::CfnApp::BasicAuthConfigProperty.new(**basic_auth_config.transform_keys(&:to_sym)) : basic_auth_config Jsii::Type.check_type(@basic_auth_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5LkNmbkFwcC5CYXNpY0F1dGhDb25maWdQcm9wZXJ0eSJ9XX19")), "basicAuthConfig") unless @basic_auth_config.nil? @build_spec = build_spec Jsii::Type.check_type(@build_spec, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "buildSpec") unless @build_spec.nil? @enable_auto_branch_creation = enable_auto_branch_creation Jsii::Type.check_type(@enable_auto_branch_creation, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableAutoBranchCreation") unless @enable_auto_branch_creation.nil? @enable_auto_build = enable_auto_build Jsii::Type.check_type(@enable_auto_build, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableAutoBuild") unless @enable_auto_build.nil? @enable_performance_mode = enable_performance_mode Jsii::Type.check_type(@enable_performance_mode, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enablePerformanceMode") unless @enable_performance_mode.nil? @enable_pull_request_preview = enable_pull_request_preview Jsii::Type.check_type(@enable_pull_request_preview, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enablePullRequestPreview") unless @enable_pull_request_preview.nil? @environment_variables = environment_variables Jsii::Type.check_type(@environment_variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYW1wbGlmeS5DZm5BcHAuRW52aXJvbm1lbnRWYXJpYWJsZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "environmentVariables") unless @environment_variables.nil? @framework = framework Jsii::Type.check_type(@framework, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "framework") unless @framework.nil? @pull_request_environment_name = pull_request_environment_name Jsii::Type.check_type(@pull_request_environment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pullRequestEnvironmentName") unless @pull_request_environment_name.nil? @stage = stage Jsii::Type.check_type(@stage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stage") unless @stage.nil? end |
Instance Attribute Details
#auto_branch_creation_patterns ⇒ Array<String>? (readonly)
Automated branch creation glob patterns for the Amplify app.
807 808 809 |
# File 'amplify/cfn_app.rb', line 807 def auto_branch_creation_patterns @auto_branch_creation_patterns end |
#basic_auth_config ⇒ AWSCDK::IResolvable, ... (readonly)
Sets password protection for your auto created branch.
812 813 814 |
# File 'amplify/cfn_app.rb', line 812 def basic_auth_config @basic_auth_config end |
#build_spec ⇒ String? (readonly)
The build specification (build spec) for the autocreated branch.
817 818 819 |
# File 'amplify/cfn_app.rb', line 817 def build_spec @build_spec end |
#enable_auto_branch_creation ⇒ Boolean, ... (readonly)
Enables automated branch creation for the Amplify app.
822 823 824 |
# File 'amplify/cfn_app.rb', line 822 def enable_auto_branch_creation @enable_auto_branch_creation end |
#enable_auto_build ⇒ Boolean, ... (readonly)
Enables auto building for the auto created branch.
827 828 829 |
# File 'amplify/cfn_app.rb', line 827 def enable_auto_build @enable_auto_build end |
#enable_performance_mode ⇒ Boolean, ... (readonly)
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.
834 835 836 |
# File 'amplify/cfn_app.rb', line 834 def enable_performance_mode @enable_performance_mode end |
#enable_pull_request_preview ⇒ Boolean, ... (readonly)
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 in the AWS Amplify Hosting User Guide .
845 846 847 |
# File 'amplify/cfn_app.rb', line 845 def enable_pull_request_preview @enable_pull_request_preview end |
#environment_variables ⇒ AWSCDK::IResolvable, ... (readonly)
The environment variables for the autocreated branch.
850 851 852 |
# File 'amplify/cfn_app.rb', line 850 def environment_variables @environment_variables end |
#framework ⇒ String? (readonly)
The framework for the autocreated branch.
855 856 857 |
# File 'amplify/cfn_app.rb', line 855 def framework @framework end |
#pull_request_environment_name ⇒ String? (readonly)
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 in the AWS Amplify Hosting User Guide .
868 869 870 |
# File 'amplify/cfn_app.rb', line 868 def pull_request_environment_name @pull_request_environment_name end |
#stage ⇒ String? (readonly)
Stage for the auto created branch.
873 874 875 |
# File 'amplify/cfn_app.rb', line 873 def stage @stage end |
Class Method Details
.jsii_properties ⇒ Object
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 |
# File 'amplify/cfn_app.rb', line 875 def self.jsii_properties { :auto_branch_creation_patterns => "autoBranchCreationPatterns", :basic_auth_config => "basicAuthConfig", :build_spec => "buildSpec", :enable_auto_branch_creation => "enableAutoBranchCreation", :enable_auto_build => "enableAutoBuild", :enable_performance_mode => "enablePerformanceMode", :enable_pull_request_preview => "enablePullRequestPreview", :environment_variables => "environmentVariables", :framework => "framework", :pull_request_environment_name => "pullRequestEnvironmentName", :stage => "stage", } end |
Instance Method Details
#to_jsii ⇒ Object
891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 |
# File 'amplify/cfn_app.rb', line 891 def to_jsii result = {} result.merge!({ "autoBranchCreationPatterns" => @auto_branch_creation_patterns, "basicAuthConfig" => @basic_auth_config, "buildSpec" => @build_spec, "enableAutoBranchCreation" => @enable_auto_branch_creation, "enableAutoBuild" => @enable_auto_build, "enablePerformanceMode" => @enable_performance_mode, "enablePullRequestPreview" => @enable_pull_request_preview, "environmentVariables" => @environment_variables, "framework" => @framework, "pullRequestEnvironmentName" => @pull_request_environment_name, "stage" => @stage, }) result.compact end |