Class: AWSCDK::Amplify::CfnAppProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Amplify::CfnAppProps
- Defined in:
- amplify/cfn_app_props.rb
Overview
Properties for defining a CfnApp.
Instance Attribute Summary collapse
-
#access_token ⇒ String?
readonly
The personal access token for a GitHub repository for an Amplify app.
-
#auto_branch_creation_config ⇒ AWSCDK::IResolvable, ...
readonly
Sets the configuration for your automatic branch creation.
-
#basic_auth_config ⇒ AWSCDK::IResolvable, ...
readonly
The credentials for basic authorization for an Amplify app.
-
#build_spec ⇒ String?
readonly
The build specification (build spec) for an Amplify app.
-
#cache_config ⇒ AWSCDK::IResolvable, ...
readonly
The cache configuration for the Amplify app.
-
#compute_role_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the IAM role for an SSR app.
-
#custom_headers ⇒ String?
readonly
The custom HTTP headers for an Amplify app.
-
#custom_rules ⇒ AWSCDK::IResolvable, ...
readonly
The custom rewrite and redirect rules for an Amplify app.
-
#description ⇒ String?
readonly
The description of the Amplify app.
-
#enable_branch_auto_deletion ⇒ Boolean, ...
readonly
Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository.
-
#environment_variables ⇒ AWSCDK::IResolvable, ...
readonly
The environment variables for the Amplify app.
-
#iam_service_role ⇒ String, ...
readonly
AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app.
-
#job_config ⇒ AWSCDK::IResolvable, ...
readonly
The configuration details that apply to the jobs for an Amplify app.
-
#name ⇒ String
readonly
The name of the Amplify app.
-
#oauth_token ⇒ String?
readonly
The OAuth token for a third-party source control system for an Amplify app.
-
#platform ⇒ String?
readonly
The platform for the Amplify app.
-
#repository ⇒ String?
readonly
The Git repository for the Amplify app.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tag for an Amplify app.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, access_token: nil, auto_branch_creation_config: nil, basic_auth_config: nil, build_spec: nil, cache_config: nil, compute_role_arn: nil, custom_headers: nil, custom_rules: nil, description: nil, enable_branch_auto_deletion: nil, environment_variables: nil, iam_service_role: nil, job_config: nil, oauth_token: nil, platform: nil, repository: nil, tags: nil) ⇒ CfnAppProps
constructor
A new instance of CfnAppProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, access_token: nil, auto_branch_creation_config: nil, basic_auth_config: nil, build_spec: nil, cache_config: nil, compute_role_arn: nil, custom_headers: nil, custom_rules: nil, description: nil, enable_branch_auto_deletion: nil, environment_variables: nil, iam_service_role: nil, job_config: nil, oauth_token: nil, platform: nil, repository: nil, tags: nil) ⇒ CfnAppProps
Returns a new instance of CfnAppProps.
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 |
# File 'amplify/cfn_app_props.rb', line 27 def initialize(name:, access_token: nil, auto_branch_creation_config: nil, basic_auth_config: nil, build_spec: nil, cache_config: nil, compute_role_arn: nil, custom_headers: nil, custom_rules: nil, description: nil, enable_branch_auto_deletion: nil, environment_variables: nil, iam_service_role: nil, job_config: nil, oauth_token: nil, platform: nil, repository: nil, tags: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @access_token = access_token Jsii::Type.check_type(@access_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessToken") unless @access_token.nil? @auto_branch_creation_config = auto_branch_creation_config.is_a?(Hash) ? ::AWSCDK::Amplify::CfnApp::AutoBranchCreationConfigProperty.new(**auto_branch_creation_config.transform_keys(&:to_sym)) : auto_branch_creation_config Jsii::Type.check_type(@auto_branch_creation_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5LkNmbkFwcC5BdXRvQnJhbmNoQ3JlYXRpb25Db25maWdQcm9wZXJ0eSJ9XX19")), "autoBranchCreationConfig") unless @auto_branch_creation_config.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? @cache_config = cache_config.is_a?(Hash) ? ::AWSCDK::Amplify::CfnApp::CacheConfigProperty.new(**cache_config.transform_keys(&:to_sym)) : cache_config Jsii::Type.check_type(@cache_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5LkNmbkFwcC5DYWNoZUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "cacheConfig") unless @cache_config.nil? @compute_role_arn = compute_role_arn Jsii::Type.check_type(@compute_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "computeRoleArn") unless @compute_role_arn.nil? @custom_headers = custom_headers Jsii::Type.check_type(@custom_headers, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customHeaders") unless @custom_headers.nil? @custom_rules = custom_rules Jsii::Type.check_type(@custom_rules, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYW1wbGlmeS5DZm5BcHAuQ3VzdG9tUnVsZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "customRules") unless @custom_rules.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @enable_branch_auto_deletion = enable_branch_auto_deletion Jsii::Type.check_type(@enable_branch_auto_deletion, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableBranchAutoDeletion") unless @enable_branch_auto_deletion.nil? @environment_variables = environment_variables Jsii::Type.check_type(@environment_variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYW1wbGlmeS5DZm5BcHAuRW52aXJvbm1lbnRWYXJpYWJsZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "environmentVariables") unless @environment_variables.nil? @iam_service_role = iam_service_role Jsii::Type.check_type(@iam_service_role, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "iamServiceRole") unless @iam_service_role.nil? @job_config = job_config.is_a?(Hash) ? ::AWSCDK::Amplify::CfnApp::JobConfigProperty.new(**job_config.transform_keys(&:to_sym)) : job_config Jsii::Type.check_type(@job_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5LkNmbkFwcC5Kb2JDb25maWdQcm9wZXJ0eSJ9XX19")), "jobConfig") unless @job_config.nil? @oauth_token = oauth_token Jsii::Type.check_type(@oauth_token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "oauthToken") unless @oauth_token.nil? @platform = platform Jsii::Type.check_type(@platform, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "platform") unless @platform.nil? @repository = repository Jsii::Type.check_type(@repository, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "repository") unless @repository.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#access_token ⇒ String? (readonly)
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 in the Amplify User Guide .
83 84 85 |
# File 'amplify/cfn_app_props.rb', line 83 def access_token @access_token end |
#auto_branch_creation_config ⇒ AWSCDK::IResolvable, ... (readonly)
Sets the configuration for your automatic branch creation.
88 89 90 |
# File 'amplify/cfn_app_props.rb', line 88 def auto_branch_creation_config @auto_branch_creation_config end |
#basic_auth_config ⇒ AWSCDK::IResolvable, ... (readonly)
The credentials for basic authorization for an Amplify app.
You must base64-encode the authorization credentials and provide them in the format user:password .
95 96 97 |
# File 'amplify/cfn_app_props.rb', line 95 def basic_auth_config @basic_auth_config end |
#build_spec ⇒ String? (readonly)
The build specification (build spec) for an Amplify app.
100 101 102 |
# File 'amplify/cfn_app_props.rb', line 100 def build_spec @build_spec end |
#cache_config ⇒ AWSCDK::IResolvable, ... (readonly)
The cache configuration for the Amplify app.
If you don't specify the cache configuration type , Amplify uses the default AMPLIFY_MANAGED setting.
107 108 109 |
# File 'amplify/cfn_app_props.rb', line 107 def cache_config @cache_config end |
#compute_role_arn ⇒ String? (readonly)
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 in the Amplify User Guide .
114 115 116 |
# File 'amplify/cfn_app_props.rb', line 114 def compute_role_arn @compute_role_arn end |
#custom_headers ⇒ String? (readonly)
The custom HTTP headers for an Amplify app.
119 120 121 |
# File 'amplify/cfn_app_props.rb', line 119 def custom_headers @custom_headers end |
#custom_rules ⇒ AWSCDK::IResolvable, ... (readonly)
The custom rewrite and redirect rules for an Amplify app.
124 125 126 |
# File 'amplify/cfn_app_props.rb', line 124 def custom_rules @custom_rules end |
#description ⇒ String? (readonly)
The description of the Amplify app.
129 130 131 |
# File 'amplify/cfn_app_props.rb', line 129 def description @description end |
#enable_branch_auto_deletion ⇒ Boolean, ... (readonly)
Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository.
134 135 136 |
# File 'amplify/cfn_app_props.rb', line 134 def enable_branch_auto_deletion @enable_branch_auto_deletion end |
#environment_variables ⇒ AWSCDK::IResolvable, ... (readonly)
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 in the Amplify Hosting User Guide .
141 142 143 |
# File 'amplify/cfn_app_props.rb', line 141 def environment_variables @environment_variables end |
#iam_service_role ⇒ String, ... (readonly)
AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app.
146 147 148 |
# File 'amplify/cfn_app_props.rb', line 146 def iam_service_role @iam_service_role end |
#job_config ⇒ AWSCDK::IResolvable, ... (readonly)
The configuration details that apply to the jobs for an Amplify app.
151 152 153 |
# File 'amplify/cfn_app_props.rb', line 151 def job_config @job_config end |
#name ⇒ String (readonly)
The name of the Amplify app.
70 71 72 |
# File 'amplify/cfn_app_props.rb', line 70 def name @name end |
#oauth_token ⇒ String? (readonly)
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 in the Amplify User Guide .
164 165 166 |
# File 'amplify/cfn_app_props.rb', line 164 def oauth_token @oauth_token end |
#platform ⇒ String? (readonly)
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 base_directory 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 .
173 174 175 |
# File 'amplify/cfn_app_props.rb', line 173 def platform @platform end |
#repository ⇒ String? (readonly)
The Git repository for the Amplify app.
178 179 180 |
# File 'amplify/cfn_app_props.rb', line 178 def repository @repository end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tag for an Amplify app.
183 184 185 |
# File 'amplify/cfn_app_props.rb', line 183 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'amplify/cfn_app_props.rb', line 185 def self.jsii_properties { :name => "name", :access_token => "accessToken", :auto_branch_creation_config => "autoBranchCreationConfig", :basic_auth_config => "basicAuthConfig", :build_spec => "buildSpec", :cache_config => "cacheConfig", :compute_role_arn => "computeRoleArn", :custom_headers => "customHeaders", :custom_rules => "customRules", :description => "description", :enable_branch_auto_deletion => "enableBranchAutoDeletion", :environment_variables => "environmentVariables", :iam_service_role => "iamServiceRole", :job_config => "jobConfig", :oauth_token => "oauthToken", :platform => "platform", :repository => "repository", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'amplify/cfn_app_props.rb', line 208 def to_jsii result = {} result.merge!({ "name" => @name, "accessToken" => @access_token, "autoBranchCreationConfig" => @auto_branch_creation_config, "basicAuthConfig" => @basic_auth_config, "buildSpec" => @build_spec, "cacheConfig" => @cache_config, "computeRoleArn" => @compute_role_arn, "customHeaders" => @custom_headers, "customRules" => @custom_rules, "description" => @description, "enableBranchAutoDeletion" => @enable_branch_auto_deletion, "environmentVariables" => @environment_variables, "iamServiceRole" => @iam_service_role, "jobConfig" => @job_config, "oauthToken" => @oauth_token, "platform" => @platform, "repository" => @repository, "tags" => @tags, }) result.compact end |