DatabaseInstanceFromSnapshotProps Struct
Construction properties for a DatabaseInstanceFromSnapshot.
Example
declare const vpc: ec2.Vpc;
const engine = rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_16_3 });
const myKey = new kms.Key(this, 'MyKey');
new rds.DatabaseInstanceFromSnapshot(this, 'InstanceFromSnapshotWithCustomizedSecret', {
engine,
vpc,
snapshotIdentifier: 'mySnapshot',
credentials: rds.SnapshotCredentials.fromGeneratedSecret('username', {
encryptionKey: myKey,
excludeCharacters: '!&*^#@()',
replicaRegions: [{ region: 'eu-west-1' }, { region: 'eu-west-2' }],
}),
});
Properties
allocatedStoragenumberallocated_storageint | floatallocatedStorageNumberAllocatedStoragedoubleAllocatedStorage*float64= 100#allowMajorVersionUpgradebooleanallow_major_version_upgradeboolallowMajorVersionUpgradeBooleanAllowMajorVersionUpgradeboolAllowMajorVersionUpgrade*bool= false#applyImmediatelybooleanapply_immediatelyboolapplyImmediatelyBooleanApplyImmediatelyboolApplyImmediately*bool#Default: Changes will be applied immediately
notes
If set to false, changes are applied during the next maintenance window.
Until RDS applies the changes, the DB instance remains in a drift state. As a result, the configuration doesn't fully reflect the requested modifications and temporarily diverges from the intended state.
This property also determines whether the DB instance reboots when a static parameter is modified in the associated DB parameter group.
autoMinorVersionUpgradebooleanauto_minor_version_upgradeboolautoMinorVersionUpgradeBooleanAutoMinorVersionUpgradeboolAutoMinorVersionUpgrade*bool= true#availabilityZonestringavailability_zonestravailabilityZoneStringAvailabilityZonestringAvailabilityZone*string#Default: no preference
backupRetentionDurationbackup_retentionDurationbackupRetentionDurationBackupRetentionDurationBackupRetentionDuration#Default: Duration.days(1) for source instances, disabled for read replicas
Set to zero to disable backups. When creating a read replica, you must enable automatic backups on the source database instance by setting the backup retention to a value other than zero.
caCertificateCaCertificateca_certificateCaCertificatecaCertificateCaCertificateCaCertificateCaCertificateCaCertificateCaCertificate#Default: RDS will choose a certificate authority
Specifying or updating this property triggers a reboot.
For RDS DB engines:
cloudwatchLogsExportsstring[]cloudwatch_logs_exportstyping.List[str]cloudwatchLogsExportsList<String>CloudwatchLogsExportsstring[]CloudwatchLogsExports*[]*string#Default: no log exports
cloudwatchLogsRetentionRetentionDayscloudwatch_logs_retentionRetentionDayscloudwatchLogsRetentionRetentionDaysCloudwatchLogsRetentionRetentionDaysCloudwatchLogsRetentionRetentionDays#Default: 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#Default: a new role is created.
clusterSnapshotIdentifierstringcluster_snapshot_identifierstrclusterSnapshotIdentifierStringClusterSnapshotIdentifierstringClusterSnapshotIdentifier*string= None#notes
For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide .
Constraints:
- Can't be specified when
snapshotIdentifieris specified. - Must be specified when
snapshotIdentifierisn't specified. - If you are restoring from a shared manual Multi-AZ DB cluster snapshot, the
clusterSnapshotIdentifiermust be the ARN of the shared snapshot. - Can't be the identifier of an Aurora DB cluster snapshot.
copyTagsToSnapshotbooleancopy_tags_to_snapshotboolcopyTagsToSnapshotBooleanCopyTagsToSnapshotboolCopyTagsToSnapshot*bool= true#credentialsSnapshotCredentialscredentialsSnapshotCredentialscredentialsSnapshotCredentialsCredentialsSnapshotCredentialsCredentialsSnapshotCredentials#Default: The existing username and password from the snapshot will be used.
Note - It is not possible to change the master username for a snapshot; however, it is possible to provide (or generate) a new password.
databaseInsightsModeDatabaseInsightsModedatabase_insights_modeDatabaseInsightsModedatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsModeDatabaseInsightsMode#Default: DatabaseInsightsMode.STANDARD when performance insights are enabled, otherwise not set.
Default: no name
deleteAutomatedBackupsbooleandelete_automated_backupsbooldeleteAutomatedBackupsBooleanDeleteAutomatedBackupsboolDeleteAutomatedBackups*bool= true#deletionProtectionbooleandeletion_protectionbooldeletionProtectionBooleanDeletionProtectionboolDeletionProtection*bool#Default: true if removalPolicy is RETAIN, false otherwise
Default: Do not join domain
Default: The role will be created for you if DatabaseInstanceNewProps#domain is specified
The role needs the AWS-managed policy AmazonRDSDirectoryServiceAccess or equivalent.
enablePerformanceInsightsbooleanenable_performance_insightsboolenablePerformanceInsightsBooleanEnablePerformanceInsightsboolEnablePerformanceInsights*bool#Default: false, unless performanceInsightRetention or performanceInsightEncryptionKey is set.
engineIInstanceEngineengineIInstanceEngineengineIInstanceEngineEngineIInstanceEngineEngineIInstanceEnginerequired#engineLifecycleSupportEngineLifecycleSupportengine_lifecycle_supportEngineLifecycleSupportengineLifecycleSupportEngineLifecycleSupportEngineLifecycleSupportEngineLifecycleSupportEngineLifecycleSupportEngineLifecycleSupport#Default: undefined - AWS RDS default setting is EngineLifecycleSupport.OPEN_SOURCE_RDS_EXTENDED_SUPPORT
This setting applies only to RDS for MySQL and RDS for PostgreSQL.
iamAuthenticationbooleaniam_authenticationbooliamAuthenticationBooleanIamAuthenticationboolIamAuthentication*bool= false#instanceIdentifierstringinstance_identifierstrinstanceIdentifierStringInstanceIdentifierstringInstanceIdentifier*string#Default: a CloudFormation generated name
If you specify a name, AWS CloudFormation converts it to lowercase.
instanceTypeInstanceTypeinstance_typeInstanceTypeinstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceTypeInstanceType#Default: m5.large (or, more specifically, db.m5.large)
Default: no provisioned iops if storage type is not specified. For GP3: 3,000 IOPS if allocated storage is less than 400 GiB for MariaDB, MySQL, and PostgreSQL, less than 200 GiB for Oracle and less than 20 GiB for SQL Server. 12,000 IOPS otherwise (except for SQL Server where the default is always 3,000 IOPS).
The value must be equal to or greater than 1000.
licenseModelLicenseModellicense_modelLicenseModellicenseModelLicenseModelLicenseModelLicenseModelLicenseModelLicenseModel#Default: RDS default license model
maxAllocatedStoragenumbermax_allocated_storageint | floatmaxAllocatedStorageNumberMaxAllocatedStoragedoubleMaxAllocatedStorage*float64#Default: No autoscaling of RDS instance
monitoringIntervalDurationmonitoring_intervalDurationmonitoringIntervalDurationMonitoringIntervalDurationMonitoringIntervalDuration#Default: no enhanced monitoring
monitoringRoleIRoleRefmonitoring_roleIRoleRefmonitoringRoleIRoleRefMonitoringRoleIRoleRefMonitoringRoleIRoleRef#Default: A role is automatically created for you
networkTypeNetworkTypenetwork_typeNetworkTypenetworkTypeNetworkTypeNetworkTypeNetworkTypeNetworkTypeNetworkType= IPV4#optionGroupIOptionGroupoption_groupIOptionGroupoptionGroupIOptionGroupOptionGroupIOptionGroupOptionGroupIOptionGroup#Default: no option group
parameterGroupIParameterGroupparameter_groupIParameterGroupparameterGroupIParameterGroupParameterGroupIParameterGroupParameterGroupIParameterGroup#Default: 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 DBParameterGroup.
performanceInsightEncryptionKeyIKeyRefperformance_insight_encryption_keyIKeyRefperformanceInsightEncryptionKeyIKeyRefPerformanceInsightEncryptionKeyIKeyRefPerformanceInsightEncryptionKeyIKeyRef#Default: default master key
performanceInsightRetentionPerformanceInsightRetentionperformance_insight_retentionPerformanceInsightRetentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetention#Default: 7 this is the free tier
If you set databaseInsightsMode to DatabaseInsightsMode.ADVANCED, you must set this property to PerformanceInsightRetention.MONTHS_15.
Default: the default port for the chosen engine.
preferredBackupWindowstringpreferred_backup_windowstrpreferredBackupWindowStringPreferredBackupWindowstringPreferredBackupWindow*string#Default: a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow
Constraints:
- Must be in the format
hh24:mi-hh24:mi. - Must be in Universal Coordinated Time (UTC).
- Must not conflict with the preferred maintenance window.
- Must be at least 30 minutes.
preferredMaintenanceWindowstringpreferred_maintenance_windowstrpreferredMaintenanceWindowStringPreferredMaintenanceWindowstringPreferredMaintenanceWindow*string#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/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance
Format: ddd:hh24:mi-ddd:hh24:mi Constraint: Minimum 30-minute window
processorFeaturesProcessorFeaturesprocessor_featuresProcessorFeaturesprocessorFeaturesProcessorFeaturesProcessorFeaturesProcessorFeaturesProcessorFeaturesProcessorFeatures#Default: the default number of CPU cores and threads per core for the chosen instance class. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor
publiclyAccessiblebooleanpublicly_accessibleboolpubliclyAccessibleBooleanPubliclyAccessibleboolPubliclyAccessible*bool#Default: true if the instance's vpcSubnets is subnetType: SubnetType.PUBLIC, false otherwise
If not specified, the instance's vpcSubnets will be used to determine if the instance is internet-facing or not.
removalPolicyRemovalPolicyremoval_policyRemovalPolicyremovalPolicyRemovalPolicyRemovalPolicyRemovalPolicyRemovalPolicyRemovalPolicy#Default: RemovalPolicy.SNAPSHOT (remove the resource, 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 Microsoft SQL Server:
Default: New role is created if s3ExportBuckets is set, no role is defined otherwise
This property must not be used if s3ExportBuckets is used.
For Microsoft SQL Server:
s3ImportBucketsIBucket[]s3_import_bucketstyping.List[IBucket]s3ImportBucketsList<IBucket>S3ImportBucketsIBucket[]S3ImportBuckets*[]IBucket= None#This feature is only supported by the Microsoft SQL Server, Oracle, and PostgreSQL engines.
This property must not be used if s3ImportRole is used.
For Microsoft SQL Server:
Default: New role is created if s3ImportBuckets is set, no role is defined otherwise
This feature is only supported by the Microsoft SQL Server, Oracle, and PostgreSQL engines.
This property must not be used if s3ImportBuckets is used.
For Microsoft SQL Server:
securityGroupsISecurityGroup[]security_groupstyping.List[ISecurityGroup]securityGroupsList<ISecurityGroup>SecurityGroupsISecurityGroup[]SecurityGroups*[]ISecurityGroup#Default: a new security group is created
snapshotIdentifierstringsnapshot_identifierstrsnapshotIdentifierStringSnapshotIdentifierstringSnapshotIdentifier*string= None#notes
If you're restoring from a shared manual DB snapshot, you must specify the ARN of the snapshot. Constraints:
- Can't be specified when
clusterSnapshotIdentifieris specified. - Must be specified when
clusterSnapshotIdentifierisn't specified.
storageThroughputnumberstorage_throughputint | floatstorageThroughputNumberStorageThroughputdoubleStorageThroughput*float64#Default: 125 MiBps if allocated storage is less than 400 GiB for MariaDB, MySQL, and PostgreSQL, less than 200 GiB for Oracle and less than 20 GiB for SQL Server. 500 MiBps otherwise (except for SQL Server where the default is always 125 MiBps).
Only applicable for GP3.
storageTypeStorageTypestorage_typeStorageTypestorageTypeStorageTypeStorageTypeStorageTypeStorageTypeStorageType= StorageType.GP2#Storage types supported are gp2, gp3, io1, io2, and standard.
subnetGroupIDBSubnetGroupRefsubnet_groupIDBSubnetGroupRefsubnetGroupIDBSubnetGroupRefSubnetGroupIDBSubnetGroupRefSubnetGroupIDBSubnetGroupRef#Default: a new subnet group will be created.
Default: RDS default timezone
This is currently supported only by Microsoft Sql Server.
vpcSubnetsSubnetSelectionvpc_subnetsSubnetSelectionvpcSubnetsSubnetSelectionVpcSubnetsSubnetSelectionVpcSubnetsSubnetSelection#Default: private subnets