Class: AWSCDK::DynamoDB::TableOptionsV2
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DynamoDB::TableOptionsV2
- Defined in:
- dynamo_db/table_options_v2.rb
Overview
Options used to configure a DynamoDB table.
Direct Known Subclasses
ReplicaTableProps, TablePropsV2, TableV2MultiAccountReplicaProps
Instance Attribute Summary collapse
-
#contributor_insights ⇒ Boolean?
readonly
deprecated
Deprecated.
use
contributorInsightsSpecificationinstead -
#contributor_insights_specification ⇒ AWSCDK::DynamoDB::ContributorInsightsSpecification?
readonly
Whether CloudWatch contributor insights is enabled and what mode is selected.
-
#deletion_protection ⇒ Boolean?
readonly
Whether deletion protection is enabled.
-
#kinesis_stream ⇒ AWSCDK::Kinesis::IStream?
readonly
Kinesis Data Stream to capture item level changes.
-
#point_in_time_recovery ⇒ Boolean?
readonly
deprecated
Deprecated.
use
pointInTimeRecoverySpecificationinstead -
#point_in_time_recovery_specification ⇒ AWSCDK::DynamoDB::PointInTimeRecoverySpecification?
readonly
Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.
-
#resource_policy ⇒ AWSCDK::IAM::PolicyDocument?
readonly
Resource policy to assign to DynamoDB Table.
-
#stream_resource_policy ⇒ AWSCDK::IAM::PolicyDocument?
readonly
Resource policy to assign to DynamoDB Stream.
-
#table_class ⇒ AWSCDK::DynamoDB::TableClass?
readonly
The table class.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Tags to be applied to the primary table (default replica table).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(contributor_insights: nil, contributor_insights_specification: nil, deletion_protection: nil, kinesis_stream: nil, point_in_time_recovery: nil, point_in_time_recovery_specification: nil, resource_policy: nil, stream_resource_policy: nil, table_class: nil, tags: nil) ⇒ TableOptionsV2
constructor
A new instance of TableOptionsV2.
- #to_jsii ⇒ Object
Constructor Details
#initialize(contributor_insights: nil, contributor_insights_specification: nil, deletion_protection: nil, kinesis_stream: nil, point_in_time_recovery: nil, point_in_time_recovery_specification: nil, resource_policy: nil, stream_resource_policy: nil, table_class: nil, tags: nil) ⇒ TableOptionsV2
Returns a new instance of TableOptionsV2.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'dynamo_db/table_options_v2.rb', line 17 def initialize(contributor_insights: nil, contributor_insights_specification: nil, deletion_protection: nil, kinesis_stream: nil, point_in_time_recovery: nil, point_in_time_recovery_specification: nil, resource_policy: nil, stream_resource_policy: nil, table_class: nil, tags: nil) @contributor_insights = contributor_insights Jsii::Type.check_type(@contributor_insights, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "contributorInsights") unless @contributor_insights.nil? @contributor_insights_specification = contributor_insights_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::ContributorInsightsSpecification.new(**contributor_insights_specification.transform_keys(&:to_sym)) : contributor_insights_specification Jsii::Type.check_type(@contributor_insights_specification, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuQ29udHJpYnV0b3JJbnNpZ2h0c1NwZWNpZmljYXRpb24ifQ==")), "contributorInsightsSpecification") unless @contributor_insights_specification.nil? @deletion_protection = deletion_protection Jsii::Type.check_type(@deletion_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deletionProtection") unless @deletion_protection.nil? @kinesis_stream = kinesis_stream Jsii::Type.check_type(@kinesis_stream, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpcy5JU3RyZWFtIn0=")), "kinesisStream") unless @kinesis_stream.nil? @point_in_time_recovery = point_in_time_recovery Jsii::Type.check_type(@point_in_time_recovery, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "pointInTimeRecovery") unless @point_in_time_recovery.nil? @point_in_time_recovery_specification = point_in_time_recovery_specification.is_a?(Hash) ? ::AWSCDK::DynamoDB::PointInTimeRecoverySpecification.new(**point_in_time_recovery_specification.transform_keys(&:to_sym)) : point_in_time_recovery_specification Jsii::Type.check_type(@point_in_time_recovery_specification, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuUG9pbnRJblRpbWVSZWNvdmVyeVNwZWNpZmljYXRpb24ifQ==")), "pointInTimeRecoverySpecification") unless @point_in_time_recovery_specification.nil? @resource_policy = resource_policy Jsii::Type.check_type(@resource_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeURvY3VtZW50In0=")), "resourcePolicy") unless @resource_policy.nil? @stream_resource_policy = stream_resource_policy Jsii::Type.check_type(@stream_resource_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeURvY3VtZW50In0=")), "streamResourcePolicy") unless @stream_resource_policy.nil? @table_class = table_class Jsii::Type.check_type(@table_class, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuVGFibGVDbGFzcyJ9")), "tableClass") unless @table_class.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#contributor_insights ⇒ Boolean? (readonly)
use contributorInsightsSpecification instead
Default: false
Whether CloudWatch contributor insights is enabled.
45 46 47 |
# File 'dynamo_db/table_options_v2.rb', line 45 def contributor_insights @contributor_insights end |
#contributor_insights_specification ⇒ AWSCDK::DynamoDB::ContributorInsightsSpecification? (readonly)
Default: - contributor insights is not enabled
Whether CloudWatch contributor insights is enabled and what mode is selected.
50 51 52 |
# File 'dynamo_db/table_options_v2.rb', line 50 def contributor_insights_specification @contributor_insights_specification end |
#deletion_protection ⇒ Boolean? (readonly)
Default: false
Whether deletion protection is enabled.
55 56 57 |
# File 'dynamo_db/table_options_v2.rb', line 55 def deletion_protection @deletion_protection end |
#kinesis_stream ⇒ AWSCDK::Kinesis::IStream? (readonly)
Default: - no Kinesis Data Stream
Kinesis Data Stream to capture item level changes.
60 61 62 |
# File 'dynamo_db/table_options_v2.rb', line 60 def kinesis_stream @kinesis_stream end |
#point_in_time_recovery ⇒ Boolean? (readonly)
use pointInTimeRecoverySpecification instead
Default: false - point in time recovery is not enabled.
Whether point-in-time recovery is enabled.
66 67 68 |
# File 'dynamo_db/table_options_v2.rb', line 66 def point_in_time_recovery @point_in_time_recovery end |
#point_in_time_recovery_specification ⇒ AWSCDK::DynamoDB::PointInTimeRecoverySpecification? (readonly)
Default: - point in time recovery is not enabled.
Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.
71 72 73 |
# File 'dynamo_db/table_options_v2.rb', line 71 def point_in_time_recovery_specification @point_in_time_recovery_specification end |
#resource_policy ⇒ AWSCDK::IAM::PolicyDocument? (readonly)
Default: - No resource policy statements are added to the created table.
Resource policy to assign to DynamoDB Table.
77 78 79 |
# File 'dynamo_db/table_options_v2.rb', line 77 def resource_policy @resource_policy end |
#stream_resource_policy ⇒ AWSCDK::IAM::PolicyDocument? (readonly)
Default: - No resource policy statements are added to the stream.
Resource policy to assign to DynamoDB Stream.
83 84 85 |
# File 'dynamo_db/table_options_v2.rb', line 83 def stream_resource_policy @stream_resource_policy end |
#table_class ⇒ AWSCDK::DynamoDB::TableClass? (readonly)
Default: TableClass.STANDARD
The table class.
88 89 90 |
# File 'dynamo_db/table_options_v2.rb', line 88 def table_class @table_class end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Default: - no tags
Tags to be applied to the primary table (default replica table).
93 94 95 |
# File 'dynamo_db/table_options_v2.rb', line 93 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'dynamo_db/table_options_v2.rb', line 95 def self.jsii_properties { :contributor_insights => "contributorInsights", :contributor_insights_specification => "contributorInsightsSpecification", :deletion_protection => "deletionProtection", :kinesis_stream => "kinesisStream", :point_in_time_recovery => "pointInTimeRecovery", :point_in_time_recovery_specification => "pointInTimeRecoverySpecification", :resource_policy => "resourcePolicy", :stream_resource_policy => "streamResourcePolicy", :table_class => "tableClass", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'dynamo_db/table_options_v2.rb', line 110 def to_jsii result = {} result.merge!({ "contributorInsights" => @contributor_insights, "contributorInsightsSpecification" => @contributor_insights_specification, "deletionProtection" => @deletion_protection, "kinesisStream" => @kinesis_stream, "pointInTimeRecovery" => @point_in_time_recovery, "pointInTimeRecoverySpecification" => @point_in_time_recovery_specification, "resourcePolicy" => @resource_policy, "streamResourcePolicy" => @stream_resource_policy, "tableClass" => @table_class, "tags" => @tags, }) result.compact end |