Class: AWSCDK::OpsWorks::CfnAppProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::OpsWorks::CfnAppProps
- Defined in:
- ops_works/cfn_app_props.rb
Overview
Properties for defining a CfnApp.
Instance Attribute Summary collapse
-
#app_source ⇒ AWSCDK::IResolvable, ...
readonly
A
Sourceobject that specifies the app repository. -
#attributes ⇒ AWSCDK::IResolvable, ...
readonly
One or more user-defined key/value pairs to be added to the stack attributes.
-
#data_sources ⇒ AWSCDK::IResolvable, ...
readonly
The app's data source.
-
#description ⇒ String?
readonly
A description of the app.
-
#domains ⇒ Array<String>?
readonly
The app virtual host settings, with multiple domains separated by commas.
-
#enable_ssl ⇒ Boolean, ...
readonly
Whether to enable SSL for the app.
-
#environment ⇒ AWSCDK::IResolvable, ...
readonly
An array of
EnvironmentVariableobjects that specify environment variables to be associated with the app. -
#name ⇒ String
readonly
The app name.
-
#shortname ⇒ String?
readonly
The app's short name.
-
#ssl_configuration ⇒ AWSCDK::IResolvable, ...
readonly
An
SslConfigurationobject with the SSL configuration. -
#stack_id ⇒ String
readonly
The stack ID.
-
#type ⇒ String
readonly
The app type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, stack_id:, type:, app_source: nil, attributes: nil, data_sources: nil, description: nil, domains: nil, enable_ssl: nil, environment: nil, shortname: nil, ssl_configuration: nil) ⇒ CfnAppProps
constructor
A new instance of CfnAppProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, stack_id:, type:, app_source: nil, attributes: nil, data_sources: nil, description: nil, domains: nil, enable_ssl: nil, environment: nil, shortname: nil, ssl_configuration: nil) ⇒ CfnAppProps
Returns a new instance of CfnAppProps.
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 |
# File 'ops_works/cfn_app_props.rb', line 21 def initialize(name:, stack_id:, type:, app_source: nil, attributes: nil, data_sources: nil, description: nil, domains: nil, enable_ssl: nil, environment: nil, shortname: nil, ssl_configuration: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @stack_id = stack_id Jsii::Type.check_type(@stack_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackId") @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @app_source = app_source.is_a?(Hash) ? ::AWSCDK::OpsWorks::CfnApp::SourceProperty.new(**app_source.transform_keys(&:to_sym)) : app_source Jsii::Type.check_type(@app_source, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vcHN3b3Jrcy5DZm5BcHAuU291cmNlUHJvcGVydHkifV19fQ==")), "appSource") unless @app_source.nil? @attributes = attributes Jsii::Type.check_type(@attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "attributes") unless @attributes.nil? @data_sources = data_sources Jsii::Type.check_type(@data_sources, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfb3Bzd29ya3MuQ2ZuQXBwLkRhdGFTb3VyY2VQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "dataSources") unless @data_sources.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @domains = domains Jsii::Type.check_type(@domains, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "domains") unless @domains.nil? @enable_ssl = enable_ssl Jsii::Type.check_type(@enable_ssl, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableSsl") unless @enable_ssl.nil? @environment = environment Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfb3Bzd29ya3MuQ2ZuQXBwLkVudmlyb25tZW50VmFyaWFibGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "environment") unless @environment.nil? @shortname = shortname Jsii::Type.check_type(@shortname, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "shortname") unless @shortname.nil? @ssl_configuration = ssl_configuration.is_a?(Hash) ? ::AWSCDK::OpsWorks::CfnApp::SSLConfigurationProperty.new(**ssl_configuration.transform_keys(&:to_sym)) : ssl_configuration Jsii::Type.check_type(@ssl_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vcHN3b3Jrcy5DZm5BcHAuU3NsQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "sslConfiguration") unless @ssl_configuration.nil? end |
Instance Attribute Details
#app_source ⇒ AWSCDK::IResolvable, ... (readonly)
A Source object that specifies the app repository.
69 70 71 |
# File 'ops_works/cfn_app_props.rb', line 69 def app_source @app_source end |
#attributes ⇒ AWSCDK::IResolvable, ... (readonly)
One or more user-defined key/value pairs to be added to the stack attributes.
74 75 76 |
# File 'ops_works/cfn_app_props.rb', line 74 def attributes @attributes end |
#data_sources ⇒ AWSCDK::IResolvable, ... (readonly)
The app's data source.
79 80 81 |
# File 'ops_works/cfn_app_props.rb', line 79 def data_sources @data_sources end |
#description ⇒ String? (readonly)
A description of the app.
84 85 86 |
# File 'ops_works/cfn_app_props.rb', line 84 def description @description end |
#domains ⇒ Array<String>? (readonly)
The app virtual host settings, with multiple domains separated by commas.
For example: 'www.example.com, example.com'
91 92 93 |
# File 'ops_works/cfn_app_props.rb', line 91 def domains @domains end |
#enable_ssl ⇒ Boolean, ... (readonly)
Whether to enable SSL for the app.
96 97 98 |
# File 'ops_works/cfn_app_props.rb', line 96 def enable_ssl @enable_ssl end |
#environment ⇒ AWSCDK::IResolvable, ... (readonly)
An array of EnvironmentVariable objects that specify environment variables to be associated with the app.
After you deploy the app, these variables are defined on the associated app server instance. For more information, see Environment Variables .
There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variables' names, values, and protected flag values - cannot exceed 20 KB. This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, "Environment: is too large (maximum is 20KB)."
If you have specified one or more environment variables, you cannot modify the stack's Chef version.
107 108 109 |
# File 'ops_works/cfn_app_props.rb', line 107 def environment @environment end |
#name ⇒ String (readonly)
The app name.
52 53 54 |
# File 'ops_works/cfn_app_props.rb', line 52 def name @name end |
#shortname ⇒ String? (readonly)
The app's short name.
112 113 114 |
# File 'ops_works/cfn_app_props.rb', line 112 def shortname @shortname end |
#ssl_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
An SslConfiguration object with the SSL configuration.
117 118 119 |
# File 'ops_works/cfn_app_props.rb', line 117 def ssl_configuration @ssl_configuration end |
#stack_id ⇒ String (readonly)
The stack ID.
57 58 59 |
# File 'ops_works/cfn_app_props.rb', line 57 def stack_id @stack_id end |
#type ⇒ String (readonly)
The app type.
Each supported type is associated with a particular layer. For example, PHP applications are associated with a PHP layer. OpsWorks Stacks deploys an application to those instances that are members of the corresponding layer. If your app isn't one of the standard types, or you prefer to implement your own Deploy recipes, specify other .
64 65 66 |
# File 'ops_works/cfn_app_props.rb', line 64 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'ops_works/cfn_app_props.rb', line 119 def self.jsii_properties { :name => "name", :stack_id => "stackId", :type => "type", :app_source => "appSource", :attributes => "attributes", :data_sources => "dataSources", :description => "description", :domains => "domains", :enable_ssl => "enableSsl", :environment => "environment", :shortname => "shortname", :ssl_configuration => "sslConfiguration", } end |
Instance Method Details
#to_jsii ⇒ Object
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'ops_works/cfn_app_props.rb', line 136 def to_jsii result = {} result.merge!({ "name" => @name, "stackId" => @stack_id, "type" => @type, "appSource" => @app_source, "attributes" => @attributes, "dataSources" => @data_sources, "description" => @description, "domains" => @domains, "enableSsl" => @enable_ssl, "environment" => @environment, "shortname" => @shortname, "sslConfiguration" => @ssl_configuration, }) result.compact end |