Class DatabaseInstance
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.docdb.DatabaseInstance
- All Implemented Interfaces:
IResource,IDatabaseInstance,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:36.469Z")
@Stability(Stable)
public class DatabaseInstance
extends Resource
implements IDatabaseInstance
A database instance.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.docdb.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.rds.*;
CaCertificate caCertificate;
DatabaseCluster databaseCluster;
InstanceType instanceType;
DatabaseInstance databaseInstance = DatabaseInstance.Builder.create(this, "MyDatabaseInstance")
.cluster(databaseCluster)
.instanceType(instanceType)
// the properties below are optional
.autoMinorVersionUpgrade(false)
.availabilityZone("availabilityZone")
.caCertificate(caCertificate)
.dbInstanceName("dbInstanceName")
.enablePerformanceInsights(false)
.preferredMaintenanceWindow("preferredMaintenanceWindow")
.removalPolicy(RemovalPolicy.DESTROY)
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.docdb.IDatabaseInstance
IDatabaseInstance.Jsii$Default, IDatabaseInstance.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDatabaseInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedDatabaseInstance(software.amazon.jsii.JsiiObjectRef objRef) DatabaseInstance(software.constructs.Construct scope, String id, DatabaseInstanceProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IDatabaseInstancefromDatabaseInstanceAttributes(software.constructs.Construct scope, String id, DatabaseInstanceAttributes attrs) Import an existing database instance.The instance's database cluster.The instance endpoint address.The instance endpoint port.The instance arn.The instance endpoint.The instance identifier.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
DatabaseInstance
protected DatabaseInstance(software.amazon.jsii.JsiiObjectRef objRef) -
DatabaseInstance
protected 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
-
fromDatabaseInstanceAttributes
@Stability(Stable) @NotNull public static IDatabaseInstance fromDatabaseInstanceAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseInstanceAttributes attrs) Import an existing database instance.- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
getCluster
The instance's database cluster. -
getDbInstanceEndpointAddress
The instance endpoint address.- Specified by:
getDbInstanceEndpointAddressin interfaceIDatabaseInstance
-
getDbInstanceEndpointPort
The instance endpoint port.- Specified by:
getDbInstanceEndpointPortin interfaceIDatabaseInstance
-
getInstanceArn
The instance arn.- Specified by:
getInstanceArnin interfaceIDatabaseInstance
-
getInstanceEndpoint
The instance endpoint.- Specified by:
getInstanceEndpointin interfaceIDatabaseInstance
-
getInstanceIdentifier
The instance identifier.- Specified by:
getInstanceIdentifierin interfaceIDatabaseInstance
-