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.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::DocDB::DBInstance", "Properties" : { "AutoMinorVersionUpgrade" :
Boolean
, "AvailabilityZone" :String
, "CACertificateIdentifier" :String
, "CertificateRotationRestart" :Boolean
, "DBClusterIdentifier" :String
, "DBInstanceClass" :String
, "DBInstanceIdentifier" :String
, "EnablePerformanceInsights" :Boolean
, "PreferredMaintenanceWindow" :String
, "Tags" :[ Tag, ... ]
} }
YAML
Type: AWS::DocDB::DBInstance Properties: AutoMinorVersionUpgrade:
Boolean
AvailabilityZone:String
CACertificateIdentifier:String
CertificateRotationRestart:Boolean
DBClusterIdentifier:String
DBInstanceClass:String
DBInstanceIdentifier:String
EnablePerformanceInsights:Boolean
PreferredMaintenanceWindow:String
Tags:- Tag
Properties
AutoMinorVersionUpgrade
-
This parameter does not apply to Amazon DocumentDB. Amazon DocumentDB does not perform minor version upgrades regardless of the value set.
Default:
false
Required: No
Type: Boolean
Update requires: No interruption
AvailabilityZone
-
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
Required: No
Type: String
Update requires: Replacement
CACertificateIdentifier
-
The CA certificate identifier to use for the DB instance's server certificate.
For more information, see Updating Your Amazon DocumentDB TLS Certificates and Encrypting Data in Transit in the Amazon DocumentDB Developer Guide.
Required: No
Type: String
Update requires: No interruption
CertificateRotationRestart
-
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.
By default, the DB instance is restarted when you rotate your SSL/TLS certificate. The certificate is not updated until the DB instance is restarted.
Important
Set this parameter only if you are not using SSL/TLS to connect to the DB instance.
If you are using SSL/TLS to connect to the DB instance, see Updating Your Amazon DocumentDB TLS Certificates and Encrypting Data in Transit in the Amazon DocumentDB Developer Guide.
Required: No
Type: Boolean
Update requires: No interruption
DBClusterIdentifier
-
The identifier of the cluster that the instance will belong to.
Required: Yes
Type: String
Update requires: Replacement
DBInstanceClass
-
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.Required: Yes
Type: String
Update requires: No interruption
DBInstanceIdentifier
-
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
Required: No
Type: String
Update requires: Replacement
-
EnablePerformanceInsights
-
A value that indicates whether to enable Performance Insights for the DB Instance. For more information, see Using Amazon Performance Insights.
Required: No
Type: Boolean
Update requires: No interruption
PreferredMaintenanceWindow
-
The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC).
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.
Required: No
Type: String
Update requires: No interruption
-
The tags to be assigned to the instance. You can assign up to 10 tags to an instance.
Required: No
Type: Array of Tag
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the DBInstance's name, such as sample-cluster-instance
.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt
.
Endpoint
-
The connection endpoint for the instance. For example:
sample-cluster.cluster-abcdefghijkl.us-east-1.docdb.amazonaws.com
. Port
-
The port number on which the database accepts connections, such as
27017
.
Examples
JSON
{ "Type" : "AWS::DocDB::DBInstance", "Properties" : { "AutoMinorVersionUpgrade" : true, "AvailabilityZone" : "us-east-1c", "DBClusterIdentifier" : "sample-cluster", "DBInstanceClass" : "db.r5.large", "DBInstanceIdentifier" : "sample-cluster-instance-0", "PreferredMaintenanceWindow" : "sat:06:54-sat:07:24", "Tags" : [{ "Key": "String","Value": "String" }] } }
YAML
Type: "AWS::DocDB::DBInstance" Properties: AutoMinorVersionUpgrade: true AvailabilityZone: "us-east-1c" DBClusterIdentifier: "sample-cluster" DBInstanceClass: "db.r5.large" DBInstanceIdentifier: "sample-cluster-instance-0" PreferredMaintenanceWindow: "sat:06:54-sat:07:24" Tags: - Key: "String" Value: "String"