Class: AWSCDK::DynamoDB::CfnTable::TimeToLiveSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DynamoDB::CfnTable::TimeToLiveSpecificationProperty
- Defined in:
- dynamo_db/cfn_table.rb
Overview
Represents the settings used to enable or disable Time to Live (TTL) for the specified table.
Instance Attribute Summary collapse
-
#attribute_name ⇒ String?
readonly
The name of the TTL attribute used to store the expiration time for items in the table.
-
#enabled ⇒ Boolean, AWSCDK::IResolvable
readonly
Indicates whether TTL is to be enabled (true) or disabled (false) on the table.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(enabled:, attribute_name: nil) ⇒ TimeToLiveSpecificationProperty
constructor
A new instance of TimeToLiveSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(enabled:, attribute_name: nil) ⇒ TimeToLiveSpecificationProperty
Returns a new instance of TimeToLiveSpecificationProperty.
1755 1756 1757 1758 1759 1760 |
# File 'dynamo_db/cfn_table.rb', line 1755 def initialize(enabled:, attribute_name: nil) @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") @attribute_name = attribute_name Jsii::Type.check_type(@attribute_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attributeName") unless @attribute_name.nil? end |
Instance Attribute Details
#attribute_name ⇒ String? (readonly)
The name of the TTL attribute used to store the expiration time for items in the table.
- The
AttributeNameproperty is required when enabling the TTL, or when TTL is already enabled.- To update this property, you must first disable TTL and then enable TTL with the new attribute name.
1774 1775 1776 |
# File 'dynamo_db/cfn_table.rb', line 1774 def attribute_name @attribute_name end |
#enabled ⇒ Boolean, AWSCDK::IResolvable (readonly)
Indicates whether TTL is to be enabled (true) or disabled (false) on the table.
1766 1767 1768 |
# File 'dynamo_db/cfn_table.rb', line 1766 def enabled @enabled end |
Class Method Details
.jsii_properties ⇒ Object
1776 1777 1778 1779 1780 1781 |
# File 'dynamo_db/cfn_table.rb', line 1776 def self.jsii_properties { :enabled => "enabled", :attribute_name => "attributeName", } end |
Instance Method Details
#to_jsii ⇒ Object
1783 1784 1785 1786 1787 1788 1789 1790 |
# File 'dynamo_db/cfn_table.rb', line 1783 def to_jsii result = {} result.merge!({ "enabled" => @enabled, "attributeName" => @attribute_name, }) result.compact end |