Class: AWSCDK::DynamoDB::TableV2MultiAccountReplicaProps
- Inherits:
-
TableOptionsV2
- Object
- TableOptionsV2
- AWSCDK::DynamoDB::TableV2MultiAccountReplicaProps
- Defined in:
- dynamo_db/table_v2_multi_account_replica_props.rb
Overview
Properties for creating a multi-account replica table.
Note: partitionKey, sortKey, and localSecondaryIndexes are not options because CloudFormation automatically inherits the key schema and LSIs from the source table via globalTableSourceArn.
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.
-
#encryption ⇒ AWSCDK::DynamoDB::TableEncryptionV2?
readonly
The server-side encryption configuration for the replica table.
-
#global_table_settings_replication_mode ⇒ AWSCDK::DynamoDB::GlobalTableSettingsReplicationMode?
readonly
Controls whether table settings are synchronized across replicas.
-
#grant_index_permissions ⇒ Boolean?
readonly
Whether or not to grant permissions for all indexes of the table.
-
#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.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
The removal policy applied to the table.
-
#replica_source_table ⇒ AWSCDK::DynamoDB::ITableV2?
readonly
The source table to replicate from.
-
#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.
-
#table_name ⇒ String?
readonly
Enforces a particular physical table name.
-
#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, encryption: nil, global_table_settings_replication_mode: nil, grant_index_permissions: nil, removal_policy: nil, replica_source_table: nil, table_name: nil) ⇒ TableV2MultiAccountReplicaProps
constructor
A new instance of TableV2MultiAccountReplicaProps.
- #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, encryption: nil, global_table_settings_replication_mode: nil, grant_index_permissions: nil, removal_policy: nil, replica_source_table: nil, table_name: nil) ⇒ TableV2MultiAccountReplicaProps
Returns a new instance of TableV2MultiAccountReplicaProps.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 26 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, encryption: nil, global_table_settings_replication_mode: nil, grant_index_permissions: nil, removal_policy: nil, replica_source_table: nil, table_name: 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? @encryption = encryption Jsii::Type.check_type(@encryption, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuVGFibGVFbmNyeXB0aW9uVjIifQ==")), "encryption") unless @encryption.nil? @global_table_settings_replication_mode = global_table_settings_replication_mode Jsii::Type.check_type(@global_table_settings_replication_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuR2xvYmFsVGFibGVTZXR0aW5nc1JlcGxpY2F0aW9uTW9kZSJ9")), "globalTableSettingsReplicationMode") unless @global_table_settings_replication_mode.nil? @grant_index_permissions = Jsii::Type.check_type(@grant_index_permissions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "grantIndexPermissions") unless @grant_index_permissions.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? @replica_source_table = replica_source_table Jsii::Type.check_type(@replica_source_table, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZHluYW1vZGIuSVRhYmxlVjIifQ==")), "replicaSourceTable") unless @replica_source_table.nil? @table_name = table_name Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName") unless @table_name.nil? end |
Instance Attribute Details
#contributor_insights ⇒ Boolean? (readonly)
use contributorInsightsSpecification instead
Default: false
Whether CloudWatch contributor insights is enabled.
66 67 68 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 66 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.
71 72 73 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 71 def contributor_insights_specification @contributor_insights_specification end |
#deletion_protection ⇒ Boolean? (readonly)
Default: false
Whether deletion protection is enabled.
76 77 78 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 76 def deletion_protection @deletion_protection end |
#encryption ⇒ AWSCDK::DynamoDB::TableEncryptionV2? (readonly)
Default: TableEncryptionV2.dynamoOwnedKey()
The server-side encryption configuration for the replica table.
Note: Each replica manages its own encryption independently. This is not synchronized across replicas.
122 123 124 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 122 def encryption @encryption end |
#global_table_settings_replication_mode ⇒ AWSCDK::DynamoDB::GlobalTableSettingsReplicationMode? (readonly)
Default: GlobalTableSettingsReplicationMode.ALL
Controls whether table settings are synchronized across replicas.
When set to ALL, synchronizable settings (billing mode, throughput, TTL, streams view type, GSIs) are automatically replicated across all replicas. When set to NONE, each replica manages its own settings independently (billing mode must be PAY_PER_REQUEST).
Note: Some settings are always synchronized (key schema, LSIs) regardless of this setting, and some are never synchronized (table class, SSE, deletion protection, PITR, tags, resource policy).
134 135 136 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 134 def global_table_settings_replication_mode @global_table_settings_replication_mode end |
#grant_index_permissions ⇒ Boolean? (readonly)
Default: false
Whether or not to grant permissions for all indexes of the table.
Note: If false, permissions will only be granted to indexes when global_indexes is specified.
141 142 143 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 141 def @grant_index_permissions end |
#kinesis_stream ⇒ AWSCDK::Kinesis::IStream? (readonly)
Default: - no Kinesis Data Stream
Kinesis Data Stream to capture item level changes.
81 82 83 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 81 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.
87 88 89 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 87 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.
92 93 94 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 92 def point_in_time_recovery_specification @point_in_time_recovery_specification end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Default: RemovalPolicy.RETAIN
The removal policy applied to the table.
146 147 148 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 146 def removal_policy @removal_policy end |
#replica_source_table ⇒ AWSCDK::DynamoDB::ITableV2? (readonly)
Default: - must be provided
The source table to replicate from.
[disable-awslint:prefer-ref-interface]
153 154 155 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 153 def replica_source_table @replica_source_table 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.
98 99 100 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 98 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.
104 105 106 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 104 def stream_resource_policy @stream_resource_policy end |
#table_class ⇒ AWSCDK::DynamoDB::TableClass? (readonly)
Default: TableClass.STANDARD
The table class.
109 110 111 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 109 def table_class @table_class end |
#table_name ⇒ String? (readonly)
Default: - generated by CloudFormation
Enforces a particular physical table name.
158 159 160 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 158 def table_name @table_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Default: - no tags
Tags to be applied to the primary table (default replica table).
114 115 116 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 114 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 160 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", :encryption => "encryption", :global_table_settings_replication_mode => "globalTableSettingsReplicationMode", :grant_index_permissions => "grantIndexPermissions", :removal_policy => "removalPolicy", :replica_source_table => "replicaSourceTable", :table_name => "tableName", } end |
Instance Method Details
#to_jsii ⇒ Object
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'dynamo_db/table_v2_multi_account_replica_props.rb', line 181 def to_jsii result = {} result.merge!(super) 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, "encryption" => @encryption, "globalTableSettingsReplicationMode" => @global_table_settings_replication_mode, "grantIndexPermissions" => @grant_index_permissions, "removalPolicy" => @removal_policy, "replicaSourceTable" => @replica_source_table, "tableName" => @table_name, }) result.compact end |