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

@@ -20,7 +20,8 @@ cluster = docdb.DatabaseCluster(self, "Database",
20
20
  vpc_subnets=ec2.SubnetSelection(
21
21
  subnet_type=ec2.SubnetType.PUBLIC
22
22
  ),
23
- vpc=vpc
23
+ vpc=vpc,
24
+ copy_tags_to_snapshot=True
24
25
  )
25
26
  ```
26
27
 
@@ -261,6 +262,27 @@ cluster = docdb.DatabaseCluster(self, "Database",
261
262
  security_group_removal_policy=RemovalPolicy.RETAIN
262
263
  )
263
264
  ```
265
+
266
+ ## CA certificate
267
+
268
+ Use the `caCertificate` property to specify the [CA certificate](https://docs.aws.amazon.com/documentdb/latest/developerguide/ca_cert_rotation.html) to use for all instances inside the cluster:
269
+
270
+ ```python
271
+ # vpc: ec2.Vpc
272
+
273
+
274
+ cluster = docdb.DatabaseCluster(self, "Database",
275
+ master_user=docdb.Login(
276
+ username="myuser"
277
+ ),
278
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.MEMORY5, ec2.InstanceSize.LARGE),
279
+ vpc_subnets=ec2.SubnetSelection(
280
+ subnet_type=ec2.SubnetType.PUBLIC
281
+ ),
282
+ vpc=vpc,
283
+ ca_certificate=docdb.CaCertificate.RDS_CA_RSA4096_G1
284
+ )
285
+ ```
264
286
  '''
265
287
  from pkgutil import extend_path
266
288
  __path__ = extend_path(__path__, __name__)
@@ -305,6 +327,7 @@ from ..aws_ec2 import (
305
327
  from ..aws_iam import IRole as _IRole_235f5d8e
306
328
  from ..aws_kms import IKey as _IKey_5f11635f
307
329
  from ..aws_logs import RetentionDays as _RetentionDays_070f99f0
330
+ from ..aws_rds import CaCertificate as _CaCertificate_e77d2630
308
331
  from ..aws_secretsmanager import (
309
332
  ISecret as _ISecret_6e020e6a,
310
333
  ISecretAttachmentTarget as _ISecretAttachmentTarget_123e2df9,
@@ -400,6 +423,79 @@ class BackupProps:
400
423
  )
401
424
 
402
425
 
426
+ class CaCertificate(
427
+ metaclass=jsii.JSIIMeta,
428
+ jsii_type="aws-cdk-lib.aws_docdb.CaCertificate",
429
+ ):
430
+ '''The CA certificate used for a DB instance.
431
+
432
+ :see: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html
433
+ '''
434
+
435
+ @jsii.member(jsii_name="of")
436
+ @builtins.classmethod
437
+ def of(cls, identifier: builtins.str) -> _CaCertificate_e77d2630:
438
+ '''Custom CA certificate.
439
+
440
+ :param identifier: - CA certificate identifier.
441
+ '''
442
+ if __debug__:
443
+ type_hints = typing.get_type_hints(_typecheckingstub__12afe9cc79eeaf5e583167389fab10fd90ade8f1fee3c8f0119c02136d36047f)
444
+ check_type(argname="argument identifier", value=identifier, expected_type=type_hints["identifier"])
445
+ return typing.cast(_CaCertificate_e77d2630, jsii.sinvoke(cls, "of", [identifier]))
446
+
447
+ @jsii.member(jsii_name="toString")
448
+ def to_string(self) -> builtins.str:
449
+ '''Returns the CA certificate identifier as a string.'''
450
+ return typing.cast(builtins.str, jsii.invoke(self, "toString", []))
451
+
452
+ @jsii.python.classproperty
453
+ @jsii.member(jsii_name="RDS_CA_2019")
454
+ def RDS_CA_2019(cls) -> _CaCertificate_e77d2630:
455
+ '''rds-ca-2019 certificate authority.'''
456
+ return typing.cast(_CaCertificate_e77d2630, jsii.sget(cls, "RDS_CA_2019"))
457
+
458
+ @jsii.python.classproperty
459
+ @jsii.member(jsii_name="RDS_CA_ECC384_G1")
460
+ def RDS_CA_ECC384_G1(cls) -> _CaCertificate_e77d2630:
461
+ '''rds-ca-ecc384-g1 certificate authority.'''
462
+ return typing.cast(_CaCertificate_e77d2630, jsii.sget(cls, "RDS_CA_ECC384_G1"))
463
+
464
+ @jsii.python.classproperty
465
+ @jsii.member(jsii_name="RDS_CA_RDS2048_G1")
466
+ def RDS_CA_RDS2048_G1(cls) -> _CaCertificate_e77d2630:
467
+ '''(deprecated) rds-ca-rsa2048-g1 certificate authority.
468
+
469
+ :deprecated: use RDS_CA_RSA2048_G1 (slight misspelling)
470
+
471
+ :stability: deprecated
472
+ '''
473
+ return typing.cast(_CaCertificate_e77d2630, jsii.sget(cls, "RDS_CA_RDS2048_G1"))
474
+
475
+ @jsii.python.classproperty
476
+ @jsii.member(jsii_name="RDS_CA_RDS4096_G1")
477
+ def RDS_CA_RDS4096_G1(cls) -> _CaCertificate_e77d2630:
478
+ '''(deprecated) rds-ca-rsa4096-g1 certificate authority.
479
+
480
+ :deprecated: use RDS_CA_RSA4096_G1 (slight misspelling)
481
+
482
+ :stability: deprecated
483
+ '''
484
+ return typing.cast(_CaCertificate_e77d2630, jsii.sget(cls, "RDS_CA_RDS4096_G1"))
485
+
486
+ @jsii.python.classproperty
487
+ @jsii.member(jsii_name="RDS_CA_RSA2048_G1")
488
+ def RDS_CA_RSA2048_G1(cls) -> _CaCertificate_e77d2630:
489
+ '''rds-ca-rsa2048-g1 certificate authority.'''
490
+ return typing.cast(_CaCertificate_e77d2630, jsii.sget(cls, "RDS_CA_RSA2048_G1"))
491
+
492
+ @jsii.python.classproperty
493
+ @jsii.member(jsii_name="RDS_CA_RSA4096_G1")
494
+ def RDS_CA_RSA4096_G1(cls) -> _CaCertificate_e77d2630:
495
+ '''rds-ca-rsa4096-g1 certificate authority.'''
496
+ return typing.cast(_CaCertificate_e77d2630, jsii.sget(cls, "RDS_CA_RSA4096_G1"))
497
+
498
+
403
499
  @jsii.implements(_IInspectable_c2943556, _ITaggable_36806126)
404
500
  class CfnDBCluster(
405
501
  _CfnResource_9df397a6,
@@ -3343,8 +3439,10 @@ class DatabaseClusterAttributes:
3343
3439
  "master_user": "masterUser",
3344
3440
  "vpc": "vpc",
3345
3441
  "backup": "backup",
3442
+ "ca_certificate": "caCertificate",
3346
3443
  "cloud_watch_logs_retention": "cloudWatchLogsRetention",
3347
3444
  "cloud_watch_logs_retention_role": "cloudWatchLogsRetentionRole",
3445
+ "copy_tags_to_snapshot": "copyTagsToSnapshot",
3348
3446
  "db_cluster_name": "dbClusterName",
3349
3447
  "deletion_protection": "deletionProtection",
3350
3448
  "enable_performance_insights": "enablePerformanceInsights",
@@ -3373,8 +3471,10 @@ class DatabaseClusterProps:
3373
3471
  master_user: typing.Union["Login", typing.Dict[builtins.str, typing.Any]],
3374
3472
  vpc: _IVpc_f30d5663,
3375
3473
  backup: typing.Optional[typing.Union[BackupProps, typing.Dict[builtins.str, typing.Any]]] = None,
3474
+ ca_certificate: typing.Optional[_CaCertificate_e77d2630] = None,
3376
3475
  cloud_watch_logs_retention: typing.Optional[_RetentionDays_070f99f0] = None,
3377
3476
  cloud_watch_logs_retention_role: typing.Optional[_IRole_235f5d8e] = None,
3477
+ copy_tags_to_snapshot: typing.Optional[builtins.bool] = None,
3378
3478
  db_cluster_name: typing.Optional[builtins.str] = None,
3379
3479
  deletion_protection: typing.Optional[builtins.bool] = None,
3380
3480
  enable_performance_insights: typing.Optional[builtins.bool] = None,
@@ -3400,8 +3500,10 @@ class DatabaseClusterProps:
3400
3500
  :param master_user: Username and password for the administrative user.
3401
3501
  :param vpc: What subnets to run the DocumentDB instances in. Must be at least 2 subnets in two different AZs.
3402
3502
  :param backup: Backup settings. Default: - Backup retention period for automated backups is 1 day. Backup preferred window is set to a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.
3503
+ :param ca_certificate: The identifier of the CA certificate used for the instances. Specifying or updating this property triggers a reboot. Default: - DocumentDB will choose a certificate authority
3403
3504
  :param cloud_watch_logs_retention: The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``Infinity``. Default: - logs never expire
3404
3505
  :param cloud_watch_logs_retention_role: The IAM role for the Lambda function associated with the custom resource that sets the retention policy. Default: - a new role is created.
3506
+ :param copy_tags_to_snapshot: Whether to copy tags to the snapshot when a snapshot is created. Default: - false
3405
3507
  :param db_cluster_name: An optional identifier for the cluster. Default: - A name is automatically generated.
3406
3508
  :param deletion_protection: Specifies whether this cluster can be deleted. If deletionProtection is enabled, the cluster cannot be deleted unless it is modified and deletionProtection is disabled. deletionProtection protects clusters from being accidentally deleted. Default: - false
3407
3509
  :param enable_performance_insights: A value that indicates whether to enable Performance Insights for the instances in the DB Cluster. Default: - false
@@ -3437,7 +3539,7 @@ class DatabaseClusterProps:
3437
3539
  subnet_type=ec2.SubnetType.PUBLIC
3438
3540
  ),
3439
3541
  vpc=vpc,
3440
- removal_policy=RemovalPolicy.SNAPSHOT
3542
+ ca_certificate=docdb.CaCertificate.RDS_CA_RSA4096_G1
3441
3543
  )
3442
3544
  '''
3443
3545
  if isinstance(master_user, dict):
@@ -3452,8 +3554,10 @@ class DatabaseClusterProps:
3452
3554
  check_type(argname="argument master_user", value=master_user, expected_type=type_hints["master_user"])
3453
3555
  check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
3454
3556
  check_type(argname="argument backup", value=backup, expected_type=type_hints["backup"])
3557
+ check_type(argname="argument ca_certificate", value=ca_certificate, expected_type=type_hints["ca_certificate"])
3455
3558
  check_type(argname="argument cloud_watch_logs_retention", value=cloud_watch_logs_retention, expected_type=type_hints["cloud_watch_logs_retention"])
3456
3559
  check_type(argname="argument cloud_watch_logs_retention_role", value=cloud_watch_logs_retention_role, expected_type=type_hints["cloud_watch_logs_retention_role"])
3560
+ check_type(argname="argument copy_tags_to_snapshot", value=copy_tags_to_snapshot, expected_type=type_hints["copy_tags_to_snapshot"])
3457
3561
  check_type(argname="argument db_cluster_name", value=db_cluster_name, expected_type=type_hints["db_cluster_name"])
3458
3562
  check_type(argname="argument deletion_protection", value=deletion_protection, expected_type=type_hints["deletion_protection"])
3459
3563
  check_type(argname="argument enable_performance_insights", value=enable_performance_insights, expected_type=type_hints["enable_performance_insights"])
@@ -3479,10 +3583,14 @@ class DatabaseClusterProps:
3479
3583
  }
3480
3584
  if backup is not None:
3481
3585
  self._values["backup"] = backup
3586
+ if ca_certificate is not None:
3587
+ self._values["ca_certificate"] = ca_certificate
3482
3588
  if cloud_watch_logs_retention is not None:
3483
3589
  self._values["cloud_watch_logs_retention"] = cloud_watch_logs_retention
3484
3590
  if cloud_watch_logs_retention_role is not None:
3485
3591
  self._values["cloud_watch_logs_retention_role"] = cloud_watch_logs_retention_role
3592
+ if copy_tags_to_snapshot is not None:
3593
+ self._values["copy_tags_to_snapshot"] = copy_tags_to_snapshot
3486
3594
  if db_cluster_name is not None:
3487
3595
  self._values["db_cluster_name"] = db_cluster_name
3488
3596
  if deletion_protection is not None:
@@ -3559,6 +3667,19 @@ class DatabaseClusterProps:
3559
3667
  result = self._values.get("backup")
3560
3668
  return typing.cast(typing.Optional[BackupProps], result)
3561
3669
 
3670
+ @builtins.property
3671
+ def ca_certificate(self) -> typing.Optional[_CaCertificate_e77d2630]:
3672
+ '''The identifier of the CA certificate used for the instances.
3673
+
3674
+ Specifying or updating this property triggers a reboot.
3675
+
3676
+ :default: - DocumentDB will choose a certificate authority
3677
+
3678
+ :see: https://docs.aws.amazon.com/documentdb/latest/developerguide/ca_cert_rotation.html
3679
+ '''
3680
+ result = self._values.get("ca_certificate")
3681
+ return typing.cast(typing.Optional[_CaCertificate_e77d2630], result)
3682
+
3562
3683
  @builtins.property
3563
3684
  def cloud_watch_logs_retention(self) -> typing.Optional[_RetentionDays_070f99f0]:
3564
3685
  '''The number of days log events are kept in CloudWatch Logs.
@@ -3581,6 +3702,15 @@ class DatabaseClusterProps:
3581
3702
  result = self._values.get("cloud_watch_logs_retention_role")
3582
3703
  return typing.cast(typing.Optional[_IRole_235f5d8e], result)
3583
3704
 
3705
+ @builtins.property
3706
+ def copy_tags_to_snapshot(self) -> typing.Optional[builtins.bool]:
3707
+ '''Whether to copy tags to the snapshot when a snapshot is created.
3708
+
3709
+ :default: - false
3710
+ '''
3711
+ result = self._values.get("copy_tags_to_snapshot")
3712
+ return typing.cast(typing.Optional[builtins.bool], result)
3713
+
3584
3714
  @builtins.property
3585
3715
  def db_cluster_name(self) -> typing.Optional[builtins.str]:
3586
3716
  '''An optional identifier for the cluster.
@@ -3888,6 +4018,7 @@ class DatabaseInstanceAttributes:
3888
4018
  "instance_type": "instanceType",
3889
4019
  "auto_minor_version_upgrade": "autoMinorVersionUpgrade",
3890
4020
  "availability_zone": "availabilityZone",
4021
+ "ca_certificate": "caCertificate",
3891
4022
  "db_instance_name": "dbInstanceName",
3892
4023
  "enable_performance_insights": "enablePerformanceInsights",
3893
4024
  "preferred_maintenance_window": "preferredMaintenanceWindow",
@@ -3902,6 +4033,7 @@ class DatabaseInstanceProps:
3902
4033
  instance_type: _InstanceType_f64915b9,
3903
4034
  auto_minor_version_upgrade: typing.Optional[builtins.bool] = None,
3904
4035
  availability_zone: typing.Optional[builtins.str] = None,
4036
+ ca_certificate: typing.Optional[_CaCertificate_e77d2630] = None,
3905
4037
  db_instance_name: typing.Optional[builtins.str] = None,
3906
4038
  enable_performance_insights: typing.Optional[builtins.bool] = None,
3907
4039
  preferred_maintenance_window: typing.Optional[builtins.str] = None,
@@ -3913,6 +4045,7 @@ class DatabaseInstanceProps:
3913
4045
  :param instance_type: The name of the compute and memory capacity classes.
3914
4046
  :param auto_minor_version_upgrade: Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. Default: true
3915
4047
  :param availability_zone: The name of the Availability Zone where the DB instance will be located. Default: - no preference
4048
+ :param ca_certificate: The identifier of the CA certificate for this DB instance. Specifying or updating this property triggers a reboot. Default: - DocumentDB will choose a certificate authority
3916
4049
  :param db_instance_name: A name for the DB instance. If you specify a name, AWS CloudFormation converts it to lowercase. Default: - a CloudFormation generated name
3917
4050
  :param enable_performance_insights: A value that indicates whether to enable Performance Insights for the DB Instance. Default: - false
3918
4051
  :param preferred_maintenance_window: The weekly time range (in UTC) during which system maintenance can occur. Format: ``ddd:hh24:mi-ddd:hh24:mi`` Constraint: Minimum 30-minute window Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-maintain.html#maintenance-window
@@ -3927,7 +4060,9 @@ class DatabaseInstanceProps:
3927
4060
  import aws_cdk as cdk
3928
4061
  from aws_cdk import aws_docdb as docdb
3929
4062
  from aws_cdk import aws_ec2 as ec2
4063
+ from aws_cdk import aws_rds as rds
3930
4064
 
4065
+ # ca_certificate: rds.CaCertificate
3931
4066
  # database_cluster: docdb.DatabaseCluster
3932
4067
  # instance_type: ec2.InstanceType
3933
4068
 
@@ -3938,6 +4073,7 @@ class DatabaseInstanceProps:
3938
4073
  # the properties below are optional
3939
4074
  auto_minor_version_upgrade=False,
3940
4075
  availability_zone="availabilityZone",
4076
+ ca_certificate=ca_certificate,
3941
4077
  db_instance_name="dbInstanceName",
3942
4078
  enable_performance_insights=False,
3943
4079
  preferred_maintenance_window="preferredMaintenanceWindow",
@@ -3950,6 +4086,7 @@ class DatabaseInstanceProps:
3950
4086
  check_type(argname="argument instance_type", value=instance_type, expected_type=type_hints["instance_type"])
3951
4087
  check_type(argname="argument auto_minor_version_upgrade", value=auto_minor_version_upgrade, expected_type=type_hints["auto_minor_version_upgrade"])
3952
4088
  check_type(argname="argument availability_zone", value=availability_zone, expected_type=type_hints["availability_zone"])
4089
+ check_type(argname="argument ca_certificate", value=ca_certificate, expected_type=type_hints["ca_certificate"])
3953
4090
  check_type(argname="argument db_instance_name", value=db_instance_name, expected_type=type_hints["db_instance_name"])
3954
4091
  check_type(argname="argument enable_performance_insights", value=enable_performance_insights, expected_type=type_hints["enable_performance_insights"])
3955
4092
  check_type(argname="argument preferred_maintenance_window", value=preferred_maintenance_window, expected_type=type_hints["preferred_maintenance_window"])
@@ -3962,6 +4099,8 @@ class DatabaseInstanceProps:
3962
4099
  self._values["auto_minor_version_upgrade"] = auto_minor_version_upgrade
3963
4100
  if availability_zone is not None:
3964
4101
  self._values["availability_zone"] = availability_zone
4102
+ if ca_certificate is not None:
4103
+ self._values["ca_certificate"] = ca_certificate
3965
4104
  if db_instance_name is not None:
3966
4105
  self._values["db_instance_name"] = db_instance_name
3967
4106
  if enable_performance_insights is not None:
@@ -4003,6 +4142,19 @@ class DatabaseInstanceProps:
4003
4142
  result = self._values.get("availability_zone")
4004
4143
  return typing.cast(typing.Optional[builtins.str], result)
4005
4144
 
4145
+ @builtins.property
4146
+ def ca_certificate(self) -> typing.Optional[_CaCertificate_e77d2630]:
4147
+ '''The identifier of the CA certificate for this DB instance.
4148
+
4149
+ Specifying or updating this property triggers a reboot.
4150
+
4151
+ :default: - DocumentDB will choose a certificate authority
4152
+
4153
+ :see: https://docs.aws.amazon.com/documentdb/latest/developerguide/ca_cert_rotation.html
4154
+ '''
4155
+ result = self._values.get("ca_certificate")
4156
+ return typing.cast(typing.Optional[_CaCertificate_e77d2630], result)
4157
+
4006
4158
  @builtins.property
4007
4159
  def db_instance_name(self) -> typing.Optional[builtins.str]:
4008
4160
  '''A name for the DB instance.
@@ -4569,7 +4721,7 @@ class Login:
4569
4721
  subnet_type=ec2.SubnetType.PUBLIC
4570
4722
  ),
4571
4723
  vpc=vpc,
4572
- removal_policy=RemovalPolicy.SNAPSHOT
4724
+ ca_certificate=docdb.CaCertificate.RDS_CA_RSA4096_G1
4573
4725
  )
4574
4726
  '''
4575
4727
  if __debug__:
@@ -4845,7 +4997,7 @@ class DatabaseCluster(
4845
4997
  subnet_type=ec2.SubnetType.PUBLIC
4846
4998
  ),
4847
4999
  vpc=vpc,
4848
- removal_policy=RemovalPolicy.SNAPSHOT
5000
+ ca_certificate=docdb.CaCertificate.RDS_CA_RSA4096_G1
4849
5001
  )
4850
5002
  '''
4851
5003
 
@@ -4858,8 +5010,10 @@ class DatabaseCluster(
4858
5010
  master_user: typing.Union[Login, typing.Dict[builtins.str, typing.Any]],
4859
5011
  vpc: _IVpc_f30d5663,
4860
5012
  backup: typing.Optional[typing.Union[BackupProps, typing.Dict[builtins.str, typing.Any]]] = None,
5013
+ ca_certificate: typing.Optional[_CaCertificate_e77d2630] = None,
4861
5014
  cloud_watch_logs_retention: typing.Optional[_RetentionDays_070f99f0] = None,
4862
5015
  cloud_watch_logs_retention_role: typing.Optional[_IRole_235f5d8e] = None,
5016
+ copy_tags_to_snapshot: typing.Optional[builtins.bool] = None,
4863
5017
  db_cluster_name: typing.Optional[builtins.str] = None,
4864
5018
  deletion_protection: typing.Optional[builtins.bool] = None,
4865
5019
  enable_performance_insights: typing.Optional[builtins.bool] = None,
@@ -4886,8 +5040,10 @@ class DatabaseCluster(
4886
5040
  :param master_user: Username and password for the administrative user.
4887
5041
  :param vpc: What subnets to run the DocumentDB instances in. Must be at least 2 subnets in two different AZs.
4888
5042
  :param backup: Backup settings. Default: - Backup retention period for automated backups is 1 day. Backup preferred window is set to a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week.
5043
+ :param ca_certificate: The identifier of the CA certificate used for the instances. Specifying or updating this property triggers a reboot. Default: - DocumentDB will choose a certificate authority
4889
5044
  :param cloud_watch_logs_retention: The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``Infinity``. Default: - logs never expire
4890
5045
  :param cloud_watch_logs_retention_role: The IAM role for the Lambda function associated with the custom resource that sets the retention policy. Default: - a new role is created.
5046
+ :param copy_tags_to_snapshot: Whether to copy tags to the snapshot when a snapshot is created. Default: - false
4891
5047
  :param db_cluster_name: An optional identifier for the cluster. Default: - A name is automatically generated.
4892
5048
  :param deletion_protection: Specifies whether this cluster can be deleted. If deletionProtection is enabled, the cluster cannot be deleted unless it is modified and deletionProtection is disabled. deletionProtection protects clusters from being accidentally deleted. Default: - false
4893
5049
  :param enable_performance_insights: A value that indicates whether to enable Performance Insights for the instances in the DB Cluster. Default: - false
@@ -4916,8 +5072,10 @@ class DatabaseCluster(
4916
5072
  master_user=master_user,
4917
5073
  vpc=vpc,
4918
5074
  backup=backup,
5075
+ ca_certificate=ca_certificate,
4919
5076
  cloud_watch_logs_retention=cloud_watch_logs_retention,
4920
5077
  cloud_watch_logs_retention_role=cloud_watch_logs_retention_role,
5078
+ copy_tags_to_snapshot=copy_tags_to_snapshot,
4921
5079
  db_cluster_name=db_cluster_name,
4922
5080
  deletion_protection=deletion_protection,
4923
5081
  enable_performance_insights=enable_performance_insights,
@@ -5127,7 +5285,9 @@ class DatabaseInstance(
5127
5285
  import aws_cdk as cdk
5128
5286
  from aws_cdk import aws_docdb as docdb
5129
5287
  from aws_cdk import aws_ec2 as ec2
5288
+ from aws_cdk import aws_rds as rds
5130
5289
 
5290
+ # ca_certificate: rds.CaCertificate
5131
5291
  # database_cluster: docdb.DatabaseCluster
5132
5292
  # instance_type: ec2.InstanceType
5133
5293
 
@@ -5138,6 +5298,7 @@ class DatabaseInstance(
5138
5298
  # the properties below are optional
5139
5299
  auto_minor_version_upgrade=False,
5140
5300
  availability_zone="availabilityZone",
5301
+ ca_certificate=ca_certificate,
5141
5302
  db_instance_name="dbInstanceName",
5142
5303
  enable_performance_insights=False,
5143
5304
  preferred_maintenance_window="preferredMaintenanceWindow",
@@ -5154,6 +5315,7 @@ class DatabaseInstance(
5154
5315
  instance_type: _InstanceType_f64915b9,
5155
5316
  auto_minor_version_upgrade: typing.Optional[builtins.bool] = None,
5156
5317
  availability_zone: typing.Optional[builtins.str] = None,
5318
+ ca_certificate: typing.Optional[_CaCertificate_e77d2630] = None,
5157
5319
  db_instance_name: typing.Optional[builtins.str] = None,
5158
5320
  enable_performance_insights: typing.Optional[builtins.bool] = None,
5159
5321
  preferred_maintenance_window: typing.Optional[builtins.str] = None,
@@ -5166,6 +5328,7 @@ class DatabaseInstance(
5166
5328
  :param instance_type: The name of the compute and memory capacity classes.
5167
5329
  :param auto_minor_version_upgrade: Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. Default: true
5168
5330
  :param availability_zone: The name of the Availability Zone where the DB instance will be located. Default: - no preference
5331
+ :param ca_certificate: The identifier of the CA certificate for this DB instance. Specifying or updating this property triggers a reboot. Default: - DocumentDB will choose a certificate authority
5169
5332
  :param db_instance_name: A name for the DB instance. If you specify a name, AWS CloudFormation converts it to lowercase. Default: - a CloudFormation generated name
5170
5333
  :param enable_performance_insights: A value that indicates whether to enable Performance Insights for the DB Instance. Default: - false
5171
5334
  :param preferred_maintenance_window: The weekly time range (in UTC) during which system maintenance can occur. Format: ``ddd:hh24:mi-ddd:hh24:mi`` Constraint: Minimum 30-minute window Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-maintain.html#maintenance-window
@@ -5180,6 +5343,7 @@ class DatabaseInstance(
5180
5343
  instance_type=instance_type,
5181
5344
  auto_minor_version_upgrade=auto_minor_version_upgrade,
5182
5345
  availability_zone=availability_zone,
5346
+ ca_certificate=ca_certificate,
5183
5347
  db_instance_name=db_instance_name,
5184
5348
  enable_performance_insights=enable_performance_insights,
5185
5349
  preferred_maintenance_window=preferred_maintenance_window,
@@ -5270,6 +5434,7 @@ class DatabaseInstance(
5270
5434
 
5271
5435
  __all__ = [
5272
5436
  "BackupProps",
5437
+ "CaCertificate",
5273
5438
  "CfnDBCluster",
5274
5439
  "CfnDBClusterParameterGroup",
5275
5440
  "CfnDBClusterParameterGroupProps",
@@ -5308,6 +5473,12 @@ def _typecheckingstub__ee6fe0fa77944f4ac01bc65293ff8588d9093a5a1b3fa48a6bab1d3e7
5308
5473
  """Type checking stubs"""
5309
5474
  pass
5310
5475
 
5476
+ def _typecheckingstub__12afe9cc79eeaf5e583167389fab10fd90ade8f1fee3c8f0119c02136d36047f(
5477
+ identifier: builtins.str,
5478
+ ) -> None:
5479
+ """Type checking stubs"""
5480
+ pass
5481
+
5311
5482
  def _typecheckingstub__7db61dc80f26049d79a38255d8a0b3abaf4b5019d7cbed64c937ec0f3e40056c(
5312
5483
  scope: _constructs_77d1e7e8.Construct,
5313
5484
  id: builtins.str,
@@ -5859,8 +6030,10 @@ def _typecheckingstub__bb24ec128a97ca07df15f55d4e96dda851d4300951806a7a3d7f391cc
5859
6030
  master_user: typing.Union[Login, typing.Dict[builtins.str, typing.Any]],
5860
6031
  vpc: _IVpc_f30d5663,
5861
6032
  backup: typing.Optional[typing.Union[BackupProps, typing.Dict[builtins.str, typing.Any]]] = None,
6033
+ ca_certificate: typing.Optional[_CaCertificate_e77d2630] = None,
5862
6034
  cloud_watch_logs_retention: typing.Optional[_RetentionDays_070f99f0] = None,
5863
6035
  cloud_watch_logs_retention_role: typing.Optional[_IRole_235f5d8e] = None,
6036
+ copy_tags_to_snapshot: typing.Optional[builtins.bool] = None,
5864
6037
  db_cluster_name: typing.Optional[builtins.str] = None,
5865
6038
  deletion_protection: typing.Optional[builtins.bool] = None,
5866
6039
  enable_performance_insights: typing.Optional[builtins.bool] = None,
@@ -5898,6 +6071,7 @@ def _typecheckingstub__676d69b0db2a30b5f20b867ed1d439431b0f7d419a335b2a51aaaf208
5898
6071
  instance_type: _InstanceType_f64915b9,
5899
6072
  auto_minor_version_upgrade: typing.Optional[builtins.bool] = None,
5900
6073
  availability_zone: typing.Optional[builtins.str] = None,
6074
+ ca_certificate: typing.Optional[_CaCertificate_e77d2630] = None,
5901
6075
  db_instance_name: typing.Optional[builtins.str] = None,
5902
6076
  enable_performance_insights: typing.Optional[builtins.bool] = None,
5903
6077
  preferred_maintenance_window: typing.Optional[builtins.str] = None,
@@ -5984,8 +6158,10 @@ def _typecheckingstub__3fef762ebf4d69195051e79f76d91c6d9e93e2a84a6c1e71f7b4a0b8c
5984
6158
  master_user: typing.Union[Login, typing.Dict[builtins.str, typing.Any]],
5985
6159
  vpc: _IVpc_f30d5663,
5986
6160
  backup: typing.Optional[typing.Union[BackupProps, typing.Dict[builtins.str, typing.Any]]] = None,
6161
+ ca_certificate: typing.Optional[_CaCertificate_e77d2630] = None,
5987
6162
  cloud_watch_logs_retention: typing.Optional[_RetentionDays_070f99f0] = None,
5988
6163
  cloud_watch_logs_retention_role: typing.Optional[_IRole_235f5d8e] = None,
6164
+ copy_tags_to_snapshot: typing.Optional[builtins.bool] = None,
5989
6165
  db_cluster_name: typing.Optional[builtins.str] = None,
5990
6166
  deletion_protection: typing.Optional[builtins.bool] = None,
5991
6167
  enable_performance_insights: typing.Optional[builtins.bool] = None,
@@ -6052,6 +6228,7 @@ def _typecheckingstub__5817f4b16546e48d296754293847a6856ad12a571f11de701f04c2152
6052
6228
  instance_type: _InstanceType_f64915b9,
6053
6229
  auto_minor_version_upgrade: typing.Optional[builtins.bool] = None,
6054
6230
  availability_zone: typing.Optional[builtins.str] = None,
6231
+ ca_certificate: typing.Optional[_CaCertificate_e77d2630] = None,
6055
6232
  db_instance_name: typing.Optional[builtins.str] = None,
6056
6233
  enable_performance_insights: typing.Optional[builtins.bool] = None,
6057
6234
  preferred_maintenance_window: typing.Optional[builtins.str] = None,
@@ -73587,8 +73587,7 @@ class InstanceType(
73587
73587
  subnet_type=ec2.SubnetType.PUBLIC
73588
73588
  ),
73589
73589
  vpc=vpc,
73590
- removal_policy=RemovalPolicy.SNAPSHOT,
73591
- instance_removal_policy=RemovalPolicy.RETAIN
73590
+ ca_certificate=docdb.CaCertificate.RDS_CA_RSA4096_G1
73592
73591
  )
73593
73592
  '''
73594
73593