aws-cdk-lib 2.210.0__py3-none-any.whl → 2.211.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/__init__.py +6 -11
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.210.0.jsii.tgz → aws-cdk-lib@2.211.0.jsii.tgz} +0 -0
- aws_cdk/aws_amazonmq/__init__.py +2 -1
- aws_cdk/aws_appconfig/__init__.py +9 -0
- aws_cdk/aws_arcregionswitch/__init__.py +4962 -0
- aws_cdk/aws_athena/__init__.py +23 -19
- aws_cdk/aws_autoscaling/__init__.py +6 -6
- aws_cdk/aws_batch/__init__.py +721 -51
- aws_cdk/aws_cassandra/__init__.py +28 -1
- aws_cdk/aws_cloudfront/__init__.py +20 -8
- aws_cdk/aws_cognito/__init__.py +9 -2
- aws_cdk/aws_datazone/__init__.py +118 -77
- aws_cdk/aws_dax/__init__.py +39 -0
- aws_cdk/aws_deadline/__init__.py +155 -7
- aws_cdk/aws_docdb/__init__.py +20 -11
- aws_cdk/aws_dynamodb/__init__.py +160 -20
- aws_cdk/aws_ec2/__init__.py +978 -256
- aws_cdk/aws_ecr/__init__.py +274 -0
- aws_cdk/aws_ecs/__init__.py +1642 -140
- aws_cdk/aws_eks/__init__.py +51 -3
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +30 -16
- aws_cdk/aws_entityresolution/__init__.py +240 -45
- aws_cdk/aws_evs/__init__.py +20 -45
- aws_cdk/aws_iot/__init__.py +387 -0
- aws_cdk/aws_iotsitewise/__init__.py +1247 -139
- aws_cdk/aws_ivs/__init__.py +443 -33
- aws_cdk/aws_kinesisfirehose/__init__.py +2 -0
- aws_cdk/aws_lambda/__init__.py +3 -3
- aws_cdk/aws_lightsail/__init__.py +590 -0
- aws_cdk/aws_logs/__init__.py +97 -3
- aws_cdk/aws_medialive/__init__.py +270 -7
- aws_cdk/aws_mediapackagev2/__init__.py +204 -6
- aws_cdk/aws_neptune/__init__.py +41 -2
- aws_cdk/aws_networkfirewall/__init__.py +490 -134
- aws_cdk/aws_observabilityadmin/__init__.py +1468 -0
- aws_cdk/aws_opensearchserverless/__init__.py +2 -2
- aws_cdk/aws_opsworks/__init__.py +125 -125
- aws_cdk/aws_opsworkscm/__init__.py +1 -53
- aws_cdk/aws_pcs/__init__.py +36 -0
- aws_cdk/aws_qbusiness/__init__.py +3 -3
- aws_cdk/aws_quicksight/__init__.py +107 -0
- aws_cdk/aws_rds/__init__.py +274 -0
- aws_cdk/aws_s3/__init__.py +56 -1
- aws_cdk/aws_s3express/__init__.py +52 -1
- aws_cdk/aws_sagemaker/__init__.py +4033 -218
- aws_cdk/aws_ses/__init__.py +172 -9
- aws_cdk/aws_ssm/__init__.py +8 -4
- aws_cdk/aws_verifiedpermissions/__init__.py +23 -2
- aws_cdk/aws_wisdom/__init__.py +2 -2
- aws_cdk/aws_workspacesweb/__init__.py +949 -157
- {aws_cdk_lib-2.210.0.dist-info → aws_cdk_lib-2.211.0.dist-info}/METADATA +8 -8
- {aws_cdk_lib-2.210.0.dist-info → aws_cdk_lib-2.211.0.dist-info}/RECORD +57 -55
- {aws_cdk_lib-2.210.0.dist-info → aws_cdk_lib-2.211.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.210.0.dist-info → aws_cdk_lib-2.211.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.210.0.dist-info → aws_cdk_lib-2.211.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.210.0.dist-info → aws_cdk_lib-2.211.0.dist-info}/top_level.txt +0 -0
aws_cdk/aws_dynamodb/__init__.py
CHANGED
|
@@ -141,6 +141,68 @@ bar_stack = BarStack(app, "BarStack",
|
|
|
141
141
|
|
|
142
142
|
Note: You can create an instance of the `TableV2` construct with as many `replicas` as needed as long as there is only one replica per region. After table creation you can add or remove `replicas`, but you can only add or remove a single replica in each update.
|
|
143
143
|
|
|
144
|
+
## Multi-Region Strong Consistency (MRSC)
|
|
145
|
+
|
|
146
|
+
By default, DynamoDB global tables provide eventual consistency across regions. For applications requiring strong consistency across regions, you can configure Multi-Region Strong Consistency (MRSC) using the `multiRegionConsistency` property.
|
|
147
|
+
|
|
148
|
+
MRSC global tables can be configured in two ways:
|
|
149
|
+
|
|
150
|
+
* **Three replicas**: Deploy your table across three regions within the same region set
|
|
151
|
+
* **Two replicas + one witness**: Deploy your table across two regions with a witness region for consensus
|
|
152
|
+
|
|
153
|
+
### Region Sets
|
|
154
|
+
|
|
155
|
+
MRSC global tables must be deployed within the same region set. The supported region sets are:
|
|
156
|
+
|
|
157
|
+
* **US Region set**: `us-east-1`, `us-east-2`, `us-west-2`
|
|
158
|
+
* **EU Region set**: `eu-west-1`, `eu-west-2`, `eu-west-3`, `eu-central-1`
|
|
159
|
+
* **AP Region set**: `ap-northeast-1`, `ap-northeast-2`, `ap-northeast-3`
|
|
160
|
+
|
|
161
|
+
### Three Replicas Configuration
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
import aws_cdk as cdk
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
app = cdk.App()
|
|
168
|
+
stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
|
|
169
|
+
|
|
170
|
+
mrsc_table = dynamodb.TableV2(stack, "MRSCTable",
|
|
171
|
+
partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
|
|
172
|
+
multi_region_consistency=dynamodb.MultiRegionConsistency.STRONG,
|
|
173
|
+
replicas=[dynamodb.ReplicaTableProps(region="us-east-1"), dynamodb.ReplicaTableProps(region="us-east-2")
|
|
174
|
+
]
|
|
175
|
+
)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Two Replicas + Witness Configuration
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
import aws_cdk as cdk
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
app = cdk.App()
|
|
185
|
+
stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
|
|
186
|
+
|
|
187
|
+
mrsc_table = dynamodb.TableV2(stack, "MRSCTable",
|
|
188
|
+
partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
|
|
189
|
+
multi_region_consistency=dynamodb.MultiRegionConsistency.STRONG,
|
|
190
|
+
replicas=[dynamodb.ReplicaTableProps(region="us-east-1")
|
|
191
|
+
],
|
|
192
|
+
witness_region="us-east-2"
|
|
193
|
+
)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Important Considerations
|
|
197
|
+
|
|
198
|
+
* **Witness regions** can only be used with `MultiRegionConsistency.STRONG`. Attempting to specify a witness region with eventual consistency will result in a validation error.
|
|
199
|
+
* **Region validation**: All regions (primary, replicas, and witness) must be within the same region set.
|
|
200
|
+
* **Replica count**: When using a witness region, you must have exactly 2 replicas (including the primary). Without a witness region, you must have exactly 3 replicas.
|
|
201
|
+
* **Performance**: MRSC provides strong consistency but may have higher latency compared to eventual consistency.
|
|
202
|
+
|
|
203
|
+
Further reading:
|
|
204
|
+
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes-mrsc
|
|
205
|
+
|
|
144
206
|
## Billing
|
|
145
207
|
|
|
146
208
|
The `TableV2` construct can be configured with on-demand or provisioned billing:
|
|
@@ -1050,12 +1112,12 @@ class Attribute:
|
|
|
1050
1112
|
app = cdk.App()
|
|
1051
1113
|
stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
|
|
1052
1114
|
|
|
1053
|
-
|
|
1115
|
+
mrsc_table = dynamodb.TableV2(stack, "MRSCTable",
|
|
1054
1116
|
partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1117
|
+
multi_region_consistency=dynamodb.MultiRegionConsistency.STRONG,
|
|
1118
|
+
replicas=[dynamodb.ReplicaTableProps(region="us-east-1")
|
|
1119
|
+
],
|
|
1120
|
+
witness_region="us-east-2"
|
|
1059
1121
|
)
|
|
1060
1122
|
'''
|
|
1061
1123
|
if __debug__:
|
|
@@ -1108,12 +1170,12 @@ class AttributeType(enum.Enum):
|
|
|
1108
1170
|
app = cdk.App()
|
|
1109
1171
|
stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
|
|
1110
1172
|
|
|
1111
|
-
|
|
1173
|
+
mrsc_table = dynamodb.TableV2(stack, "MRSCTable",
|
|
1112
1174
|
partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1175
|
+
multi_region_consistency=dynamodb.MultiRegionConsistency.STRONG,
|
|
1176
|
+
replicas=[dynamodb.ReplicaTableProps(region="us-east-1")
|
|
1177
|
+
],
|
|
1178
|
+
witness_region="us-east-2"
|
|
1117
1179
|
)
|
|
1118
1180
|
'''
|
|
1119
1181
|
|
|
@@ -9578,6 +9640,38 @@ class MaxThroughputProps:
|
|
|
9578
9640
|
)
|
|
9579
9641
|
|
|
9580
9642
|
|
|
9643
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_dynamodb.MultiRegionConsistency")
|
|
9644
|
+
class MultiRegionConsistency(enum.Enum):
|
|
9645
|
+
'''Global table multi-region consistency mode.
|
|
9646
|
+
|
|
9647
|
+
:see: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes-mrsc
|
|
9648
|
+
:exampleMetadata: infused
|
|
9649
|
+
|
|
9650
|
+
Example::
|
|
9651
|
+
|
|
9652
|
+
import aws_cdk as cdk
|
|
9653
|
+
|
|
9654
|
+
|
|
9655
|
+
app = cdk.App()
|
|
9656
|
+
stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
|
|
9657
|
+
|
|
9658
|
+
mrsc_table = dynamodb.TableV2(stack, "MRSCTable",
|
|
9659
|
+
partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
|
|
9660
|
+
multi_region_consistency=dynamodb.MultiRegionConsistency.STRONG,
|
|
9661
|
+
replicas=[dynamodb.ReplicaTableProps(region="us-east-1"), dynamodb.ReplicaTableProps(region="us-east-2")
|
|
9662
|
+
]
|
|
9663
|
+
)
|
|
9664
|
+
'''
|
|
9665
|
+
|
|
9666
|
+
EVENTUAL = "EVENTUAL"
|
|
9667
|
+
'''Default consistency mode for Global Tables.
|
|
9668
|
+
|
|
9669
|
+
Multi-region eventual consistency.
|
|
9670
|
+
'''
|
|
9671
|
+
STRONG = "STRONG"
|
|
9672
|
+
'''Multi-region strong consistency.'''
|
|
9673
|
+
|
|
9674
|
+
|
|
9581
9675
|
@jsii.enum(jsii_type="aws-cdk-lib.aws_dynamodb.Operation")
|
|
9582
9676
|
class Operation(enum.Enum):
|
|
9583
9677
|
'''Supported DynamoDB table operations.'''
|
|
@@ -13950,12 +14044,14 @@ class TableProps(TableOptions):
|
|
|
13950
14044
|
"encryption": "encryption",
|
|
13951
14045
|
"global_secondary_indexes": "globalSecondaryIndexes",
|
|
13952
14046
|
"local_secondary_indexes": "localSecondaryIndexes",
|
|
14047
|
+
"multi_region_consistency": "multiRegionConsistency",
|
|
13953
14048
|
"removal_policy": "removalPolicy",
|
|
13954
14049
|
"replicas": "replicas",
|
|
13955
14050
|
"sort_key": "sortKey",
|
|
13956
14051
|
"table_name": "tableName",
|
|
13957
14052
|
"time_to_live_attribute": "timeToLiveAttribute",
|
|
13958
14053
|
"warm_throughput": "warmThroughput",
|
|
14054
|
+
"witness_region": "witnessRegion",
|
|
13959
14055
|
},
|
|
13960
14056
|
)
|
|
13961
14057
|
class TablePropsV2(TableOptionsV2):
|
|
@@ -13976,12 +14072,14 @@ class TablePropsV2(TableOptionsV2):
|
|
|
13976
14072
|
encryption: typing.Optional[TableEncryptionV2] = None,
|
|
13977
14073
|
global_secondary_indexes: typing.Optional[typing.Sequence[typing.Union["GlobalSecondaryIndexPropsV2", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
13978
14074
|
local_secondary_indexes: typing.Optional[typing.Sequence[typing.Union["LocalSecondaryIndexProps", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
14075
|
+
multi_region_consistency: typing.Optional[MultiRegionConsistency] = None,
|
|
13979
14076
|
removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
|
|
13980
14077
|
replicas: typing.Optional[typing.Sequence[typing.Union["ReplicaTableProps", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
13981
14078
|
sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
13982
14079
|
table_name: typing.Optional[builtins.str] = None,
|
|
13983
14080
|
time_to_live_attribute: typing.Optional[builtins.str] = None,
|
|
13984
14081
|
warm_throughput: typing.Optional[typing.Union["WarmThroughput", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
14082
|
+
witness_region: typing.Optional[builtins.str] = None,
|
|
13985
14083
|
) -> None:
|
|
13986
14084
|
'''Properties used to configure a DynamoDB table.
|
|
13987
14085
|
|
|
@@ -13999,12 +14097,14 @@ class TablePropsV2(TableOptionsV2):
|
|
|
13999
14097
|
:param encryption: The server-side encryption. Default: TableEncryptionV2.dynamoOwnedKey()
|
|
14000
14098
|
:param global_secondary_indexes: Global secondary indexes. Note: You can provide a maximum of 20 global secondary indexes. Default: - no global secondary indexes
|
|
14001
14099
|
:param local_secondary_indexes: Local secondary indexes. Note: You can only provide a maximum of 5 local secondary indexes. Default: - no local secondary indexes
|
|
14100
|
+
:param multi_region_consistency: Specifies the consistency mode for a new global table. Default: MultiRegionConsistency.EVENTUAL
|
|
14002
14101
|
:param removal_policy: The removal policy applied to the table. Default: RemovalPolicy.RETAIN
|
|
14003
14102
|
:param replicas: Replica tables to deploy with the primary table. Note: Adding replica tables allows you to use your table as a global table. You cannot specify a replica table in the region that the primary table will be deployed to. Replica tables will only be supported if the stack deployment region is defined. Default: - no replica tables
|
|
14004
14103
|
:param sort_key: Sort key attribute definition. Default: - no sort key
|
|
14005
14104
|
:param table_name: The name of the table. Default: - generated by CloudFormation
|
|
14006
14105
|
:param time_to_live_attribute: The name of the TTL attribute. Default: - TTL is disabled
|
|
14007
14106
|
:param warm_throughput: The warm throughput configuration for the table. Default: - no warm throughput is configured
|
|
14107
|
+
:param witness_region: The witness Region for the MRSC global table. A MRSC global table can be configured with either three replicas, or with two replicas and one witness. Note: Witness region cannot be specified for a Multi-Region Eventual Consistency (MREC) Global Table. Witness regions are only supported for Multi-Region Strong Consistency (MRSC) Global Tables. Default: - no witness region
|
|
14008
14108
|
|
|
14009
14109
|
:exampleMetadata: infused
|
|
14010
14110
|
|
|
@@ -14016,12 +14116,12 @@ class TablePropsV2(TableOptionsV2):
|
|
|
14016
14116
|
app = cdk.App()
|
|
14017
14117
|
stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
|
|
14018
14118
|
|
|
14019
|
-
|
|
14119
|
+
mrsc_table = dynamodb.TableV2(stack, "MRSCTable",
|
|
14020
14120
|
partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
|
|
14021
|
-
|
|
14022
|
-
|
|
14023
|
-
|
|
14024
|
-
|
|
14121
|
+
multi_region_consistency=dynamodb.MultiRegionConsistency.STRONG,
|
|
14122
|
+
replicas=[dynamodb.ReplicaTableProps(region="us-east-1")
|
|
14123
|
+
],
|
|
14124
|
+
witness_region="us-east-2"
|
|
14025
14125
|
)
|
|
14026
14126
|
'''
|
|
14027
14127
|
if isinstance(point_in_time_recovery_specification, dict):
|
|
@@ -14048,12 +14148,14 @@ class TablePropsV2(TableOptionsV2):
|
|
|
14048
14148
|
check_type(argname="argument encryption", value=encryption, expected_type=type_hints["encryption"])
|
|
14049
14149
|
check_type(argname="argument global_secondary_indexes", value=global_secondary_indexes, expected_type=type_hints["global_secondary_indexes"])
|
|
14050
14150
|
check_type(argname="argument local_secondary_indexes", value=local_secondary_indexes, expected_type=type_hints["local_secondary_indexes"])
|
|
14151
|
+
check_type(argname="argument multi_region_consistency", value=multi_region_consistency, expected_type=type_hints["multi_region_consistency"])
|
|
14051
14152
|
check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
|
|
14052
14153
|
check_type(argname="argument replicas", value=replicas, expected_type=type_hints["replicas"])
|
|
14053
14154
|
check_type(argname="argument sort_key", value=sort_key, expected_type=type_hints["sort_key"])
|
|
14054
14155
|
check_type(argname="argument table_name", value=table_name, expected_type=type_hints["table_name"])
|
|
14055
14156
|
check_type(argname="argument time_to_live_attribute", value=time_to_live_attribute, expected_type=type_hints["time_to_live_attribute"])
|
|
14056
14157
|
check_type(argname="argument warm_throughput", value=warm_throughput, expected_type=type_hints["warm_throughput"])
|
|
14158
|
+
check_type(argname="argument witness_region", value=witness_region, expected_type=type_hints["witness_region"])
|
|
14057
14159
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
14058
14160
|
"partition_key": partition_key,
|
|
14059
14161
|
}
|
|
@@ -14083,6 +14185,8 @@ class TablePropsV2(TableOptionsV2):
|
|
|
14083
14185
|
self._values["global_secondary_indexes"] = global_secondary_indexes
|
|
14084
14186
|
if local_secondary_indexes is not None:
|
|
14085
14187
|
self._values["local_secondary_indexes"] = local_secondary_indexes
|
|
14188
|
+
if multi_region_consistency is not None:
|
|
14189
|
+
self._values["multi_region_consistency"] = multi_region_consistency
|
|
14086
14190
|
if removal_policy is not None:
|
|
14087
14191
|
self._values["removal_policy"] = removal_policy
|
|
14088
14192
|
if replicas is not None:
|
|
@@ -14095,6 +14199,8 @@ class TablePropsV2(TableOptionsV2):
|
|
|
14095
14199
|
self._values["time_to_live_attribute"] = time_to_live_attribute
|
|
14096
14200
|
if warm_throughput is not None:
|
|
14097
14201
|
self._values["warm_throughput"] = warm_throughput
|
|
14202
|
+
if witness_region is not None:
|
|
14203
|
+
self._values["witness_region"] = witness_region
|
|
14098
14204
|
|
|
14099
14205
|
@builtins.property
|
|
14100
14206
|
def contributor_insights(self) -> typing.Optional[builtins.bool]:
|
|
@@ -14240,6 +14346,15 @@ class TablePropsV2(TableOptionsV2):
|
|
|
14240
14346
|
result = self._values.get("local_secondary_indexes")
|
|
14241
14347
|
return typing.cast(typing.Optional[typing.List["LocalSecondaryIndexProps"]], result)
|
|
14242
14348
|
|
|
14349
|
+
@builtins.property
|
|
14350
|
+
def multi_region_consistency(self) -> typing.Optional[MultiRegionConsistency]:
|
|
14351
|
+
'''Specifies the consistency mode for a new global table.
|
|
14352
|
+
|
|
14353
|
+
:default: MultiRegionConsistency.EVENTUAL
|
|
14354
|
+
'''
|
|
14355
|
+
result = self._values.get("multi_region_consistency")
|
|
14356
|
+
return typing.cast(typing.Optional[MultiRegionConsistency], result)
|
|
14357
|
+
|
|
14243
14358
|
@builtins.property
|
|
14244
14359
|
def removal_policy(self) -> typing.Optional[_RemovalPolicy_9f93c814]:
|
|
14245
14360
|
'''The removal policy applied to the table.
|
|
@@ -14298,6 +14413,20 @@ class TablePropsV2(TableOptionsV2):
|
|
|
14298
14413
|
result = self._values.get("warm_throughput")
|
|
14299
14414
|
return typing.cast(typing.Optional["WarmThroughput"], result)
|
|
14300
14415
|
|
|
14416
|
+
@builtins.property
|
|
14417
|
+
def witness_region(self) -> typing.Optional[builtins.str]:
|
|
14418
|
+
'''The witness Region for the MRSC global table.
|
|
14419
|
+
|
|
14420
|
+
A MRSC global table can be configured with either three replicas, or with two replicas and one witness.
|
|
14421
|
+
|
|
14422
|
+
Note: Witness region cannot be specified for a Multi-Region Eventual Consistency (MREC) Global Table.
|
|
14423
|
+
Witness regions are only supported for Multi-Region Strong Consistency (MRSC) Global Tables.
|
|
14424
|
+
|
|
14425
|
+
:default: - no witness region
|
|
14426
|
+
'''
|
|
14427
|
+
result = self._values.get("witness_region")
|
|
14428
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
14429
|
+
|
|
14301
14430
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
14302
14431
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
14303
14432
|
|
|
@@ -14327,12 +14456,12 @@ class TableV2(
|
|
|
14327
14456
|
app = cdk.App()
|
|
14328
14457
|
stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
|
|
14329
14458
|
|
|
14330
|
-
|
|
14459
|
+
mrsc_table = dynamodb.TableV2(stack, "MRSCTable",
|
|
14331
14460
|
partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14461
|
+
multi_region_consistency=dynamodb.MultiRegionConsistency.STRONG,
|
|
14462
|
+
replicas=[dynamodb.ReplicaTableProps(region="us-east-1")
|
|
14463
|
+
],
|
|
14464
|
+
witness_region="us-east-2"
|
|
14336
14465
|
)
|
|
14337
14466
|
'''
|
|
14338
14467
|
|
|
@@ -14347,12 +14476,14 @@ class TableV2(
|
|
|
14347
14476
|
encryption: typing.Optional[TableEncryptionV2] = None,
|
|
14348
14477
|
global_secondary_indexes: typing.Optional[typing.Sequence[typing.Union["GlobalSecondaryIndexPropsV2", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
14349
14478
|
local_secondary_indexes: typing.Optional[typing.Sequence[typing.Union["LocalSecondaryIndexProps", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
14479
|
+
multi_region_consistency: typing.Optional[MultiRegionConsistency] = None,
|
|
14350
14480
|
removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
|
|
14351
14481
|
replicas: typing.Optional[typing.Sequence[typing.Union["ReplicaTableProps", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
14352
14482
|
sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
14353
14483
|
table_name: typing.Optional[builtins.str] = None,
|
|
14354
14484
|
time_to_live_attribute: typing.Optional[builtins.str] = None,
|
|
14355
14485
|
warm_throughput: typing.Optional[typing.Union["WarmThroughput", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
14486
|
+
witness_region: typing.Optional[builtins.str] = None,
|
|
14356
14487
|
contributor_insights: typing.Optional[builtins.bool] = None,
|
|
14357
14488
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
14358
14489
|
kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
|
|
@@ -14371,12 +14502,14 @@ class TableV2(
|
|
|
14371
14502
|
:param encryption: The server-side encryption. Default: TableEncryptionV2.dynamoOwnedKey()
|
|
14372
14503
|
:param global_secondary_indexes: Global secondary indexes. Note: You can provide a maximum of 20 global secondary indexes. Default: - no global secondary indexes
|
|
14373
14504
|
:param local_secondary_indexes: Local secondary indexes. Note: You can only provide a maximum of 5 local secondary indexes. Default: - no local secondary indexes
|
|
14505
|
+
:param multi_region_consistency: Specifies the consistency mode for a new global table. Default: MultiRegionConsistency.EVENTUAL
|
|
14374
14506
|
:param removal_policy: The removal policy applied to the table. Default: RemovalPolicy.RETAIN
|
|
14375
14507
|
:param replicas: Replica tables to deploy with the primary table. Note: Adding replica tables allows you to use your table as a global table. You cannot specify a replica table in the region that the primary table will be deployed to. Replica tables will only be supported if the stack deployment region is defined. Default: - no replica tables
|
|
14376
14508
|
:param sort_key: Sort key attribute definition. Default: - no sort key
|
|
14377
14509
|
:param table_name: The name of the table. Default: - generated by CloudFormation
|
|
14378
14510
|
:param time_to_live_attribute: The name of the TTL attribute. Default: - TTL is disabled
|
|
14379
14511
|
:param warm_throughput: The warm throughput configuration for the table. Default: - no warm throughput is configured
|
|
14512
|
+
:param witness_region: The witness Region for the MRSC global table. A MRSC global table can be configured with either three replicas, or with two replicas and one witness. Note: Witness region cannot be specified for a Multi-Region Eventual Consistency (MREC) Global Table. Witness regions are only supported for Multi-Region Strong Consistency (MRSC) Global Tables. Default: - no witness region
|
|
14380
14513
|
:param contributor_insights: Whether CloudWatch contributor insights is enabled. Default: false
|
|
14381
14514
|
:param deletion_protection: Whether deletion protection is enabled. Default: false
|
|
14382
14515
|
:param kinesis_stream: Kinesis Data Stream to capture item level changes. Default: - no Kinesis Data Stream
|
|
@@ -14397,12 +14530,14 @@ class TableV2(
|
|
|
14397
14530
|
encryption=encryption,
|
|
14398
14531
|
global_secondary_indexes=global_secondary_indexes,
|
|
14399
14532
|
local_secondary_indexes=local_secondary_indexes,
|
|
14533
|
+
multi_region_consistency=multi_region_consistency,
|
|
14400
14534
|
removal_policy=removal_policy,
|
|
14401
14535
|
replicas=replicas,
|
|
14402
14536
|
sort_key=sort_key,
|
|
14403
14537
|
table_name=table_name,
|
|
14404
14538
|
time_to_live_attribute=time_to_live_attribute,
|
|
14405
14539
|
warm_throughput=warm_throughput,
|
|
14540
|
+
witness_region=witness_region,
|
|
14406
14541
|
contributor_insights=contributor_insights,
|
|
14407
14542
|
deletion_protection=deletion_protection,
|
|
14408
14543
|
kinesis_stream=kinesis_stream,
|
|
@@ -16553,6 +16688,7 @@ __all__ = [
|
|
|
16553
16688
|
"InputFormat",
|
|
16554
16689
|
"LocalSecondaryIndexProps",
|
|
16555
16690
|
"MaxThroughputProps",
|
|
16691
|
+
"MultiRegionConsistency",
|
|
16556
16692
|
"Operation",
|
|
16557
16693
|
"OperationsMetricOptions",
|
|
16558
16694
|
"PointInTimeRecoverySpecification",
|
|
@@ -17825,12 +17961,14 @@ def _typecheckingstub__205e5df85e01c6c2d91d5922a57e3ed5903027748a8b3222622bebd10
|
|
|
17825
17961
|
encryption: typing.Optional[TableEncryptionV2] = None,
|
|
17826
17962
|
global_secondary_indexes: typing.Optional[typing.Sequence[typing.Union[GlobalSecondaryIndexPropsV2, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
17827
17963
|
local_secondary_indexes: typing.Optional[typing.Sequence[typing.Union[LocalSecondaryIndexProps, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
17964
|
+
multi_region_consistency: typing.Optional[MultiRegionConsistency] = None,
|
|
17828
17965
|
removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
|
|
17829
17966
|
replicas: typing.Optional[typing.Sequence[typing.Union[ReplicaTableProps, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
17830
17967
|
sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
17831
17968
|
table_name: typing.Optional[builtins.str] = None,
|
|
17832
17969
|
time_to_live_attribute: typing.Optional[builtins.str] = None,
|
|
17833
17970
|
warm_throughput: typing.Optional[typing.Union[WarmThroughput, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
17971
|
+
witness_region: typing.Optional[builtins.str] = None,
|
|
17834
17972
|
) -> None:
|
|
17835
17973
|
"""Type checking stubs"""
|
|
17836
17974
|
pass
|
|
@@ -17845,12 +17983,14 @@ def _typecheckingstub__9ea47b003cdb497ff620f1410260696f97dbb2b00fa8558235f23771f
|
|
|
17845
17983
|
encryption: typing.Optional[TableEncryptionV2] = None,
|
|
17846
17984
|
global_secondary_indexes: typing.Optional[typing.Sequence[typing.Union[GlobalSecondaryIndexPropsV2, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
17847
17985
|
local_secondary_indexes: typing.Optional[typing.Sequence[typing.Union[LocalSecondaryIndexProps, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
17986
|
+
multi_region_consistency: typing.Optional[MultiRegionConsistency] = None,
|
|
17848
17987
|
removal_policy: typing.Optional[_RemovalPolicy_9f93c814] = None,
|
|
17849
17988
|
replicas: typing.Optional[typing.Sequence[typing.Union[ReplicaTableProps, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
17850
17989
|
sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
17851
17990
|
table_name: typing.Optional[builtins.str] = None,
|
|
17852
17991
|
time_to_live_attribute: typing.Optional[builtins.str] = None,
|
|
17853
17992
|
warm_throughput: typing.Optional[typing.Union[WarmThroughput, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
17993
|
+
witness_region: typing.Optional[builtins.str] = None,
|
|
17854
17994
|
contributor_insights: typing.Optional[builtins.bool] = None,
|
|
17855
17995
|
deletion_protection: typing.Optional[builtins.bool] = None,
|
|
17856
17996
|
kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
|