Class CfnDBInstance
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::DocDB::DBInstance.
The AWS::DocDB::DBInstance Amazon DocumentDB (with MongoDB compatibility) resource describes a DBInstance. For more information, see DBInstance in the Amazon DocumentDB Developer Guide .
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.*;
CfnDBInstance cfnDBInstance = CfnDBInstance.Builder.create(this, "MyCfnDBInstance")
.dbClusterIdentifier("dbClusterIdentifier")
.dbInstanceClass("dbInstanceClass")
// the properties below are optional
.autoMinorVersionUpgrade(false)
.availabilityZone("availabilityZone")
.dbInstanceIdentifier("dbInstanceIdentifier")
.enablePerformanceInsights(false)
.preferredMaintenanceWindow("preferredMaintenanceWindow")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnDBInstance(Construct scope, String id, CfnDBInstanceProps props) Create a newAWS::DocDB::DBInstance.protectedCfnDBInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDBInstance(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe connection endpoint for the instance.The port number on which the database accepts connections, such as27017.This parameter does not apply to Amazon DocumentDB.The Amazon EC2 Availability Zone that the instance is created in.The identifier of the cluster that the instance will belong to.The compute and memory capacity of the instance;The instance identifier.AWS::DocDB::DBInstance.EnablePerformanceInsights.The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).getTags()The tags to be assigned to the instance.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThis parameter does not apply to Amazon DocumentDB.voidThis parameter does not apply to Amazon DocumentDB.voidsetAvailabilityZone(String value) The Amazon EC2 Availability Zone that the instance is created in.voidsetDbClusterIdentifier(String value) The identifier of the cluster that the instance will belong to.voidsetDbInstanceClass(String value) The compute and memory capacity of the instance;voidsetDbInstanceIdentifier(String value) The instance identifier.voidAWS::DocDB::DBInstance.EnablePerformanceInsights.voidAWS::DocDB::DBInstance.EnablePerformanceInsights.voidThe time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @NotNull CfnDBInstanceProps props) Create a newAWS::DocDB::DBInstance.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrEndpoint
The connection endpoint for the instance.For example:
sample-cluster.cluster-abcdefghijkl.us-east-1.docdb.amazonaws.com. -
getAttrPort
The port number on which the database accepts connections, such as27017. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
The tags to be assigned to the instance.You can assign up to 10 tags to an instance.
-
getDbClusterIdentifier
The identifier of the cluster that the instance will belong to. -
setDbClusterIdentifier
The identifier of the cluster that the instance will belong to. -
getDbInstanceClass
The compute and memory capacity of the instance;for example,
db.m4.large. If you change the class of an instance there can be some interruption in the cluster's service. -
setDbInstanceClass
The compute and memory capacity of the instance;for example,
db.m4.large. If you change the class of an instance there can be some interruption in the cluster's service. -
getAutoMinorVersionUpgrade
This parameter does not apply to Amazon DocumentDB.Amazon DocumentDB does not perform minor version upgrades regardless of the value set.
Default:
false -
setAutoMinorVersionUpgrade
This parameter does not apply to Amazon DocumentDB.Amazon DocumentDB does not perform minor version upgrades regardless of the value set.
Default:
false -
setAutoMinorVersionUpgrade
This parameter does not apply to Amazon DocumentDB.Amazon DocumentDB does not perform minor version upgrades regardless of the value set.
Default:
false -
getAvailabilityZone
The Amazon EC2 Availability Zone that the instance is created in.Default: A random, system-chosen Availability Zone in the endpoint's AWS Region .
Example:
us-east-1d -
setAvailabilityZone
The Amazon EC2 Availability Zone that the instance is created in.Default: A random, system-chosen Availability Zone in the endpoint's AWS Region .
Example:
us-east-1d -
getDbInstanceIdentifier
The instance identifier. This parameter is stored as a lowercase string.Constraints:
- Must contain from 1 to 63 letters, numbers, or hyphens.
- The first character must be a letter.
- Cannot end with a hyphen or contain two consecutive hyphens.
Example:
mydbinstance -
setDbInstanceIdentifier
The instance identifier. This parameter is stored as a lowercase string.Constraints:
- Must contain from 1 to 63 letters, numbers, or hyphens.
- The first character must be a letter.
- Cannot end with a hyphen or contain two consecutive hyphens.
Example:
mydbinstance -
getEnablePerformanceInsights
AWS::DocDB::DBInstance.EnablePerformanceInsights. -
setEnablePerformanceInsights
AWS::DocDB::DBInstance.EnablePerformanceInsights. -
setEnablePerformanceInsights
AWS::DocDB::DBInstance.EnablePerformanceInsights. -
getPreferredMaintenanceWindow
The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).Format:
ddd:hh24:mi-ddd:hh24:miThe 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.
Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
-
setPreferredMaintenanceWindow
The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).Format:
ddd:hh24:mi-ddd:hh24:miThe 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.
Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
-