Class CfnDBInstance
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
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 can delete theDBSnapshotIdentifier
property. 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:
- For
AWS::RDS::DBInstance
resources that don't specify theDBClusterIdentifier
property, AWS CloudFormation saves a snapshot of the DB instance. - For
AWS::RDS::DBInstance
resources that do specify theDBClusterIdentifier
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())) .automaticBackupReplicationKmsKeyId("automaticBackupReplicationKmsKeyId") .automaticBackupReplicationRegion("automaticBackupReplicationRegion") .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") .dedicatedLogVolume(false) .deleteAutomatedBackups(false) .deletionProtection(false) .domain("domain") .domainAuthSecretArn("domainAuthSecretArn") .domainDnsIps(List.of("domainDnsIps")) .domainFqdn("domainFqdn") .domainIamRoleName("domainIamRoleName") .domainOu("domainOu") .enableCloudwatchLogsExports(List.of("enableCloudwatchLogsExports")) .enableIamDatabaseAuthentication(false) .enablePerformanceInsights(false) .endpoint(EndpointProperty.builder() .address("address") .hostedZoneId("hostedZoneId") .port("port") .build()) .engine("engine") .engineLifecycleSupport("engineLifecycleSupport") .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") .sourceDbClusterIdentifier("sourceDbClusterIdentifier") .sourceDbInstanceAutomatedBackupsArn("sourceDbInstanceAutomatedBackupsArn") .sourceDbInstanceIdentifier("sourceDbInstanceIdentifier") .sourceDbiResourceId("sourceDbiResourceId") .sourceRegion("sourceRegion") .storageEncrypted(false) .storageThroughput(123) .storageType("storageType") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .tdeCredentialArn("tdeCredentialArn") .tdeCredentialPassword("tdeCredentialPassword") .timezone("timezone") .useDefaultProcessorFeatures(false) .useLatestRestorableTime(false) .vpcSecurityGroups(List.of("vpcSecurityGroups")) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnDBInstance
.static interface
The details of the DB instance’s server certificate.static interface
Information about an AWS Identity and Access Management (IAM) role that is associated with a DB instance.static interface
This data type represents the information you need to connect to an Amazon RDS DB instance.static interface
TheMasterUserSecret
return value specifies the secret managed by RDS in AWS Secrets Manager for the master user password.static interface
TheProcessorFeature
property type specifies the processor features of a DB instance class.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnDBInstance
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnDBInstance
(software.amazon.jsii.JsiiObjectRef objRef) CfnDBInstance
(software.constructs.Construct scope, String id) CfnDBInstance
(software.constructs.Construct scope, String id, CfnDBInstanceProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe amount of storage in gibibytes (GiB) to be initially allocated for the database instance.A value that indicates whether major version upgrades are allowed.The AWS Identity and Access Management (IAM) roles associated with the DB instance.The CA identifier of the CA certificate used for the DB instance's server certificate.The expiration date of the DB instance’s server certificate.The Amazon Resource Name (ARN) for the DB instance.The AWS Region-unique, immutable identifier for the DB instance.The Oracle system ID (Oracle SID) for a container database (CDB).The connection endpoint for the database.The ID that Amazon Route 53 assigns when you create a hosted zone.The port number on which the database accepts connections.The Amazon Resource Name (ARN) of the secret.The AWS KMS key identifier for encryption of the replicated automated backups.The AWS Region associated with the automated backup.A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window.The Availability Zone (AZ) where the database will be created.The number of days for which automated backups are retained.The identifier of the CA certificate for this DB instance.The details of the DB instance's server certificate.Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.For supported engines, indicates that the DB instance should be associated with the specified character set.Specifies whether to copy tags from the DB instance to snapshots of the DB instance.The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance.The identifier of the DB cluster that this DB instance will belong to.The identifier for the Multi-AZ DB cluster snapshot to restore from.The compute and memory capacity of the DB instance, for exampledb.m5.large
.A name for the DB instance.The meaning of this parameter differs according to the database engine you use.The name of an existing DB parameter group or a reference to an AWS::RDS::DBParameterGroup resource created in the template.A list of the DB security groups to assign to the DB instance.The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance.A DB subnet group to associate with the DB instance.Indicates whether the DB instance has a dedicated log volume (DLV) enabled.A value that indicates whether to remove automated backups immediately after the DB instance is deleted.Specifies whether the DB instance has deletion protection enabled.The Active Directory directory ID to create the DB instance in.The ARN for the Secrets Manager secret with the credentials for the user joining the domain.The IPv4 DNS IP addresses of your primary and secondary Active Directory domain controllers.The fully qualified domain name (FQDN) of an Active Directory domain.The name of the IAM role to use when making API calls to the Directory Service.The Active Directory organizational unit for your DB instance to join.The list of log types that need to be enabled for exporting to CloudWatch Logs.A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.Specifies whether to enable Performance Insights for the DB instance.The connection endpoint for the DB instance.The name of the database engine to use for this DB instance.The life cycle type for this DB instance.The version number of the database engine to use.getIops()
The number of I/O operations per second (IOPS) that the database provisions.The ARN of the AWS KMS key that's used to encrypt the DB instance, such asarn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
.License model information for this DB instance.Specifies whether to manage the master user password with AWS Secrets Manager.The master user name for the DB instance.The password for the master user.The secret managed by RDS in AWS Secrets Manager for the master user password.The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance.The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs.Specifies whether the DB instance is a Multi-AZ deployment.The name of the NCHAR character set for the Oracle DB instance.The network type of the DB instance.Indicates that the DB instance should be associated with the specified option group.The AWS KMS key identifier for encryption of Performance Insights data.The number of days to retain Performance Insights data.getPort()
The port number on which the database accepts connections.The daily time range during which automated backups are created if automated backups are enabled, using theBackupRetentionPeriod
parameter.The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.The order of priority in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance.Indicates whether the DB instance is an internet-facing instance.The open mode of an Oracle read replica.The date and time to restore from.The identifier of the Multi-AZ DB cluster that will act as the source for the read replica.The Amazon Resource Name (ARN) of the replicated automated backups from which to restore, for example,arn:aws:rds:us-east-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE
.If you want to create a read replica DB instance, specify the ID of the source DB instance.The resource ID of the source DB instance from which to restore.The ID of the region that contains the source DB instance for the read replica.A value that indicates whether the DB instance is encrypted.Specifies the storage throughput value for the DB instance.The storage type to associate with the DB instance.getTags()
Tag Manager which manages the tags for this resource.Tags to assign to the DB instance.Deprecated.this property has been deprecatedDeprecated.this property has been deprecatedThe time zone of the DB instance.Specifies whether the DB instance class of the DB instance uses its default processor features.Specifies whether the DB instance is restored from the latest backup time.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.renderProperties
(Map<String, Object> props) void
setAllocatedStorage
(String value) The amount of storage in gibibytes (GiB) to be initially allocated for the database instance.void
A value that indicates whether major version upgrades are allowed.void
A value that indicates whether major version upgrades are allowed.void
setAssociatedRoles
(List<Object> value) The AWS Identity and Access Management (IAM) roles associated with the DB instance.void
setAssociatedRoles
(IResolvable value) The AWS Identity and Access Management (IAM) roles associated with the DB instance.void
The AWS KMS key identifier for encryption of the replicated automated backups.void
The AWS Region associated with the automated backup.void
A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window.void
A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window.void
setAvailabilityZone
(String value) The Availability Zone (AZ) where the database will be created.void
setBackupRetentionPeriod
(Number value) The number of days for which automated backups are retained.void
setCaCertificateIdentifier
(String value) The identifier of the CA certificate for this DB instance.void
setCertificateDetails
(IResolvable value) The details of the DB instance's server certificate.void
The details of the DB instance's server certificate.void
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.void
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.void
setCharacterSetName
(String value) For supported engines, indicates that the DB instance should be associated with the specified character set.void
setCopyTagsToSnapshot
(Boolean value) Specifies whether to copy tags from the DB instance to snapshots of the DB instance.void
setCopyTagsToSnapshot
(IResolvable value) Specifies whether to copy tags from the DB instance to snapshots of the DB instance.void
The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance.void
setDbClusterIdentifier
(String value) The identifier of the DB cluster that this DB instance will belong to.void
The identifier for the Multi-AZ DB cluster snapshot to restore from.void
setDbInstanceClass
(String value) The compute and memory capacity of the DB instance, for exampledb.m5.large
.void
setDbInstanceIdentifier
(String value) A name for the DB instance.void
The meaning of this parameter differs according to the database engine you use.void
setDbParameterGroupName
(String value) The name of an existing DB parameter group or a reference to an AWS::RDS::DBParameterGroup resource created in the template.void
setDbSecurityGroups
(List<String> value) A list of the DB security groups to assign to the DB instance.void
setDbSnapshotIdentifier
(String value) The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance.void
setDbSubnetGroupName
(String value) A DB subnet group to associate with the DB instance.void
setDedicatedLogVolume
(Boolean value) Indicates whether the DB instance has a dedicated log volume (DLV) enabled.void
setDedicatedLogVolume
(IResolvable value) Indicates whether the DB instance has a dedicated log volume (DLV) enabled.void
setDeleteAutomatedBackups
(Boolean value) A value that indicates whether to remove automated backups immediately after the DB instance is deleted.void
A value that indicates whether to remove automated backups immediately after the DB instance is deleted.void
setDeletionProtection
(Boolean value) Specifies whether the DB instance has deletion protection enabled.void
setDeletionProtection
(IResolvable value) Specifies whether the DB instance has deletion protection enabled.void
The Active Directory directory ID to create the DB instance in.void
setDomainAuthSecretArn
(String value) The ARN for the Secrets Manager secret with the credentials for the user joining the domain.void
setDomainDnsIps
(List<String> value) The IPv4 DNS IP addresses of your primary and secondary Active Directory domain controllers.void
setDomainFqdn
(String value) The fully qualified domain name (FQDN) of an Active Directory domain.void
setDomainIamRoleName
(String value) The name of the IAM role to use when making API calls to the Directory Service.void
setDomainOu
(String value) The Active Directory organizational unit for your DB instance to join.void
setEnableCloudwatchLogsExports
(List<String> value) The list of log types that need to be enabled for exporting to CloudWatch Logs.void
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.void
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.void
Specifies whether to enable Performance Insights for the DB instance.void
Specifies whether to enable Performance Insights for the DB instance.void
setEndpoint
(IResolvable value) The connection endpoint for the DB instance.void
The connection endpoint for the DB instance.void
The name of the database engine to use for this DB instance.void
setEngineLifecycleSupport
(String value) The life cycle type for this DB instance.void
setEngineVersion
(String value) The version number of the database engine to use.void
The number of I/O operations per second (IOPS) that the database provisions.void
setKmsKeyId
(String value) The ARN of the AWS KMS key that's used to encrypt the DB instance, such asarn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
.void
setLicenseModel
(String value) License model information for this DB instance.void
Specifies whether to manage the master user password with AWS Secrets Manager.void
Specifies whether to manage the master user password with AWS Secrets Manager.void
setMasterUsername
(String value) The master user name for the DB instance.void
setMasterUserPassword
(String value) The password for the master user.void
setMasterUserSecret
(IResolvable value) The secret managed by RDS in AWS Secrets Manager for the master user password.void
The secret managed by RDS in AWS Secrets Manager for the master user password.void
setMaxAllocatedStorage
(Number value) The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance.void
setMonitoringInterval
(Number value) The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.void
setMonitoringRoleArn
(String value) The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs.void
setMultiAz
(Boolean value) Specifies whether the DB instance is a Multi-AZ deployment.void
setMultiAz
(IResolvable value) Specifies whether the DB instance is a Multi-AZ deployment.void
setNcharCharacterSetName
(String value) The name of the NCHAR character set for the Oracle DB instance.void
setNetworkType
(String value) The network type of the DB instance.void
setOptionGroupName
(String value) Indicates that the DB instance should be associated with the specified option group.void
The AWS KMS key identifier for encryption of Performance Insights data.void
The number of days to retain Performance Insights data.void
The port number on which the database accepts connections.void
setPreferredBackupWindow
(String value) The daily time range during which automated backups are created if automated backups are enabled, using theBackupRetentionPeriod
parameter.void
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).void
setProcessorFeatures
(List<Object> value) The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.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
setPromotionTier
(Number value) The order of priority in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance.void
setPubliclyAccessible
(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
(String value) The open mode of an Oracle read replica.void
setRestoreTime
(String value) The date and time to restore from.void
The identifier of the Multi-AZ DB cluster that will act as the source for the read replica.void
The Amazon Resource Name (ARN) of the replicated automated backups from which to restore, for example,arn:aws:rds:us-east-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE
.void
If you want to create a read replica DB instance, specify the ID of the source DB instance.void
setSourceDbiResourceId
(String value) The resource ID of the source DB instance from which to restore.void
setSourceRegion
(String value) The ID of the region that contains the source DB instance for the read replica.void
setStorageEncrypted
(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
(Number value) Specifies the storage throughput value for the DB instance.void
setStorageType
(String value) The storage type to associate with the DB instance.void
setTagsRaw
(List<CfnTag> value) Tags to assign to the DB instance.void
setTdeCredentialArn
(String value) Deprecated.this property has been deprecatedvoid
setTdeCredentialPassword
(String value) Deprecated.this property has been deprecatedvoid
setTimezone
(String value) The time zone of the DB instance.void
Specifies whether the DB instance class of the DB instance uses its default processor features.void
Specifies whether the DB instance class of the DB instance uses its default processor features.void
Specifies whether the DB instance is restored from the latest backup time.void
Specifies whether the DB instance is restored from the latest backup time.void
setVpcSecurityGroups
(List<String> value) A list of the VPC security group IDs to assign to the DB instance.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDBInstance
protected CfnDBInstance(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDBInstance
protected CfnDBInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDBInstance
@Stability(Stable) public CfnDBInstance(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnDBInstanceProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties.
-
CfnDBInstance
@Stability(Stable) public CfnDBInstance(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrCertificateDetailsCaIdentifier
The CA identifier of the CA certificate used for the DB instance's server certificate. -
getAttrCertificateDetailsValidTill
The expiration date of the DB instance’s server certificate. -
getAttrDbInstanceArn
The Amazon Resource Name (ARN) for the DB instance. -
getAttrDbiResourceId
The AWS Region-unique, immutable identifier for the DB instance.This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.
-
getAttrDbSystemId
The Oracle system ID (Oracle SID) for a container database (CDB).The Oracle SID is also the name of the CDB.
This setting is valid for RDS Custom only.
-
getAttrEndpointAddress
The connection endpoint for the database. For example:mystack-mydb-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
.For Aurora Serverless DB clusters, the connection endpoint only applies to the DB cluster.
-
getAttrEndpointHostedZoneId
The ID that Amazon Route 53 assigns when you create a hosted zone. -
getAttrEndpointPort
The port number on which the database accepts connections.For example:
3306
-
getAttrMasterUserSecretSecretArn
The Amazon Resource Name (ARN) of the secret.This parameter is a return value that you can retrieve using the
Fn::GetAtt
intrinsic function. For more information, see Return values . -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAllocatedStorage
The amount of storage in gibibytes (GiB) to be initially allocated for the database instance. -
setAllocatedStorage
The amount of storage in gibibytes (GiB) to be initially allocated for the database instance. -
getAllowMajorVersionUpgrade
A value that indicates whether major version upgrades are allowed. -
setAllowMajorVersionUpgrade
A value that indicates whether major version upgrades are allowed. -
setAllowMajorVersionUpgrade
A value that indicates whether major version upgrades are allowed. -
getAssociatedRoles
The AWS Identity and Access Management (IAM) roles associated with the DB instance. -
setAssociatedRoles
The AWS Identity and Access Management (IAM) roles associated with the DB instance. -
setAssociatedRoles
The AWS Identity and Access Management (IAM) roles associated with the DB instance. -
getAutomaticBackupReplicationKmsKeyId
The AWS KMS key identifier for encryption of the replicated automated backups. -
setAutomaticBackupReplicationKmsKeyId
The AWS KMS key identifier for encryption of the replicated automated backups. -
getAutomaticBackupReplicationRegion
The AWS Region associated with the automated backup. -
setAutomaticBackupReplicationRegion
The AWS Region associated with the automated backup. -
getAutoMinorVersionUpgrade
A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window. -
setAutoMinorVersionUpgrade
A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window. -
setAutoMinorVersionUpgrade
A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window. -
getAvailabilityZone
The Availability Zone (AZ) where the database will be created. -
setAvailabilityZone
The Availability Zone (AZ) where the database will be created. -
getBackupRetentionPeriod
The number of days for which automated backups are retained. -
setBackupRetentionPeriod
The number of days for which automated backups are retained. -
getCaCertificateIdentifier
The identifier of the CA certificate for this DB instance. -
setCaCertificateIdentifier
The identifier of the CA certificate for this DB instance. -
getCertificateDetails
The details of the DB instance's server certificate. -
setCertificateDetails
The details of the DB instance's server certificate. -
setCertificateDetails
@Stability(Stable) public void setCertificateDetails(@Nullable CfnDBInstance.CertificateDetailsProperty value) The details of the DB instance's server certificate. -
getCertificateRotationRestart
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate. -
setCertificateRotationRestart
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate. -
setCertificateRotationRestart
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate. -
getCharacterSetName
For supported engines, indicates that the DB instance should be associated with the specified character set. -
setCharacterSetName
For supported engines, indicates that the DB instance should be associated with the specified character set. -
getCopyTagsToSnapshot
Specifies whether to copy tags from the DB instance to snapshots of the DB instance. -
setCopyTagsToSnapshot
Specifies whether to copy tags from the DB instance to snapshots of the DB instance. -
setCopyTagsToSnapshot
Specifies whether to copy tags from the DB instance to snapshots of the DB instance. -
getCustomIamInstanceProfile
The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance. -
setCustomIamInstanceProfile
The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance. -
getDbClusterIdentifier
The identifier of the DB cluster that this DB instance will belong to. -
setDbClusterIdentifier
The identifier of the DB cluster that this DB instance will belong to. -
getDbClusterSnapshotIdentifier
The identifier for the Multi-AZ DB cluster snapshot to restore from. -
setDbClusterSnapshotIdentifier
The identifier for the Multi-AZ DB cluster snapshot to restore from. -
getDbInstanceClass
The compute and memory capacity of the DB instance, for exampledb.m5.large
. Not all DB instance classes are available in all AWS Regions , or for all database engines. For the full list of DB instance classes, and availability for your engine, see DB instance classes in the Amazon RDS User Guide or Aurora DB instance classes in the Amazon Aurora User Guide . -
setDbInstanceClass
The compute and memory capacity of the DB instance, for exampledb.m5.large
. Not all DB instance classes are available in all AWS Regions , or for all database engines. For the full list of DB instance classes, and availability for your engine, see DB instance classes in the Amazon RDS User Guide or Aurora DB instance classes in the Amazon Aurora User Guide . -
getDbInstanceIdentifier
A name for the DB instance. -
setDbInstanceIdentifier
A name for the DB instance. -
getDbName
The meaning of this parameter differs according to the database engine you use. -
setDbName
The meaning of this parameter differs according to the database engine you use. -
getDbParameterGroupName
The name of an existing DB parameter group or a reference to an AWS::RDS::DBParameterGroup resource created in the template. -
setDbParameterGroupName
The name of an existing DB parameter group or a reference to an AWS::RDS::DBParameterGroup resource created in the template. -
getDbSecurityGroups
A list of the DB security groups to assign to the DB instance. -
setDbSecurityGroups
A list of the DB security groups to assign to the DB instance. -
getDbSnapshotIdentifier
The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance. -
setDbSnapshotIdentifier
The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance. -
getDbSubnetGroupName
A DB subnet group to associate with the DB instance. -
setDbSubnetGroupName
A DB subnet group to associate with the DB instance. -
getDedicatedLogVolume
Indicates whether the DB instance has a dedicated log volume (DLV) enabled. -
setDedicatedLogVolume
Indicates whether the DB instance has a dedicated log volume (DLV) enabled. -
setDedicatedLogVolume
Indicates whether the DB instance has a dedicated log volume (DLV) enabled. -
getDeleteAutomatedBackups
A value that indicates whether to remove automated backups immediately after the DB instance is deleted. -
setDeleteAutomatedBackups
A value that indicates whether to remove automated backups immediately after the DB instance is deleted. -
setDeleteAutomatedBackups
A value that indicates whether to remove automated backups immediately after the DB instance is deleted. -
getDeletionProtection
Specifies whether the DB instance has deletion protection enabled. -
setDeletionProtection
Specifies whether the DB instance has deletion protection enabled. -
setDeletionProtection
Specifies whether the DB instance has deletion protection enabled. -
getDomain
The Active Directory directory ID to create the DB instance in. -
setDomain
The Active Directory directory ID to create the DB instance in. -
getDomainAuthSecretArn
The ARN for the Secrets Manager secret with the credentials for the user joining the domain. -
setDomainAuthSecretArn
The ARN for the Secrets Manager secret with the credentials for the user joining the domain. -
getDomainDnsIps
The IPv4 DNS IP addresses of your primary and secondary Active Directory domain controllers. -
setDomainDnsIps
The IPv4 DNS IP addresses of your primary and secondary Active Directory domain controllers. -
getDomainFqdn
The fully qualified domain name (FQDN) of an Active Directory domain. -
setDomainFqdn
The fully qualified domain name (FQDN) of an Active Directory domain. -
getDomainIamRoleName
The name of the IAM role to use when making API calls to the Directory Service. -
setDomainIamRoleName
The name of the IAM role to use when making API calls to the Directory Service. -
getDomainOu
The Active Directory organizational unit for your DB instance to join. -
setDomainOu
The Active Directory organizational unit for your DB instance to join. -
getEnableCloudwatchLogsExports
The list of log types that need to be enabled for exporting to CloudWatch Logs. -
setEnableCloudwatchLogsExports
The list of log types that need to be enabled for exporting to CloudWatch Logs. -
getEnableIamDatabaseAuthentication
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. -
setEnableIamDatabaseAuthentication
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. -
setEnableIamDatabaseAuthentication
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. -
getEnablePerformanceInsights
Specifies whether to enable Performance Insights for the DB instance. -
setEnablePerformanceInsights
Specifies whether to enable Performance Insights for the DB instance. -
setEnablePerformanceInsights
Specifies whether to enable Performance Insights for the DB instance. -
getEndpoint
The connection endpoint for the DB instance. -
setEndpoint
The connection endpoint for the DB instance. -
setEndpoint
The connection endpoint for the DB instance. -
getEngine
The name of the database engine to use for this DB instance. -
setEngine
The name of the database engine to use for this DB instance. -
getEngineLifecycleSupport
The life cycle type for this DB instance. -
setEngineLifecycleSupport
The life cycle type for this DB instance. -
getEngineVersion
The version number of the database engine to use. -
setEngineVersion
The version number of the database engine to use. -
getIops
The number of I/O operations per second (IOPS) that the database provisions. -
setIops
The number of I/O operations per second (IOPS) that the database provisions. -
getKmsKeyId
The ARN of the AWS KMS key that's used to encrypt the DB instance, such asarn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
. -
setKmsKeyId
The ARN of the AWS KMS key that's used to encrypt the DB instance, such asarn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
. -
getLicenseModel
License model information for this DB instance. -
setLicenseModel
License model information for this DB instance. -
getManageMasterUserPassword
Specifies whether to manage the master user password with AWS Secrets Manager. -
setManageMasterUserPassword
Specifies whether to manage the master user password with AWS Secrets Manager. -
setManageMasterUserPassword
Specifies whether to manage the master user password with AWS Secrets Manager. -
getMasterUsername
The master user name for the DB instance. -
setMasterUsername
The master user name for the DB instance. -
getMasterUserPassword
The password for the master user.The password can include any printable ASCII character except "/", """, or "@".
-
setMasterUserPassword
The password for the master user.The password can include any printable ASCII character except "/", """, or "@".
-
getMasterUserSecret
The secret managed by RDS in AWS Secrets Manager for the master user password. -
setMasterUserSecret
The secret managed by RDS in AWS Secrets Manager for the master user password. -
setMasterUserSecret
@Stability(Stable) public void setMasterUserSecret(@Nullable CfnDBInstance.MasterUserSecretProperty value) The secret managed by RDS in AWS Secrets Manager for the master user password. -
getMaxAllocatedStorage
The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance. -
setMaxAllocatedStorage
The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance. -
getMonitoringInterval
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. -
setMonitoringInterval
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. -
getMonitoringRoleArn
The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs. -
setMonitoringRoleArn
The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs. -
getMultiAz
Specifies whether the DB instance is a Multi-AZ deployment. -
setMultiAz
Specifies whether the DB instance is a Multi-AZ deployment. -
setMultiAz
Specifies whether the DB instance is a Multi-AZ deployment. -
getNcharCharacterSetName
The name of the NCHAR character set for the Oracle DB instance. -
setNcharCharacterSetName
The name of the NCHAR character set for the Oracle DB instance. -
getNetworkType
The network type of the DB instance. -
setNetworkType
The network type of the DB instance. -
getOptionGroupName
Indicates that the DB instance should be associated with the specified option group. -
setOptionGroupName
Indicates that the DB instance should be associated with the specified option group. -
getPerformanceInsightsKmsKeyId
The AWS KMS key identifier for encryption of Performance Insights data. -
setPerformanceInsightsKmsKeyId
The AWS KMS key identifier for encryption of Performance Insights data. -
getPerformanceInsightsRetentionPeriod
The number of days to retain Performance Insights data. -
setPerformanceInsightsRetentionPeriod
The number of days to retain Performance Insights data. -
getPort
The port number on which the database accepts connections. -
setPort
The port number on which the database accepts connections. -
getPreferredBackupWindow
The daily time range during which automated backups are created if automated backups are enabled, using theBackupRetentionPeriod
parameter. -
setPreferredBackupWindow
The daily time range during which automated backups are created if automated backups are enabled, using theBackupRetentionPeriod
parameter. -
getPreferredMaintenanceWindow
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). -
setPreferredMaintenanceWindow
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). -
getProcessorFeatures
The number of CPU cores and the number of threads per core for the DB instance class of the DB instance. -
setProcessorFeatures
The number of CPU cores and the number of threads per core for the DB instance class of the DB instance. -
setProcessorFeatures
The number of CPU cores and the number of threads per core for the DB instance class of the DB instance. -
getPromotionTier
The order of priority in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. -
setPromotionTier
The order of priority in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. -
getPubliclyAccessible
Indicates whether the DB instance is an internet-facing instance. -
setPubliclyAccessible
Indicates whether the DB instance is an internet-facing instance. -
setPubliclyAccessible
Indicates whether the DB instance is an internet-facing instance. -
getReplicaMode
The open mode of an Oracle read replica. -
setReplicaMode
The open mode of an Oracle read replica. -
getRestoreTime
The date and time to restore from. -
setRestoreTime
The date and time to restore from. -
getSourceDbClusterIdentifier
The identifier of the Multi-AZ DB cluster that will act as the source for the read replica. -
setSourceDbClusterIdentifier
The identifier of the Multi-AZ DB cluster that will act as the source for the read replica. -
getSourceDbInstanceAutomatedBackupsArn
The Amazon Resource Name (ARN) of the replicated automated backups from which to restore, for example,arn:aws:rds:us-east-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE
. -
setSourceDbInstanceAutomatedBackupsArn
The Amazon Resource Name (ARN) of the replicated automated backups from which to restore, for example,arn:aws:rds:us-east-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE
. -
getSourceDbInstanceIdentifier
If you want to create a read replica DB instance, specify the ID of the source DB instance. -
setSourceDbInstanceIdentifier
If you want to create a read replica DB instance, specify the ID of the source DB instance. -
getSourceDbiResourceId
The resource ID of the source DB instance from which to restore. -
setSourceDbiResourceId
The resource ID of the source DB instance from which to restore. -
getSourceRegion
The ID of the region that contains the source DB instance for the read replica. -
setSourceRegion
The ID of the region that contains the source DB instance for the read replica. -
getStorageEncrypted
A value that indicates whether the DB instance is encrypted.By default, it isn't encrypted.
-
setStorageEncrypted
A value that indicates whether the DB instance is encrypted.By default, it isn't encrypted.
-
setStorageEncrypted
A value that indicates whether the DB instance is encrypted.By default, it isn't encrypted.
-
getStorageThroughput
Specifies the storage throughput value for the DB instance.This setting applies only to the
gp3
storage type. -
setStorageThroughput
Specifies the storage throughput value for the DB instance.This setting applies only to the
gp3
storage type. -
getStorageType
The storage type to associate with the DB instance. -
setStorageType
The storage type to associate with the DB instance. -
getTagsRaw
Tags to assign to the DB instance. -
setTagsRaw
Tags to assign to the DB instance. -
getTdeCredentialArn
Deprecated.this property has been deprecated -
setTdeCredentialArn
Deprecated.this property has been deprecated -
getTdeCredentialPassword
Deprecated.this property has been deprecated -
setTdeCredentialPassword
Deprecated.this property has been deprecated -
getTimezone
The time zone of the DB instance. -
setTimezone
The time zone of the DB instance. -
getUseDefaultProcessorFeatures
Specifies whether the DB instance class of the DB instance uses its default processor features. -
setUseDefaultProcessorFeatures
Specifies whether the DB instance class of the DB instance uses its default processor features. -
setUseDefaultProcessorFeatures
Specifies whether the DB instance class of the DB instance uses its default processor features. -
getUseLatestRestorableTime
Specifies whether the DB instance is restored from the latest backup time. -
setUseLatestRestorableTime
Specifies whether the DB instance is restored from the latest backup time. -
setUseLatestRestorableTime
Specifies whether the DB instance is restored from the latest backup time. -
getVpcSecurityGroups
A list of the VPC security group IDs to assign to the DB instance. -
setVpcSecurityGroups
A list of the VPC security group IDs to assign to the DB instance.
-