@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.016Z") @Stability(value=Stable) public class CfnDBInstance extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnDBInstance.Builder
A fluent builder for
CfnDBInstance. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnDBInstance(software.constructs.Construct scope,
String id,
CfnDBInstanceProps props)
Create a new `AWS::DocDB::DBInstance`.
|
protected |
CfnDBInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDBInstance(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrEndpoint()
The connection endpoint for the instance.
|
String |
getAttrPort()
The port number on which the database accepts connections, such as `27017` .
|
Object |
getAutoMinorVersionUpgrade()
This parameter does not apply to Amazon DocumentDB.
|
String |
getAvailabilityZone()
The Amazon EC2 Availability Zone that the instance is created in.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDbClusterIdentifier()
The identifier of the cluster that the instance will belong to.
|
String |
getDbInstanceClass()
The compute and memory capacity of the instance;
|
String |
getDbInstanceIdentifier()
The instance identifier.
|
Object |
getEnablePerformanceInsights()
`AWS::DocDB::DBInstance.EnablePerformanceInsights`.
|
String |
getPreferredMaintenanceWindow()
The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).
|
TagManager |
getTags()
The tags to be assigned to the instance.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAutoMinorVersionUpgrade(Boolean value)
This parameter does not apply to Amazon DocumentDB.
|
void |
setAutoMinorVersionUpgrade(IResolvable value)
This parameter does not apply to Amazon DocumentDB.
|
void |
setAvailabilityZone(String value)
The Amazon EC2 Availability Zone that the instance is created in.
|
void |
setDbClusterIdentifier(String value)
The identifier of the cluster that the instance will belong to.
|
void |
setDbInstanceClass(String value)
The compute and memory capacity of the instance;
|
void |
setDbInstanceIdentifier(String value)
The instance identifier.
|
void |
setEnablePerformanceInsights(Boolean value)
`AWS::DocDB::DBInstance.EnablePerformanceInsights`.
|
void |
setEnablePerformanceInsights(IResolvable value)
`AWS::DocDB::DBInstance.EnablePerformanceInsights`.
|
void |
setPreferredMaintenanceWindow(String value)
The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnDBInstance(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDBInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnDBInstance(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnDBInstanceProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrEndpoint()
For example: sample-cluster.cluster-abcdefghijkl.us-east-1.docdb.amazonaws.com .
@Stability(value=Stable) @NotNull public String getAttrPort()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
You can assign up to 10 tags to an instance.
@Stability(value=Stable) @NotNull public String getDbClusterIdentifier()
@Stability(value=Stable)
public void setDbClusterIdentifier(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getDbInstanceClass()
for example, db.m4.large . If you change the class of an instance there can be some interruption in the cluster's service.
@Stability(value=Stable)
public void setDbInstanceClass(@NotNull
String value)
for example, db.m4.large . If you change the class of an instance there can be some interruption in the cluster's service.
@Stability(value=Stable) @Nullable public Object getAutoMinorVersionUpgrade()
Amazon DocumentDB does not perform minor version upgrades regardless of the value set.
Default: false
@Stability(value=Stable)
public void setAutoMinorVersionUpgrade(@Nullable
Boolean value)
Amazon DocumentDB does not perform minor version upgrades regardless of the value set.
Default: false
@Stability(value=Stable)
public void setAutoMinorVersionUpgrade(@Nullable
IResolvable value)
Amazon DocumentDB does not perform minor version upgrades regardless of the value set.
Default: false
@Stability(value=Stable) @Nullable public String getAvailabilityZone()
Default: A random, system-chosen Availability Zone in the endpoint's AWS Region .
Example: us-east-1d
@Stability(value=Stable)
public void setAvailabilityZone(@Nullable
String value)
Default: A random, system-chosen Availability Zone in the endpoint's AWS Region .
Example: us-east-1d
@Stability(value=Stable) @Nullable public String getDbInstanceIdentifier()
Constraints:
Example: mydbinstance
@Stability(value=Stable)
public void setDbInstanceIdentifier(@Nullable
String value)
Constraints:
Example: mydbinstance
@Stability(value=Stable) @Nullable public Object getEnablePerformanceInsights()
@Stability(value=Stable)
public void setEnablePerformanceInsights(@Nullable
Boolean value)
@Stability(value=Stable)
public void setEnablePerformanceInsights(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getPreferredMaintenanceWindow()
Format: ddd:hh24:mi-ddd:hh24:mi
The 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.
@Stability(value=Stable)
public void setPreferredMaintenanceWindow(@Nullable
String value)
Format: ddd:hh24:mi-ddd:hh24:mi
The 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.
Copyright © 2022. All rights reserved.