aws-cdk-lib 2.211.0__py3-none-any.whl → 2.213.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.

Files changed (47) hide show
  1. aws_cdk/__init__.py +398 -43
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.211.0.jsii.tgz → aws-cdk-lib@2.213.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigateway/__init__.py +2 -0
  5. aws_cdk/aws_apigatewayv2/__init__.py +1798 -74
  6. aws_cdk/aws_appintegrations/__init__.py +395 -0
  7. aws_cdk/aws_arcregionswitch/__init__.py +118 -0
  8. aws_cdk/aws_batch/__init__.py +4 -4
  9. aws_cdk/aws_bedrock/__init__.py +18 -0
  10. aws_cdk/aws_billingconductor/__init__.py +3 -3
  11. aws_cdk/aws_cloudfront/__init__.py +19 -0
  12. aws_cdk/aws_codebuild/__init__.py +122 -0
  13. aws_cdk/aws_codepipeline/__init__.py +51 -50
  14. aws_cdk/aws_connect/__init__.py +40 -15
  15. aws_cdk/aws_deadline/__init__.py +16 -5
  16. aws_cdk/aws_dynamodb/__init__.py +477 -56
  17. aws_cdk/aws_ec2/__init__.py +266 -55
  18. aws_cdk/aws_ecs/__init__.py +7 -9
  19. aws_cdk/aws_eks/__init__.py +6 -4
  20. aws_cdk/aws_elasticloadbalancingv2/__init__.py +2 -2
  21. aws_cdk/aws_gameliftstreams/__init__.py +7 -6
  22. aws_cdk/aws_glue/__init__.py +18 -9
  23. aws_cdk/aws_guardduty/__init__.py +1233 -113
  24. aws_cdk/aws_iam/__init__.py +21 -6
  25. aws_cdk/aws_imagebuilder/__init__.py +34 -20
  26. aws_cdk/aws_inspectorv2/__init__.py +1516 -0
  27. aws_cdk/aws_ivs/__init__.py +1 -1
  28. aws_cdk/aws_lakeformation/__init__.py +1 -1
  29. aws_cdk/aws_lambda/__init__.py +6 -6
  30. aws_cdk/aws_omics/__init__.py +1 -1
  31. aws_cdk/aws_opensearchservice/__init__.py +128 -0
  32. aws_cdk/aws_pcs/__init__.py +16 -8
  33. aws_cdk/aws_quicksight/__init__.py +81 -83
  34. aws_cdk/aws_rds/__init__.py +31 -163
  35. aws_cdk/aws_s3express/__init__.py +7 -3
  36. aws_cdk/aws_s3tables/__init__.py +2 -2
  37. aws_cdk/aws_sagemaker/__init__.py +62 -20
  38. aws_cdk/aws_sqs/__init__.py +4 -3
  39. aws_cdk/aws_stepfunctions_tasks/__init__.py +16 -9
  40. aws_cdk/aws_synthetics/__init__.py +116 -0
  41. aws_cdk/cx_api/__init__.py +22 -0
  42. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.213.0.dist-info}/METADATA +329 -9
  43. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.213.0.dist-info}/RECORD +47 -47
  44. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.213.0.dist-info}/LICENSE +0 -0
  45. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.213.0.dist-info}/NOTICE +0 -0
  46. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.213.0.dist-info}/WHEEL +0 -0
  47. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.213.0.dist-info}/top_level.txt +0 -0
@@ -18,7 +18,9 @@ By default, `TableV2` will create a single table in the main deployment region r
18
18
  ```python
19
19
  table = dynamodb.TableV2(self, "Table",
20
20
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
21
- contributor_insights=True,
21
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
22
+ enabled=True
23
+ ),
22
24
  table_class=dynamodb.TableClass.STANDARD_INFREQUENT_ACCESS,
23
25
  point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
24
26
  point_in_time_recovery_enabled=True
@@ -68,12 +70,12 @@ global_table.add_replica(region="us-east-2", deletion_protection=True)
68
70
 
69
71
  The following properties are configurable on a per-replica basis, but will be inherited from the `TableV2` properties if not specified:
70
72
 
71
- * contributorInsights
73
+ * contributorInsightsSpecification
72
74
  * deletionProtection
73
75
  * pointInTimeRecoverySpecification
74
76
  * tableClass
75
77
  * readCapacity (only configurable if the `TableV2` billing mode is `PROVISIONED`)
76
- * globalSecondaryIndexes (only `contributorInsights` and `readCapacity`)
78
+ * globalSecondaryIndexes (only `contributorInsightsSpecification` and `readCapacity`)
77
79
 
78
80
  The following example shows how to define properties on a per-replica basis:
79
81
 
@@ -86,7 +88,9 @@ stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
86
88
 
87
89
  global_table = dynamodb.TableV2(stack, "GlobalTable",
88
90
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
89
- contributor_insights=True,
91
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
92
+ enabled=True
93
+ ),
90
94
  point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
91
95
  point_in_time_recovery_enabled=True
92
96
  ),
@@ -98,7 +102,9 @@ global_table = dynamodb.TableV2(stack, "GlobalTable",
98
102
  )
99
103
  ), dynamodb.ReplicaTableProps(
100
104
  region="us-east-2",
101
- contributor_insights=False
105
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
106
+ enabled=False
107
+ )
102
108
  )
103
109
  ]
104
110
  )
@@ -430,7 +436,7 @@ table = dynamodb.TableV2(self, "Table",
430
436
  )
431
437
  ```
432
438
 
433
- All `globalSecondaryIndexes` for replica tables are inherited from the primary table. You can configure `contributorInsights` and `readCapacity` for each `globalSecondaryIndex` on a per-replica basis:
439
+ All `globalSecondaryIndexes` for replica tables are inherited from the primary table. You can configure `contributorInsightsSpecification` and `readCapacity` for each `globalSecondaryIndex` on a per-replica basis:
434
440
 
435
441
  ```python
436
442
  import aws_cdk as cdk
@@ -441,7 +447,9 @@ stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
441
447
 
442
448
  global_table = dynamodb.TableV2(stack, "GlobalTable",
443
449
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
444
- contributor_insights=True,
450
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
451
+ enabled=True
452
+ ),
445
453
  billing=dynamodb.Billing.provisioned(
446
454
  read_capacity=dynamodb.Capacity.fixed(10),
447
455
  write_capacity=dynamodb.Capacity.autoscaled(max_capacity=10)
@@ -468,7 +476,9 @@ global_table = dynamodb.TableV2(stack, "GlobalTable",
468
476
  region="us-east-2",
469
477
  global_secondary_index_options={
470
478
  "gsi2": dynamodb.ReplicaGlobalSecondaryIndexOptions(
471
- contributor_insights=False
479
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
480
+ enabled=False
481
+ )
472
482
  )
473
483
  }
474
484
  )
@@ -586,25 +596,37 @@ table = dynamodb.TableV2(self, "Table",
586
596
 
587
597
  ## Contributor Insights
588
598
 
589
- Enabling `contributorInsights` for `TableV2` will provide information about the most accessed and throttled items in a table or `globalSecondaryIndex`. DynamoDB delivers this information to you via CloudWatch Contributor Insights rules, reports, and graphs of report data.
599
+ Enabling `contributorInsightSpecification` for `TableV2` will provide information about the most accessed and throttled or throttled only items in a table or `globalSecondaryIndex`. DynamoDB delivers this information to you via CloudWatch Contributor Insights rules, reports, and graphs of report data.
600
+
601
+ By default, Contributor Insights for DynamoDB monitors all requests, including both the most accessed and most throttled items.
602
+ To limit the scope to only the most accessed or only the most throttled items, use the optional `mode` parameter.
603
+
604
+ * To monitor all traffic on a table or index, set `mode` to `ContributorInsightsMode.ACCESSED_AND_THROTTLED_KEYS`.
605
+ * To monitor only throttled traffic on a table or index, set `mode` to `ContributorInsightsMode.THROTTLED_KEYS`.
590
606
 
591
607
  ```python
592
608
  table = dynamodb.TableV2(self, "Table",
593
609
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
594
- contributor_insights=True
610
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
611
+ enabled=True,
612
+ mode=dynamodb.ContributorInsightsMode.ACCESSED_AND_THROTTLED_KEYS
613
+ )
595
614
  )
596
615
  ```
597
616
 
598
- When you use `Table`, you can enable contributor insights for a table or specific global secondary index by setting `contributorInsightsEnabled` to `true`.
617
+ When you use `Table`, you can enable contributor insights for a table or specific global secondary index by setting `contributorInsightsSpecification` parameter `enabled` to `true`.
599
618
 
600
619
  ```python
601
620
  table = dynamodb.Table(self, "Table",
602
621
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
603
- contributor_insights_enabled=True
622
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification( # for a table
623
+ enabled=True,
624
+ mode=dynamodb.ContributorInsightsMode.THROTTLED_KEYS)
604
625
  )
605
626
 
606
627
  table.add_global_secondary_index(
607
- contributor_insights_enabled=True, # for a specific global secondary index
628
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification( # for a specific global secondary index
629
+ enabled=True),
608
630
  index_name="gsi",
609
631
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING)
610
632
  )
@@ -1584,7 +1606,10 @@ class CfnGlobalTable(
1584
1606
 
1585
1607
  # the properties below are optional
1586
1608
  contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
1587
- enabled=False
1609
+ enabled=False,
1610
+
1611
+ # the properties below are optional
1612
+ mode="mode"
1588
1613
  ),
1589
1614
  deletion_protection_enabled=False,
1590
1615
  global_secondary_indexes=[dynamodb.CfnGlobalTable.ReplicaGlobalSecondaryIndexSpecificationProperty(
@@ -1592,7 +1617,10 @@ class CfnGlobalTable(
1592
1617
 
1593
1618
  # the properties below are optional
1594
1619
  contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
1595
- enabled=False
1620
+ enabled=False,
1621
+
1622
+ # the properties below are optional
1623
+ mode="mode"
1596
1624
  ),
1597
1625
  read_on_demand_throughput_settings=dynamodb.CfnGlobalTable.ReadOnDemandThroughputSettingsProperty(
1598
1626
  max_read_request_units=123
@@ -2358,17 +2386,19 @@ class CfnGlobalTable(
2358
2386
  @jsii.data_type(
2359
2387
  jsii_type="aws-cdk-lib.aws_dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty",
2360
2388
  jsii_struct_bases=[],
2361
- name_mapping={"enabled": "enabled"},
2389
+ name_mapping={"enabled": "enabled", "mode": "mode"},
2362
2390
  )
2363
2391
  class ContributorInsightsSpecificationProperty:
2364
2392
  def __init__(
2365
2393
  self,
2366
2394
  *,
2367
2395
  enabled: typing.Union[builtins.bool, _IResolvable_da3f097b],
2396
+ mode: typing.Optional[builtins.str] = None,
2368
2397
  ) -> None:
2369
2398
  '''Configures contributor insights settings for a replica or one of its indexes.
2370
2399
 
2371
2400
  :param enabled: Indicates whether CloudWatch Contributor Insights are to be enabled (true) or disabled (false).
2401
+ :param mode:
2372
2402
 
2373
2403
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-contributorinsightsspecification.html
2374
2404
  :exampleMetadata: fixture=_generated
@@ -2380,15 +2410,21 @@ class CfnGlobalTable(
2380
2410
  from aws_cdk import aws_dynamodb as dynamodb
2381
2411
 
2382
2412
  contributor_insights_specification_property = dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
2383
- enabled=False
2413
+ enabled=False,
2414
+
2415
+ # the properties below are optional
2416
+ mode="mode"
2384
2417
  )
2385
2418
  '''
2386
2419
  if __debug__:
2387
2420
  type_hints = typing.get_type_hints(_typecheckingstub__0c4c1ec1851b3df040f636031283503da693894fbb627b438be175be8c1d8995)
2388
2421
  check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
2422
+ check_type(argname="argument mode", value=mode, expected_type=type_hints["mode"])
2389
2423
  self._values: typing.Dict[builtins.str, typing.Any] = {
2390
2424
  "enabled": enabled,
2391
2425
  }
2426
+ if mode is not None:
2427
+ self._values["mode"] = mode
2392
2428
 
2393
2429
  @builtins.property
2394
2430
  def enabled(self) -> typing.Union[builtins.bool, _IResolvable_da3f097b]:
@@ -2400,6 +2436,14 @@ class CfnGlobalTable(
2400
2436
  assert result is not None, "Required property 'enabled' is missing"
2401
2437
  return typing.cast(typing.Union[builtins.bool, _IResolvable_da3f097b], result)
2402
2438
 
2439
+ @builtins.property
2440
+ def mode(self) -> typing.Optional[builtins.str]:
2441
+ '''
2442
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-contributorinsightsspecification.html#cfn-dynamodb-globaltable-contributorinsightsspecification-mode
2443
+ '''
2444
+ result = self._values.get("mode")
2445
+ return typing.cast(typing.Optional[builtins.str], result)
2446
+
2403
2447
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
2404
2448
  return isinstance(rhs, self.__class__) and rhs._values == self._values
2405
2449
 
@@ -3287,7 +3331,10 @@ class CfnGlobalTable(
3287
3331
 
3288
3332
  # the properties below are optional
3289
3333
  contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
3290
- enabled=False
3334
+ enabled=False,
3335
+
3336
+ # the properties below are optional
3337
+ mode="mode"
3291
3338
  ),
3292
3339
  read_on_demand_throughput_settings=dynamodb.CfnGlobalTable.ReadOnDemandThroughputSettingsProperty(
3293
3340
  max_read_request_units=123
@@ -3513,7 +3560,10 @@ class CfnGlobalTable(
3513
3560
 
3514
3561
  # the properties below are optional
3515
3562
  contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
3516
- enabled=False
3563
+ enabled=False,
3564
+
3565
+ # the properties below are optional
3566
+ mode="mode"
3517
3567
  ),
3518
3568
  deletion_protection_enabled=False,
3519
3569
  global_secondary_indexes=[dynamodb.CfnGlobalTable.ReplicaGlobalSecondaryIndexSpecificationProperty(
@@ -3521,7 +3571,10 @@ class CfnGlobalTable(
3521
3571
 
3522
3572
  # the properties below are optional
3523
3573
  contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
3524
- enabled=False
3574
+ enabled=False,
3575
+
3576
+ # the properties below are optional
3577
+ mode="mode"
3525
3578
  ),
3526
3579
  read_on_demand_throughput_settings=dynamodb.CfnGlobalTable.ReadOnDemandThroughputSettingsProperty(
3527
3580
  max_read_request_units=123
@@ -4564,7 +4617,10 @@ class CfnGlobalTableProps:
4564
4617
 
4565
4618
  # the properties below are optional
4566
4619
  contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
4567
- enabled=False
4620
+ enabled=False,
4621
+
4622
+ # the properties below are optional
4623
+ mode="mode"
4568
4624
  ),
4569
4625
  deletion_protection_enabled=False,
4570
4626
  global_secondary_indexes=[dynamodb.CfnGlobalTable.ReplicaGlobalSecondaryIndexSpecificationProperty(
@@ -4572,7 +4628,10 @@ class CfnGlobalTableProps:
4572
4628
 
4573
4629
  # the properties below are optional
4574
4630
  contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
4575
- enabled=False
4631
+ enabled=False,
4632
+
4633
+ # the properties below are optional
4634
+ mode="mode"
4576
4635
  ),
4577
4636
  read_on_demand_throughput_settings=dynamodb.CfnGlobalTable.ReadOnDemandThroughputSettingsProperty(
4578
4637
  max_read_request_units=123
@@ -5051,7 +5110,10 @@ class CfnTable(
5051
5110
  )],
5052
5111
  billing_mode="billingMode",
5053
5112
  contributor_insights_specification=dynamodb.CfnTable.ContributorInsightsSpecificationProperty(
5054
- enabled=False
5113
+ enabled=False,
5114
+
5115
+ # the properties below are optional
5116
+ mode="mode"
5055
5117
  ),
5056
5118
  deletion_protection_enabled=False,
5057
5119
  global_secondary_indexes=[dynamodb.CfnTable.GlobalSecondaryIndexProperty(
@@ -5067,7 +5129,10 @@ class CfnTable(
5067
5129
 
5068
5130
  # the properties below are optional
5069
5131
  contributor_insights_specification=dynamodb.CfnTable.ContributorInsightsSpecificationProperty(
5070
- enabled=False
5132
+ enabled=False,
5133
+
5134
+ # the properties below are optional
5135
+ mode="mode"
5071
5136
  ),
5072
5137
  on_demand_throughput=dynamodb.CfnTable.OnDemandThroughputProperty(
5073
5138
  max_read_request_units=123,
@@ -5733,17 +5798,19 @@ class CfnTable(
5733
5798
  @jsii.data_type(
5734
5799
  jsii_type="aws-cdk-lib.aws_dynamodb.CfnTable.ContributorInsightsSpecificationProperty",
5735
5800
  jsii_struct_bases=[],
5736
- name_mapping={"enabled": "enabled"},
5801
+ name_mapping={"enabled": "enabled", "mode": "mode"},
5737
5802
  )
5738
5803
  class ContributorInsightsSpecificationProperty:
5739
5804
  def __init__(
5740
5805
  self,
5741
5806
  *,
5742
5807
  enabled: typing.Union[builtins.bool, _IResolvable_da3f097b],
5808
+ mode: typing.Optional[builtins.str] = None,
5743
5809
  ) -> None:
5744
5810
  '''The settings used to enable or disable CloudWatch Contributor Insights.
5745
5811
 
5746
5812
  :param enabled: Indicates whether CloudWatch Contributor Insights are to be enabled (true) or disabled (false).
5813
+ :param mode:
5747
5814
 
5748
5815
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-contributorinsightsspecification.html
5749
5816
  :exampleMetadata: fixture=_generated
@@ -5755,15 +5822,21 @@ class CfnTable(
5755
5822
  from aws_cdk import aws_dynamodb as dynamodb
5756
5823
 
5757
5824
  contributor_insights_specification_property = dynamodb.CfnTable.ContributorInsightsSpecificationProperty(
5758
- enabled=False
5825
+ enabled=False,
5826
+
5827
+ # the properties below are optional
5828
+ mode="mode"
5759
5829
  )
5760
5830
  '''
5761
5831
  if __debug__:
5762
5832
  type_hints = typing.get_type_hints(_typecheckingstub__0a8b688e9e547ebf94c63195c5144ea544272eec7f4f0112bdff07a522156c82)
5763
5833
  check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
5834
+ check_type(argname="argument mode", value=mode, expected_type=type_hints["mode"])
5764
5835
  self._values: typing.Dict[builtins.str, typing.Any] = {
5765
5836
  "enabled": enabled,
5766
5837
  }
5838
+ if mode is not None:
5839
+ self._values["mode"] = mode
5767
5840
 
5768
5841
  @builtins.property
5769
5842
  def enabled(self) -> typing.Union[builtins.bool, _IResolvable_da3f097b]:
@@ -5775,6 +5848,14 @@ class CfnTable(
5775
5848
  assert result is not None, "Required property 'enabled' is missing"
5776
5849
  return typing.cast(typing.Union[builtins.bool, _IResolvable_da3f097b], result)
5777
5850
 
5851
+ @builtins.property
5852
+ def mode(self) -> typing.Optional[builtins.str]:
5853
+ '''
5854
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-contributorinsightsspecification.html#cfn-dynamodb-table-contributorinsightsspecification-mode
5855
+ '''
5856
+ result = self._values.get("mode")
5857
+ return typing.cast(typing.Optional[builtins.str], result)
5858
+
5778
5859
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
5779
5860
  return isinstance(rhs, self.__class__) and rhs._values == self._values
5780
5861
 
@@ -5917,7 +5998,10 @@ class CfnTable(
5917
5998
 
5918
5999
  # the properties below are optional
5919
6000
  contributor_insights_specification=dynamodb.CfnTable.ContributorInsightsSpecificationProperty(
5920
- enabled=False
6001
+ enabled=False,
6002
+
6003
+ # the properties below are optional
6004
+ mode="mode"
5921
6005
  ),
5922
6006
  on_demand_throughput=dynamodb.CfnTable.OnDemandThroughputProperty(
5923
6007
  max_read_request_units=123,
@@ -7460,7 +7544,10 @@ class CfnTableProps:
7460
7544
  )],
7461
7545
  billing_mode="billingMode",
7462
7546
  contributor_insights_specification=dynamodb.CfnTable.ContributorInsightsSpecificationProperty(
7463
- enabled=False
7547
+ enabled=False,
7548
+
7549
+ # the properties below are optional
7550
+ mode="mode"
7464
7551
  ),
7465
7552
  deletion_protection_enabled=False,
7466
7553
  global_secondary_indexes=[dynamodb.CfnTable.GlobalSecondaryIndexProperty(
@@ -7476,7 +7563,10 @@ class CfnTableProps:
7476
7563
 
7477
7564
  # the properties below are optional
7478
7565
  contributor_insights_specification=dynamodb.CfnTable.ContributorInsightsSpecificationProperty(
7479
- enabled=False
7566
+ enabled=False,
7567
+
7568
+ # the properties below are optional
7569
+ mode="mode"
7480
7570
  ),
7481
7571
  on_demand_throughput=dynamodb.CfnTable.OnDemandThroughputProperty(
7482
7572
  max_read_request_units=123,
@@ -7922,6 +8012,121 @@ class CfnTableProps:
7922
8012
  )
7923
8013
 
7924
8014
 
8015
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_dynamodb.ContributorInsightsMode")
8016
+ class ContributorInsightsMode(enum.Enum):
8017
+ '''DynamoDB's Contributor Insights Mode.
8018
+
8019
+ :see: https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-dynamodb-table-contributorinsightsspecification.html
8020
+ :exampleMetadata: infused
8021
+
8022
+ Example::
8023
+
8024
+ table = dynamodb.TableV2(self, "Table",
8025
+ partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
8026
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
8027
+ enabled=True,
8028
+ mode=dynamodb.ContributorInsightsMode.ACCESSED_AND_THROTTLED_KEYS
8029
+ )
8030
+ )
8031
+ '''
8032
+
8033
+ ACCESSED_AND_THROTTLED_KEYS = "ACCESSED_AND_THROTTLED_KEYS"
8034
+ '''Emits metrics for all read and write requests, whether successful or throttled.'''
8035
+ THROTTLED_KEYS = "THROTTLED_KEYS"
8036
+ '''Emits metrics for read and write requests that were throttled.'''
8037
+
8038
+
8039
+ @jsii.data_type(
8040
+ jsii_type="aws-cdk-lib.aws_dynamodb.ContributorInsightsSpecification",
8041
+ jsii_struct_bases=[],
8042
+ name_mapping={"enabled": "enabled", "mode": "mode"},
8043
+ )
8044
+ class ContributorInsightsSpecification:
8045
+ def __init__(
8046
+ self,
8047
+ *,
8048
+ enabled: builtins.bool,
8049
+ mode: typing.Optional[ContributorInsightsMode] = None,
8050
+ ) -> None:
8051
+ '''Reference to ContributorInsightsSpecification.
8052
+
8053
+ :param enabled: Indicates whether contributor insights is enabled. Default: false
8054
+ :param mode: Indicates the type of metrics captured by contributor insights. Default: ACCESSED_AND_THROTTLED_KEYS
8055
+
8056
+ :exampleMetadata: infused
8057
+
8058
+ Example::
8059
+
8060
+ import aws_cdk as cdk
8061
+
8062
+
8063
+ app = cdk.App()
8064
+ stack = cdk.Stack(app, "Stack", env=cdk.Environment(region="us-west-2"))
8065
+
8066
+ global_table = dynamodb.TableV2(stack, "GlobalTable",
8067
+ partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
8068
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
8069
+ enabled=True
8070
+ ),
8071
+ point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
8072
+ point_in_time_recovery_enabled=True
8073
+ ),
8074
+ replicas=[dynamodb.ReplicaTableProps(
8075
+ region="us-east-1",
8076
+ table_class=dynamodb.TableClass.STANDARD_INFREQUENT_ACCESS,
8077
+ point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
8078
+ point_in_time_recovery_enabled=False
8079
+ )
8080
+ ), dynamodb.ReplicaTableProps(
8081
+ region="us-east-2",
8082
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
8083
+ enabled=False
8084
+ )
8085
+ )
8086
+ ]
8087
+ )
8088
+ '''
8089
+ if __debug__:
8090
+ type_hints = typing.get_type_hints(_typecheckingstub__656543bd456aefaef11a80dfb0950fe5597d4bc0465f2f4fdec81a81dfe7358d)
8091
+ check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
8092
+ check_type(argname="argument mode", value=mode, expected_type=type_hints["mode"])
8093
+ self._values: typing.Dict[builtins.str, typing.Any] = {
8094
+ "enabled": enabled,
8095
+ }
8096
+ if mode is not None:
8097
+ self._values["mode"] = mode
8098
+
8099
+ @builtins.property
8100
+ def enabled(self) -> builtins.bool:
8101
+ '''Indicates whether contributor insights is enabled.
8102
+
8103
+ :default: false
8104
+ '''
8105
+ result = self._values.get("enabled")
8106
+ assert result is not None, "Required property 'enabled' is missing"
8107
+ return typing.cast(builtins.bool, result)
8108
+
8109
+ @builtins.property
8110
+ def mode(self) -> typing.Optional[ContributorInsightsMode]:
8111
+ '''Indicates the type of metrics captured by contributor insights.
8112
+
8113
+ :default: ACCESSED_AND_THROTTLED_KEYS
8114
+ '''
8115
+ result = self._values.get("mode")
8116
+ return typing.cast(typing.Optional[ContributorInsightsMode], result)
8117
+
8118
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
8119
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
8120
+
8121
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
8122
+ return not (rhs == self)
8123
+
8124
+ def __repr__(self) -> str:
8125
+ return "ContributorInsightsSpecification(%s)" % ", ".join(
8126
+ k + "=" + repr(v) for k, v in self._values.items()
8127
+ )
8128
+
8129
+
7925
8130
  @jsii.data_type(
7926
8131
  jsii_type="aws-cdk-lib.aws_dynamodb.CsvOptions",
7927
8132
  jsii_struct_bases=[],
@@ -9732,7 +9937,9 @@ class PointInTimeRecoverySpecification:
9732
9937
 
9733
9938
  table = dynamodb.TableV2(self, "Table",
9734
9939
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
9735
- contributor_insights=True,
9940
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
9941
+ enabled=True
9942
+ ),
9736
9943
  table_class=dynamodb.TableClass.STANDARD_INFREQUENT_ACCESS,
9737
9944
  point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
9738
9945
  point_in_time_recovery_enabled=True
@@ -9807,6 +10014,7 @@ class ProjectionType(enum.Enum):
9807
10014
  jsii_struct_bases=[],
9808
10015
  name_mapping={
9809
10016
  "contributor_insights": "contributorInsights",
10017
+ "contributor_insights_specification": "contributorInsightsSpecification",
9810
10018
  "max_read_request_units": "maxReadRequestUnits",
9811
10019
  "read_capacity": "readCapacity",
9812
10020
  },
@@ -9816,12 +10024,14 @@ class ReplicaGlobalSecondaryIndexOptions:
9816
10024
  self,
9817
10025
  *,
9818
10026
  contributor_insights: typing.Optional[builtins.bool] = None,
10027
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
9819
10028
  max_read_request_units: typing.Optional[jsii.Number] = None,
9820
10029
  read_capacity: typing.Optional[Capacity] = None,
9821
10030
  ) -> None:
9822
10031
  '''Options used to configure global secondary indexes on a replica table.
9823
10032
 
9824
- :param contributor_insights: Whether CloudWatch contributor insights is enabled for a specific global secondary index on a replica table. Default: - inherited from the primary table
10033
+ :param contributor_insights: (deprecated) Whether CloudWatch contributor insights is enabled for a specific global secondary index on a replica table. Default: - inherited from the primary table
10034
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected for a specific global secondary index on a replica table. Default: - contributor insights is not enabled
9825
10035
  :param max_read_request_units: The maximum read request units for a specific global secondary index on a replica table. Note: This can only be configured if primary table billing is PAY_PER_REQUEST. Default: - inherited from the primary table
9826
10036
  :param read_capacity: The read capacity for a specific global secondary index on a replica table. Note: This can only be configured if primary table billing is provisioned. Default: - inherited from the primary table
9827
10037
 
@@ -9837,7 +10047,9 @@ class ReplicaGlobalSecondaryIndexOptions:
9837
10047
 
9838
10048
  global_table = dynamodb.TableV2(stack, "GlobalTable",
9839
10049
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
9840
- contributor_insights=True,
10050
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
10051
+ enabled=True
10052
+ ),
9841
10053
  billing=dynamodb.Billing.provisioned(
9842
10054
  read_capacity=dynamodb.Capacity.fixed(10),
9843
10055
  write_capacity=dynamodb.Capacity.autoscaled(max_capacity=10)
@@ -9864,21 +10076,28 @@ class ReplicaGlobalSecondaryIndexOptions:
9864
10076
  region="us-east-2",
9865
10077
  global_secondary_index_options={
9866
10078
  "gsi2": dynamodb.ReplicaGlobalSecondaryIndexOptions(
9867
- contributor_insights=False
10079
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
10080
+ enabled=False
10081
+ )
9868
10082
  )
9869
10083
  }
9870
10084
  )
9871
10085
  ]
9872
10086
  )
9873
10087
  '''
10088
+ if isinstance(contributor_insights_specification, dict):
10089
+ contributor_insights_specification = ContributorInsightsSpecification(**contributor_insights_specification)
9874
10090
  if __debug__:
9875
10091
  type_hints = typing.get_type_hints(_typecheckingstub__eaa3a170e1978a5997011b8319bcd83bf34642dac50e342aad0705ee28b15714)
9876
10092
  check_type(argname="argument contributor_insights", value=contributor_insights, expected_type=type_hints["contributor_insights"])
10093
+ check_type(argname="argument contributor_insights_specification", value=contributor_insights_specification, expected_type=type_hints["contributor_insights_specification"])
9877
10094
  check_type(argname="argument max_read_request_units", value=max_read_request_units, expected_type=type_hints["max_read_request_units"])
9878
10095
  check_type(argname="argument read_capacity", value=read_capacity, expected_type=type_hints["read_capacity"])
9879
10096
  self._values: typing.Dict[builtins.str, typing.Any] = {}
9880
10097
  if contributor_insights is not None:
9881
10098
  self._values["contributor_insights"] = contributor_insights
10099
+ if contributor_insights_specification is not None:
10100
+ self._values["contributor_insights_specification"] = contributor_insights_specification
9882
10101
  if max_read_request_units is not None:
9883
10102
  self._values["max_read_request_units"] = max_read_request_units
9884
10103
  if read_capacity is not None:
@@ -9886,13 +10105,28 @@ class ReplicaGlobalSecondaryIndexOptions:
9886
10105
 
9887
10106
  @builtins.property
9888
10107
  def contributor_insights(self) -> typing.Optional[builtins.bool]:
9889
- '''Whether CloudWatch contributor insights is enabled for a specific global secondary index on a replica table.
10108
+ '''(deprecated) Whether CloudWatch contributor insights is enabled for a specific global secondary index on a replica table.
9890
10109
 
9891
10110
  :default: - inherited from the primary table
10111
+
10112
+ :deprecated: use ``contributorInsightsSpecification`` instead
10113
+
10114
+ :stability: deprecated
9892
10115
  '''
9893
10116
  result = self._values.get("contributor_insights")
9894
10117
  return typing.cast(typing.Optional[builtins.bool], result)
9895
10118
 
10119
+ @builtins.property
10120
+ def contributor_insights_specification(
10121
+ self,
10122
+ ) -> typing.Optional[ContributorInsightsSpecification]:
10123
+ '''Whether CloudWatch contributor insights is enabled and what mode is selected for a specific global secondary index on a replica table.
10124
+
10125
+ :default: - contributor insights is not enabled
10126
+ '''
10127
+ result = self._values.get("contributor_insights_specification")
10128
+ return typing.cast(typing.Optional[ContributorInsightsSpecification], result)
10129
+
9896
10130
  @builtins.property
9897
10131
  def max_read_request_units(self) -> typing.Optional[jsii.Number]:
9898
10132
  '''The maximum read request units for a specific global secondary index on a replica table.
@@ -12639,7 +12873,9 @@ class TableClass(enum.Enum):
12639
12873
 
12640
12874
  table = dynamodb.TableV2(self, "Table",
12641
12875
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
12642
- contributor_insights=True,
12876
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
12877
+ enabled=True
12878
+ ),
12643
12879
  table_class=dynamodb.TableClass.STANDARD_INFREQUENT_ACCESS,
12644
12880
  point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
12645
12881
  point_in_time_recovery_enabled=True
@@ -12769,6 +13005,7 @@ typing.cast(typing.Any, TableEncryptionV2).__jsii_proxy_class__ = lambda : _Tabl
12769
13005
  "sort_key": "sortKey",
12770
13006
  "billing_mode": "billingMode",
12771
13007
  "contributor_insights_enabled": "contributorInsightsEnabled",
13008
+ "contributor_insights_specification": "contributorInsightsSpecification",
12772
13009
  "deletion_protection": "deletionProtection",
12773
13010
  "encryption": "encryption",
12774
13011
  "encryption_key": "encryptionKey",
@@ -12799,6 +13036,7 @@ class TableOptions(SchemaOptions):
12799
13036
  sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
12800
13037
  billing_mode: typing.Optional[BillingMode] = None,
12801
13038
  contributor_insights_enabled: typing.Optional[builtins.bool] = None,
13039
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
12802
13040
  deletion_protection: typing.Optional[builtins.bool] = None,
12803
13041
  encryption: typing.Optional[TableEncryption] = None,
12804
13042
  encryption_key: typing.Optional[_IKey_5f11635f] = None,
@@ -12827,7 +13065,8 @@ class TableOptions(SchemaOptions):
12827
13065
  :param partition_key: Partition key attribute definition.
12828
13066
  :param sort_key: Sort key attribute definition. Default: no sort key
12829
13067
  :param billing_mode: Specify how you are charged for read and write throughput and how you manage capacity. Default: PROVISIONED if ``replicationRegions`` is not specified, PAY_PER_REQUEST otherwise
12830
- :param contributor_insights_enabled: Whether CloudWatch contributor insights is enabled. Default: false
13068
+ :param contributor_insights_enabled: (deprecated) Whether CloudWatch contributor insights is enabled. Default: false
13069
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
12831
13070
  :param deletion_protection: Enables deletion protection for the table. Default: false
12832
13071
  :param encryption: Whether server-side encryption with an AWS managed customer master key is enabled. This property cannot be set if ``serverSideEncryption`` is set. .. epigraph:: **NOTE**: if you set this to ``CUSTOMER_MANAGED`` and ``encryptionKey`` is not specified, the key that the Tablet generates for you will be created with default permissions. If you are using CDKv2, these permissions will be sufficient to enable the key for use with DynamoDB tables. If you are using CDKv1, make sure the feature flag ``@aws-cdk/aws-kms:defaultKeyPolicies`` is set to ``true`` in your ``cdk.json``. Default: - The table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
12833
13072
  :param encryption_key: External KMS key to use for table encryption. This property can only be set if ``encryption`` is set to ``TableEncryption.CUSTOMER_MANAGED``. Default: - If ``encryption`` is set to ``TableEncryption.CUSTOMER_MANAGED`` and this property is undefined, a new KMS key will be created and associated with this table. If ``encryption`` and this property are both undefined, then the table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
@@ -12875,6 +13114,12 @@ class TableOptions(SchemaOptions):
12875
13114
  # the properties below are optional
12876
13115
  billing_mode=dynamodb.BillingMode.PAY_PER_REQUEST,
12877
13116
  contributor_insights_enabled=False,
13117
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
13118
+ enabled=False,
13119
+
13120
+ # the properties below are optional
13121
+ mode=dynamodb.ContributorInsightsMode.ACCESSED_AND_THROTTLED_KEYS
13122
+ ),
12878
13123
  deletion_protection=False,
12879
13124
  encryption=dynamodb.TableEncryption.DEFAULT,
12880
13125
  encryption_key=key,
@@ -12921,6 +13166,8 @@ class TableOptions(SchemaOptions):
12921
13166
  partition_key = Attribute(**partition_key)
12922
13167
  if isinstance(sort_key, dict):
12923
13168
  sort_key = Attribute(**sort_key)
13169
+ if isinstance(contributor_insights_specification, dict):
13170
+ contributor_insights_specification = ContributorInsightsSpecification(**contributor_insights_specification)
12924
13171
  if isinstance(import_source, dict):
12925
13172
  import_source = ImportSourceSpecification(**import_source)
12926
13173
  if isinstance(point_in_time_recovery_specification, dict):
@@ -12933,6 +13180,7 @@ class TableOptions(SchemaOptions):
12933
13180
  check_type(argname="argument sort_key", value=sort_key, expected_type=type_hints["sort_key"])
12934
13181
  check_type(argname="argument billing_mode", value=billing_mode, expected_type=type_hints["billing_mode"])
12935
13182
  check_type(argname="argument contributor_insights_enabled", value=contributor_insights_enabled, expected_type=type_hints["contributor_insights_enabled"])
13183
+ check_type(argname="argument contributor_insights_specification", value=contributor_insights_specification, expected_type=type_hints["contributor_insights_specification"])
12936
13184
  check_type(argname="argument deletion_protection", value=deletion_protection, expected_type=type_hints["deletion_protection"])
12937
13185
  check_type(argname="argument encryption", value=encryption, expected_type=type_hints["encryption"])
12938
13186
  check_type(argname="argument encryption_key", value=encryption_key, expected_type=type_hints["encryption_key"])
@@ -12962,6 +13210,8 @@ class TableOptions(SchemaOptions):
12962
13210
  self._values["billing_mode"] = billing_mode
12963
13211
  if contributor_insights_enabled is not None:
12964
13212
  self._values["contributor_insights_enabled"] = contributor_insights_enabled
13213
+ if contributor_insights_specification is not None:
13214
+ self._values["contributor_insights_specification"] = contributor_insights_specification
12965
13215
  if deletion_protection is not None:
12966
13216
  self._values["deletion_protection"] = deletion_protection
12967
13217
  if encryption is not None:
@@ -13030,13 +13280,28 @@ class TableOptions(SchemaOptions):
13030
13280
 
13031
13281
  @builtins.property
13032
13282
  def contributor_insights_enabled(self) -> typing.Optional[builtins.bool]:
13033
- '''Whether CloudWatch contributor insights is enabled.
13283
+ '''(deprecated) Whether CloudWatch contributor insights is enabled.
13034
13284
 
13035
13285
  :default: false
13286
+
13287
+ :deprecated: use `contributorInsightsSpecification instead
13288
+
13289
+ :stability: deprecated
13036
13290
  '''
13037
13291
  result = self._values.get("contributor_insights_enabled")
13038
13292
  return typing.cast(typing.Optional[builtins.bool], result)
13039
13293
 
13294
+ @builtins.property
13295
+ def contributor_insights_specification(
13296
+ self,
13297
+ ) -> typing.Optional[ContributorInsightsSpecification]:
13298
+ '''Whether CloudWatch contributor insights is enabled and what mode is selected.
13299
+
13300
+ :default: - contributor insights is not enabled
13301
+ '''
13302
+ result = self._values.get("contributor_insights_specification")
13303
+ return typing.cast(typing.Optional[ContributorInsightsSpecification], result)
13304
+
13040
13305
  @builtins.property
13041
13306
  def deletion_protection(self) -> typing.Optional[builtins.bool]:
13042
13307
  '''Enables deletion protection for the table.
@@ -13301,6 +13566,7 @@ class TableOptions(SchemaOptions):
13301
13566
  jsii_struct_bases=[],
13302
13567
  name_mapping={
13303
13568
  "contributor_insights": "contributorInsights",
13569
+ "contributor_insights_specification": "contributorInsightsSpecification",
13304
13570
  "deletion_protection": "deletionProtection",
13305
13571
  "kinesis_stream": "kinesisStream",
13306
13572
  "point_in_time_recovery": "pointInTimeRecovery",
@@ -13315,6 +13581,7 @@ class TableOptionsV2:
13315
13581
  self,
13316
13582
  *,
13317
13583
  contributor_insights: typing.Optional[builtins.bool] = None,
13584
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
13318
13585
  deletion_protection: typing.Optional[builtins.bool] = None,
13319
13586
  kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
13320
13587
  point_in_time_recovery: typing.Optional[builtins.bool] = None,
@@ -13325,7 +13592,8 @@ class TableOptionsV2:
13325
13592
  ) -> None:
13326
13593
  '''Options used to configure a DynamoDB table.
13327
13594
 
13328
- :param contributor_insights: Whether CloudWatch contributor insights is enabled. Default: false
13595
+ :param contributor_insights: (deprecated) Whether CloudWatch contributor insights is enabled. Default: false
13596
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
13329
13597
  :param deletion_protection: Whether deletion protection is enabled. Default: false
13330
13598
  :param kinesis_stream: Kinesis Data Stream to capture item level changes. Default: - no Kinesis Data Stream
13331
13599
  :param point_in_time_recovery: (deprecated) Whether point-in-time recovery is enabled. Default: false - point in time recovery is not enabled.
@@ -13349,6 +13617,12 @@ class TableOptionsV2:
13349
13617
 
13350
13618
  table_options_v2 = dynamodb.TableOptionsV2(
13351
13619
  contributor_insights=False,
13620
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
13621
+ enabled=False,
13622
+
13623
+ # the properties below are optional
13624
+ mode=dynamodb.ContributorInsightsMode.ACCESSED_AND_THROTTLED_KEYS
13625
+ ),
13352
13626
  deletion_protection=False,
13353
13627
  kinesis_stream=stream,
13354
13628
  point_in_time_recovery=False,
@@ -13366,11 +13640,14 @@ class TableOptionsV2:
13366
13640
  )]
13367
13641
  )
13368
13642
  '''
13643
+ if isinstance(contributor_insights_specification, dict):
13644
+ contributor_insights_specification = ContributorInsightsSpecification(**contributor_insights_specification)
13369
13645
  if isinstance(point_in_time_recovery_specification, dict):
13370
13646
  point_in_time_recovery_specification = PointInTimeRecoverySpecification(**point_in_time_recovery_specification)
13371
13647
  if __debug__:
13372
13648
  type_hints = typing.get_type_hints(_typecheckingstub__1b65ee3c8ef5c3b632f4d1fad233252caadaa5f607c0fd92f49b64933f1de51c)
13373
13649
  check_type(argname="argument contributor_insights", value=contributor_insights, expected_type=type_hints["contributor_insights"])
13650
+ check_type(argname="argument contributor_insights_specification", value=contributor_insights_specification, expected_type=type_hints["contributor_insights_specification"])
13374
13651
  check_type(argname="argument deletion_protection", value=deletion_protection, expected_type=type_hints["deletion_protection"])
13375
13652
  check_type(argname="argument kinesis_stream", value=kinesis_stream, expected_type=type_hints["kinesis_stream"])
13376
13653
  check_type(argname="argument point_in_time_recovery", value=point_in_time_recovery, expected_type=type_hints["point_in_time_recovery"])
@@ -13381,6 +13658,8 @@ class TableOptionsV2:
13381
13658
  self._values: typing.Dict[builtins.str, typing.Any] = {}
13382
13659
  if contributor_insights is not None:
13383
13660
  self._values["contributor_insights"] = contributor_insights
13661
+ if contributor_insights_specification is not None:
13662
+ self._values["contributor_insights_specification"] = contributor_insights_specification
13384
13663
  if deletion_protection is not None:
13385
13664
  self._values["deletion_protection"] = deletion_protection
13386
13665
  if kinesis_stream is not None:
@@ -13398,13 +13677,28 @@ class TableOptionsV2:
13398
13677
 
13399
13678
  @builtins.property
13400
13679
  def contributor_insights(self) -> typing.Optional[builtins.bool]:
13401
- '''Whether CloudWatch contributor insights is enabled.
13680
+ '''(deprecated) Whether CloudWatch contributor insights is enabled.
13402
13681
 
13403
13682
  :default: false
13683
+
13684
+ :deprecated: use ``contributorInsightsSpecification`` instead
13685
+
13686
+ :stability: deprecated
13404
13687
  '''
13405
13688
  result = self._values.get("contributor_insights")
13406
13689
  return typing.cast(typing.Optional[builtins.bool], result)
13407
13690
 
13691
+ @builtins.property
13692
+ def contributor_insights_specification(
13693
+ self,
13694
+ ) -> typing.Optional[ContributorInsightsSpecification]:
13695
+ '''Whether CloudWatch contributor insights is enabled and what mode is selected.
13696
+
13697
+ :default: - contributor insights is not enabled
13698
+ '''
13699
+ result = self._values.get("contributor_insights_specification")
13700
+ return typing.cast(typing.Optional[ContributorInsightsSpecification], result)
13701
+
13408
13702
  @builtins.property
13409
13703
  def deletion_protection(self) -> typing.Optional[builtins.bool]:
13410
13704
  '''Whether deletion protection is enabled.
@@ -13496,6 +13790,7 @@ class TableOptionsV2:
13496
13790
  "sort_key": "sortKey",
13497
13791
  "billing_mode": "billingMode",
13498
13792
  "contributor_insights_enabled": "contributorInsightsEnabled",
13793
+ "contributor_insights_specification": "contributorInsightsSpecification",
13499
13794
  "deletion_protection": "deletionProtection",
13500
13795
  "encryption": "encryption",
13501
13796
  "encryption_key": "encryptionKey",
@@ -13529,6 +13824,7 @@ class TableProps(TableOptions):
13529
13824
  sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
13530
13825
  billing_mode: typing.Optional[BillingMode] = None,
13531
13826
  contributor_insights_enabled: typing.Optional[builtins.bool] = None,
13827
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
13532
13828
  deletion_protection: typing.Optional[builtins.bool] = None,
13533
13829
  encryption: typing.Optional[TableEncryption] = None,
13534
13830
  encryption_key: typing.Optional[_IKey_5f11635f] = None,
@@ -13558,7 +13854,8 @@ class TableProps(TableOptions):
13558
13854
  :param partition_key: Partition key attribute definition.
13559
13855
  :param sort_key: Sort key attribute definition. Default: no sort key
13560
13856
  :param billing_mode: Specify how you are charged for read and write throughput and how you manage capacity. Default: PROVISIONED if ``replicationRegions`` is not specified, PAY_PER_REQUEST otherwise
13561
- :param contributor_insights_enabled: Whether CloudWatch contributor insights is enabled. Default: false
13857
+ :param contributor_insights_enabled: (deprecated) Whether CloudWatch contributor insights is enabled. Default: false
13858
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
13562
13859
  :param deletion_protection: Enables deletion protection for the table. Default: false
13563
13860
  :param encryption: Whether server-side encryption with an AWS managed customer master key is enabled. This property cannot be set if ``serverSideEncryption`` is set. .. epigraph:: **NOTE**: if you set this to ``CUSTOMER_MANAGED`` and ``encryptionKey`` is not specified, the key that the Tablet generates for you will be created with default permissions. If you are using CDKv2, these permissions will be sufficient to enable the key for use with DynamoDB tables. If you are using CDKv1, make sure the feature flag ``@aws-cdk/aws-kms:defaultKeyPolicies`` is set to ``true`` in your ``cdk.json``. Default: - The table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
13564
13861
  :param encryption_key: External KMS key to use for table encryption. This property can only be set if ``encryption`` is set to ``TableEncryption.CUSTOMER_MANAGED``. Default: - If ``encryption`` is set to ``TableEncryption.CUSTOMER_MANAGED`` and this property is undefined, a new KMS key will be created and associated with this table. If ``encryption`` and this property are both undefined, then the table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
@@ -13613,6 +13910,8 @@ class TableProps(TableOptions):
13613
13910
  partition_key = Attribute(**partition_key)
13614
13911
  if isinstance(sort_key, dict):
13615
13912
  sort_key = Attribute(**sort_key)
13913
+ if isinstance(contributor_insights_specification, dict):
13914
+ contributor_insights_specification = ContributorInsightsSpecification(**contributor_insights_specification)
13616
13915
  if isinstance(import_source, dict):
13617
13916
  import_source = ImportSourceSpecification(**import_source)
13618
13917
  if isinstance(point_in_time_recovery_specification, dict):
@@ -13625,6 +13924,7 @@ class TableProps(TableOptions):
13625
13924
  check_type(argname="argument sort_key", value=sort_key, expected_type=type_hints["sort_key"])
13626
13925
  check_type(argname="argument billing_mode", value=billing_mode, expected_type=type_hints["billing_mode"])
13627
13926
  check_type(argname="argument contributor_insights_enabled", value=contributor_insights_enabled, expected_type=type_hints["contributor_insights_enabled"])
13927
+ check_type(argname="argument contributor_insights_specification", value=contributor_insights_specification, expected_type=type_hints["contributor_insights_specification"])
13628
13928
  check_type(argname="argument deletion_protection", value=deletion_protection, expected_type=type_hints["deletion_protection"])
13629
13929
  check_type(argname="argument encryption", value=encryption, expected_type=type_hints["encryption"])
13630
13930
  check_type(argname="argument encryption_key", value=encryption_key, expected_type=type_hints["encryption_key"])
@@ -13657,6 +13957,8 @@ class TableProps(TableOptions):
13657
13957
  self._values["billing_mode"] = billing_mode
13658
13958
  if contributor_insights_enabled is not None:
13659
13959
  self._values["contributor_insights_enabled"] = contributor_insights_enabled
13960
+ if contributor_insights_specification is not None:
13961
+ self._values["contributor_insights_specification"] = contributor_insights_specification
13660
13962
  if deletion_protection is not None:
13661
13963
  self._values["deletion_protection"] = deletion_protection
13662
13964
  if encryption is not None:
@@ -13731,13 +14033,28 @@ class TableProps(TableOptions):
13731
14033
 
13732
14034
  @builtins.property
13733
14035
  def contributor_insights_enabled(self) -> typing.Optional[builtins.bool]:
13734
- '''Whether CloudWatch contributor insights is enabled.
14036
+ '''(deprecated) Whether CloudWatch contributor insights is enabled.
13735
14037
 
13736
14038
  :default: false
14039
+
14040
+ :deprecated: use `contributorInsightsSpecification instead
14041
+
14042
+ :stability: deprecated
13737
14043
  '''
13738
14044
  result = self._values.get("contributor_insights_enabled")
13739
14045
  return typing.cast(typing.Optional[builtins.bool], result)
13740
14046
 
14047
+ @builtins.property
14048
+ def contributor_insights_specification(
14049
+ self,
14050
+ ) -> typing.Optional[ContributorInsightsSpecification]:
14051
+ '''Whether CloudWatch contributor insights is enabled and what mode is selected.
14052
+
14053
+ :default: - contributor insights is not enabled
14054
+ '''
14055
+ result = self._values.get("contributor_insights_specification")
14056
+ return typing.cast(typing.Optional[ContributorInsightsSpecification], result)
14057
+
13741
14058
  @builtins.property
13742
14059
  def deletion_protection(self) -> typing.Optional[builtins.bool]:
13743
14060
  '''Enables deletion protection for the table.
@@ -14031,6 +14348,7 @@ class TableProps(TableOptions):
14031
14348
  jsii_struct_bases=[TableOptionsV2],
14032
14349
  name_mapping={
14033
14350
  "contributor_insights": "contributorInsights",
14351
+ "contributor_insights_specification": "contributorInsightsSpecification",
14034
14352
  "deletion_protection": "deletionProtection",
14035
14353
  "kinesis_stream": "kinesisStream",
14036
14354
  "point_in_time_recovery": "pointInTimeRecovery",
@@ -14059,6 +14377,7 @@ class TablePropsV2(TableOptionsV2):
14059
14377
  self,
14060
14378
  *,
14061
14379
  contributor_insights: typing.Optional[builtins.bool] = None,
14380
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
14062
14381
  deletion_protection: typing.Optional[builtins.bool] = None,
14063
14382
  kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
14064
14383
  point_in_time_recovery: typing.Optional[builtins.bool] = None,
@@ -14083,7 +14402,8 @@ class TablePropsV2(TableOptionsV2):
14083
14402
  ) -> None:
14084
14403
  '''Properties used to configure a DynamoDB table.
14085
14404
 
14086
- :param contributor_insights: Whether CloudWatch contributor insights is enabled. Default: false
14405
+ :param contributor_insights: (deprecated) Whether CloudWatch contributor insights is enabled. Default: false
14406
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
14087
14407
  :param deletion_protection: Whether deletion protection is enabled. Default: false
14088
14408
  :param kinesis_stream: Kinesis Data Stream to capture item level changes. Default: - no Kinesis Data Stream
14089
14409
  :param point_in_time_recovery: (deprecated) Whether point-in-time recovery is enabled. Default: false - point in time recovery is not enabled.
@@ -14119,11 +14439,12 @@ class TablePropsV2(TableOptionsV2):
14119
14439
  mrsc_table = dynamodb.TableV2(stack, "MRSCTable",
14120
14440
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
14121
14441
  multi_region_consistency=dynamodb.MultiRegionConsistency.STRONG,
14122
- replicas=[dynamodb.ReplicaTableProps(region="us-east-1")
14123
- ],
14124
- witness_region="us-east-2"
14442
+ replicas=[dynamodb.ReplicaTableProps(region="us-east-1"), dynamodb.ReplicaTableProps(region="us-east-2")
14443
+ ]
14125
14444
  )
14126
14445
  '''
14446
+ if isinstance(contributor_insights_specification, dict):
14447
+ contributor_insights_specification = ContributorInsightsSpecification(**contributor_insights_specification)
14127
14448
  if isinstance(point_in_time_recovery_specification, dict):
14128
14449
  point_in_time_recovery_specification = PointInTimeRecoverySpecification(**point_in_time_recovery_specification)
14129
14450
  if isinstance(partition_key, dict):
@@ -14135,6 +14456,7 @@ class TablePropsV2(TableOptionsV2):
14135
14456
  if __debug__:
14136
14457
  type_hints = typing.get_type_hints(_typecheckingstub__205e5df85e01c6c2d91d5922a57e3ed5903027748a8b3222622bebd1077e84ba)
14137
14458
  check_type(argname="argument contributor_insights", value=contributor_insights, expected_type=type_hints["contributor_insights"])
14459
+ check_type(argname="argument contributor_insights_specification", value=contributor_insights_specification, expected_type=type_hints["contributor_insights_specification"])
14138
14460
  check_type(argname="argument deletion_protection", value=deletion_protection, expected_type=type_hints["deletion_protection"])
14139
14461
  check_type(argname="argument kinesis_stream", value=kinesis_stream, expected_type=type_hints["kinesis_stream"])
14140
14462
  check_type(argname="argument point_in_time_recovery", value=point_in_time_recovery, expected_type=type_hints["point_in_time_recovery"])
@@ -14161,6 +14483,8 @@ class TablePropsV2(TableOptionsV2):
14161
14483
  }
14162
14484
  if contributor_insights is not None:
14163
14485
  self._values["contributor_insights"] = contributor_insights
14486
+ if contributor_insights_specification is not None:
14487
+ self._values["contributor_insights_specification"] = contributor_insights_specification
14164
14488
  if deletion_protection is not None:
14165
14489
  self._values["deletion_protection"] = deletion_protection
14166
14490
  if kinesis_stream is not None:
@@ -14204,13 +14528,28 @@ class TablePropsV2(TableOptionsV2):
14204
14528
 
14205
14529
  @builtins.property
14206
14530
  def contributor_insights(self) -> typing.Optional[builtins.bool]:
14207
- '''Whether CloudWatch contributor insights is enabled.
14531
+ '''(deprecated) Whether CloudWatch contributor insights is enabled.
14208
14532
 
14209
14533
  :default: false
14534
+
14535
+ :deprecated: use ``contributorInsightsSpecification`` instead
14536
+
14537
+ :stability: deprecated
14210
14538
  '''
14211
14539
  result = self._values.get("contributor_insights")
14212
14540
  return typing.cast(typing.Optional[builtins.bool], result)
14213
14541
 
14542
+ @builtins.property
14543
+ def contributor_insights_specification(
14544
+ self,
14545
+ ) -> typing.Optional[ContributorInsightsSpecification]:
14546
+ '''Whether CloudWatch contributor insights is enabled and what mode is selected.
14547
+
14548
+ :default: - contributor insights is not enabled
14549
+ '''
14550
+ result = self._values.get("contributor_insights_specification")
14551
+ return typing.cast(typing.Optional[ContributorInsightsSpecification], result)
14552
+
14214
14553
  @builtins.property
14215
14554
  def deletion_protection(self) -> typing.Optional[builtins.bool]:
14216
14555
  '''Whether deletion protection is enabled.
@@ -14485,6 +14824,7 @@ class TableV2(
14485
14824
  warm_throughput: typing.Optional[typing.Union["WarmThroughput", typing.Dict[builtins.str, typing.Any]]] = None,
14486
14825
  witness_region: typing.Optional[builtins.str] = None,
14487
14826
  contributor_insights: typing.Optional[builtins.bool] = None,
14827
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
14488
14828
  deletion_protection: typing.Optional[builtins.bool] = None,
14489
14829
  kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
14490
14830
  point_in_time_recovery: typing.Optional[builtins.bool] = None,
@@ -14510,7 +14850,8 @@ class TableV2(
14510
14850
  :param time_to_live_attribute: The name of the TTL attribute. Default: - TTL is disabled
14511
14851
  :param warm_throughput: The warm throughput configuration for the table. Default: - no warm throughput is configured
14512
14852
  :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
14513
- :param contributor_insights: Whether CloudWatch contributor insights is enabled. Default: false
14853
+ :param contributor_insights: (deprecated) Whether CloudWatch contributor insights is enabled. Default: false
14854
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
14514
14855
  :param deletion_protection: Whether deletion protection is enabled. Default: false
14515
14856
  :param kinesis_stream: Kinesis Data Stream to capture item level changes. Default: - no Kinesis Data Stream
14516
14857
  :param point_in_time_recovery: (deprecated) Whether point-in-time recovery is enabled. Default: false - point in time recovery is not enabled.
@@ -14539,6 +14880,7 @@ class TableV2(
14539
14880
  warm_throughput=warm_throughput,
14540
14881
  witness_region=witness_region,
14541
14882
  contributor_insights=contributor_insights,
14883
+ contributor_insights_specification=contributor_insights_specification,
14542
14884
  deletion_protection=deletion_protection,
14543
14885
  kinesis_stream=kinesis_stream,
14544
14886
  point_in_time_recovery=point_in_time_recovery,
@@ -14719,6 +15061,7 @@ class TableV2(
14719
15061
  max_read_request_units: typing.Optional[jsii.Number] = None,
14720
15062
  read_capacity: typing.Optional[Capacity] = None,
14721
15063
  contributor_insights: typing.Optional[builtins.bool] = None,
15064
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
14722
15065
  deletion_protection: typing.Optional[builtins.bool] = None,
14723
15066
  kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
14724
15067
  point_in_time_recovery: typing.Optional[builtins.bool] = None,
@@ -14735,7 +15078,8 @@ class TableV2(
14735
15078
  :param global_secondary_index_options: Options used to configure global secondary index properties. Default: - inherited from the primary table
14736
15079
  :param max_read_request_units: The maximum read request units. Note: This can only be configured if the primary table billing is PAY_PER_REQUEST. Default: - inherited from the primary table
14737
15080
  :param read_capacity: The read capacity. Note: This can only be configured if the primary table billing is provisioned. Default: - inherited from the primary table
14738
- :param contributor_insights: Whether CloudWatch contributor insights is enabled. Default: false
15081
+ :param contributor_insights: (deprecated) Whether CloudWatch contributor insights is enabled. Default: false
15082
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
14739
15083
  :param deletion_protection: Whether deletion protection is enabled. Default: false
14740
15084
  :param kinesis_stream: Kinesis Data Stream to capture item level changes. Default: - no Kinesis Data Stream
14741
15085
  :param point_in_time_recovery: (deprecated) Whether point-in-time recovery is enabled. Default: false - point in time recovery is not enabled.
@@ -14750,6 +15094,7 @@ class TableV2(
14750
15094
  max_read_request_units=max_read_request_units,
14751
15095
  read_capacity=read_capacity,
14752
15096
  contributor_insights=contributor_insights,
15097
+ contributor_insights_specification=contributor_insights_specification,
14753
15098
  deletion_protection=deletion_protection,
14754
15099
  kinesis_stream=kinesis_stream,
14755
15100
  point_in_time_recovery=point_in_time_recovery,
@@ -15147,6 +15492,7 @@ class WarmThroughput:
15147
15492
  "partition_key": "partitionKey",
15148
15493
  "sort_key": "sortKey",
15149
15494
  "contributor_insights_enabled": "contributorInsightsEnabled",
15495
+ "contributor_insights_specification": "contributorInsightsSpecification",
15150
15496
  "max_read_request_units": "maxReadRequestUnits",
15151
15497
  "max_write_request_units": "maxWriteRequestUnits",
15152
15498
  "read_capacity": "readCapacity",
@@ -15164,6 +15510,7 @@ class GlobalSecondaryIndexProps(SecondaryIndexProps, SchemaOptions):
15164
15510
  partition_key: typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]],
15165
15511
  sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
15166
15512
  contributor_insights_enabled: typing.Optional[builtins.bool] = None,
15513
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
15167
15514
  max_read_request_units: typing.Optional[jsii.Number] = None,
15168
15515
  max_write_request_units: typing.Optional[jsii.Number] = None,
15169
15516
  read_capacity: typing.Optional[jsii.Number] = None,
@@ -15177,7 +15524,8 @@ class GlobalSecondaryIndexProps(SecondaryIndexProps, SchemaOptions):
15177
15524
  :param projection_type: The set of attributes that are projected into the secondary index. Default: ALL
15178
15525
  :param partition_key: Partition key attribute definition.
15179
15526
  :param sort_key: Sort key attribute definition. Default: no sort key
15180
- :param contributor_insights_enabled: Whether CloudWatch contributor insights is enabled for the specified global secondary index. Default: false
15527
+ :param contributor_insights_enabled: (deprecated) Whether CloudWatch contributor insights is enabled for the specified global secondary index. Default: false
15528
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
15181
15529
  :param max_read_request_units: The maximum read request units for the global secondary index. Can only be provided if table billingMode is PAY_PER_REQUEST. Default: - on-demand throughput is disabled
15182
15530
  :param max_write_request_units: The maximum write request units for the global secondary index. Can only be provided if table billingMode is PAY_PER_REQUEST. Default: - on-demand throughput is disabled
15183
15531
  :param read_capacity: The read capacity for the global secondary index. Can only be provided if table billingMode is Provisioned or undefined. Default: 5
@@ -15190,11 +15538,14 @@ class GlobalSecondaryIndexProps(SecondaryIndexProps, SchemaOptions):
15190
15538
 
15191
15539
  table = dynamodb.Table(self, "Table",
15192
15540
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
15193
- contributor_insights_enabled=True
15541
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification( # for a table
15542
+ enabled=True,
15543
+ mode=dynamodb.ContributorInsightsMode.THROTTLED_KEYS)
15194
15544
  )
15195
15545
 
15196
15546
  table.add_global_secondary_index(
15197
- contributor_insights_enabled=True, # for a specific global secondary index
15547
+ contributor_insights_specification=dynamodb.ContributorInsightsSpecification( # for a specific global secondary index
15548
+ enabled=True),
15198
15549
  index_name="gsi",
15199
15550
  partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING)
15200
15551
  )
@@ -15203,6 +15554,8 @@ class GlobalSecondaryIndexProps(SecondaryIndexProps, SchemaOptions):
15203
15554
  partition_key = Attribute(**partition_key)
15204
15555
  if isinstance(sort_key, dict):
15205
15556
  sort_key = Attribute(**sort_key)
15557
+ if isinstance(contributor_insights_specification, dict):
15558
+ contributor_insights_specification = ContributorInsightsSpecification(**contributor_insights_specification)
15206
15559
  if isinstance(warm_throughput, dict):
15207
15560
  warm_throughput = WarmThroughput(**warm_throughput)
15208
15561
  if __debug__:
@@ -15213,6 +15566,7 @@ class GlobalSecondaryIndexProps(SecondaryIndexProps, SchemaOptions):
15213
15566
  check_type(argname="argument partition_key", value=partition_key, expected_type=type_hints["partition_key"])
15214
15567
  check_type(argname="argument sort_key", value=sort_key, expected_type=type_hints["sort_key"])
15215
15568
  check_type(argname="argument contributor_insights_enabled", value=contributor_insights_enabled, expected_type=type_hints["contributor_insights_enabled"])
15569
+ check_type(argname="argument contributor_insights_specification", value=contributor_insights_specification, expected_type=type_hints["contributor_insights_specification"])
15216
15570
  check_type(argname="argument max_read_request_units", value=max_read_request_units, expected_type=type_hints["max_read_request_units"])
15217
15571
  check_type(argname="argument max_write_request_units", value=max_write_request_units, expected_type=type_hints["max_write_request_units"])
15218
15572
  check_type(argname="argument read_capacity", value=read_capacity, expected_type=type_hints["read_capacity"])
@@ -15230,6 +15584,8 @@ class GlobalSecondaryIndexProps(SecondaryIndexProps, SchemaOptions):
15230
15584
  self._values["sort_key"] = sort_key
15231
15585
  if contributor_insights_enabled is not None:
15232
15586
  self._values["contributor_insights_enabled"] = contributor_insights_enabled
15587
+ if contributor_insights_specification is not None:
15588
+ self._values["contributor_insights_specification"] = contributor_insights_specification
15233
15589
  if max_read_request_units is not None:
15234
15590
  self._values["max_read_request_units"] = max_read_request_units
15235
15591
  if max_write_request_units is not None:
@@ -15284,13 +15640,28 @@ class GlobalSecondaryIndexProps(SecondaryIndexProps, SchemaOptions):
15284
15640
 
15285
15641
  @builtins.property
15286
15642
  def contributor_insights_enabled(self) -> typing.Optional[builtins.bool]:
15287
- '''Whether CloudWatch contributor insights is enabled for the specified global secondary index.
15643
+ '''(deprecated) Whether CloudWatch contributor insights is enabled for the specified global secondary index.
15288
15644
 
15289
15645
  :default: false
15646
+
15647
+ :deprecated: use ``contributorInsightsSpecification`` instead
15648
+
15649
+ :stability: deprecated
15290
15650
  '''
15291
15651
  result = self._values.get("contributor_insights_enabled")
15292
15652
  return typing.cast(typing.Optional[builtins.bool], result)
15293
15653
 
15654
+ @builtins.property
15655
+ def contributor_insights_specification(
15656
+ self,
15657
+ ) -> typing.Optional[ContributorInsightsSpecification]:
15658
+ '''Whether CloudWatch contributor insights is enabled and what mode is selected.
15659
+
15660
+ :default: - contributor insights is not enabled
15661
+ '''
15662
+ result = self._values.get("contributor_insights_specification")
15663
+ return typing.cast(typing.Optional[ContributorInsightsSpecification], result)
15664
+
15294
15665
  @builtins.property
15295
15666
  def max_read_request_units(self) -> typing.Optional[jsii.Number]:
15296
15667
  '''The maximum read request units for the global secondary index.
@@ -15970,6 +16341,7 @@ class OperationsMetricOptions(SystemErrorsForOperationsMetricOptions):
15970
16341
  jsii_struct_bases=[TableOptionsV2],
15971
16342
  name_mapping={
15972
16343
  "contributor_insights": "contributorInsights",
16344
+ "contributor_insights_specification": "contributorInsightsSpecification",
15973
16345
  "deletion_protection": "deletionProtection",
15974
16346
  "kinesis_stream": "kinesisStream",
15975
16347
  "point_in_time_recovery": "pointInTimeRecovery",
@@ -15988,6 +16360,7 @@ class ReplicaTableProps(TableOptionsV2):
15988
16360
  self,
15989
16361
  *,
15990
16362
  contributor_insights: typing.Optional[builtins.bool] = None,
16363
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
15991
16364
  deletion_protection: typing.Optional[builtins.bool] = None,
15992
16365
  kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
15993
16366
  point_in_time_recovery: typing.Optional[builtins.bool] = None,
@@ -16002,7 +16375,8 @@ class ReplicaTableProps(TableOptionsV2):
16002
16375
  ) -> None:
16003
16376
  '''Properties used to configure a replica table.
16004
16377
 
16005
- :param contributor_insights: Whether CloudWatch contributor insights is enabled. Default: false
16378
+ :param contributor_insights: (deprecated) Whether CloudWatch contributor insights is enabled. Default: false
16379
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
16006
16380
  :param deletion_protection: Whether deletion protection is enabled. Default: false
16007
16381
  :param kinesis_stream: Kinesis Data Stream to capture item level changes. Default: - no Kinesis Data Stream
16008
16382
  :param point_in_time_recovery: (deprecated) Whether point-in-time recovery is enabled. Default: false - point in time recovery is not enabled.
@@ -16032,11 +16406,14 @@ class ReplicaTableProps(TableOptionsV2):
16032
16406
 
16033
16407
  global_table.add_replica(region="us-east-2", deletion_protection=True)
16034
16408
  '''
16409
+ if isinstance(contributor_insights_specification, dict):
16410
+ contributor_insights_specification = ContributorInsightsSpecification(**contributor_insights_specification)
16035
16411
  if isinstance(point_in_time_recovery_specification, dict):
16036
16412
  point_in_time_recovery_specification = PointInTimeRecoverySpecification(**point_in_time_recovery_specification)
16037
16413
  if __debug__:
16038
16414
  type_hints = typing.get_type_hints(_typecheckingstub__7500a741eaeb840f48aaefcd8fc5fbbb8b1082165601116ca363e5ddbaa79e6f)
16039
16415
  check_type(argname="argument contributor_insights", value=contributor_insights, expected_type=type_hints["contributor_insights"])
16416
+ check_type(argname="argument contributor_insights_specification", value=contributor_insights_specification, expected_type=type_hints["contributor_insights_specification"])
16040
16417
  check_type(argname="argument deletion_protection", value=deletion_protection, expected_type=type_hints["deletion_protection"])
16041
16418
  check_type(argname="argument kinesis_stream", value=kinesis_stream, expected_type=type_hints["kinesis_stream"])
16042
16419
  check_type(argname="argument point_in_time_recovery", value=point_in_time_recovery, expected_type=type_hints["point_in_time_recovery"])
@@ -16053,6 +16430,8 @@ class ReplicaTableProps(TableOptionsV2):
16053
16430
  }
16054
16431
  if contributor_insights is not None:
16055
16432
  self._values["contributor_insights"] = contributor_insights
16433
+ if contributor_insights_specification is not None:
16434
+ self._values["contributor_insights_specification"] = contributor_insights_specification
16056
16435
  if deletion_protection is not None:
16057
16436
  self._values["deletion_protection"] = deletion_protection
16058
16437
  if kinesis_stream is not None:
@@ -16076,13 +16455,28 @@ class ReplicaTableProps(TableOptionsV2):
16076
16455
 
16077
16456
  @builtins.property
16078
16457
  def contributor_insights(self) -> typing.Optional[builtins.bool]:
16079
- '''Whether CloudWatch contributor insights is enabled.
16458
+ '''(deprecated) Whether CloudWatch contributor insights is enabled.
16080
16459
 
16081
16460
  :default: false
16461
+
16462
+ :deprecated: use ``contributorInsightsSpecification`` instead
16463
+
16464
+ :stability: deprecated
16082
16465
  '''
16083
16466
  result = self._values.get("contributor_insights")
16084
16467
  return typing.cast(typing.Optional[builtins.bool], result)
16085
16468
 
16469
+ @builtins.property
16470
+ def contributor_insights_specification(
16471
+ self,
16472
+ ) -> typing.Optional[ContributorInsightsSpecification]:
16473
+ '''Whether CloudWatch contributor insights is enabled and what mode is selected.
16474
+
16475
+ :default: - contributor insights is not enabled
16476
+ '''
16477
+ result = self._values.get("contributor_insights_specification")
16478
+ return typing.cast(typing.Optional[ContributorInsightsSpecification], result)
16479
+
16086
16480
  @builtins.property
16087
16481
  def deletion_protection(self) -> typing.Optional[builtins.bool]:
16088
16482
  '''Whether deletion protection is enabled.
@@ -16250,6 +16644,7 @@ class Table(
16250
16644
  table_name: typing.Optional[builtins.str] = None,
16251
16645
  billing_mode: typing.Optional[BillingMode] = None,
16252
16646
  contributor_insights_enabled: typing.Optional[builtins.bool] = None,
16647
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
16253
16648
  deletion_protection: typing.Optional[builtins.bool] = None,
16254
16649
  encryption: typing.Optional[TableEncryption] = None,
16255
16650
  encryption_key: typing.Optional[_IKey_5f11635f] = None,
@@ -16280,7 +16675,8 @@ class Table(
16280
16675
  :param kinesis_stream: Kinesis Data Stream to capture item-level changes for the table. Default: - no Kinesis Data Stream
16281
16676
  :param table_name: Enforces a particular physical table name. Default:
16282
16677
  :param billing_mode: Specify how you are charged for read and write throughput and how you manage capacity. Default: PROVISIONED if ``replicationRegions`` is not specified, PAY_PER_REQUEST otherwise
16283
- :param contributor_insights_enabled: Whether CloudWatch contributor insights is enabled. Default: false
16678
+ :param contributor_insights_enabled: (deprecated) Whether CloudWatch contributor insights is enabled. Default: false
16679
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
16284
16680
  :param deletion_protection: Enables deletion protection for the table. Default: false
16285
16681
  :param encryption: Whether server-side encryption with an AWS managed customer master key is enabled. This property cannot be set if ``serverSideEncryption`` is set. .. epigraph:: **NOTE**: if you set this to ``CUSTOMER_MANAGED`` and ``encryptionKey`` is not specified, the key that the Tablet generates for you will be created with default permissions. If you are using CDKv2, these permissions will be sufficient to enable the key for use with DynamoDB tables. If you are using CDKv1, make sure the feature flag ``@aws-cdk/aws-kms:defaultKeyPolicies`` is set to ``true`` in your ``cdk.json``. Default: - The table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
16286
16682
  :param encryption_key: External KMS key to use for table encryption. This property can only be set if ``encryption`` is set to ``TableEncryption.CUSTOMER_MANAGED``. Default: - If ``encryption`` is set to ``TableEncryption.CUSTOMER_MANAGED`` and this property is undefined, a new KMS key will be created and associated with this table. If ``encryption`` and this property are both undefined, then the table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.
@@ -16314,6 +16710,7 @@ class Table(
16314
16710
  table_name=table_name,
16315
16711
  billing_mode=billing_mode,
16316
16712
  contributor_insights_enabled=contributor_insights_enabled,
16713
+ contributor_insights_specification=contributor_insights_specification,
16317
16714
  deletion_protection=deletion_protection,
16318
16715
  encryption=encryption,
16319
16716
  encryption_key=encryption_key,
@@ -16430,6 +16827,7 @@ class Table(
16430
16827
  self,
16431
16828
  *,
16432
16829
  contributor_insights_enabled: typing.Optional[builtins.bool] = None,
16830
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
16433
16831
  max_read_request_units: typing.Optional[jsii.Number] = None,
16434
16832
  max_write_request_units: typing.Optional[jsii.Number] = None,
16435
16833
  read_capacity: typing.Optional[jsii.Number] = None,
@@ -16443,7 +16841,8 @@ class Table(
16443
16841
  ) -> None:
16444
16842
  '''Add a global secondary index of table.
16445
16843
 
16446
- :param contributor_insights_enabled: Whether CloudWatch contributor insights is enabled for the specified global secondary index. Default: false
16844
+ :param contributor_insights_enabled: (deprecated) Whether CloudWatch contributor insights is enabled for the specified global secondary index. Default: false
16845
+ :param contributor_insights_specification: Whether CloudWatch contributor insights is enabled and what mode is selected. Default: - contributor insights is not enabled
16447
16846
  :param max_read_request_units: The maximum read request units for the global secondary index. Can only be provided if table billingMode is PAY_PER_REQUEST. Default: - on-demand throughput is disabled
16448
16847
  :param max_write_request_units: The maximum write request units for the global secondary index. Can only be provided if table billingMode is PAY_PER_REQUEST. Default: - on-demand throughput is disabled
16449
16848
  :param read_capacity: The read capacity for the global secondary index. Can only be provided if table billingMode is Provisioned or undefined. Default: 5
@@ -16457,6 +16856,7 @@ class Table(
16457
16856
  '''
16458
16857
  props = GlobalSecondaryIndexProps(
16459
16858
  contributor_insights_enabled=contributor_insights_enabled,
16859
+ contributor_insights_specification=contributor_insights_specification,
16460
16860
  max_read_request_units=max_read_request_units,
16461
16861
  max_write_request_units=max_write_request_units,
16462
16862
  read_capacity=read_capacity,
@@ -16676,6 +17076,8 @@ __all__ = [
16676
17076
  "CfnGlobalTableProps",
16677
17077
  "CfnTable",
16678
17078
  "CfnTableProps",
17079
+ "ContributorInsightsMode",
17080
+ "ContributorInsightsSpecification",
16679
17081
  "CsvOptions",
16680
17082
  "EnableScalingProps",
16681
17083
  "GlobalSecondaryIndexProps",
@@ -16889,6 +17291,7 @@ def _typecheckingstub__51587895f2d228591cb8c1b278064c8ca442192e93e2e20c22de9e04b
16889
17291
  def _typecheckingstub__0c4c1ec1851b3df040f636031283503da693894fbb627b438be175be8c1d8995(
16890
17292
  *,
16891
17293
  enabled: typing.Union[builtins.bool, _IResolvable_da3f097b],
17294
+ mode: typing.Optional[builtins.str] = None,
16892
17295
  ) -> None:
16893
17296
  """Type checking stubs"""
16894
17297
  pass
@@ -17265,6 +17668,7 @@ def _typecheckingstub__09c7a32c39444fb07dbb26b4ad1f9b87ad574421e0b12ac175c090173
17265
17668
  def _typecheckingstub__0a8b688e9e547ebf94c63195c5144ea544272eec7f4f0112bdff07a522156c82(
17266
17669
  *,
17267
17670
  enabled: typing.Union[builtins.bool, _IResolvable_da3f097b],
17671
+ mode: typing.Optional[builtins.str] = None,
17268
17672
  ) -> None:
17269
17673
  """Type checking stubs"""
17270
17674
  pass
@@ -17439,6 +17843,14 @@ def _typecheckingstub__0b7f8e29621d526383ce725f2daafbe00b52cfe2381995edac86b72a6
17439
17843
  """Type checking stubs"""
17440
17844
  pass
17441
17845
 
17846
+ def _typecheckingstub__656543bd456aefaef11a80dfb0950fe5597d4bc0465f2f4fdec81a81dfe7358d(
17847
+ *,
17848
+ enabled: builtins.bool,
17849
+ mode: typing.Optional[ContributorInsightsMode] = None,
17850
+ ) -> None:
17851
+ """Type checking stubs"""
17852
+ pass
17853
+
17442
17854
  def _typecheckingstub__ea195ac1b9cf7ff33466083daefb8a95f1a8ce8a200cbc595c25050dc94670eb(
17443
17855
  *,
17444
17856
  delimiter: typing.Optional[builtins.str] = None,
@@ -17567,6 +17979,7 @@ def _typecheckingstub__4073f2e85ef31d8deba5f90be11b466e4a3f1ea003482bf5c4df5706f
17567
17979
  def _typecheckingstub__eaa3a170e1978a5997011b8319bcd83bf34642dac50e342aad0705ee28b15714(
17568
17980
  *,
17569
17981
  contributor_insights: typing.Optional[builtins.bool] = None,
17982
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
17570
17983
  max_read_request_units: typing.Optional[jsii.Number] = None,
17571
17984
  read_capacity: typing.Optional[Capacity] = None,
17572
17985
  ) -> None:
@@ -17874,6 +18287,7 @@ def _typecheckingstub__dadf5733fac70178ab246582a0b777b8c203659229753a8396594d751
17874
18287
  sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
17875
18288
  billing_mode: typing.Optional[BillingMode] = None,
17876
18289
  contributor_insights_enabled: typing.Optional[builtins.bool] = None,
18290
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
17877
18291
  deletion_protection: typing.Optional[builtins.bool] = None,
17878
18292
  encryption: typing.Optional[TableEncryption] = None,
17879
18293
  encryption_key: typing.Optional[_IKey_5f11635f] = None,
@@ -17901,6 +18315,7 @@ def _typecheckingstub__dadf5733fac70178ab246582a0b777b8c203659229753a8396594d751
17901
18315
  def _typecheckingstub__1b65ee3c8ef5c3b632f4d1fad233252caadaa5f607c0fd92f49b64933f1de51c(
17902
18316
  *,
17903
18317
  contributor_insights: typing.Optional[builtins.bool] = None,
18318
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
17904
18319
  deletion_protection: typing.Optional[builtins.bool] = None,
17905
18320
  kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
17906
18321
  point_in_time_recovery: typing.Optional[builtins.bool] = None,
@@ -17918,6 +18333,7 @@ def _typecheckingstub__00475a5e14af8c4c7049089f69b3d29ad81bc91e7e1f0a5a5b7b794a5
17918
18333
  sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
17919
18334
  billing_mode: typing.Optional[BillingMode] = None,
17920
18335
  contributor_insights_enabled: typing.Optional[builtins.bool] = None,
18336
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
17921
18337
  deletion_protection: typing.Optional[builtins.bool] = None,
17922
18338
  encryption: typing.Optional[TableEncryption] = None,
17923
18339
  encryption_key: typing.Optional[_IKey_5f11635f] = None,
@@ -17948,6 +18364,7 @@ def _typecheckingstub__00475a5e14af8c4c7049089f69b3d29ad81bc91e7e1f0a5a5b7b794a5
17948
18364
  def _typecheckingstub__205e5df85e01c6c2d91d5922a57e3ed5903027748a8b3222622bebd1077e84ba(
17949
18365
  *,
17950
18366
  contributor_insights: typing.Optional[builtins.bool] = None,
18367
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
17951
18368
  deletion_protection: typing.Optional[builtins.bool] = None,
17952
18369
  kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
17953
18370
  point_in_time_recovery: typing.Optional[builtins.bool] = None,
@@ -17992,6 +18409,7 @@ def _typecheckingstub__9ea47b003cdb497ff620f1410260696f97dbb2b00fa8558235f23771f
17992
18409
  warm_throughput: typing.Optional[typing.Union[WarmThroughput, typing.Dict[builtins.str, typing.Any]]] = None,
17993
18410
  witness_region: typing.Optional[builtins.str] = None,
17994
18411
  contributor_insights: typing.Optional[builtins.bool] = None,
18412
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
17995
18413
  deletion_protection: typing.Optional[builtins.bool] = None,
17996
18414
  kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
17997
18415
  point_in_time_recovery: typing.Optional[builtins.bool] = None,
@@ -18082,6 +18500,7 @@ def _typecheckingstub__7f586bf63a567e16bde337be791f392306be66abca1c4abb791989fb9
18082
18500
  partition_key: typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]],
18083
18501
  sort_key: typing.Optional[typing.Union[Attribute, typing.Dict[builtins.str, typing.Any]]] = None,
18084
18502
  contributor_insights_enabled: typing.Optional[builtins.bool] = None,
18503
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
18085
18504
  max_read_request_units: typing.Optional[jsii.Number] = None,
18086
18505
  max_write_request_units: typing.Optional[jsii.Number] = None,
18087
18506
  read_capacity: typing.Optional[jsii.Number] = None,
@@ -18139,6 +18558,7 @@ def _typecheckingstub__323fc564f2052282a189a09de9130b5d9a855212d7bd5a514ddb98a52
18139
18558
  def _typecheckingstub__7500a741eaeb840f48aaefcd8fc5fbbb8b1082165601116ca363e5ddbaa79e6f(
18140
18559
  *,
18141
18560
  contributor_insights: typing.Optional[builtins.bool] = None,
18561
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
18142
18562
  deletion_protection: typing.Optional[builtins.bool] = None,
18143
18563
  kinesis_stream: typing.Optional[_IStream_4e2457d2] = None,
18144
18564
  point_in_time_recovery: typing.Optional[builtins.bool] = None,
@@ -18163,6 +18583,7 @@ def _typecheckingstub__b92f0ed514f00b57a2a41d754e55fe495d22b05b0ad4711b80ce00457
18163
18583
  table_name: typing.Optional[builtins.str] = None,
18164
18584
  billing_mode: typing.Optional[BillingMode] = None,
18165
18585
  contributor_insights_enabled: typing.Optional[builtins.bool] = None,
18586
+ contributor_insights_specification: typing.Optional[typing.Union[ContributorInsightsSpecification, typing.Dict[builtins.str, typing.Any]]] = None,
18166
18587
  deletion_protection: typing.Optional[builtins.bool] = None,
18167
18588
  encryption: typing.Optional[TableEncryption] = None,
18168
18589
  encryption_key: typing.Optional[_IKey_5f11635f] = None,