Class: AWSCDK::AppSync::CfnResolver::CachingConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_sync/cfn_resolver.rb

Overview

The caching configuration for a resolver that has caching activated.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ttl:, caching_keys: nil) ⇒ CachingConfigProperty

Returns a new instance of CachingConfigProperty.

Parameters:

  • ttl (Numeric)

    The TTL in seconds for a resolver that has caching activated.

  • caching_keys (Array<String>, nil) (defaults to: nil)

    The caching keys for a resolver that has caching activated.



791
792
793
794
795
796
# File 'app_sync/cfn_resolver.rb', line 791

def initialize(ttl:, caching_keys: nil)
  @ttl = ttl
  Jsii::Type.check_type(@ttl, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "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_keysArray<String>? (readonly)

The caching keys for a resolver that has caching activated.

Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.



811
812
813
# File 'app_sync/cfn_resolver.rb', line 811

def caching_keys
  @caching_keys
end

#ttlNumeric (readonly)

The TTL in seconds for a resolver that has caching activated.

Valid values are 1–3,600 seconds.



804
805
806
# File 'app_sync/cfn_resolver.rb', line 804

def ttl
  @ttl
end

Class Method Details

.jsii_propertiesObject



813
814
815
816
817
818
# File 'app_sync/cfn_resolver.rb', line 813

def self.jsii_properties
  {
    :ttl => "ttl",
    :caching_keys => "cachingKeys",
  }
end

Instance Method Details

#to_jsiiObject



820
821
822
823
824
825
826
827
# File 'app_sync/cfn_resolver.rb', line 820

def to_jsii
  result = {}
  result.merge!({
    "ttl" => @ttl,
    "cachingKeys" => @caching_keys,
  })
  result.compact
end