ALIYUN::MONGODB::Instance is used to create or clone an ApsaraDB for MongoDB replica set instance.
Syntax
{
"Type": "ALIYUN::MONGODB::Instance",
"Properties": {
"DatabaseNames": String,
"VpcPasswordFree": Boolean,
"ReadonlyReplicas": Integer,
"BusinessInfo": String,
"AccountPassword": String,
"VpcId": String,
"SecurityGroupId": String,
"AutoRenew": Boolean,
"ResourceGroupId": String,
"VSwitchId": String,
"StorageEngine": String,
"SrcDBInstanceId": String,
"ReplicationFactor": Integer,
"ZoneId": String,
"EngineVersion": String,
"RestoreTime": String,
"DBInstanceStorage": Integer,
"DBInstanceDescription": String,
"CouponNo": String,
"Period": Integer,
"SecurityIPArray": String,
"ChargeType": String,
"BackupId": String,
"TDEStatus": Boolean,
"DBInstanceClass": String,
"NetworkType": String,
"Tags": List,
"SecondaryZoneId": String,
"HiddenZoneId": String,
"StorageType": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
VpcPasswordFree | Boolean | No | No | Specifies whether to enable password-free access to the instance over a virtual private cloud (VPC). | Valid values:
|
DBInstanceStorage | Integer | Yes | Yes | The storage capacity of the instance. | Valid values: 10 to 3000. The value must be a multiple of 10. Unit: GB. |
DBInstanceClass | String | Yes | Yes | The instance type. | For more information, see Overview. |
TDEStatus | Boolean | No | Yes | Specifies whether to enable transparent data encryption (TDE). | Valid values:
|
SrcDBInstanceId | String | No | No | The ID of the source instance. | You can specify this property only if you use ALIYUN::MONGODB::Instance to clone an instance. You must specify this property together with BackupId or RestoreTime. |
DBInstanceDescription | String | No | No | The description of the instance. | The description must be 2 to 256 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter. |
SecurityIPArray | String | No | No | The IP addresses that are used to access the instance. | Separate multiple IP addresses with commas (,). Each IP address must be unique. You can add up to 1,000 IP addresses. The following types of formats are supported: IP addresses and CIDR blocks. For example, you can set the value to 0.0.0.0/0, 10.23.XX.XX (IP address), and 10.23.XX.XX/24 (CIDR block). /24 indicates that the prefix in the CIDR block is 24 bits in length. A prefix must be 1 to 32 bits in length. Default value: 0.0.0.0/0. A value of 0.0.0.0/0 specifies that all IP addresses can be used to access the instance. |
ZoneId | String | No | No | The zone ID. | For more information, see DescribeRegions. If you set NetworkType to VPC, you must set ZoneId to the zone ID of the vSwitch in the VPC. |
VpcId | String | No | No | The VPC ID. | This property takes effect when NetworkType is set to VPC. |
SecurityGroupId | String | No | Yes | The ID of the security group. | None. |
VSwitchId | String | No | No | The vSwitch ID. | This property takes effect when NetworkType is set to VPC. |
BackupId | String | No | No | The ID of the backup set. | You can specify this property only if you use ALIYUN::MONGODB::Instance to clone an instance. You must specify this property together with SrcDBInstanceId. |
NetworkType | String | No | No | The network type. | Valid values:
|
AccountPassword | String | No | Yes | The password of the root account. | The password must be 6 to 32 characters in length, and can contain letters, digits, and the following special characters: |
EngineVersion | String | No | No | The version of the database engine. | Valid values:
|
StorageEngine | String | No | No | The storage engine. | For more information about storage engines and MongoDB versions, see MongoDB versions and storage engines. Valid values:
|
ReplicationFactor | Integer | No | Yes | The number of nodes in the instance. | Valid values:
|
DatabaseNames | String | No | No | The database name. | None. |
ReadonlyReplicas | Integer | No | Yes | The number of read-only nodes. | Valid values: 1 to 5. |
BusinessInfo | String | No | No | The business information. | This property is an additional property. |
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
AutoRenew | Boolean | No | No | Specifies whether to enable auto-renewal for the instance. | Valid values:
|
RestoreTime | String | No | No | The point in time at which you want to restore the cloned instance. | Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. You can specify this property only if you use ALIYUN::MONGODB::Instance to clone an instance. You must specify this property together with SrcDBInstanceId and BackupId. You can specify a point in time in the next seven days of the request to clone an instance. |
CouponNo | String | No | No | The coupon code. | Default value: youhuiquan_promotion_option_id_for_blank. |
Period | Integer | No | No | The subscription duration of the instance. | Unit: month. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. Default value: 1. This property takes effect when ChargeType is set to PrePaid. |
ChargeType | String | No | No | The billing method of the instance. | Valid values:
|
Tags | List | No | Yes | The tags of the instance. | You can add up to 20 tags to the instance. For more information, see Tags properties. |
SecondaryZoneId | String | No | No | The zone ID of the secondary node. | Valid values:
Note
|
HiddenZoneId | String | No | No | The zone ID of the hidden node. | Valid values:
Note
|
StorageType | String | No | No | The storage type. | Valid values:
|
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Key | String | Yes | No | The tag key. | The tag key must be 1 to 128 characters in length, and cannot contain |
Value | String | No | No | The tag value. | The tag value can be up to 128 characters in length, and cannot contain |
Return values
Fn::GetAtt
OrderId: the order ID of the ApsaraDB for MongoDB instance.
DBInstanceId: the ID of the ApsaraDB for MongoDB instance. The ID is globally unique.
DBInstanceStatus: the status of the ApsaraDB for MongoDB instance.
ConnectionURI: the connection Uniform Resource Identifier (URI).
ReplicaSetName: the name of the replica set.
Examples
For more examples, visit MongoDBInstance.json and MongoDBInstance.yml.