edit-icon download-icon

ALIYUN::MONGODB::Instance

Last Updated: Mar 27, 2018

The ALIYUN::MONGODB::Instance type is used to create an ApsaraDB for MongoDB instance.

Syntax

  1. {
  2. "Type" : "ALIYUN::MONGODB::Instance",
  3. "Properties" : {
  4. "SrcDBInstanceId" : String,
  5. "DBInstanceStorage" : Integer,
  6. "DBInstanceDescription" : String,
  7. "SecurityIPArray" : String,
  8. "ZoneId" : String,
  9. "VpcId" : String,
  10. "VSwitchId" : String,
  11. "BackupId" : String,
  12. "NetworkType" : String,
  13. "DBInstanceClass" : String,
  14. "AccountPassword" : String
  15. }
  16. }

Attributes

Attribute name Type Required? Description Constraint
DBInstanceStorage integer Yes Size of the database instance Value range: [5, 1000], unit: GB. The increment is 5 GB.
DBInstanceClass string Yes Database instance type Value options: dds.mongo.mid, dds.mongo.standard, dds.mongo.large, dds.mongo.xlarge, dds.mongo.2xlarge, and dds.mongo.4xlarge.
SrcDBInstanceId string No Backup instance used to create a new instance N/A
DBInstanceDescription string No Instance description N/A
SecurityIPArray string No List of all IP addresses allowed to access the instance The IP addresses are separated by commas and cannot be repeated. The list can contain a maximum of 1,000 IP addresses. Supported formats include %, 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24. (CIDR mode; classless inter-domain routing. /24 indicates the length of the prefix of an IP address. The range of the prefix length is [1, 32].) 0.0.0.0/0 indicates that no access restriction is applied. By default, no access restriction is applied.
ZoneId string No Zone ID The zone in VPC must be the same as the zone associated with VSwitchId.
VpcId string No VPC ID N/A
VSwitchId string No VSwitch ID associated with the VPC ID N/A
BackupId string No Backup set ID N/A
NetworkType string No Network type Value options: CLASSIC and VPC. Default value: CLASSIC.
AccountPassword string No Password of user root The password is a string of 6 to 32 characters and must contain letters, digits, and underscores(_).

Return values

Fn::GetAtt

  • OrderId: ID of the order for creating an ApsaraDB for MongoDB instance.
  • DBInstanceId: ID of the ApsaraDB for MongoDB instance, which is globally unique.
  • DBInstanceStatus: status of the ApsaraDB for MongoDB instance.

Example

  1. {
  2. "ROSTemplateFormatVersion" : "2015-09-01",
  3. "Resources" : {
  4. "MongoDB": {
  5. "Type": "ALIYUN::MONGODB::Instance",
  6. "Properties": {
  7. "DBInstanceClass":"dds.mongo.mid",
  8. "DBInstanceStorage":"10",
  9. "VpcId": "vpc-25o8sqkwb",
  10. "VSwitchId": "vsw-25w8qld3m"
  11. }
  12. }
  13. },
  14. "Outputs": {
  15. "DBInstanceStatus": {
  16. "Description": "Status of mongodb instance.",
  17. "Value": {
  18. "Fn::GetAtt": [
  19. "MongoDB",
  20. "DBInstanceStatus"
  21. ]
  22. }
  23. },
  24. "InstanceId": {
  25. "Description": "The instance id of created mongodb instance.",
  26. "Value": {
  27. "Fn::GetAtt": [
  28. "MongoDB",
  29. "DBInstanceId"
  30. ]
  31. }
  32. }
  33. }
  34. }
Thank you! We've received your feedback.