Class DatabaseInstance
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.rds.DatabaseInstanceBase
software.amazon.awscdk.services.rds.DatabaseInstance
- All Implemented Interfaces:
- IConstruct,- IDependable,- IResource,- IConnectable,- IDatabaseInstance,- ISecretAttachmentTarget,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
           date="2023-06-19T16:30:49.117Z")
@Stability(Stable)
public class DatabaseInstance
extends DatabaseInstanceBase
implements IDatabaseInstance
A database instance.
 
Example:
 Vpc vpc;
 IInstanceEngine engine = DatabaseInstanceEngine.postgres(PostgresInstanceEngineProps.builder().version(PostgresEngineVersion.VER_12_3).build());
 DatabaseInstance.Builder.create(this, "InstanceWithUsername")
         .engine(engine)
         .vpc(vpc)
         .credentials(Credentials.fromGeneratedSecret("postgres"))
         .build();
 DatabaseInstance.Builder.create(this, "InstanceWithUsernameAndPassword")
         .engine(engine)
         .vpc(vpc)
         .credentials(Credentials.fromPassword("postgres", SecretValue.ssmSecure("/dbPassword", "1")))
         .build();
 ISecret mySecret = Secret.fromSecretName(this, "DBSecret", "myDBLoginInfo");
 DatabaseInstance.Builder.create(this, "InstanceWithSecretLogin")
         .engine(engine)
         .vpc(vpc)
         .credentials(Credentials.fromSecret(mySecret))
         .build();
 - 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstructIConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.rds.IDatabaseInstanceIDatabaseInstance.Jsii$Default, IDatabaseInstance.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResourceIResource.Jsii$Default
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDatabaseInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedDatabaseInstance(software.amazon.jsii.JsiiObjectRef objRef) DatabaseInstance(software.constructs.Construct scope, String id, DatabaseInstanceProps props) 
- 
Method SummaryModifier and TypeMethodDescriptionaddRotationMultiUser(String id, RotationMultiUserOptions options) Adds the multi user rotation to this instance.Adds the single user rotation of the master password to this instance.Adds the single user rotation of the master password to this instance.Access to network connections.The instance endpoint address.The instance endpoint port.protected BooleanThe engine of this database Instance.The instance endpoint.The instance identifier.protected InstanceTypeprotected CfnDBInstancePropsThe AWS Secrets Manager secret attached to the instance.protected CfnDBInstancePropsgetVpc()The VPC where this database instance is deployed.protected SubnetSelectionprotected voidprotected voidMethods inherited from class software.amazon.awscdk.services.rds.DatabaseInstanceBaseaddProxy, asSecretAttachmentTarget, fromDatabaseInstanceAttributes, getInstanceArn, grantConnect, metric, metric, metricCPUUtilization, metricCPUUtilization, metricDatabaseConnections, metricDatabaseConnections, metricFreeableMemory, metricFreeableMemory, metricFreeStorageSpace, metricFreeStorageSpace, metricReadIOPS, metricReadIOPS, metricWriteIOPS, metricWriteIOPS, onEvent, onEventMethods inherited from class software.amazon.awscdk.core.ResourceapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.ConstructgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.ConstructtoStringMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstructgetNodeMethods inherited from interface software.amazon.awscdk.services.rds.IDatabaseInstanceaddProxy, getInstanceArn, grantConnect, metric, metric, metricCPUUtilization, metricCPUUtilization, metricDatabaseConnections, metricDatabaseConnections, metricFreeableMemory, metricFreeableMemory, metricFreeStorageSpace, metricFreeStorageSpace, metricReadIOPS, metricReadIOPS, metricWriteIOPS, metricWriteIOPS, onEvent, onEventMethods inherited from interface software.amazon.awscdk.core.IResourceapplyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.awscdk.services.secretsmanager.ISecretAttachmentTargetasSecretAttachmentTargetMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Constructor Details- 
DatabaseInstanceprotected DatabaseInstance(software.amazon.jsii.JsiiObjectRef objRef) 
- 
DatabaseInstanceprotected DatabaseInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
DatabaseInstance@Stability(Stable) public DatabaseInstance(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseInstanceProps props) - Parameters:
- scope- This parameter is required.
- id- This parameter is required.
- props- This parameter is required.
 
 
- 
- 
Method Details- 
addRotationMultiUser@Stability(Stable) @NotNull public SecretRotation addRotationMultiUser(@NotNull String id, @NotNull RotationMultiUserOptions options) Adds the multi user rotation to this instance.- Parameters:
- id- This parameter is required.
- options- This parameter is required.
 
- 
addRotationSingleUser@Stability(Stable) @NotNull public SecretRotation addRotationSingleUser(@Nullable RotationSingleUserOptions options) Adds the single user rotation of the master password to this instance.- Parameters:
- options- the options for the rotation, if you want to override the defaults.
 
- 
addRotationSingleUserAdds the single user rotation of the master password to this instance.
- 
setLogRetention@Stability(Stable) protected void setLogRetention()
- 
getConnectionsAccess to network connections.- Specified by:
- getConnectionsin interface- IConnectable
- Specified by:
- getConnectionsin class- DatabaseInstanceBase
 
- 
getDbInstanceEndpointAddressThe instance endpoint address.- Specified by:
- getDbInstanceEndpointAddressin interface- IDatabaseInstance
- Specified by:
- getDbInstanceEndpointAddressin class- DatabaseInstanceBase
 
- 
getDbInstanceEndpointPortThe instance endpoint port.- Specified by:
- getDbInstanceEndpointPortin interface- IDatabaseInstance
- Specified by:
- getDbInstanceEndpointPortin class- DatabaseInstanceBase
 
- 
getInstanceEndpointThe instance endpoint.- Specified by:
- getInstanceEndpointin interface- IDatabaseInstance
- Specified by:
- getInstanceEndpointin class- DatabaseInstanceBase
 
- 
getInstanceIdentifierThe instance identifier.- Specified by:
- getInstanceIdentifierin interface- IDatabaseInstance
- Specified by:
- getInstanceIdentifierin class- DatabaseInstanceBase
 
- 
getInstanceType
- 
getNewCfnProps
- 
getSourceCfnProps
- 
getVpcThe VPC where this database instance is deployed.
- 
getEngineThe engine of this database Instance.May be not known for imported Instances if it wasn't provided explicitly, or for read replicas. - Specified by:
- getEnginein interface- IDatabaseInstance
- Specified by:
- getEnginein class- DatabaseInstanceBase
 
- 
getSecretThe AWS Secrets Manager secret attached to the instance.
- 
getVpcPlacement
- 
getEnableIamAuthentication- Specified by:
- getEnableIamAuthenticationin class- DatabaseInstanceBase
 
- 
setEnableIamAuthentication- Specified by:
- setEnableIamAuthenticationin class- DatabaseInstanceBase
 
 
-