Class: AWSCDK::AppSync::CachingConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppSync::CachingConfig
- Defined in:
- app_sync/caching_config.rb
Overview
CachingConfig for AppSync resolvers.
Instance Attribute Summary collapse
-
#caching_keys ⇒ Array<String>?
readonly
The caching keys for a resolver that has caching enabled.
-
#ttl ⇒ AWSCDK::Duration
readonly
The TTL in seconds for a resolver that has caching enabled.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ttl:, caching_keys: nil) ⇒ CachingConfig
constructor
A new instance of CachingConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(ttl:, caching_keys: nil) ⇒ CachingConfig
Returns a new instance of CachingConfig.
9 10 11 12 13 14 |
# File 'app_sync/caching_config.rb', line 9 def initialize(ttl:, caching_keys: nil) @ttl = ttl Jsii::Type.check_type(@ttl, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "ttl") @caching_keys = caching_keys Jsii::Type.check_type(@caching_keys, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "cachingKeys") unless @caching_keys.nil? end |
Instance Attribute Details
#caching_keys ⇒ Array<String>? (readonly)
Note:
Default: - No caching keys
The caching keys for a resolver that has caching enabled.
Valid values are entries from the $context.arguments, $context.source, and $context.identity maps.
28 29 30 |
# File 'app_sync/caching_config.rb', line 28 def caching_keys @caching_keys end |
#ttl ⇒ AWSCDK::Duration (readonly)
The TTL in seconds for a resolver that has caching enabled.
Valid values are between 1 and 3600 seconds.
21 22 23 |
# File 'app_sync/caching_config.rb', line 21 def ttl @ttl end |
Class Method Details
.jsii_properties ⇒ Object
30 31 32 33 34 35 |
# File 'app_sync/caching_config.rb', line 30 def self.jsii_properties { :ttl => "ttl", :caching_keys => "cachingKeys", } end |
Instance Method Details
#to_jsii ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'app_sync/caching_config.rb', line 37 def to_jsii result = {} result.merge!({ "ttl" => @ttl, "cachingKeys" => @caching_keys, }) result.compact end |