@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:51.081Z") public class CfnDBInstance extends CfnResource implements IInspectable
The AWS::RDS::DBInstance
resource creates an Amazon DB instance. The new DB instance can be an RDS DB instance, or it can be a DB instance in an Aurora DB cluster.
For more information about creating an RDS DB instance, see Creating an Amazon RDS DB instance in the Amazon RDS User Guide .
For more information about creating a DB instance in an Aurora DB cluster, see Creating an Amazon Aurora DB cluster in the Amazon Aurora User Guide .
If you import an existing DB instance, and the template configuration doesn't match the actual configuration of the DB instance, AWS CloudFormation applies the changes in the template during the import operation.
If a DB instance is deleted or replaced during an update, AWS CloudFormation deletes all automated snapshots. However, it retains manual DB snapshots. During an update that requires replacement, you can apply a stack policy to prevent DB instances from being replaced. For more information, see Prevent Updates to Stack Resources .
Updating DB instances
When properties labeled " Update requires: Replacement " are updated, AWS CloudFormation first creates a replacement DB instance, then changes references from other dependent resources to point to the replacement DB instance, and finally deletes the old DB instance.
We highly recommend that you take a snapshot of the database before updating the stack. If you don't, you lose the data when AWS CloudFormation replaces your DB instance. To preserve your data, perform the following procedure:
- Deactivate any applications that are using the DB instance so that there's no activity on the DB instance.
- Create a snapshot of the DB instance. For more information, see Creating a DB Snapshot .
- If you want to restore your instance using a DB snapshot, modify the updated template with your DB instance changes and add the
DBSnapshotIdentifier
property with the ID of the DB snapshot that you want to use.After you restore a DB instance with a
DBSnapshotIdentifier
property, you must specify the sameDBSnapshotIdentifier
property for any future updates to the DB instance. When you specify this property for an update, the DB instance is not restored from the DB snapshot again, and the data in the database is not changed. However, if you don't specify theDBSnapshotIdentifier
property, an empty DB instance is created, and the original DB instance is deleted. If you specify a property that is different from the previous snapshot restore property, a new DB instance is restored from the specifiedDBSnapshotIdentifier
property, and the original DB instance is deleted.
- Update the stack.
For more information about updating other properties of this resource, see [ModifyDBInstance](https://docs.aws.amazon.com//AmazonRDS/latest/APIReference/API_ModifyDBInstance.html)
. For more information about updating stacks, see AWS CloudFormation Stacks Updates .
Deleting DB instances
For DB instances that are part of an Aurora DB cluster, you can set a deletion policy for your DB instance to control how AWS CloudFormation handles the DB instance when the stack is deleted. For Amazon RDS DB instances, you can choose to retain the DB instance, to delete the DB instance, or to create a snapshot of the DB instance. The default AWS CloudFormation behavior depends on the DBClusterIdentifier
property:
AWS::RDS::DBInstance
resources that don't specify the DBClusterIdentifier
property, AWS CloudFormation saves a snapshot of the DB instance.AWS::RDS::DBInstance
resources that do specify the DBClusterIdentifier
property, AWS CloudFormation deletes the DB instance.For more information, see DeletionPolicy Attribute .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.rds.*; CfnDBInstance cfnDBInstance = CfnDBInstance.Builder.create(this, "MyCfnDBInstance") .allocatedStorage("allocatedStorage") .allowMajorVersionUpgrade(false) .associatedRoles(List.of(DBInstanceRoleProperty.builder() .featureName("featureName") .roleArn("roleArn") .build())) .autoMinorVersionUpgrade(false) .availabilityZone("availabilityZone") .backupRetentionPeriod(123) .caCertificateIdentifier("caCertificateIdentifier") .certificateDetails(CertificateDetailsProperty.builder() .caIdentifier("caIdentifier") .validTill("validTill") .build()) .certificateRotationRestart(false) .characterSetName("characterSetName") .copyTagsToSnapshot(false) .customIamInstanceProfile("customIamInstanceProfile") .dbClusterIdentifier("dbClusterIdentifier") .dbClusterSnapshotIdentifier("dbClusterSnapshotIdentifier") .dbInstanceClass("dbInstanceClass") .dbInstanceIdentifier("dbInstanceIdentifier") .dbName("dbName") .dbParameterGroupName("dbParameterGroupName") .dbSecurityGroups(List.of("dbSecurityGroups")) .dbSnapshotIdentifier("dbSnapshotIdentifier") .dbSubnetGroupName("dbSubnetGroupName") .deleteAutomatedBackups(false) .deletionProtection(false) .domain("domain") .domainIamRoleName("domainIamRoleName") .enableCloudwatchLogsExports(List.of("enableCloudwatchLogsExports")) .enableIamDatabaseAuthentication(false) .enablePerformanceInsights(false) .endpoint(EndpointProperty.builder() .address("address") .hostedZoneId("hostedZoneId") .port("port") .build()) .engine("engine") .engineVersion("engineVersion") .iops(123) .kmsKeyId("kmsKeyId") .licenseModel("licenseModel") .manageMasterUserPassword(false) .masterUsername("masterUsername") .masterUserPassword("masterUserPassword") .masterUserSecret(MasterUserSecretProperty.builder() .kmsKeyId("kmsKeyId") .secretArn("secretArn") .build()) .maxAllocatedStorage(123) .monitoringInterval(123) .monitoringRoleArn("monitoringRoleArn") .multiAz(false) .ncharCharacterSetName("ncharCharacterSetName") .networkType("networkType") .optionGroupName("optionGroupName") .performanceInsightsKmsKeyId("performanceInsightsKmsKeyId") .performanceInsightsRetentionPeriod(123) .port("port") .preferredBackupWindow("preferredBackupWindow") .preferredMaintenanceWindow("preferredMaintenanceWindow") .processorFeatures(List.of(ProcessorFeatureProperty.builder() .name("name") .value("value") .build())) .promotionTier(123) .publiclyAccessible(false) .replicaMode("replicaMode") .restoreTime("restoreTime") .sourceDbInstanceAutomatedBackupsArn("sourceDbInstanceAutomatedBackupsArn") .sourceDbInstanceIdentifier("sourceDbInstanceIdentifier") .sourceDbiResourceId("sourceDbiResourceId") .sourceRegion("sourceRegion") .storageEncrypted(false) .storageThroughput(123) .storageType("storageType") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .timezone("timezone") .useDefaultProcessorFeatures(false) .useLatestRestorableTime(false) .vpcSecurityGroups(List.of("vpcSecurityGroups")) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnDBInstance.Builder
A fluent builder for
CfnDBInstance . |
static interface |
CfnDBInstance.CertificateDetailsProperty
Returns the details of the DB instance’s server certificate.
|
static interface |
CfnDBInstance.DBInstanceRoleProperty
Describes an AWS Identity and Access Management (IAM) role that is associated with a DB instance.
|
static interface |
CfnDBInstance.EndpointProperty
This data type represents the information you need to connect to an Amazon RDS DB instance.
|
static interface |
CfnDBInstance.MasterUserSecretProperty
Contains the secret managed by RDS in AWS Secrets Manager for the master user password.
|
static interface |
CfnDBInstance.ProcessorFeatureProperty
The `ProcessorFeature` property type specifies the processor features of a DB instance class status.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnDBInstance(Construct scope,
java.lang.String id)
Create a new `AWS::RDS::DBInstance`.
|
|
CfnDBInstance(Construct scope,
java.lang.String id,
CfnDBInstanceProps props)
Create a new `AWS::RDS::DBInstance`.
|
protected |
CfnDBInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDBInstance(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAllocatedStorage()
The amount of storage in gibibytes (GiB) to be initially allocated for the database instance.
|
java.lang.Object |
getAllowMajorVersionUpgrade()
A value that indicates whether major version upgrades are allowed.
|
java.lang.Object |
getAssociatedRoles()
The AWS Identity and Access Management (IAM) roles associated with the DB instance.
|
java.lang.String |
getAttrCertificateDetailsCaIdentifier()
The CA identifier of the CA certificate used for the DB instance's server certificate.
|
java.lang.String |
getAttrCertificateDetailsValidTill()
The expiration date of the DB instance’s server certificate.
|
java.lang.String |
getAttrDbInstanceArn()
The Amazon Resource Name (ARN) for the DB instance.
|
java.lang.String |
getAttrDbiResourceId()
The AWS Region-unique, immutable identifier for the DB instance.
|
java.lang.String |
getAttrDbSystemId()
The Oracle system ID (Oracle SID) for a container database (CDB).
|
java.lang.String |
getAttrEndpointAddress()
The connection endpoint for the database.
|
java.lang.String |
getAttrEndpointHostedZoneId()
The ID that Amazon Route 53 assigns when you create a hosted zone.
|
java.lang.String |
getAttrEndpointPort()
The port number on which the database accepts connections.
|
java.lang.String |
getAttrMasterUserSecretSecretArn()
The Amazon Resource Name (ARN) of the secret.
|
java.lang.Object |
getAutoMinorVersionUpgrade()
A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window.
|
java.lang.String |
getAvailabilityZone()
The Availability Zone (AZ) where the database will be created.
|
java.lang.Number |
getBackupRetentionPeriod()
The number of days for which automated backups are retained.
|
java.lang.String |
getCaCertificateIdentifier()
The identifier of the CA certificate for this DB instance.
|
java.lang.Object |
getCertificateDetails()
The details of the DB instance's server certificate.
|
java.lang.Object |
getCertificateRotationRestart()
A value that indicates whether the DB instance is restarted when you rotate your SSL/TLS certificate.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getCharacterSetName()
For supported engines, indicates that the DB instance should be associated with the specified character set.
|
java.lang.Object |
getCopyTagsToSnapshot()
A value that indicates whether to copy tags from the DB instance to snapshots of the DB instance.
|
java.lang.String |
getCustomIamInstanceProfile()
The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance.
|
java.lang.String |
getDbClusterIdentifier()
The identifier of the DB cluster that the instance will belong to.
|
java.lang.String |
getDbClusterSnapshotIdentifier()
The identifier for the RDS for MySQL Multi-AZ DB cluster snapshot to restore from.
|
java.lang.String |
getDbInstanceClass()
The compute and memory capacity of the DB instance, for example, `db.m4.large` .
|
java.lang.String |
getDbInstanceIdentifier()
A name for the DB instance.
|
java.lang.String |
getDbName()
The meaning of this parameter differs according to the database engine you use.
|
java.lang.String |
getDbParameterGroupName()
The name of an existing DB parameter group or a reference to an [AWS::RDS::DBParameterGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html) resource created in the template.
|
java.util.List<java.lang.String> |
getDbSecurityGroups()
A list of the DB security groups to assign to the DB instance.
|
java.lang.String |
getDbSnapshotIdentifier()
The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance.
|
java.lang.String |
getDbSubnetGroupName()
A DB subnet group to associate with the DB instance.
|
java.lang.Object |
getDeleteAutomatedBackups()
A value that indicates whether to remove automated backups immediately after the DB instance is deleted.
|
java.lang.Object |
getDeletionProtection()
A value that indicates whether the DB instance has deletion protection enabled.
|
java.lang.String |
getDomain()
The Active Directory directory ID to create the DB instance in.
|
java.lang.String |
getDomainIamRoleName()
Specify the name of the IAM role to be used when making API calls to the Directory Service.
|
java.util.List<java.lang.String> |
getEnableCloudwatchLogsExports()
The list of log types that need to be enabled for exporting to CloudWatch Logs.
|
java.lang.Object |
getEnableIamDatabaseAuthentication()
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.
|
java.lang.Object |
getEnablePerformanceInsights()
A value that indicates whether to enable Performance Insights for the DB instance.
|
java.lang.Object |
getEndpoint()
Specifies the connection endpoint.
|
java.lang.String |
getEngine()
The name of the database engine that you want to use for this DB instance.
|
java.lang.String |
getEngineVersion()
The version number of the database engine to use.
|
java.lang.Number |
getIops()
The number of I/O operations per second (IOPS) that the database provisions.
|
java.lang.String |
getKmsKeyId()
The ARN of the AWS KMS key that's used to encrypt the DB instance, such as `arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef` .
|
java.lang.String |
getLicenseModel()
License model information for this DB instance.
|
java.lang.Object |
getManageMasterUserPassword()
A value that indicates whether to manage the master user password with AWS Secrets Manager.
|
java.lang.String |
getMasterUsername()
The master user name for the DB instance.
|
java.lang.String |
getMasterUserPassword()
The password for the master user.
|
java.lang.Object |
getMasterUserSecret()
Contains the secret managed by RDS in AWS Secrets Manager for the master user password.
|
java.lang.Number |
getMaxAllocatedStorage()
The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance.
|
java.lang.Number |
getMonitoringInterval()
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
|
java.lang.String |
getMonitoringRoleArn()
The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs.
|
java.lang.Object |
getMultiAz()
Specifies whether the database instance is a Multi-AZ DB instance deployment.
|
java.lang.String |
getNcharCharacterSetName()
The name of the NCHAR character set for the Oracle DB instance.
|
java.lang.String |
getNetworkType()
The network type of the DB instance.
|
java.lang.String |
getOptionGroupName()
Indicates that the DB instance should be associated with the specified option group.
|
java.lang.String |
getPerformanceInsightsKmsKeyId()
The AWS KMS key identifier for encryption of Performance Insights data.
|
java.lang.Number |
getPerformanceInsightsRetentionPeriod()
The number of days to retain Performance Insights data.
|
java.lang.String |
getPort()
The port number on which the database accepts connections.
|
java.lang.String |
getPreferredBackupWindow()
The daily time range during which automated backups are created if automated backups are enabled, using the `BackupRetentionPeriod` parameter.
|
java.lang.String |
getPreferredMaintenanceWindow()
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
|
java.lang.Object |
getProcessorFeatures()
The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.
|
java.lang.Number |
getPromotionTier()
A value that specifies the order in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance.
|
java.lang.Object |
getPubliclyAccessible()
Indicates whether the DB instance is an internet-facing instance.
|
java.lang.String |
getReplicaMode()
The open mode of an Oracle read replica.
|
java.lang.String |
getRestoreTime()
The date and time to restore from.
|
java.lang.String |
getSourceDbInstanceAutomatedBackupsArn()
The Amazon Resource Name (ARN) of the replicated automated backups from which to restore, for example, `arn:aws:rds:useast-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE` .
|
java.lang.String |
getSourceDbInstanceIdentifier()
If you want to create a read replica DB instance, specify the ID of the source DB instance.
|
java.lang.String |
getSourceDbiResourceId()
The resource ID of the source DB instance from which to restore.
|
java.lang.String |
getSourceRegion()
The ID of the region that contains the source DB instance for the read replica.
|
java.lang.Object |
getStorageEncrypted()
A value that indicates whether the DB instance is encrypted.
|
java.lang.Number |
getStorageThroughput()
Specifies the storage throughput value for the DB instance.
|
java.lang.String |
getStorageType()
Specifies the storage type to be associated with the DB instance.
|
TagManager |
getTags()
An optional array of key-value pairs to apply to this DB instance.
|
java.lang.String |
getTimezone()
The time zone of the DB instance.
|
java.lang.Object |
getUseDefaultProcessorFeatures()
A value that indicates whether the DB instance class of the DB instance uses its default processor features.
|
java.lang.Object |
getUseLatestRestorableTime()
A value that indicates whether the DB instance is restored from the latest backup time.
|
java.util.List<java.lang.String> |
getVpcSecurityGroups()
A list of the VPC security group IDs to assign to the DB instance.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAllocatedStorage(java.lang.String value)
The amount of storage in gibibytes (GiB) to be initially allocated for the database instance.
|
void |
setAllowMajorVersionUpgrade(java.lang.Boolean value)
A value that indicates whether major version upgrades are allowed.
|
void |
setAllowMajorVersionUpgrade(IResolvable value)
A value that indicates whether major version upgrades are allowed.
|
void |
setAssociatedRoles(IResolvable value)
The AWS Identity and Access Management (IAM) roles associated with the DB instance.
|
void |
setAssociatedRoles(java.util.List<java.lang.Object> value)
The AWS Identity and Access Management (IAM) roles associated with the DB instance.
|
void |
setAutoMinorVersionUpgrade(java.lang.Boolean value)
A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window.
|
void |
setAutoMinorVersionUpgrade(IResolvable value)
A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window.
|
void |
setAvailabilityZone(java.lang.String value)
The Availability Zone (AZ) where the database will be created.
|
void |
setBackupRetentionPeriod(java.lang.Number value)
The number of days for which automated backups are retained.
|
void |
setCaCertificateIdentifier(java.lang.String value)
The identifier of the CA certificate for this DB instance.
|
void |
setCertificateDetails(CfnDBInstance.CertificateDetailsProperty value)
The details of the DB instance's server certificate.
|
void |
setCertificateDetails(IResolvable value)
The details of the DB instance's server certificate.
|
void |
setCertificateRotationRestart(java.lang.Boolean value)
A value that indicates whether the DB instance is restarted when you rotate your SSL/TLS certificate.
|
void |
setCertificateRotationRestart(IResolvable value)
A value that indicates whether the DB instance is restarted when you rotate your SSL/TLS certificate.
|
void |
setCharacterSetName(java.lang.String value)
For supported engines, indicates that the DB instance should be associated with the specified character set.
|
void |
setCopyTagsToSnapshot(java.lang.Boolean value)
A value that indicates whether to copy tags from the DB instance to snapshots of the DB instance.
|
void |
setCopyTagsToSnapshot(IResolvable value)
A value that indicates whether to copy tags from the DB instance to snapshots of the DB instance.
|
void |
setCustomIamInstanceProfile(java.lang.String value)
The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance.
|
void |
setDbClusterIdentifier(java.lang.String value)
The identifier of the DB cluster that the instance will belong to.
|
void |
setDbClusterSnapshotIdentifier(java.lang.String value)
The identifier for the RDS for MySQL Multi-AZ DB cluster snapshot to restore from.
|
void |
setDbInstanceClass(java.lang.String value)
The compute and memory capacity of the DB instance, for example, `db.m4.large` .
|
void |
setDbInstanceIdentifier(java.lang.String value)
A name for the DB instance.
|
void |
setDbName(java.lang.String value)
The meaning of this parameter differs according to the database engine you use.
|
void |
setDbParameterGroupName(java.lang.String value)
The name of an existing DB parameter group or a reference to an [AWS::RDS::DBParameterGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html) resource created in the template.
|
void |
setDbSecurityGroups(java.util.List<java.lang.String> value)
A list of the DB security groups to assign to the DB instance.
|
void |
setDbSnapshotIdentifier(java.lang.String value)
The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance.
|
void |
setDbSubnetGroupName(java.lang.String value)
A DB subnet group to associate with the DB instance.
|
void |
setDeleteAutomatedBackups(java.lang.Boolean value)
A value that indicates whether to remove automated backups immediately after the DB instance is deleted.
|
void |
setDeleteAutomatedBackups(IResolvable value)
A value that indicates whether to remove automated backups immediately after the DB instance is deleted.
|
void |
setDeletionProtection(java.lang.Boolean value)
A value that indicates whether the DB instance has deletion protection enabled.
|
void |
setDeletionProtection(IResolvable value)
A value that indicates whether the DB instance has deletion protection enabled.
|
void |
setDomain(java.lang.String value)
The Active Directory directory ID to create the DB instance in.
|
void |
setDomainIamRoleName(java.lang.String value)
Specify the name of the IAM role to be used when making API calls to the Directory Service.
|
void |
setEnableCloudwatchLogsExports(java.util.List<java.lang.String> value)
The list of log types that need to be enabled for exporting to CloudWatch Logs.
|
void |
setEnableIamDatabaseAuthentication(java.lang.Boolean value)
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.
|
void |
setEnableIamDatabaseAuthentication(IResolvable value)
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.
|
void |
setEnablePerformanceInsights(java.lang.Boolean value)
A value that indicates whether to enable Performance Insights for the DB instance.
|
void |
setEnablePerformanceInsights(IResolvable value)
A value that indicates whether to enable Performance Insights for the DB instance.
|
void |
setEndpoint(CfnDBInstance.EndpointProperty value)
Specifies the connection endpoint.
|
void |
setEndpoint(IResolvable value)
Specifies the connection endpoint.
|
void |
setEngine(java.lang.String value)
The name of the database engine that you want to use for this DB instance.
|
void |
setEngineVersion(java.lang.String value)
The version number of the database engine to use.
|
void |
setIops(java.lang.Number value)
The number of I/O operations per second (IOPS) that the database provisions.
|
void |
setKmsKeyId(java.lang.String value)
The ARN of the AWS KMS key that's used to encrypt the DB instance, such as `arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef` .
|
void |
setLicenseModel(java.lang.String value)
License model information for this DB instance.
|
void |
setManageMasterUserPassword(java.lang.Boolean value)
A value that indicates whether to manage the master user password with AWS Secrets Manager.
|
void |
setManageMasterUserPassword(IResolvable value)
A value that indicates whether to manage the master user password with AWS Secrets Manager.
|
void |
setMasterUsername(java.lang.String value)
The master user name for the DB instance.
|
void |
setMasterUserPassword(java.lang.String value)
The password for the master user.
|
void |
setMasterUserSecret(CfnDBInstance.MasterUserSecretProperty value)
Contains the secret managed by RDS in AWS Secrets Manager for the master user password.
|
void |
setMasterUserSecret(IResolvable value)
Contains the secret managed by RDS in AWS Secrets Manager for the master user password.
|
void |
setMaxAllocatedStorage(java.lang.Number value)
The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance.
|
void |
setMonitoringInterval(java.lang.Number value)
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
|
void |
setMonitoringRoleArn(java.lang.String value)
The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs.
|
void |
setMultiAz(java.lang.Boolean value)
Specifies whether the database instance is a Multi-AZ DB instance deployment.
|
void |
setMultiAz(IResolvable value)
Specifies whether the database instance is a Multi-AZ DB instance deployment.
|
void |
setNcharCharacterSetName(java.lang.String value)
The name of the NCHAR character set for the Oracle DB instance.
|
void |
setNetworkType(java.lang.String value)
The network type of the DB instance.
|
void |
setOptionGroupName(java.lang.String value)
Indicates that the DB instance should be associated with the specified option group.
|
void |
setPerformanceInsightsKmsKeyId(java.lang.String value)
The AWS KMS key identifier for encryption of Performance Insights data.
|
void |
setPerformanceInsightsRetentionPeriod(java.lang.Number value)
The number of days to retain Performance Insights data.
|
void |
setPort(java.lang.String value)
The port number on which the database accepts connections.
|
void |
setPreferredBackupWindow(java.lang.String value)
The daily time range during which automated backups are created if automated backups are enabled, using the `BackupRetentionPeriod` parameter.
|
void |
setPreferredMaintenanceWindow(java.lang.String value)
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
|
void |
setProcessorFeatures(IResolvable value)
The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.
|
void |
setProcessorFeatures(java.util.List<java.lang.Object> value)
The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.
|
void |
setPromotionTier(java.lang.Number value)
A value that specifies the order in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance.
|
void |
setPubliclyAccessible(java.lang.Boolean value)
Indicates whether the DB instance is an internet-facing instance.
|
void |
setPubliclyAccessible(IResolvable value)
Indicates whether the DB instance is an internet-facing instance.
|
void |
setReplicaMode(java.lang.String value)
The open mode of an Oracle read replica.
|
void |
setRestoreTime(java.lang.String value)
The date and time to restore from.
|
void |
setSourceDbInstanceAutomatedBackupsArn(java.lang.String value)
The Amazon Resource Name (ARN) of the replicated automated backups from which to restore, for example, `arn:aws:rds:useast-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE` .
|
void |
setSourceDbInstanceIdentifier(java.lang.String value)
If you want to create a read replica DB instance, specify the ID of the source DB instance.
|
void |
setSourceDbiResourceId(java.lang.String value)
The resource ID of the source DB instance from which to restore.
|
void |
setSourceRegion(java.lang.String value)
The ID of the region that contains the source DB instance for the read replica.
|
void |
setStorageEncrypted(java.lang.Boolean value)
A value that indicates whether the DB instance is encrypted.
|
void |
setStorageEncrypted(IResolvable value)
A value that indicates whether the DB instance is encrypted.
|
void |
setStorageThroughput(java.lang.Number value)
Specifies the storage throughput value for the DB instance.
|
void |
setStorageType(java.lang.String value)
Specifies the storage type to be associated with the DB instance.
|
void |
setTimezone(java.lang.String value)
The time zone of the DB instance.
|
void |
setUseDefaultProcessorFeatures(java.lang.Boolean value)
A value that indicates whether the DB instance class of the DB instance uses its default processor features.
|
void |
setUseDefaultProcessorFeatures(IResolvable value)
A value that indicates whether the DB instance class of the DB instance uses its default processor features.
|
void |
setUseLatestRestorableTime(java.lang.Boolean value)
A value that indicates whether the DB instance is restored from the latest backup time.
|
void |
setUseLatestRestorableTime(IResolvable value)
A value that indicates whether the DB instance is restored from the latest backup time.
|
void |
setVpcSecurityGroups(java.util.List<java.lang.String> value)
A list of the VPC security group IDs to assign to the DB instance.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnDBInstance(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDBInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnDBInstance(Construct scope, java.lang.String id, CfnDBInstanceProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties.public CfnDBInstance(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrCertificateDetailsCaIdentifier()
public java.lang.String getAttrCertificateDetailsValidTill()
public java.lang.String getAttrDbInstanceArn()
public java.lang.String getAttrDbiResourceId()
This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.
public java.lang.String getAttrDbSystemId()
The Oracle SID is also the name of the CDB.
This setting is valid for RDS Custom only.
public java.lang.String getAttrEndpointAddress()
For Aurora Serverless DB clusters, the connection endpoint only applies to the DB cluster.
public java.lang.String getAttrEndpointHostedZoneId()
public java.lang.String getAttrEndpointPort()
For example: 3306
public java.lang.String getAttrMasterUserSecretSecretArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getAllocatedStorage()
If any value is set in the
Iops
parameter,AllocatedStorage
must be at least 100 GiB, which corresponds to the minimum Iops value of 1,000. If you increase theIops
value (in 1,000 IOPS increments), then you must also increase theAllocatedStorage
value (in 100-GiB increments).
Amazon Aurora
Not applicable. Aurora cluster volumes automatically grow as the amount of data in your database increases, though you are only charged for the space that you use in an Aurora cluster volume.
MySQL
Constraints to the amount of storage for each storage type are the following:
MariaDB
Constraints to the amount of storage for each storage type are the following:
PostgreSQL
Constraints to the amount of storage for each storage type are the following:
Oracle
Constraints to the amount of storage for each storage type are the following:
SQL Server
Constraints to the amount of storage for each storage type are the following:
public void setAllocatedStorage(java.lang.String value)
If any value is set in the
Iops
parameter,AllocatedStorage
must be at least 100 GiB, which corresponds to the minimum Iops value of 1,000. If you increase theIops
value (in 1,000 IOPS increments), then you must also increase theAllocatedStorage
value (in 100-GiB increments).
Amazon Aurora
Not applicable. Aurora cluster volumes automatically grow as the amount of data in your database increases, though you are only charged for the space that you use in an Aurora cluster volume.
MySQL
Constraints to the amount of storage for each storage type are the following:
MariaDB
Constraints to the amount of storage for each storage type are the following:
PostgreSQL
Constraints to the amount of storage for each storage type are the following:
Oracle
Constraints to the amount of storage for each storage type are the following:
SQL Server
Constraints to the amount of storage for each storage type are the following:
public java.lang.Object getAllowMajorVersionUpgrade()
Changing this parameter doesn't result in an outage and the change is asynchronously applied as soon as possible.
Constraints: Major version upgrades must be allowed when specifying a value for the EngineVersion
parameter that is a different major version than the DB instance's current version.
public void setAllowMajorVersionUpgrade(java.lang.Boolean value)
Changing this parameter doesn't result in an outage and the change is asynchronously applied as soon as possible.
Constraints: Major version upgrades must be allowed when specifying a value for the EngineVersion
parameter that is a different major version than the DB instance's current version.
public void setAllowMajorVersionUpgrade(IResolvable value)
Changing this parameter doesn't result in an outage and the change is asynchronously applied as soon as possible.
Constraints: Major version upgrades must be allowed when specifying a value for the EngineVersion
parameter that is a different major version than the DB instance's current version.
public java.lang.Object getAssociatedRoles()
Amazon Aurora
Not applicable. The associated roles are managed by the DB cluster.
public void setAssociatedRoles(IResolvable value)
Amazon Aurora
Not applicable. The associated roles are managed by the DB cluster.
public void setAssociatedRoles(java.util.List<java.lang.Object> value)
Amazon Aurora
Not applicable. The associated roles are managed by the DB cluster.
public java.lang.Object getAutoMinorVersionUpgrade()
By default, minor engine upgrades are applied automatically.
public void setAutoMinorVersionUpgrade(java.lang.Boolean value)
By default, minor engine upgrades are applied automatically.
public void setAutoMinorVersionUpgrade(IResolvable value)
By default, minor engine upgrades are applied automatically.
public java.lang.String getAvailabilityZone()
For information on AWS Regions and Availability Zones, see Regions and Availability Zones .
Amazon Aurora
Each Aurora DB cluster hosts copies of its storage in three separate Availability Zones. Specify one of these Availability Zones. Aurora automatically chooses an appropriate Availability Zone if you don't specify one.
Default: A random, system-chosen Availability Zone in the endpoint's AWS Region .
Example: us-east-1d
Constraint: The AvailabilityZone
parameter can't be specified if the DB instance is a Multi-AZ deployment. The specified Availability Zone must be in the same AWS Region as the current endpoint.
public void setAvailabilityZone(java.lang.String value)
For information on AWS Regions and Availability Zones, see Regions and Availability Zones .
Amazon Aurora
Each Aurora DB cluster hosts copies of its storage in three separate Availability Zones. Specify one of these Availability Zones. Aurora automatically chooses an appropriate Availability Zone if you don't specify one.
Default: A random, system-chosen Availability Zone in the endpoint's AWS Region .
Example: us-east-1d
Constraint: The AvailabilityZone
parameter can't be specified if the DB instance is a Multi-AZ deployment. The specified Availability Zone must be in the same AWS Region as the current endpoint.
public java.lang.Number getBackupRetentionPeriod()
Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.
Amazon Aurora
Not applicable. The retention period for automated backups is managed by the DB cluster.
Default: 1
Constraints:
public void setBackupRetentionPeriod(java.lang.Number value)
Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.
Amazon Aurora
Not applicable. The retention period for automated backups is managed by the DB cluster.
Default: 1
Constraints:
public java.lang.String getCaCertificateIdentifier()
Specifying or updating this property triggers a reboot.
For more information about CA certificate identifiers for RDS DB engines, see Rotating Your SSL/TLS Certificate in the Amazon RDS User Guide .
For more information about CA certificate identifiers for Aurora DB engines, see Rotating Your SSL/TLS Certificate in the Amazon Aurora User Guide .
public void setCaCertificateIdentifier(java.lang.String value)
Specifying or updating this property triggers a reboot.
For more information about CA certificate identifiers for RDS DB engines, see Rotating Your SSL/TLS Certificate in the Amazon RDS User Guide .
For more information about CA certificate identifiers for Aurora DB engines, see Rotating Your SSL/TLS Certificate in the Amazon Aurora User Guide .
public java.lang.Object getCertificateDetails()
public void setCertificateDetails(IResolvable value)
public void setCertificateDetails(CfnDBInstance.CertificateDetailsProperty value)
public java.lang.Object getCertificateRotationRestart()
By default, the DB instance is restarted when you rotate your SSL/TLS certificate. The certificate is not updated until the DB instance is restarted.
Set this parameter only if you are not using SSL/TLS to connect to the DB instance.
If you are using SSL/TLS to connect to the DB instance, follow the appropriate instructions for your DB engine to rotate your SSL/TLS certificate:
This setting doesn't apply to RDS Custom.
public void setCertificateRotationRestart(java.lang.Boolean value)
By default, the DB instance is restarted when you rotate your SSL/TLS certificate. The certificate is not updated until the DB instance is restarted.
Set this parameter only if you are not using SSL/TLS to connect to the DB instance.
If you are using SSL/TLS to connect to the DB instance, follow the appropriate instructions for your DB engine to rotate your SSL/TLS certificate:
This setting doesn't apply to RDS Custom.
public void setCertificateRotationRestart(IResolvable value)
By default, the DB instance is restarted when you rotate your SSL/TLS certificate. The certificate is not updated until the DB instance is restarted.
Set this parameter only if you are not using SSL/TLS to connect to the DB instance.
If you are using SSL/TLS to connect to the DB instance, follow the appropriate instructions for your DB engine to rotate your SSL/TLS certificate:
This setting doesn't apply to RDS Custom.
public java.lang.String getCharacterSetName()
Amazon Aurora
Not applicable. The character set is managed by the DB cluster. For more information, see AWS::RDS::DBCluster .
public void setCharacterSetName(java.lang.String value)
Amazon Aurora
Not applicable. The character set is managed by the DB cluster. For more information, see AWS::RDS::DBCluster .
public java.lang.Object getCopyTagsToSnapshot()
By default, tags are not copied.
Amazon Aurora
Not applicable. Copying tags to snapshots is managed by the DB cluster. Setting this value for an Aurora DB instance has no effect on the DB cluster setting.
public void setCopyTagsToSnapshot(java.lang.Boolean value)
By default, tags are not copied.
Amazon Aurora
Not applicable. Copying tags to snapshots is managed by the DB cluster. Setting this value for an Aurora DB instance has no effect on the DB cluster setting.
public void setCopyTagsToSnapshot(IResolvable value)
By default, tags are not copied.
Amazon Aurora
Not applicable. Copying tags to snapshots is managed by the DB cluster. Setting this value for an Aurora DB instance has no effect on the DB cluster setting.
public java.lang.String getCustomIamInstanceProfile()
The instance profile must meet the following requirements:
AWSRDSCustom
.For the list of permissions required for the IAM role, see Configure IAM and your VPC in the Amazon RDS User Guide .
This setting is required for RDS Custom.
public void setCustomIamInstanceProfile(java.lang.String value)
The instance profile must meet the following requirements:
AWSRDSCustom
.For the list of permissions required for the IAM role, see Configure IAM and your VPC in the Amazon RDS User Guide .
This setting is required for RDS Custom.
public java.lang.String getDbClusterIdentifier()
public void setDbClusterIdentifier(java.lang.String value)
public java.lang.String getDbClusterSnapshotIdentifier()
For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide .
Constraints:
DBSnapshotIdentifier
is specified.DBSnapshotIdentifier
isn't specified.DBClusterSnapshotIdentifier
must be the ARN of the shared snapshot.public void setDbClusterSnapshotIdentifier(java.lang.String value)
For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide .
Constraints:
DBSnapshotIdentifier
is specified.DBSnapshotIdentifier
isn't specified.DBClusterSnapshotIdentifier
must be the ARN of the shared snapshot.public java.lang.String getDbInstanceClass()
For the full list of DB instance classes, and availability for your engine, see DB Instance Class in the Amazon RDS User Guide. For more information about DB instance class pricing and AWS Region support for DB instance classes, see Amazon RDS Pricing .
public void setDbInstanceClass(java.lang.String value)
For the full list of DB instance classes, and availability for your engine, see DB Instance Class in the Amazon RDS User Guide. For more information about DB instance class pricing and AWS Region support for DB instance classes, see Amazon RDS Pricing .
public java.lang.String getDbInstanceIdentifier()
If you specify a name, AWS CloudFormation converts it to lowercase. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the DB instance. For more information, see Name Type .
For information about constraints that apply to DB instance identifiers, see Naming constraints in Amazon RDS in the Amazon RDS User Guide .
If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
public void setDbInstanceIdentifier(java.lang.String value)
If you specify a name, AWS CloudFormation converts it to lowercase. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the DB instance. For more information, see Name Type .
For information about constraints that apply to DB instance identifiers, see Naming constraints in Amazon RDS in the Amazon RDS User Guide .
If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
public java.lang.String getDbName()
If you specify the
[DBSnapshotIdentifier](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-dbsnapshotidentifier)
property, this property only applies to RDS for Oracle.
Amazon Aurora
Not applicable. The database name is managed by the DB cluster.
MySQL
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
MariaDB
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
PostgreSQL
The name of the database to create when the DB instance is created. If this parameter is not specified, the default postgres
database is created in the DB instance.
Constraints:
Oracle
The Oracle System ID (SID) of the created DB instance. If you specify null
, the default value ORCL
is used. You can't specify the string NULL, or any other reserved word, for DBName
.
Default: ORCL
Constraints:
SQL Server
Not applicable. Must be null.
public void setDbName(java.lang.String value)
If you specify the
[DBSnapshotIdentifier](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-dbsnapshotidentifier)
property, this property only applies to RDS for Oracle.
Amazon Aurora
Not applicable. The database name is managed by the DB cluster.
MySQL
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
MariaDB
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.
Constraints:
PostgreSQL
The name of the database to create when the DB instance is created. If this parameter is not specified, the default postgres
database is created in the DB instance.
Constraints:
Oracle
The Oracle System ID (SID) of the created DB instance. If you specify null
, the default value ORCL
is used. You can't specify the string NULL, or any other reserved word, for DBName
.
Default: ORCL
Constraints:
SQL Server
Not applicable. Must be null.
public java.lang.String getDbParameterGroupName()
To list all of the available DB parameter group names, use the following command:
aws rds describe-db-parameter-groups --query "DBParameterGroups[].DBParameterGroupName" --output text
If any of the data members of the referenced parameter group are changed during an update, the DB instance might need to be restarted, which causes some interruption. If the parameter group contains static parameters, whether they were changed or not, an update triggers a reboot.
If you don't specify a value for DBParameterGroupName
property, the default DB parameter group for the specified engine and engine version is used.
public void setDbParameterGroupName(java.lang.String value)
To list all of the available DB parameter group names, use the following command:
aws rds describe-db-parameter-groups --query "DBParameterGroups[].DBParameterGroupName" --output text
If any of the data members of the referenced parameter group are changed during an update, the DB instance might need to be restarted, which causes some interruption. If the parameter group contains static parameters, whether they were changed or not, an update triggers a reboot.
If you don't specify a value for DBParameterGroupName
property, the default DB parameter group for the specified engine and engine version is used.
public java.util.List<java.lang.String> getDbSecurityGroups()
The list can include both the name of existing DB security groups or references to AWS::RDS::DBSecurityGroup resources created in the template.
If you set DBSecurityGroups, you must not set VPCSecurityGroups, and vice versa. Also, note that the DBSecurityGroups property exists only for backwards compatibility with older regions and is no longer recommended for providing security information to an RDS DB instance. Instead, use VPCSecurityGroups.
If you specify this property, AWS CloudFormation sends only the following properties (if specified) to Amazon RDS during create operations:
AllocatedStorage
AutoMinorVersionUpgrade
AvailabilityZone
BackupRetentionPeriod
CharacterSetName
DBInstanceClass
DBName
DBParameterGroupName
DBSecurityGroups
DBSubnetGroupName
Engine
EngineVersion
Iops
LicenseModel
MasterUsername
MasterUserPassword
MultiAZ
OptionGroupName
PreferredBackupWindow
PreferredMaintenanceWindow
All other properties are ignored. Specify a virtual private cloud (VPC) security group if you want to submit other properties, such as
StorageType
,StorageEncrypted
, orKmsKeyId
. If you're already using theDBSecurityGroups
property, you can't use these other properties by updating your DB instance to use a VPC security group. You must recreate the DB instance.
public void setDbSecurityGroups(java.util.List<java.lang.String> value)
The list can include both the name of existing DB security groups or references to AWS::RDS::DBSecurityGroup resources created in the template.
If you set DBSecurityGroups, you must not set VPCSecurityGroups, and vice versa. Also, note that the DBSecurityGroups property exists only for backwards compatibility with older regions and is no longer recommended for providing security information to an RDS DB instance. Instead, use VPCSecurityGroups.
If you specify this property, AWS CloudFormation sends only the following properties (if specified) to Amazon RDS during create operations:
AllocatedStorage
AutoMinorVersionUpgrade
AvailabilityZone
BackupRetentionPeriod
CharacterSetName
DBInstanceClass
DBName
DBParameterGroupName
DBSecurityGroups
DBSubnetGroupName
Engine
EngineVersion
Iops
LicenseModel
MasterUsername
MasterUserPassword
MultiAZ
OptionGroupName
PreferredBackupWindow
PreferredMaintenanceWindow
All other properties are ignored. Specify a virtual private cloud (VPC) security group if you want to submit other properties, such as
StorageType
,StorageEncrypted
, orKmsKeyId
. If you're already using theDBSecurityGroups
property, you can't use these other properties by updating your DB instance to use a VPC security group. You must recreate the DB instance.
public java.lang.String getDbSnapshotIdentifier()
If you're restoring from a shared manual DB snapshot, you must specify the ARN of the snapshot.
By specifying this property, you can create a DB instance from the specified DB snapshot. If the DBSnapshotIdentifier
property is an empty string or the AWS::RDS::DBInstance
declaration has no DBSnapshotIdentifier
property, AWS CloudFormation creates a new database. If the property contains a value (other than an empty string), AWS CloudFormation creates a database from the specified snapshot. If a snapshot with the specified name doesn't exist, AWS CloudFormation can't create the database and it rolls back the stack.
Some DB instance properties aren't valid when you restore from a snapshot, such as the MasterUsername
and MasterUserPassword
properties. For information about the properties that you can specify, see the RestoreDBInstanceFromDBSnapshot
action in the Amazon RDS API Reference .
After you restore a DB instance with a DBSnapshotIdentifier
property, you must specify the same DBSnapshotIdentifier
property for any future updates to the DB instance. When you specify this property for an update, the DB instance is not restored from the DB snapshot again, and the data in the database is not changed. However, if you don't specify the DBSnapshotIdentifier
property, an empty DB instance is created, and the original DB instance is deleted. If you specify a property that is different from the previous snapshot restore property, a new DB instance is restored from the specified DBSnapshotIdentifier
property, and the original DB instance is deleted.
If you specify the DBSnapshotIdentifier
property to restore a DB instance (as opposed to specifying it for DB instance updates), then don't specify the following properties:
CharacterSetName
DBClusterIdentifier
DBName
DeleteAutomatedBackups
EnablePerformanceInsights
KmsKeyId
MasterUsername
MasterUserPassword
PerformanceInsightsKMSKeyId
PerformanceInsightsRetentionPeriod
PromotionTier
SourceDBInstanceIdentifier
SourceRegion
StorageEncrypted
(for an encrypted snapshot)Timezone
Amazon Aurora
Not applicable. Snapshot restore is managed by the DB cluster.
public void setDbSnapshotIdentifier(java.lang.String value)
If you're restoring from a shared manual DB snapshot, you must specify the ARN of the snapshot.
By specifying this property, you can create a DB instance from the specified DB snapshot. If the DBSnapshotIdentifier
property is an empty string or the AWS::RDS::DBInstance
declaration has no DBSnapshotIdentifier
property, AWS CloudFormation creates a new database. If the property contains a value (other than an empty string), AWS CloudFormation creates a database from the specified snapshot. If a snapshot with the specified name doesn't exist, AWS CloudFormation can't create the database and it rolls back the stack.
Some DB instance properties aren't valid when you restore from a snapshot, such as the MasterUsername
and MasterUserPassword
properties. For information about the properties that you can specify, see the RestoreDBInstanceFromDBSnapshot
action in the Amazon RDS API Reference .
After you restore a DB instance with a DBSnapshotIdentifier
property, you must specify the same DBSnapshotIdentifier
property for any future updates to the DB instance. When you specify this property for an update, the DB instance is not restored from the DB snapshot again, and the data in the database is not changed. However, if you don't specify the DBSnapshotIdentifier
property, an empty DB instance is created, and the original DB instance is deleted. If you specify a property that is different from the previous snapshot restore property, a new DB instance is restored from the specified DBSnapshotIdentifier
property, and the original DB instance is deleted.
If you specify the DBSnapshotIdentifier
property to restore a DB instance (as opposed to specifying it for DB instance updates), then don't specify the following properties:
CharacterSetName
DBClusterIdentifier
DBName
DeleteAutomatedBackups
EnablePerformanceInsights
KmsKeyId
MasterUsername
MasterUserPassword
PerformanceInsightsKMSKeyId
PerformanceInsightsRetentionPeriod
PromotionTier
SourceDBInstanceIdentifier
SourceRegion
StorageEncrypted
(for an encrypted snapshot)Timezone
Amazon Aurora
Not applicable. Snapshot restore is managed by the DB cluster.
public java.lang.String getDbSubnetGroupName()
If you update this value, the new subnet group must be a subnet group in a new VPC.
If there's no DB subnet group, then the DB instance isn't a VPC DB instance.
For more information about using Amazon RDS in a VPC, see Using Amazon RDS with Amazon Virtual Private Cloud (VPC) in the Amazon RDS User Guide .
Amazon Aurora
Not applicable. The DB subnet group is managed by the DB cluster. If specified, the setting must match the DB cluster setting.
public void setDbSubnetGroupName(java.lang.String value)
If you update this value, the new subnet group must be a subnet group in a new VPC.
If there's no DB subnet group, then the DB instance isn't a VPC DB instance.
For more information about using Amazon RDS in a VPC, see Using Amazon RDS with Amazon Virtual Private Cloud (VPC) in the Amazon RDS User Guide .
Amazon Aurora
Not applicable. The DB subnet group is managed by the DB cluster. If specified, the setting must match the DB cluster setting.
public java.lang.Object getDeleteAutomatedBackups()
This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB instance is deleted.
Amazon Aurora
Not applicable. When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. Manual DB cluster snapshots of the DB cluster are not deleted.
public void setDeleteAutomatedBackups(java.lang.Boolean value)
This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB instance is deleted.
Amazon Aurora
Not applicable. When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. Manual DB cluster snapshots of the DB cluster are not deleted.
public void setDeleteAutomatedBackups(IResolvable value)
This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB instance is deleted.
Amazon Aurora
Not applicable. When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. Manual DB cluster snapshots of the DB cluster are not deleted.
public java.lang.Object getDeletionProtection()
The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled. For more information, see Deleting a DB Instance .
Amazon Aurora
Not applicable. You can enable or disable deletion protection for the DB cluster. For more information, see CreateDBCluster
. DB instances in a DB cluster can be deleted even when deletion protection is enabled for the DB cluster.
public void setDeletionProtection(java.lang.Boolean value)
The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled. For more information, see Deleting a DB Instance .
Amazon Aurora
Not applicable. You can enable or disable deletion protection for the DB cluster. For more information, see CreateDBCluster
. DB instances in a DB cluster can be deleted even when deletion protection is enabled for the DB cluster.
public void setDeletionProtection(IResolvable value)
The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled. For more information, see Deleting a DB Instance .
Amazon Aurora
Not applicable. You can enable or disable deletion protection for the DB cluster. For more information, see CreateDBCluster
. DB instances in a DB cluster can be deleted even when deletion protection is enabled for the DB cluster.
public java.lang.String getDomain()
Currently, only Microsoft SQL Server, Oracle, and PostgreSQL DB instances can be created in an Active Directory Domain.
For more information, see Kerberos Authentication in the Amazon RDS User Guide .
public void setDomain(java.lang.String value)
Currently, only Microsoft SQL Server, Oracle, and PostgreSQL DB instances can be created in an Active Directory Domain.
For more information, see Kerberos Authentication in the Amazon RDS User Guide .
public java.lang.String getDomainIamRoleName()
This setting doesn't apply to RDS Custom.
Amazon Aurora
Not applicable. The domain is managed by the DB cluster.
public void setDomainIamRoleName(java.lang.String value)
This setting doesn't apply to RDS Custom.
Amazon Aurora
Not applicable. The domain is managed by the DB cluster.
public java.util.List<java.lang.String> getEnableCloudwatchLogsExports()
The values in the list depend on the DB engine being used. For more information, see Publishing Database Logs to Amazon CloudWatch Logs in the Amazon Relational Database Service User Guide .
Amazon Aurora
Not applicable. CloudWatch Logs exports are managed by the DB cluster.
MariaDB
Valid values: audit
, error
, general
, slowquery
Microsoft SQL Server
Valid values: agent
, error
MySQL
Valid values: audit
, error
, general
, slowquery
Oracle
Valid values: alert
, audit
, listener
, trace
PostgreSQL
Valid values: postgresql
, upgrade
public void setEnableCloudwatchLogsExports(java.util.List<java.lang.String> value)
The values in the list depend on the DB engine being used. For more information, see Publishing Database Logs to Amazon CloudWatch Logs in the Amazon Relational Database Service User Guide .
Amazon Aurora
Not applicable. CloudWatch Logs exports are managed by the DB cluster.
MariaDB
Valid values: audit
, error
, general
, slowquery
Microsoft SQL Server
Valid values: agent
, error
MySQL
Valid values: audit
, error
, general
, slowquery
Oracle
Valid values: alert
, audit
, listener
, trace
PostgreSQL
Valid values: postgresql
, upgrade
public java.lang.Object getEnableIamDatabaseAuthentication()
By default, mapping is disabled.
This property is supported for RDS for MariaDB, RDS for MySQL, and RDS for PostgreSQL. For more information, see IAM Database Authentication for MariaDB, MySQL, and PostgreSQL in the Amazon RDS User Guide.
Amazon Aurora
Not applicable. Mapping AWS IAM accounts to database accounts is managed by the DB cluster.
public void setEnableIamDatabaseAuthentication(java.lang.Boolean value)
By default, mapping is disabled.
This property is supported for RDS for MariaDB, RDS for MySQL, and RDS for PostgreSQL. For more information, see IAM Database Authentication for MariaDB, MySQL, and PostgreSQL in the Amazon RDS User Guide.
Amazon Aurora
Not applicable. Mapping AWS IAM accounts to database accounts is managed by the DB cluster.
public void setEnableIamDatabaseAuthentication(IResolvable value)
By default, mapping is disabled.
This property is supported for RDS for MariaDB, RDS for MySQL, and RDS for PostgreSQL. For more information, see IAM Database Authentication for MariaDB, MySQL, and PostgreSQL in the Amazon RDS User Guide.
Amazon Aurora
Not applicable. Mapping AWS IAM accounts to database accounts is managed by the DB cluster.
public java.lang.Object getEnablePerformanceInsights()
For more information, see Using Amazon Performance Insights in the Amazon RDS User Guide .
This setting doesn't apply to RDS Custom.
public void setEnablePerformanceInsights(java.lang.Boolean value)
For more information, see Using Amazon Performance Insights in the Amazon RDS User Guide .
This setting doesn't apply to RDS Custom.
public void setEnablePerformanceInsights(IResolvable value)
For more information, see Using Amazon Performance Insights in the Amazon RDS User Guide .
This setting doesn't apply to RDS Custom.
public java.lang.Object getEndpoint()
The endpoint might not be shown for instances whose status is
creating
.
public void setEndpoint(IResolvable value)
The endpoint might not be shown for instances whose status is
creating
.
public void setEndpoint(CfnDBInstance.EndpointProperty value)
The endpoint might not be shown for instances whose status is
creating
.
public java.lang.String getEngine()
When you are creating a DB instance, the
Engine
property is required.
Valid Values:
aurora
(for MySQL 5.6-compatible Aurora)aurora-mysql
(for MySQL 5.7-compatible Aurora)aurora-postgresql
custom-oracle-ee
custom-oracle-ee-cdb
custom-sqlserver-ee
custom-sqlserver-se
custom-sqlserver-web
mariadb
mysql
oracle-ee
oracle-ee-cdb
oracle-se2
oracle-se2-cdb
postgres
sqlserver-ee
sqlserver-se
sqlserver-ex
sqlserver-web
public void setEngine(java.lang.String value)
When you are creating a DB instance, the
Engine
property is required.
Valid Values:
aurora
(for MySQL 5.6-compatible Aurora)aurora-mysql
(for MySQL 5.7-compatible Aurora)aurora-postgresql
custom-oracle-ee
custom-oracle-ee-cdb
custom-sqlserver-ee
custom-sqlserver-se
custom-sqlserver-web
mariadb
mysql
oracle-ee
oracle-ee-cdb
oracle-se2
oracle-se2-cdb
postgres
sqlserver-ee
sqlserver-se
sqlserver-ex
sqlserver-web
public java.lang.String getEngineVersion()
For a list of valid engine versions, use the DescribeDBEngineVersions
action.
The following are the database engines and links to information about the major and minor versions that are available with Amazon RDS. Not every database engine is available for every AWS Region.
Amazon Aurora
Not applicable. The version number of the database engine to be used by the DB instance is managed by the DB cluster.
MariaDB
See MariaDB on Amazon RDS Versions in the Amazon RDS User Guide.
Microsoft SQL Server
See Microsoft SQL Server Versions on Amazon RDS in the Amazon RDS User Guide.
MySQL
See MySQL on Amazon RDS Versions in the Amazon RDS User Guide.
Oracle
See Oracle Database Engine Release Notes in the Amazon RDS User Guide.
PostgreSQL
See Supported PostgreSQL Database Versions in the Amazon RDS User Guide.
public void setEngineVersion(java.lang.String value)
For a list of valid engine versions, use the DescribeDBEngineVersions
action.
The following are the database engines and links to information about the major and minor versions that are available with Amazon RDS. Not every database engine is available for every AWS Region.
Amazon Aurora
Not applicable. The version number of the database engine to be used by the DB instance is managed by the DB cluster.
MariaDB
See MariaDB on Amazon RDS Versions in the Amazon RDS User Guide.
Microsoft SQL Server
See Microsoft SQL Server Versions on Amazon RDS in the Amazon RDS User Guide.
MySQL
See MySQL on Amazon RDS Versions in the Amazon RDS User Guide.
Oracle
See Oracle Database Engine Release Notes in the Amazon RDS User Guide.
PostgreSQL
See Supported PostgreSQL Database Versions in the Amazon RDS User Guide.
public java.lang.Number getIops()
The value must be equal to or greater than 1000.
If you specify this property, you must follow the range of allowed ratios of your requested IOPS rate to the amount of storage that you allocate (IOPS to allocated storage). For example, you can provision an Oracle database instance with 1000 IOPS and 200 GiB of storage (a ratio of 5:1), or specify 2000 IOPS with 200 GiB of storage (a ratio of 10:1). For more information, see Amazon RDS Provisioned IOPS Storage to Improve Performance in the Amazon RDS User Guide .
If you specify
io1
for theStorageType
property, then you must also specify theIops
property.
public void setIops(java.lang.Number value)
The value must be equal to or greater than 1000.
If you specify this property, you must follow the range of allowed ratios of your requested IOPS rate to the amount of storage that you allocate (IOPS to allocated storage). For example, you can provision an Oracle database instance with 1000 IOPS and 200 GiB of storage (a ratio of 5:1), or specify 2000 IOPS with 200 GiB of storage (a ratio of 10:1). For more information, see Amazon RDS Provisioned IOPS Storage to Improve Performance in the Amazon RDS User Guide .
If you specify
io1
for theStorageType
property, then you must also specify theIops
property.
public java.lang.String getKmsKeyId()
If you enable the StorageEncrypted property but don't specify this property, AWS CloudFormation uses the default KMS key. If you specify this property, you must set the StorageEncrypted property to true.
If you specify the SourceDBInstanceIdentifier
property, the value is inherited from the source DB instance if the read replica is created in the same region.
If you create an encrypted read replica in a different AWS Region, then you must specify a KMS key for the destination AWS Region. KMS encryption keys are specific to the region that they're created in, and you can't use encryption keys from one region in another region.
If you specify the SnapshotIdentifier
property, the StorageEncrypted
property value is inherited from the snapshot, and if the DB instance is encrypted, the specified KmsKeyId
property is used.
If you specify DBSecurityGroups
, AWS CloudFormation ignores this property. To specify both a security group and this property, you must use a VPC security group. For more information about Amazon RDS and VPC, see Using Amazon RDS with Amazon VPC in the Amazon RDS User Guide .
Amazon Aurora
Not applicable. The KMS key identifier is managed by the DB cluster.
public void setKmsKeyId(java.lang.String value)
If you enable the StorageEncrypted property but don't specify this property, AWS CloudFormation uses the default KMS key. If you specify this property, you must set the StorageEncrypted property to true.
If you specify the SourceDBInstanceIdentifier
property, the value is inherited from the source DB instance if the read replica is created in the same region.
If you create an encrypted read replica in a different AWS Region, then you must specify a KMS key for the destination AWS Region. KMS encryption keys are specific to the region that they're created in, and you can't use encryption keys from one region in another region.
If you specify the SnapshotIdentifier
property, the StorageEncrypted
property value is inherited from the snapshot, and if the DB instance is encrypted, the specified KmsKeyId
property is used.
If you specify DBSecurityGroups
, AWS CloudFormation ignores this property. To specify both a security group and this property, you must use a VPC security group. For more information about Amazon RDS and VPC, see Using Amazon RDS with Amazon VPC in the Amazon RDS User Guide .
Amazon Aurora
Not applicable. The KMS key identifier is managed by the DB cluster.
public java.lang.String getLicenseModel()
Valid values:
general-public-license
postgresql-license
general-public-license
license-included
general-public-license
bring-your-own-license
or license-included
postgresql-license
If you've specified
DBSecurityGroups
and then you update the license model, AWS CloudFormation replaces the underlying DB instance. This will incur some interruptions to database availability.
public void setLicenseModel(java.lang.String value)
Valid values:
general-public-license
postgresql-license
general-public-license
license-included
general-public-license
bring-your-own-license
or license-included
postgresql-license
If you've specified
DBSecurityGroups
and then you update the license model, AWS CloudFormation replaces the underlying DB instance. This will incur some interruptions to database availability.
public java.lang.Object getManageMasterUserPassword()
For more information, see Password management with AWS Secrets Manager in the Amazon RDS User Guide.
Constraints:
MasterUserPassword
is specified.public void setManageMasterUserPassword(java.lang.Boolean value)
For more information, see Password management with AWS Secrets Manager in the Amazon RDS User Guide.
Constraints:
MasterUserPassword
is specified.public void setManageMasterUserPassword(IResolvable value)
For more information, see Password management with AWS Secrets Manager in the Amazon RDS User Guide.
Constraints:
MasterUserPassword
is specified.public java.lang.String getMasterUsername()
If you specify the
SourceDBInstanceIdentifier
orDBSnapshotIdentifier
property, don't specify this property. The value is inherited from the source DB instance or snapshot.
Amazon Aurora
Not applicable. The name for the master user is managed by the DB cluster.
MariaDB
Constraints:
Microsoft SQL Server
Constraints:
MySQL
Constraints:
Oracle
Constraints:
PostgreSQL
Constraints:
public void setMasterUsername(java.lang.String value)
If you specify the
SourceDBInstanceIdentifier
orDBSnapshotIdentifier
property, don't specify this property. The value is inherited from the source DB instance or snapshot.
Amazon Aurora
Not applicable. The name for the master user is managed by the DB cluster.
MariaDB
Constraints:
Microsoft SQL Server
Constraints:
MySQL
Constraints:
Oracle
Constraints:
PostgreSQL
Constraints:
public java.lang.String getMasterUserPassword()
Amazon Aurora
Not applicable. The password for the master user is managed by the DB cluster.
MariaDB
Constraints: Must contain from 8 to 41 characters.
Microsoft SQL Server
Constraints: Must contain from 8 to 128 characters.
MySQL
Constraints: Must contain from 8 to 41 characters.
Oracle
Constraints: Must contain from 8 to 30 characters.
PostgreSQL
Constraints: Must contain from 8 to 128 characters.
public void setMasterUserPassword(java.lang.String value)
Amazon Aurora
Not applicable. The password for the master user is managed by the DB cluster.
MariaDB
Constraints: Must contain from 8 to 41 characters.
Microsoft SQL Server
Constraints: Must contain from 8 to 128 characters.
MySQL
Constraints: Must contain from 8 to 41 characters.
Oracle
Constraints: Must contain from 8 to 30 characters.
PostgreSQL
Constraints: Must contain from 8 to 128 characters.
public java.lang.Object getMasterUserSecret()
For more information, see Password management with AWS Secrets Manager in the Amazon RDS User Guide.
public void setMasterUserSecret(IResolvable value)
For more information, see Password management with AWS Secrets Manager in the Amazon RDS User Guide.
public void setMasterUserSecret(CfnDBInstance.MasterUserSecretProperty value)
For more information, see Password management with AWS Secrets Manager in the Amazon RDS User Guide.
public java.lang.Number getMaxAllocatedStorage()
For more information about this setting, including limitations that apply to it, see Managing capacity automatically with Amazon RDS storage autoscaling in the Amazon RDS User Guide .
This setting doesn't apply to RDS Custom.
Amazon Aurora
Not applicable. Storage is managed by the DB cluster.
public void setMaxAllocatedStorage(java.lang.Number value)
For more information about this setting, including limitations that apply to it, see Managing capacity automatically with Amazon RDS storage autoscaling in the Amazon RDS User Guide .
This setting doesn't apply to RDS Custom.
Amazon Aurora
Not applicable. Storage is managed by the DB cluster.
public java.lang.Number getMonitoringInterval()
To disable collection of Enhanced Monitoring metrics, specify 0. The default is 0.
If MonitoringRoleArn
is specified, then you must set MonitoringInterval
to a value other than 0.
This setting doesn't apply to RDS Custom.
Valid Values: 0, 1, 5, 10, 15, 30, 60
public void setMonitoringInterval(java.lang.Number value)
To disable collection of Enhanced Monitoring metrics, specify 0. The default is 0.
If MonitoringRoleArn
is specified, then you must set MonitoringInterval
to a value other than 0.
This setting doesn't apply to RDS Custom.
Valid Values: 0, 1, 5, 10, 15, 30, 60
public java.lang.String getMonitoringRoleArn()
For example, arn:aws:iam:123456789012:role/emaccess
. For information on creating a monitoring role, see Setting Up and Enabling Enhanced Monitoring in the Amazon RDS User Guide .
If MonitoringInterval
is set to a value other than 0, then you must supply a MonitoringRoleArn
value.
This setting doesn't apply to RDS Custom.
public void setMonitoringRoleArn(java.lang.String value)
For example, arn:aws:iam:123456789012:role/emaccess
. For information on creating a monitoring role, see Setting Up and Enabling Enhanced Monitoring in the Amazon RDS User Guide .
If MonitoringInterval
is set to a value other than 0, then you must supply a MonitoringRoleArn
value.
This setting doesn't apply to RDS Custom.
public java.lang.Object getMultiAz()
You can't set the AvailabilityZone
parameter if the MultiAZ
parameter is set to true.
For more information, see Multi-AZ deployments for high availability in the Amazon RDS User Guide .
Amazon Aurora
Not applicable. Amazon Aurora storage is replicated across all of the Availability Zones and doesn't require the MultiAZ
option to be set.
public void setMultiAz(java.lang.Boolean value)
You can't set the AvailabilityZone
parameter if the MultiAZ
parameter is set to true.
For more information, see Multi-AZ deployments for high availability in the Amazon RDS User Guide .
Amazon Aurora
Not applicable. Amazon Aurora storage is replicated across all of the Availability Zones and doesn't require the MultiAZ
option to be set.
public void setMultiAz(IResolvable value)
You can't set the AvailabilityZone
parameter if the MultiAZ
parameter is set to true.
For more information, see Multi-AZ deployments for high availability in the Amazon RDS User Guide .
Amazon Aurora
Not applicable. Amazon Aurora storage is replicated across all of the Availability Zones and doesn't require the MultiAZ
option to be set.
public java.lang.String getNcharCharacterSetName()
This parameter doesn't apply to RDS Custom.
public void setNcharCharacterSetName(java.lang.String value)
This parameter doesn't apply to RDS Custom.
public java.lang.String getNetworkType()
Valid values:
IPV4
DUAL
The network type is determined by the DBSubnetGroup
specified for the DB instance. A DBSubnetGroup
can support only the IPv4 protocol or the IPv4 and IPv6 protocols ( DUAL
).
For more information, see Working with a DB instance in a VPC in the Amazon RDS User Guide.
public void setNetworkType(java.lang.String value)
Valid values:
IPV4
DUAL
The network type is determined by the DBSubnetGroup
specified for the DB instance. A DBSubnetGroup
can support only the IPv4 protocol or the IPv4 and IPv6 protocols ( DUAL
).
For more information, see Working with a DB instance in a VPC in the Amazon RDS User Guide.
public java.lang.String getOptionGroupName()
Permanent options, such as the TDE option for Oracle Advanced Security TDE, can't be removed from an option group. Also, that option group can't be removed from a DB instance once it is associated with a DB instance.
public void setOptionGroupName(java.lang.String value)
Permanent options, such as the TDE option for Oracle Advanced Security TDE, can't be removed from an option group. Also, that option group can't be removed from a DB instance once it is associated with a DB instance.
public java.lang.String getPerformanceInsightsKmsKeyId()
The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
If you do not specify a value for PerformanceInsightsKMSKeyId
, then Amazon RDS uses your default KMS key. There is a default KMS key for your AWS account. Your AWS account has a different default KMS key for each AWS Region.
For information about enabling Performance Insights, see EnablePerformanceInsights .
public void setPerformanceInsightsKmsKeyId(java.lang.String value)
The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.
If you do not specify a value for PerformanceInsightsKMSKeyId
, then Amazon RDS uses your default KMS key. There is a default KMS key for your AWS account. Your AWS account has a different default KMS key for each AWS Region.
For information about enabling Performance Insights, see EnablePerformanceInsights .
public java.lang.Number getPerformanceInsightsRetentionPeriod()
For example, the following values are valid:
If you specify a retention period such as 94, which isn't a valid value, RDS issues an error.
This setting doesn't apply to RDS Custom.
public void setPerformanceInsightsRetentionPeriod(java.lang.Number value)
For example, the following values are valid:
If you specify a retention period such as 94, which isn't a valid value, RDS issues an error.
This setting doesn't apply to RDS Custom.
public java.lang.String getPort()
Amazon Aurora
Not applicable. The port number is managed by the DB cluster.
public void setPort(java.lang.String value)
Amazon Aurora
Not applicable. The port number is managed by the DB cluster.
public java.lang.String getPreferredBackupWindow()
For more information, see Backup Window in the Amazon RDS User Guide.
Constraints:
hh24:mi-hh24:mi
.Amazon Aurora
Not applicable. The daily time range for creating automated backups is managed by the DB cluster.
public void setPreferredBackupWindow(java.lang.String value)
For more information, see Backup Window in the Amazon RDS User Guide.
Constraints:
hh24:mi-hh24:mi
.Amazon Aurora
Not applicable. The daily time range for creating automated backups is managed by the DB cluster.
public java.lang.String getPreferredMaintenanceWindow()
Format: ddd:hh24:mi-ddd:hh24:mi
The default is 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 Adjusting the Preferred DB Instance Maintenance Window in the Amazon RDS User Guide.
This property applies when AWS CloudFormation initially creates the DB instance. If you use AWS CloudFormation to update the DB instance, those updates are applied immediately.
Constraints: Minimum 30-minute window.
public void setPreferredMaintenanceWindow(java.lang.String value)
Format: ddd:hh24:mi-ddd:hh24:mi
The default is 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 Adjusting the Preferred DB Instance Maintenance Window in the Amazon RDS User Guide.
This property applies when AWS CloudFormation initially creates the DB instance. If you use AWS CloudFormation to update the DB instance, those updates are applied immediately.
Constraints: Minimum 30-minute window.
public java.lang.Object getProcessorFeatures()
This setting doesn't apply to RDS Custom.
Amazon Aurora
Not applicable.
public void setProcessorFeatures(IResolvable value)
This setting doesn't apply to RDS Custom.
Amazon Aurora
Not applicable.
public void setProcessorFeatures(java.util.List<java.lang.Object> value)
This setting doesn't apply to RDS Custom.
Amazon Aurora
Not applicable.
public java.lang.Number getPromotionTier()
For more information, see Fault Tolerance for an Aurora DB Cluster in the Amazon Aurora User Guide .
This setting doesn't apply to RDS Custom.
Default: 1
Valid Values: 0 - 15
public void setPromotionTier(java.lang.Number value)
For more information, see Fault Tolerance for an Aurora DB Cluster in the Amazon Aurora User Guide .
This setting doesn't apply to RDS Custom.
Default: 1
Valid Values: 0 - 15
public java.lang.Object getPubliclyAccessible()
If you specify true, AWS CloudFormation creates an instance with a publicly resolvable DNS name, which resolves to a public IP address. If you specify false, AWS CloudFormation creates an internal instance with a DNS name that resolves to a private IP address.
The default behavior value depends on your VPC setup and the database subnet group. For more information, see the PubliclyAccessible
parameter in the CreateDBInstance in the Amazon RDS API Reference .
public void setPubliclyAccessible(java.lang.Boolean value)
If you specify true, AWS CloudFormation creates an instance with a publicly resolvable DNS name, which resolves to a public IP address. If you specify false, AWS CloudFormation creates an internal instance with a DNS name that resolves to a private IP address.
The default behavior value depends on your VPC setup and the database subnet group. For more information, see the PubliclyAccessible
parameter in the CreateDBInstance in the Amazon RDS API Reference .
public void setPubliclyAccessible(IResolvable value)
If you specify true, AWS CloudFormation creates an instance with a publicly resolvable DNS name, which resolves to a public IP address. If you specify false, AWS CloudFormation creates an internal instance with a DNS name that resolves to a private IP address.
The default behavior value depends on your VPC setup and the database subnet group. For more information, see the PubliclyAccessible
parameter in the CreateDBInstance in the Amazon RDS API Reference .
public java.lang.String getReplicaMode()
For more information, see Working with Oracle Read Replicas for Amazon RDS in the Amazon RDS User Guide .
This setting is only supported in RDS for Oracle.
Default: open-read-only
Valid Values: open-read-only
or mounted
public void setReplicaMode(java.lang.String value)
For more information, see Working with Oracle Read Replicas for Amazon RDS in the Amazon RDS User Guide .
This setting is only supported in RDS for Oracle.
Default: open-read-only
Valid Values: open-read-only
or mounted
public java.lang.String getRestoreTime()
Valid Values: Value must be a time in Universal Coordinated Time (UTC) format
Constraints:
UseLatestRestorableTime
parameter is enabled
Example: 2009-09-07T23:45:00Z
public void setRestoreTime(java.lang.String value)
Valid Values: Value must be a time in Universal Coordinated Time (UTC) format
Constraints:
UseLatestRestorableTime
parameter is enabled
Example: 2009-09-07T23:45:00Z
public java.lang.String getSourceDbInstanceAutomatedBackupsArn()
This setting doesn't apply to RDS Custom.
public void setSourceDbInstanceAutomatedBackupsArn(java.lang.String value)
This setting doesn't apply to RDS Custom.
public java.lang.String getSourceDbInstanceIdentifier()
Each DB instance can have a limited number of read replicas. For more information, see Working with Read Replicas in the Amazon RDS User Guide .
For information about constraints that apply to DB instance identifiers, see Naming constraints in Amazon RDS in the Amazon RDS User Guide .
The SourceDBInstanceIdentifier
property determines whether a DB instance is a read replica. If you remove the SourceDBInstanceIdentifier
property from your template and then update your stack, AWS CloudFormation promotes the Read Replica to a standalone DB instance.
- If you specify a source DB instance that uses VPC security groups, we recommend that you specify the
VPCSecurityGroups
property. If you don't specify the property, the read replica inherits the value of theVPCSecurityGroups
property from the source DB when you create the replica. However, if you update the stack, AWS CloudFormation reverts the replica'sVPCSecurityGroups
property to the default value because it's not defined in the stack's template. This change might cause unexpected issues.- Read replicas don't support deletion policies. AWS CloudFormation ignores any deletion policy that's associated with a read replica.
- If you specify
SourceDBInstanceIdentifier
, don't specify theDBSnapshotIdentifier
property. You can't create a read replica from a snapshot.- Don't set the
BackupRetentionPeriod
,DBName
,MasterUsername
,MasterUserPassword
, andPreferredBackupWindow
properties. The database attributes are inherited from the source DB instance, and backups are disabled for read replicas.- If the source DB instance is in a different region than the read replica, specify the source region in
SourceRegion
, and specify an ARN for a valid DB instance inSourceDBInstanceIdentifier
. For more information, see Constructing a Amazon RDS Amazon Resource Name (ARN) in the Amazon RDS User Guide .- For DB instances in Amazon Aurora clusters, don't specify this property. Amazon RDS automatically assigns writer and reader DB instances.
public void setSourceDbInstanceIdentifier(java.lang.String value)
Each DB instance can have a limited number of read replicas. For more information, see Working with Read Replicas in the Amazon RDS User Guide .
For information about constraints that apply to DB instance identifiers, see Naming constraints in Amazon RDS in the Amazon RDS User Guide .
The SourceDBInstanceIdentifier
property determines whether a DB instance is a read replica. If you remove the SourceDBInstanceIdentifier
property from your template and then update your stack, AWS CloudFormation promotes the Read Replica to a standalone DB instance.
- If you specify a source DB instance that uses VPC security groups, we recommend that you specify the
VPCSecurityGroups
property. If you don't specify the property, the read replica inherits the value of theVPCSecurityGroups
property from the source DB when you create the replica. However, if you update the stack, AWS CloudFormation reverts the replica'sVPCSecurityGroups
property to the default value because it's not defined in the stack's template. This change might cause unexpected issues.- Read replicas don't support deletion policies. AWS CloudFormation ignores any deletion policy that's associated with a read replica.
- If you specify
SourceDBInstanceIdentifier
, don't specify theDBSnapshotIdentifier
property. You can't create a read replica from a snapshot.- Don't set the
BackupRetentionPeriod
,DBName
,MasterUsername
,MasterUserPassword
, andPreferredBackupWindow
properties. The database attributes are inherited from the source DB instance, and backups are disabled for read replicas.- If the source DB instance is in a different region than the read replica, specify the source region in
SourceRegion
, and specify an ARN for a valid DB instance inSourceDBInstanceIdentifier
. For more information, see Constructing a Amazon RDS Amazon Resource Name (ARN) in the Amazon RDS User Guide .- For DB instances in Amazon Aurora clusters, don't specify this property. Amazon RDS automatically assigns writer and reader DB instances.
public java.lang.String getSourceDbiResourceId()
public void setSourceDbiResourceId(java.lang.String value)
public java.lang.String getSourceRegion()
public void setSourceRegion(java.lang.String value)
public java.lang.Object getStorageEncrypted()
If you specify the KmsKeyId
property, then you must enable encryption.
If you specify the SourceDBInstanceIdentifier
property, don't specify this property. The value is inherited from the source DB instance, and if the DB instance is encrypted, the specified KmsKeyId
property is used.
If you specify the SnapshotIdentifier
and the specified snapshot is encrypted, don't specify this property. The value is inherited from the snapshot, and the specified KmsKeyId
property is used.
If you specify the SnapshotIdentifier
and the specified snapshot isn't encrypted, you can use this property to specify that the restored DB instance is encrypted. Specify the KmsKeyId
property for the KMS key to use for encryption. If you don't want the restored DB instance to be encrypted, then don't set this property or set it to false
.
Amazon Aurora
Not applicable. The encryption for DB instances is managed by the DB cluster.
public void setStorageEncrypted(java.lang.Boolean value)
If you specify the KmsKeyId
property, then you must enable encryption.
If you specify the SourceDBInstanceIdentifier
property, don't specify this property. The value is inherited from the source DB instance, and if the DB instance is encrypted, the specified KmsKeyId
property is used.
If you specify the SnapshotIdentifier
and the specified snapshot is encrypted, don't specify this property. The value is inherited from the snapshot, and the specified KmsKeyId
property is used.
If you specify the SnapshotIdentifier
and the specified snapshot isn't encrypted, you can use this property to specify that the restored DB instance is encrypted. Specify the KmsKeyId
property for the KMS key to use for encryption. If you don't want the restored DB instance to be encrypted, then don't set this property or set it to false
.
Amazon Aurora
Not applicable. The encryption for DB instances is managed by the DB cluster.
public void setStorageEncrypted(IResolvable value)
If you specify the KmsKeyId
property, then you must enable encryption.
If you specify the SourceDBInstanceIdentifier
property, don't specify this property. The value is inherited from the source DB instance, and if the DB instance is encrypted, the specified KmsKeyId
property is used.
If you specify the SnapshotIdentifier
and the specified snapshot is encrypted, don't specify this property. The value is inherited from the snapshot, and the specified KmsKeyId
property is used.
If you specify the SnapshotIdentifier
and the specified snapshot isn't encrypted, you can use this property to specify that the restored DB instance is encrypted. Specify the KmsKeyId
property for the KMS key to use for encryption. If you don't want the restored DB instance to be encrypted, then don't set this property or set it to false
.
Amazon Aurora
Not applicable. The encryption for DB instances is managed by the DB cluster.
public java.lang.Number getStorageThroughput()
This setting doesn't apply to RDS Custom or Amazon Aurora.
public void setStorageThroughput(java.lang.Number value)
This setting doesn't apply to RDS Custom or Amazon Aurora.
public java.lang.String getStorageType()
Valid values: gp2 | gp3 | io1 | standard
The standard
value is also known as magnetic.
If you specify io1
or gp3
, you must also include a value for the Iops
parameter.
Default: io1
if the Iops
parameter is specified, otherwise gp2
For more information, see Amazon RDS DB Instance Storage in the Amazon RDS User Guide .
Amazon Aurora
Not applicable. Aurora data is stored in the cluster volume, which is a single, virtual volume that uses solid state drives (SSDs).
public void setStorageType(java.lang.String value)
Valid values: gp2 | gp3 | io1 | standard
The standard
value is also known as magnetic.
If you specify io1
or gp3
, you must also include a value for the Iops
parameter.
Default: io1
if the Iops
parameter is specified, otherwise gp2
For more information, see Amazon RDS DB Instance Storage in the Amazon RDS User Guide .
Amazon Aurora
Not applicable. Aurora data is stored in the cluster volume, which is a single, virtual volume that uses solid state drives (SSDs).
public java.lang.String getTimezone()
The time zone parameter is currently supported only by Microsoft SQL Server .
public void setTimezone(java.lang.String value)
The time zone parameter is currently supported only by Microsoft SQL Server .
public java.lang.Object getUseDefaultProcessorFeatures()
This setting doesn't apply to RDS Custom.
public void setUseDefaultProcessorFeatures(java.lang.Boolean value)
This setting doesn't apply to RDS Custom.
public void setUseDefaultProcessorFeatures(IResolvable value)
This setting doesn't apply to RDS Custom.
public java.lang.Object getUseLatestRestorableTime()
By default, the DB instance isn't restored from the latest backup time.
Constraints: Can't be specified if the RestoreTime
parameter is provided.
public void setUseLatestRestorableTime(java.lang.Boolean value)
By default, the DB instance isn't restored from the latest backup time.
Constraints: Can't be specified if the RestoreTime
parameter is provided.
public void setUseLatestRestorableTime(IResolvable value)
By default, the DB instance isn't restored from the latest backup time.
Constraints: Can't be specified if the RestoreTime
parameter is provided.
public java.util.List<java.lang.String> getVpcSecurityGroups()
The list can include both the physical IDs of existing VPC security groups and references to AWS::EC2::SecurityGroup resources created in the template.
If you plan to update the resource, don't specify VPC security groups in a shared VPC.
If you set VPCSecurityGroups
, you must not set DBSecurityGroups
, and vice versa.
You can migrate a DB instance in your stack from an RDS DB security group to a VPC security group, but keep the following in mind:
- You can't revert to using an RDS security group after you establish a VPC security group membership.
- When you migrate your DB instance to VPC security groups, if your stack update rolls back because the DB instance update fails or because an update fails in another AWS CloudFormation resource, the rollback fails because it can't revert to an RDS security group.
- To use the properties that are available when you use a VPC security group, you must recreate the DB instance. If you don't, AWS CloudFormation submits only the property values that are listed in the
DBSecurityGroups
property.
To avoid this situation, migrate your DB instance to using VPC security groups only when that is the only change in your stack template.
Amazon Aurora
Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. If specified, the setting must match the DB cluster setting.
public void setVpcSecurityGroups(java.util.List<java.lang.String> value)
The list can include both the physical IDs of existing VPC security groups and references to AWS::EC2::SecurityGroup resources created in the template.
If you plan to update the resource, don't specify VPC security groups in a shared VPC.
If you set VPCSecurityGroups
, you must not set DBSecurityGroups
, and vice versa.
You can migrate a DB instance in your stack from an RDS DB security group to a VPC security group, but keep the following in mind:
- You can't revert to using an RDS security group after you establish a VPC security group membership.
- When you migrate your DB instance to VPC security groups, if your stack update rolls back because the DB instance update fails or because an update fails in another AWS CloudFormation resource, the rollback fails because it can't revert to an RDS security group.
- To use the properties that are available when you use a VPC security group, you must recreate the DB instance. If you don't, AWS CloudFormation submits only the property values that are listed in the
DBSecurityGroups
property.
To avoid this situation, migrate your DB instance to using VPC security groups only when that is the only change in your stack template.
Amazon Aurora
Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. If specified, the setting must match the DB cluster setting.