The ALIYUN::MONGODB::Instance type is used to create an ApsaraDB for MongoDB instance.
Syntax
{
"Type" : "ALIYUN::MONGODB::Instance",
"Properties" : {
"SrcDBInstanceId" : String,
"DBInstanceStorage" : Integer,
"DBInstanceDescription" : String,
"SecurityIPArray" : String,
"ZoneId" : String,
"VpcId" : String,
"VSwitchId" : String,
"BackupId" : String,
"NetworkType" : String,
"DBInstanceClass" : String,
"AccountPassword" : String
}
}
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
{
"ROSTemplateFormatVersion" : "2015-09-01",
"Resources" : {
"MongoDB": {
"Type": "ALIYUN::MONGODB::Instance",
"Properties": {
"DBInstanceClass":"dds.mongo.mid",
"DBInstanceStorage":"10",
"VpcId": "vpc-25o8sqkwb",
"VSwitchId": "vsw-25w8qld3m"
}
}
},
"Outputs": {
"DBInstanceStatus": {
"Description": "Status of mongodb instance.",
"Value": {
"Fn::GetAtt": [
"MongoDB",
"DBInstanceStatus"
]
}
},
"InstanceId": {
"Description": "The instance id of created mongodb instance.",
"Value": {
"Fn::GetAtt": [
"MongoDB",
"DBInstanceId"
]
}
}
}
}