DatabaseClusterFromSnapshot L2 construct
A database cluster restored from a snapshot.
Example
declare const vpc: ec2.Vpc;
new rds.DatabaseClusterFromSnapshot(this, 'Database', {
engine: rds.DatabaseClusterEngine.aurora({ version: rds.AuroraEngineVersion.VER_1_22_2 }),
writer: rds.ClusterInstance.provisioned('writer'),
vpc,
snapshotIdentifier: 'mySnapshot',
});
# vpc: ec2.Vpc
rds.DatabaseClusterFromSnapshot(self, "Database",
engine=rds.DatabaseClusterEngine.aurora(version=rds.AuroraEngineVersion.VER_1_22_2),
writer=rds.ClusterInstance.provisioned("writer"),
vpc=vpc,
snapshot_identifier="mySnapshot"
)
Vpc vpc;
DatabaseClusterFromSnapshot.Builder.create(this, "Database")
.engine(DatabaseClusterEngine.aurora(AuroraClusterEngineProps.builder().version(AuroraEngineVersion.VER_1_22_2).build()))
.writer(ClusterInstance.provisioned("writer"))
.vpc(vpc)
.snapshotIdentifier("mySnapshot")
.build();
// Install: dotnet add package Amazon.CDK.Lib
Vpc vpc;
new DatabaseClusterFromSnapshot(this, "Database", new DatabaseClusterFromSnapshotProps {
Engine = DatabaseClusterEngine.Aurora(new AuroraClusterEngineProps { Version = AuroraEngineVersion.VER_1_22_2 }),
Writer = ClusterInstance.Provisioned("writer"),
Vpc = vpc,
SnapshotIdentifier = "mySnapshot"
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var vpc Vpc
rds.NewDatabaseClusterFromSnapshot(this, jsii.String("Database"), &DatabaseClusterFromSnapshotProps{
Engine: rds.DatabaseClusterEngine_Aurora(&AuroraClusterEngineProps{
Version: rds.AuroraEngineVersion_VER_1_22_2(),
}),
Writer: rds.ClusterInstance_Provisioned(jsii.String("writer")),
Vpc: Vpc,
SnapshotIdentifier: jsii.String("mySnapshot"),
})
Initializer
new DatabaseClusterFromSnapshot(scope: Construct, id: string, props: DatabaseClusterFromSnapshotProps)
DatabaseClusterFromSnapshot(scope: Construct, id: str, props: DatabaseClusterFromSnapshotProps)
new DatabaseClusterFromSnapshot(Construct scope, String id, DatabaseClusterFromSnapshotProps props)
new DatabaseClusterFromSnapshot(Construct scope, string id, DatabaseClusterFromSnapshotProps props)
NewDatabaseClusterFromSnapshot(Scope Construct, Id *string, Props DatabaseClusterFromSnapshotProps)
Construct Props
autoMinorVersionUpgradebooleanauto_minor_version_upgradeboolautoMinorVersionUpgradeBooleanAutoMinorVersionUpgradeboolAutoMinorVersionUpgrade*bool= true#backtrackWindowDurationbacktrack_windowDurationbacktrackWindowDurationBacktrackWindowDurationBacktrackWindowDuration= 0 seconds (no backtrack)#This feature is only supported by the Aurora MySQL database engine and cannot be enabled on existing clusters.
backupBackupPropsbackupBackupPropsbackupBackupPropsBackupBackupPropsBackupBackupProps= Backup retention period for auto…#default
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.
cloudwatchLogsExportsstring[]cloudwatch_logs_exportstyping.List[str]cloudwatchLogsExportsList<String>CloudwatchLogsExportsstring[]CloudwatchLogsExports*[]*string= no log exports#cloudwatchLogsRetentionRetentionDayscloudwatch_logs_retentionRetentionDayscloudwatchLogsRetentionRetentionDaysCloudwatchLogsRetentionRetentionDaysCloudwatchLogsRetentionRetentionDays= logs never expire#When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to Infinity.
cloudwatchLogsRetentionRoleIRolecloudwatch_logs_retention_roleIRolecloudwatchLogsRetentionRoleIRoleCloudwatchLogsRetentionRoleIRoleCloudwatchLogsRetentionRoleIRole= a new role is created.#clusterIdentifierstringcluster_identifierstrclusterIdentifierStringClusterIdentifierstringClusterIdentifier*string= A name is automatically generate…#default
Default: A name is automatically generated.
clusterScailabilityTypeClusterScailabilityTypecluster_scailability_typeClusterScailabilityTypeclusterScailabilityTypeClusterScailabilityTypeClusterScailabilityTypeClusterScailabilityTypeClusterScailabilityTypeClusterScailabilityType= ClusterScailabilityType.STANDARDdeprecated#Set LIMITLESS if you want to use a limitless database; otherwise, set it to STANDARD.
clusterScalabilityTypeClusterScalabilityTypecluster_scalability_typeClusterScalabilityTypeclusterScalabilityTypeClusterScalabilityTypeClusterScalabilityTypeClusterScalabilityTypeClusterScalabilityTypeClusterScalabilityType= ClusterScalabilityType.STANDARD#Set LIMITLESS if you want to use a limitless database; otherwise, set it to STANDARD.
copyTagsToSnapshotbooleancopy_tags_to_snapshotboolcopyTagsToSnapshotBooleanCopyTagsToSnapshotboolCopyTagsToSnapshot*bool= true#credentialsCredentialscredentialsCredentialscredentialsCredentialsCredentialsCredentialsCredentialsCredentials= A username of 'admin' (or 'postg…deprecated#notes · default
Note - using this prop only works with Credentials.fromPassword() with the username of the snapshot, Credentials.fromUsername() with the username and password of the snapshot or Credentials.fromSecret() with a secret containing the username and password of the snapshot.
Default: A username of 'admin' (or 'postgres' for PostgreSQL) and SecretsManager-generated password that will not be applied to the cluster, use snapshotCredentials for the correct behavior.
databaseInsightsModeDatabaseInsightsModedatabase_insights_modeDatabaseInsightsModedatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsMode= DatabaseInsightsMode.STANDARD wh…#default
Default: DatabaseInsightsMode.STANDARD when performance insights are enabled and Amazon Aurora engine is used, otherwise not set.
defaultDatabaseNamestringdefault_database_namestrdefaultDatabaseNameStringDefaultDatabaseNamestringDefaultDatabaseName*string= Database is not created in clust…#default
Default: Database is not created in cluster.
deleteAutomatedBackupsbooleandelete_automated_backupsbooldeleteAutomatedBackupsBooleanDeleteAutomatedBackupsboolDeleteAutomatedBackups*bool= undefined - AWS RDS default is t…#default
Default: undefined - AWS RDS default is to remove automated backups immediately after the DB cluster is deleted, unless the AWS Backup policy specifies a point-in-time restore rule.
deletionProtectionbooleandeletion_protectionbooldeletionProtectionBooleanDeletionProtectionboolDeletionProtection*bool= true if `removalPolicy` is RETAI…#default
Default: true if removalPolicy is RETAIN, undefined otherwise, which will not enable deletion protection. To disable deletion protection after it has been enabled, you must explicitly set this value to false.
notes · default
Necessary for enabling Kerberos authentication. If specified, the DB cluster joins the given Active Directory, enabling Kerberos authentication. If not specified, the DB cluster will not be associated with any Active Directory, and Kerberos authentication will not be enabled.
Default: DB cluster is not associated with an Active Directory; Kerberos authentication is not enabled.
domainRoleIRoledomain_roleIRoledomainRoleIRoleDomainRoleIRoleDomainRoleIRole= If `DatabaseClusterBaseProps.dom…#The role needs the AWS-managed policy AmazonRDSDirectoryServiceAccess or equivalent.
default
Default: If DatabaseClusterBaseProps.domain is specified, a role with the AmazonRDSDirectoryServiceAccess policy is automatically created.
enableClusterLevelEnhancedMonitoringbooleanenable_cluster_level_enhanced_monitoringboolenableClusterLevelEnhancedMonitoringBooleanEnableClusterLevelEnhancedMonitoringboolEnableClusterLevelEnhancedMonitoring*bool= When the `monitoringInterval` is…#If set to true, monitoringInterval and monitoringRole are applied to not the instances, but the cluster. monitoringInterval is required to be set if enableClusterLevelEnhancedMonitoring is set to true.
default
Default: When the monitoringInterval is set, enhanced monitoring is enabled for each instance.
enableDataApibooleanenable_data_apiboolenableDataApiBooleanEnableDataApiboolEnableDataApi*bool= false#enableLocalWriteForwardingbooleanenable_local_write_forwardingboolenableLocalWriteForwardingBooleanEnableLocalWriteForwardingboolEnableLocalWriteForwarding*bool= false#This setting can only be enabled for Aurora MySQL 3.04 or higher, and for Aurora PostgreSQL 16.4 or higher (for version 16), 15.8 or higher (for version 15), and 14.13 or higher (for version 14).
enablePerformanceInsightsbooleanenable_performance_insightsboolenablePerformanceInsightsBooleanEnablePerformanceInsightsboolEnablePerformanceInsights*bool= false, unless `performanceInsigh…#default
Default: false, unless performanceInsightRetention or performanceInsightEncryptionKey is set, or databaseInsightsMode is set to DatabaseInsightsMode.ADVANCED.
engineIClusterEngineengineIClusterEngineengineIClusterEngineEngineIClusterEngineEngineIClusterEnginerequired#engineLifecycleSupportEngineLifecycleSupportengine_lifecycle_supportEngineLifecycleSupportengineLifecycleSupportEngineLifecycleSupportEngineLifecycleSupportEngineLifecycleSupportEngineLifecycleSupportEngineLifecycleSupport= undefined - AWS RDS default sett…#default
Default: undefined - AWS RDS default setting is EngineLifecycleSupport.OPEN_SOURCE_RDS_EXTENDED_SUPPORT
iamAuthenticationbooleaniam_authenticationbooliamAuthenticationBooleanIamAuthenticationboolIamAuthentication*bool= false#instanceIdentifierBasestringinstance_identifier_basestrinstanceIdentifierBaseStringInstanceIdentifierBasestringInstanceIdentifierBase*string= clusterIdentifier is used with t…#Every replica is named by appending the replica number to this string, 1-based.
default
Default: clusterIdentifier is used with the word "Instance" appended. If clusterIdentifier is not provided, the identifier is automatically generated.
instancePropsInstancePropsinstance_propsInstancePropsinstancePropsInstancePropsInstancePropsInstancePropsInstancePropsInstancePropsdeprecated#Has to be at least 1.
instanceUpdateBehaviourInstanceUpdateBehaviourinstance_update_behaviourInstanceUpdateBehaviourinstanceUpdateBehaviourInstanceUpdateBehaviourInstanceUpdateBehaviourInstanceUpdateBehaviourInstanceUpdateBehaviourInstanceUpdateBehaviour= InstanceUpdateBehaviour.BULK#manageMasterUserPasswordbooleanmanage_master_user_passwordboolmanageMasterUserPasswordBooleanManageMasterUserPasswordboolManageMasterUserPassword*bool= false#When enabled, RDS generates and manages the master user password in Secrets Manager. This is supported when restoring from snapshots, allowing migration to RDS-managed passwords.
monitoringIntervalDurationmonitoring_intervalDurationmonitoringIntervalDurationMonitoringIntervalDurationMonitoringIntervalDuration= no enhanced monitoring#If you enable enableClusterLevelEnhancedMonitoring, this property is applied to the cluster, otherwise it is applied to the instances.
monitoringRoleIRolemonitoring_roleIRolemonitoringRoleIRoleMonitoringRoleIRoleMonitoringRoleIRole= A role is automatically created …#If you enable enableClusterLevelEnhancedMonitoring, this property is applied to the cluster, otherwise it is applied to the instances.
default
Default: A role is automatically created for you
networkTypeNetworkTypenetwork_typeNetworkTypenetworkTypeNetworkTypeNetworkTypeNetworkTypeNetworkTypeNetworkType= IPV4#parameterGroupIParameterGroupparameter_groupIParameterGroupparameterGroupIParameterGroupParameterGroupIParameterGroupParameterGroupIParameterGroup= No parameter group.#parameters{ [key: string]: string }parameterstyping.Mapping[str, str]parametersMap<String, String>ParametersIDictionary<string, string>Parameters*map[string]*string= None#You can only specify parameterGroup or parameters but not both. You need to use a versioned engine to auto-generate a DBClusterParameterGroup.
performanceInsightEncryptionKeyIKeyperformance_insight_encryption_keyIKeyperformanceInsightEncryptionKeyIKeyPerformanceInsightEncryptionKeyIKeyPerformanceInsightEncryptionKeyIKey= default master key#performanceInsightRetentionPerformanceInsightRetentionperformance_insight_retentionPerformanceInsightRetentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetention= 7#If you set databaseInsightsMode to DatabaseInsightsMode.ADVANCED, you must set this property to PerformanceInsightRetention.MONTHS_15.
default
Default: The default for the engine is used.
preferredMaintenanceWindowstringpreferred_maintenance_windowstrpreferredMaintenanceWindowStringPreferredMaintenanceWindowstringPreferredMaintenanceWindow*string= 30-minute window selected at ran…#Example: 'Sun:23:45-Mon:00:15'
default
Default: 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.
readersIClusterInstance[]readerstyping.List[IClusterInstance]readersList<IClusterInstance>ReadersIClusterInstance[]Readers*[]IClusterInstance= no readers are created. The clus…#default
Default: no readers are created. The cluster will have a single writer/reader
removalPolicyRemovalPolicyremoval_policyRemovalPolicyremovalPolicyRemovalPolicyRemovalPolicyRemovalPolicyRemovalPolicyRemovalPolicy= RemovalPolicy.SNAPSHOT (remove t…#default
Default: RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data)
s3ExportBucketsIBucket[]s3_export_bucketstyping.List[IBucket]s3ExportBucketsList<IBucket>S3ExportBucketsIBucket[]S3ExportBuckets*[]IBucket= None#This property must not be used if s3ExportRole is used.
For MySQL:
s3ExportRoleIRoles3_export_roleIRoles3ExportRoleIRoleS3ExportRoleIRoleS3ExportRoleIRole= New role is created if `s3Export…#notes · default
This feature is only supported by the Aurora database engine.
This property must not be used if s3ExportBuckets is used. To use this property with Aurora PostgreSQL, it must be configured with the S3 export feature enabled when creating the DatabaseClusterEngine For MySQL:
Default: New role is created if s3ExportBuckets is set, no role is defined otherwise
s3ImportBucketsIBucket[]s3_import_bucketstyping.List[IBucket]s3ImportBucketsList<IBucket>S3ImportBucketsIBucket[]S3ImportBuckets*[]IBucket= None#This property must not be used if s3ImportRole is used.
For MySQL:
s3ImportRoleIRoles3_import_roleIRoles3ImportRoleIRoleS3ImportRoleIRoleS3ImportRoleIRole= New role is created if `s3Import…#notes · default
This feature is only supported by the Aurora database engine.
This property must not be used if s3ImportBuckets is used. To use this property with Aurora PostgreSQL, it must be configured with the S3 import feature enabled when creating the DatabaseClusterEngine For MySQL:
Default: New role is created if s3ImportBuckets is set, no role is defined otherwise
securityGroupsISecurityGroup[]security_groupstyping.List[ISecurityGroup]securityGroupsList<ISecurityGroup>SecurityGroupsISecurityGroup[]SecurityGroups*[]ISecurityGroup= a new security group is created.#serverlessV2AutoPauseDurationDurationserverless_v2_auto_pause_durationDurationserverlessV2AutoPauseDurationDurationServerlessV2AutoPauseDurationDurationServerlessV2AutoPauseDurationDuration= The default is 300 seconds (5 mi…#The duration must be between 300 seconds (5 minutes) and 86,400 seconds (24 hours).
default
Default: The default is 300 seconds (5 minutes).
serverlessV2MaxCapacitynumberserverless_v2_max_capacityint | floatserverlessV2MaxCapacityNumberServerlessV2MaxCapacitydoubleServerlessV2MaxCapacity*float64= 2#You can specify ACU values in half-step increments, such as 40, 40.5, 41, and so on. The largest value that you can use is 256.
The maximum capacity must be higher than 0.5 ACUs.
serverlessV2MinCapacitynumberserverless_v2_min_capacityint | floatserverlessV2MinCapacityNumberServerlessV2MinCapacitydoubleServerlessV2MinCapacity*float64= 0.5#notes
You can specify ACU values in half-step increments, such as 8, 8.5, 9, and so on. The smallest value that you can use is 0.
For Aurora versions that support the Aurora Serverless v2 auto-pause feature, the smallest value that you can use is 0. For versions that don't support Aurora Serverless v2 auto-pause, the smallest value that you can use is 0.5.
snapshotCredentialsSnapshotCredentialssnapshot_credentialsSnapshotCredentialssnapshotCredentialsSnapshotCredentialsSnapshotCredentialsSnapshotCredentialsSnapshotCredentialsSnapshotCredentials= The existing username and passwo…#Note - It is not possible to change the master username for a snapshot; however, it is possible to provide (or generate) a new password.
default
Default: The existing username and password from the snapshot will be used.
snapshotIdentifierstringsnapshot_identifierstrsnapshotIdentifierStringSnapshotIdentifierstringSnapshotIdentifier*stringrequired#You can use either the name or the Amazon Resource Name (ARN) to specify a DB cluster snapshot. However, you can use only the ARN to specify a DB instance snapshot.
storageEncryptedbooleanstorage_encryptedboolstorageEncryptedBooleanStorageEncryptedboolStorageEncrypted*bool= true if storageEncryptionKey is …#default
Default: true if storageEncryptionKey is provided, false otherwise
storageEncryptionKeyIKeyRefstorage_encryption_keyIKeyRefstorageEncryptionKeyIKeyRefStorageEncryptionKeyIKeyRefStorageEncryptionKeyIKeyRef= if storageEncrypted is true then…#If specified, storageEncrypted will be set to true.
default
Default: if storageEncrypted is true then the default master key, no key otherwise
storageTypeDBClusterStorageTypestorage_typeDBClusterStorageTypestorageTypeDBClusterStorageTypeStorageTypeDBClusterStorageTypeStorageTypeDBClusterStorageType= DBClusterStorageType.AURORA#subnetGroupIDBSubnetGroupRefsubnet_groupIDBSubnetGroupRefsubnetGroupIDBSubnetGroupRefSubnetGroupIDBSubnetGroupRefSubnetGroupIDBSubnetGroupRef= a new subnet group will be creat…#default
Default: a new subnet group will be created.
Must be at least 2 subnets in two different AZs.
vpcSubnetsSubnetSelectionvpc_subnetsSubnetSelectionvpcSubnetsSubnetSelectionVpcSubnetsSubnetSelectionVpcSubnetsSubnetSelection= the Vpc default strategy if not …#default
Default: the Vpc default strategy if not specified.
writerIClusterInstancewriterIClusterInstancewriterIClusterInstanceWriterIClusterInstanceWriterIClusterInstance= required if instanceProps is not…#default
Default: required if instanceProps is not provided
Properties
cloudwatchLogGroups{ [key: string]: ILogGroup }cloudwatch_log_groupstyping.Mapping[str, ILogGroup]cloudwatchLogGroupsMap<String, ILogGroup>CloudwatchLogGroupsIDictionary<string, ILogGroup>CloudwatchLogGroups*map[string]ILogGrouprequired#Each export value will create a separate log group.
clusterEndpointEndpointcluster_endpointEndpointclusterEndpointEndpointClusterEndpointEndpointClusterEndpointEndpointrequired#clusterIdentifierstringcluster_identifierstrclusterIdentifierStringClusterIdentifierstringClusterIdentifier*stringrequired#clusterReadEndpointEndpointcluster_read_endpointEndpointclusterReadEndpointEndpointClusterReadEndpointEndpointClusterReadEndpointEndpointrequired#clusterResourceIdentifierstringcluster_resource_identifierstrclusterResourceIdentifierStringClusterResourceIdentifierstringClusterResourceIdentifier*stringrequired#This AWS Region-unique identifier is used in things like IAM authentication policies.
connectionsConnectionsconnectionsConnectionsconnectionsConnectionsConnectionsConnectionsConnectionsConnectionsrequired#databaseInsightsModeDatabaseInsightsModedatabase_insights_modeDatabaseInsightsModedatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsMode#dbClusterRefDBClusterReferencedb_cluster_refDBClusterReferencedbClusterRefDBClusterReferenceDbClusterRefDBClusterReferenceDbClusterRefDBClusterReferencerequired#engineIClusterEngineengineIClusterEngineengineIClusterEngineEngineIClusterEngineEngineIClusterEngine#Never undefined.
envResourceEnvironmentenvResourceEnvironmentenvResourceEnvironmentEnvResourceEnvironmentEnvResourceEnvironmentrequired#notes
For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.
instanceEndpointsEndpoint[]instance_endpointstyping.List[Endpoint]instanceEndpointsList<Endpoint>InstanceEndpointsEndpoint[]InstanceEndpoints*[]Endpointrequired#instanceIdentifiersstring[]instance_identifierstyping.List[str]instanceIdentifiersList<String>InstanceIdentifiersstring[]InstanceIdentifiers*[]*stringrequired#multiUserRotationApplicationSecretRotationApplicationmulti_user_rotation_applicationSecretRotationApplicationmultiUserRotationApplicationSecretRotationApplicationMultiUserRotationApplicationSecretRotationApplicationMultiUserRotationApplicationSecretRotationApplicationrequired#performanceInsightEncryptionKeyIKeyperformance_insight_encryption_keyIKeyperformanceInsightEncryptionKeyIKeyPerformanceInsightEncryptionKeyIKeyPerformanceInsightEncryptionKeyIKey#performanceInsightRetentionPerformanceInsightRetentionperformance_insight_retentionPerformanceInsightRetentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetention#performanceInsightsEnabledbooleanperformance_insights_enabledboolperformanceInsightsEnabledBooleanPerformanceInsightsEnabledboolPerformanceInsightsEnabled*boolrequired#PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#singleUserRotationApplicationSecretRotationApplicationsingle_user_rotation_applicationSecretRotationApplicationsingleUserRotationApplicationSecretRotationApplicationSingleUserRotationApplicationSecretRotationApplicationSingleUserRotationApplicationSecretRotationApplicationrequired#vpcSubnetsSubnetSelectionvpc_subnetsSubnetSelectionvpcSubnetsSubnetSelectionVpcSubnetsSubnetSelectionVpcSubnetsSubnetSelection#Methods
addProxy(id: string, options: DatabaseProxyOptions): DatabaseProxydef add_proxy(self, id: str, options: DatabaseProxyOptions) -> DatabaseProxypublic DatabaseProxy addProxy(String id, DatabaseProxyOptions options)public DatabaseProxy AddProxy(string id, DatabaseProxyOptions options)func AddProxy(Id *string, Options DatabaseProxyOptions) DatabaseProxy#addRotationMultiUser(id: string, options: RotationMultiUserOptions): SecretRotationdef add_rotation_multi_user(self, id: str, options: RotationMultiUserOptions) -> SecretRotationpublic SecretRotation addRotationMultiUser(String id, RotationMultiUserOptions options)public SecretRotation AddRotationMultiUser(string id, RotationMultiUserOptions options)func AddRotationMultiUser(Id *string, Options RotationMultiUserOptions) SecretRotation#addRotationSingleUser(options?: RotationSingleUserOptions): SecretRotationdef add_rotation_single_user(self, options: typing.Optional[RotationSingleUserOptions] = None) -> SecretRotationpublic SecretRotation addRotationSingleUser(RotationSingleUserOptions options)public SecretRotation AddRotationSingleUser(RotationSingleUserOptions? options = null)func AddRotationSingleUser(Options RotationSingleUserOptions) SecretRotation#applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#notes · 1 parameter
When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.
Parameters
strengthstrengthstrengthstrengthStrength— - The reference strength to use for this resource.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).
asSecretAttachmentTarget(): SecretAttachmentTargetPropsdef as_secret_attachment_target(self, ) -> SecretAttachmentTargetPropspublic SecretAttachmentTargetProps asSecretAttachmentTarget()public SecretAttachmentTargetProps AsSecretAttachmentTarget()func AsSecretAttachmentTarget() SecretAttachmentTargetProps#grantConnect(grantee: IGrantable, dbUser: string): Grantdef grant_connect(self, grantee: IGrantable, db_user: str) -> Grantpublic Grant grantConnect(IGrantable grantee, String dbUser)public Grant GrantConnect(IGrantable grantee, string dbUser)func GrantConnect(Grantee IGrantable, DbUser *string) Grant#grantDataApiAccess(grantee: IGrantable): Grantdef grant_data_api_access(self, grantee: IGrantable) -> Grantpublic Grant grantDataApiAccess(IGrantable grantee)public Grant GrantDataApiAccess(IGrantable grantee)func GrantDataApiAccess(Grantee IGrantable) Grant#[disable-awslint:no-grants]
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
isOwnedResource(construct: IConstruct): boolean@staticmethod def is_owned_resource(construct: IConstruct) -> boolpublic static Boolean isOwnedResource(IConstruct construct)public static bool IsOwnedResource(IConstruct construct)func IsOwnedResource(Construct IConstruct) *boolstatic#isResource(construct: IConstruct): boolean@staticmethod def is_resource(construct: IConstruct) -> boolpublic static Boolean isResource(IConstruct construct)public static bool IsResource(IConstruct construct)func IsResource(Construct IConstruct) *boolstatic#metric(metricName: string, props?: MetricOptions): Metricdef metric(self, metric_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricOptions props)public Metric Metric(string metricName, MetricOptions? props = null)func Metric(MetricName *string, Props MetricOptions) Metric#metricACUUtilization(props?: MetricOptions): Metricdef metric_acu_utilization(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricACUUtilization(MetricOptions props)public Metric MetricACUUtilization(MetricOptions? props = null)func MetricACUUtilization(Props MetricOptions) Metric#notes
It's calculated as the value of the ServerlessDatabaseCapacity metric divided by the maximum ACU value of the DB cluster.
If this metric approaches a value of 100.0, the DB instance has scaled up as high as it can. Consider increasing the maximum ACU setting for the cluster.
metricCPUUtilization(props?: MetricOptions): Metricdef metric_cpu_utilization(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricCPUUtilization(MetricOptions props)public Metric MetricCPUUtilization(MetricOptions? props = null)func MetricCPUUtilization(Props MetricOptions) Metric#Average over 5 minutes
metricDatabaseConnections(props?: MetricOptions): Metricdef metric_database_connections(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricDatabaseConnections(MetricOptions props)public Metric MetricDatabaseConnections(MetricOptions? props = null)func MetricDatabaseConnections(Props MetricOptions) Metric#Average over 5 minutes
metricDeadlocks(props?: MetricOptions): Metricdef metric_deadlocks(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricDeadlocks(MetricOptions props)public Metric MetricDeadlocks(MetricOptions? props = null)func MetricDeadlocks(Props MetricOptions) Metric#Average over 5 minutes
metricEngineUptime(props?: MetricOptions): Metricdef metric_engine_uptime(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricEngineUptime(MetricOptions props)public Metric MetricEngineUptime(MetricOptions? props = null)func MetricEngineUptime(Props MetricOptions) Metric#Average over 5 minutes
metricFreeableMemory(props?: MetricOptions): Metricdef metric_freeable_memory(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricFreeableMemory(MetricOptions props)public Metric MetricFreeableMemory(MetricOptions? props = null)func MetricFreeableMemory(Props MetricOptions) Metric#Average over 5 minutes
metricFreeLocalStorage(props?: MetricOptions): Metricdef metric_free_local_storage(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricFreeLocalStorage(MetricOptions props)public Metric MetricFreeLocalStorage(MetricOptions? props = null)func MetricFreeLocalStorage(Props MetricOptions) Metric#Average over 5 minutes
metricNetworkReceiveThroughput(props?: MetricOptions): Metricdef metric_network_receive_throughput(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricNetworkReceiveThroughput(MetricOptions props)public Metric MetricNetworkReceiveThroughput(MetricOptions? props = null)func MetricNetworkReceiveThroughput(Props MetricOptions) Metric#Average over 5 minutes
metricNetworkThroughput(props?: MetricOptions): Metricdef metric_network_throughput(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricNetworkThroughput(MetricOptions props)public Metric MetricNetworkThroughput(MetricOptions? props = null)func MetricNetworkThroughput(Props MetricOptions) Metric#Average over 5 minutes
metricNetworkTransmitThroughput(props?: MetricOptions): Metricdef metric_network_transmit_throughput(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricNetworkTransmitThroughput(MetricOptions props)public Metric MetricNetworkTransmitThroughput(MetricOptions? props = null)func MetricNetworkTransmitThroughput(Props MetricOptions) Metric#Average over 5 minutes
metricServerlessDatabaseCapacity(props?: MetricOptions): Metricdef metric_serverless_database_capacity(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricServerlessDatabaseCapacity(MetricOptions props)public Metric MetricServerlessDatabaseCapacity(MetricOptions? props = null)func MetricServerlessDatabaseCapacity(Props MetricOptions) Metric#metricSnapshotStorageUsed(props?: MetricOptions): Metricdef metric_snapshot_storage_used(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricSnapshotStorageUsed(MetricOptions props)public Metric MetricSnapshotStorageUsed(MetricOptions? props = null)func MetricSnapshotStorageUsed(Props MetricOptions) Metric#Average over 5 minutes
metricTotalBackupStorageBilled(props?: MetricOptions): Metricdef metric_total_backup_storage_billed(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTotalBackupStorageBilled(MetricOptions props)public Metric MetricTotalBackupStorageBilled(MetricOptions? props = null)func MetricTotalBackupStorageBilled(Props MetricOptions) Metric#Average over 5 minutes
metricVolumeBytesUsed(props?: MetricOptions): Metricdef metric_volume_bytes_used(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricVolumeBytesUsed(MetricOptions props)public Metric MetricVolumeBytesUsed(MetricOptions? props = null)func MetricVolumeBytesUsed(Props MetricOptions) Metric#Average over 5 minutes
metricVolumeReadIOPs(props?: MetricOptions): Metricdef metric_volume_read_io_ps(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricVolumeReadIOPs(MetricOptions props)public Metric MetricVolumeReadIOPs(MetricOptions? props = null)func MetricVolumeReadIOPs(Props MetricOptions) Metric#This metric is only available for Aurora database clusters. For non-Aurora RDS clusters, this metric will not return any data in CloudWatch.
metricVolumeWriteIOPs(props?: MetricOptions): Metricdef metric_volume_write_io_ps(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricVolumeWriteIOPs(MetricOptions props)public Metric MetricVolumeWriteIOPs(MetricOptions? props = null)func MetricVolumeWriteIOPs(Props MetricOptions) Metric#This metric is only available for Aurora database clusters. For non-Aurora RDS clusters, this metric will not return any data in CloudWatch.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.