Class CfnDBInstance

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:15.299Z") @Stability(Stable) public class CfnDBInstance extends CfnResource implements IInspectable, ITaggable
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")
         .caCertificateIdentifier("caCertificateIdentifier")
         .certificateRotationRestart(false)
         .dbInstanceIdentifier("dbInstanceIdentifier")
         .enablePerformanceInsights(false)
         .preferredMaintenanceWindow("preferredMaintenanceWindow")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnDBInstanceProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrEndpoint

      @Stability(Stable) @NotNull public String getAttrEndpoint()
      The connection endpoint for the instance.

      For example: sample-cluster.cluster-abcdefghijkl.us-east-1.docdb.amazonaws.com .

    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getAttrPort

      @Stability(Stable) @NotNull public String getAttrPort()
      The port number on which the database accepts connections, such as 27017 .
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getDbClusterIdentifier

      @Stability(Stable) @NotNull public String getDbClusterIdentifier()
      The identifier of the cluster that the instance will belong to.
    • setDbClusterIdentifier

      @Stability(Stable) public void setDbClusterIdentifier(@NotNull String value)
      The identifier of the cluster that the instance will belong to.
    • getDbInstanceClass

      @Stability(Stable) @NotNull public String getDbInstanceClass()
      The compute and memory capacity of the instance;
    • setDbInstanceClass

      @Stability(Stable) public void setDbInstanceClass(@NotNull String value)
      The compute and memory capacity of the instance;
    • getAutoMinorVersionUpgrade

      @Stability(Stable) @Nullable public Object getAutoMinorVersionUpgrade()
      This parameter does not apply to Amazon DocumentDB.
    • setAutoMinorVersionUpgrade

      @Stability(Stable) public void setAutoMinorVersionUpgrade(@Nullable Boolean value)
      This parameter does not apply to Amazon DocumentDB.
    • setAutoMinorVersionUpgrade

      @Stability(Stable) public void setAutoMinorVersionUpgrade(@Nullable IResolvable value)
      This parameter does not apply to Amazon DocumentDB.
    • getAvailabilityZone

      @Stability(Stable) @Nullable public String getAvailabilityZone()
      The Amazon EC2 Availability Zone that the instance is created in.
    • setAvailabilityZone

      @Stability(Stable) public void setAvailabilityZone(@Nullable String value)
      The Amazon EC2 Availability Zone that the instance is created in.
    • getCaCertificateIdentifier

      @Stability(Stable) @Nullable public String getCaCertificateIdentifier()
      The CA certificate identifier to use for the DB instance's server certificate.
    • setCaCertificateIdentifier

      @Stability(Stable) public void setCaCertificateIdentifier(@Nullable String value)
      The CA certificate identifier to use for the DB instance's server certificate.
    • getCertificateRotationRestart

      @Stability(Stable) @Nullable public Object getCertificateRotationRestart()
      Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.
    • setCertificateRotationRestart

      @Stability(Stable) public void setCertificateRotationRestart(@Nullable Boolean value)
      Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.
    • setCertificateRotationRestart

      @Stability(Stable) public void setCertificateRotationRestart(@Nullable IResolvable value)
      Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.
    • getDbInstanceIdentifier

      @Stability(Stable) @Nullable public String getDbInstanceIdentifier()
      The instance identifier.

      This parameter is stored as a lowercase string.

    • setDbInstanceIdentifier

      @Stability(Stable) public void setDbInstanceIdentifier(@Nullable String value)
      The instance identifier.

      This parameter is stored as a lowercase string.

    • getEnablePerformanceInsights

      @Stability(Stable) @Nullable public Object getEnablePerformanceInsights()
      A value that indicates whether to enable Performance Insights for the DB Instance.
    • setEnablePerformanceInsights

      @Stability(Stable) public void setEnablePerformanceInsights(@Nullable Boolean value)
      A value that indicates whether to enable Performance Insights for the DB Instance.
    • setEnablePerformanceInsights

      @Stability(Stable) public void setEnablePerformanceInsights(@Nullable IResolvable value)
      A value that indicates whether to enable Performance Insights for the DB Instance.
    • getPreferredMaintenanceWindow

      @Stability(Stable) @Nullable public String getPreferredMaintenanceWindow()
      The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).
    • setPreferredMaintenanceWindow

      @Stability(Stable) public void setPreferredMaintenanceWindow(@Nullable String value)
      The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags to be assigned to the instance.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags to be assigned to the instance.