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.docdb.DatabaseInstance
- All Implemented Interfaces:
- IConstruct,- IDependable,- IResource,- IDatabaseInstance,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
           date="2023-06-19T16:30:41.912Z")
@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.services.docdb.*;
 import software.amazon.awscdk.services.ec2.*;
 import software.amazon.awscdk.core.*;
 DatabaseCluster databaseCluster;
 InstanceType instanceType;
 DatabaseInstance databaseInstance = DatabaseInstance.Builder.create(this, "MyDatabaseInstance")
         .cluster(databaseCluster)
         .instanceType(instanceType)
         // the properties below are optional
         .autoMinorVersionUpgrade(false)
         .availabilityZone("availabilityZone")
         .dbInstanceName("dbInstanceName")
         .preferredMaintenanceWindow("preferredMaintenanceWindow")
         .removalPolicy(RemovalPolicy.DESTROY)
         .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.docdb.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 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.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.core.IResourceapplyRemovalPolicy, getEnv, getStackMethods 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- 
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.
 
- 
getClusterThe instance's database cluster.
- 
getDbInstanceEndpointAddressThe instance endpoint address.- Specified by:
- getDbInstanceEndpointAddressin interface- IDatabaseInstance
 
- 
getDbInstanceEndpointPortThe instance endpoint port.- Specified by:
- getDbInstanceEndpointPortin interface- IDatabaseInstance
 
- 
getInstanceArnThe instance arn.- Specified by:
- getInstanceArnin interface- IDatabaseInstance
 
- 
getInstanceEndpointThe instance endpoint.- Specified by:
- getInstanceEndpointin interface- IDatabaseInstance
 
- 
getInstanceIdentifierThe instance identifier.- Specified by:
- getInstanceIdentifierin interface- IDatabaseInstance
 
 
-