Class: AWSCDK::Lambda::ParamsAndSecretsOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::ParamsAndSecretsOptions
- Defined in:
- lambda/params_and_secrets_options.rb
Overview
Parameters and Secrets Extension configuration options.
Instance Attribute Summary collapse
-
#cache_enabled ⇒ Boolean?
readonly
Whether the Parameters and Secrets Extension will cache parameters and secrets.
-
#cache_size ⇒ Numeric?
readonly
The maximum number of secrets and parameters to cache.
-
#http_port ⇒ Numeric?
readonly
The port for the local HTTP server.
-
#log_level ⇒ AWSCDK::Lambda::ParamsAndSecretsLogLevel?
readonly
The level of logging provided by the Parameters and Secrets Extension.
-
#max_connections ⇒ Numeric?
readonly
The maximum number of connection for HTTP clients that the Parameters and Secrets Extension uses to make requests to Parameter Store or Secrets Manager.
-
#parameter_store_timeout ⇒ AWSCDK::Duration?
readonly
The timeout for requests to Parameter Store.
-
#parameter_store_ttl ⇒ AWSCDK::Duration?
readonly
The time-to-live of a parameter in the cache.
-
#secrets_manager_timeout ⇒ AWSCDK::Duration?
readonly
The timeout for requests to Secrets Manager.
-
#secrets_manager_ttl ⇒ AWSCDK::Duration?
readonly
The time-to-live of a secret in the cache.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_enabled: nil, cache_size: nil, http_port: nil, log_level: nil, max_connections: nil, parameter_store_timeout: nil, parameter_store_ttl: nil, secrets_manager_timeout: nil, secrets_manager_ttl: nil) ⇒ ParamsAndSecretsOptions
constructor
A new instance of ParamsAndSecretsOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cache_enabled: nil, cache_size: nil, http_port: nil, log_level: nil, max_connections: nil, parameter_store_timeout: nil, parameter_store_ttl: nil, secrets_manager_timeout: nil, secrets_manager_ttl: nil) ⇒ ParamsAndSecretsOptions
Returns a new instance of ParamsAndSecretsOptions.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lambda/params_and_secrets_options.rb', line 16 def initialize(cache_enabled: nil, cache_size: nil, http_port: nil, log_level: nil, max_connections: nil, parameter_store_timeout: nil, parameter_store_ttl: nil, secrets_manager_timeout: nil, secrets_manager_ttl: nil) @cache_enabled = cache_enabled Jsii::Type.check_type(@cache_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "cacheEnabled") unless @cache_enabled.nil? @cache_size = cache_size Jsii::Type.check_type(@cache_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "cacheSize") unless @cache_size.nil? @http_port = http_port Jsii::Type.check_type(@http_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "httpPort") unless @http_port.nil? @log_level = log_level Jsii::Type.check_type(@log_level, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlBhcmFtc0FuZFNlY3JldHNMb2dMZXZlbCJ9")), "logLevel") unless @log_level.nil? @max_connections = max_connections Jsii::Type.check_type(@max_connections, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxConnections") unless @max_connections.nil? @parameter_store_timeout = parameter_store_timeout Jsii::Type.check_type(@parameter_store_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "parameterStoreTimeout") unless @parameter_store_timeout.nil? @parameter_store_ttl = parameter_store_ttl Jsii::Type.check_type(@parameter_store_ttl, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "parameterStoreTtl") unless @parameter_store_ttl.nil? @secrets_manager_timeout = secrets_manager_timeout Jsii::Type.check_type(@secrets_manager_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "secretsManagerTimeout") unless @secrets_manager_timeout.nil? @secrets_manager_ttl = secrets_manager_ttl Jsii::Type.check_type(@secrets_manager_ttl, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "secretsManagerTtl") unless @secrets_manager_ttl.nil? end |
Instance Attribute Details
#cache_enabled ⇒ Boolean? (readonly)
Default: true
Whether the Parameters and Secrets Extension will cache parameters and secrets.
41 42 43 |
# File 'lambda/params_and_secrets_options.rb', line 41 def cache_enabled @cache_enabled end |
#cache_size ⇒ Numeric? (readonly)
Default: 1000
The maximum number of secrets and parameters to cache.
Must be a value from 0 to 1000. A value of 0 means there is no caching.
Note: This variable is ignored if parameterStoreTtl and secretsManagerTtl are 0.
52 53 54 |
# File 'lambda/params_and_secrets_options.rb', line 52 def cache_size @cache_size end |
#http_port ⇒ Numeric? (readonly)
Default: 2773
The port for the local HTTP server.
Valid port numbers are 1 - 65535.
59 60 61 |
# File 'lambda/params_and_secrets_options.rb', line 59 def http_port @http_port end |
#log_level ⇒ AWSCDK::Lambda::ParamsAndSecretsLogLevel? (readonly)
Default: - Logging level will be info
The level of logging provided by the Parameters and Secrets Extension.
Note: Set to debug to see the cache configuration.
66 67 68 |
# File 'lambda/params_and_secrets_options.rb', line 66 def log_level @log_level end |
#max_connections ⇒ Numeric? (readonly)
Default: 3
The maximum number of connection for HTTP clients that the Parameters and Secrets Extension uses to make requests to Parameter Store or Secrets Manager.
There is no maximum limit. Minimum is 1.
Note: Every running copy of this Lambda function may open the number of connections specified by this property. Thus, the total number of connections may exceed this number.
77 78 79 |
# File 'lambda/params_and_secrets_options.rb', line 77 def max_connections @max_connections end |
#parameter_store_timeout ⇒ AWSCDK::Duration? (readonly)
Default: 0
The timeout for requests to Parameter Store.
A value of 0 means that there is no timeout.
85 86 87 |
# File 'lambda/params_and_secrets_options.rb', line 85 def parameter_store_timeout @parameter_store_timeout end |
#parameter_store_ttl ⇒ AWSCDK::Duration? (readonly)
Default: 300 seconds
The time-to-live of a parameter in the cache.
A value of 0 means there is no caching. The maximum time-to-live is 300 seconds.
Note: This variable is ignored if cacheSize is 0.
95 96 97 |
# File 'lambda/params_and_secrets_options.rb', line 95 def parameter_store_ttl @parameter_store_ttl end |
#secrets_manager_timeout ⇒ AWSCDK::Duration? (readonly)
Default: 0
The timeout for requests to Secrets Manager.
A value of 0 means that there is no timeout.
103 104 105 |
# File 'lambda/params_and_secrets_options.rb', line 103 def secrets_manager_timeout @secrets_manager_timeout end |
#secrets_manager_ttl ⇒ AWSCDK::Duration? (readonly)
Default: 300 seconds
The time-to-live of a secret in the cache.
A value of 0 means there is no caching. The maximum time-to-live is 300 seconds.
Note: This variable is ignored if cacheSize is 0.
113 114 115 |
# File 'lambda/params_and_secrets_options.rb', line 113 def secrets_manager_ttl @secrets_manager_ttl end |
Class Method Details
.jsii_properties ⇒ Object
115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lambda/params_and_secrets_options.rb', line 115 def self.jsii_properties { :cache_enabled => "cacheEnabled", :cache_size => "cacheSize", :http_port => "httpPort", :log_level => "logLevel", :max_connections => "maxConnections", :parameter_store_timeout => "parameterStoreTimeout", :parameter_store_ttl => "parameterStoreTtl", :secrets_manager_timeout => "secretsManagerTimeout", :secrets_manager_ttl => "secretsManagerTtl", } end |
Instance Method Details
#to_jsii ⇒ Object
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lambda/params_and_secrets_options.rb', line 129 def to_jsii result = {} result.merge!({ "cacheEnabled" => @cache_enabled, "cacheSize" => @cache_size, "httpPort" => @http_port, "logLevel" => @log_level, "maxConnections" => @max_connections, "parameterStoreTimeout" => @parameter_store_timeout, "parameterStoreTtl" => @parameter_store_ttl, "secretsManagerTimeout" => @secrets_manager_timeout, "secretsManagerTtl" => @secrets_manager_ttl, }) result.compact end |