DATASOURCE::MONGODB::InstanceClasses is used to query the ApsaraDB for MongoDB instance types that you can create in a zone.
Syntax
{
"Type": "DATASOURCE::MONGODB::InstanceClasses",
"Properties": {
"ResourceGroupId": String,
"ZoneId": String,
"InstanceChargeType": String,
"DbType": String,
"RefreshOptions": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
ZoneId | String | No | Yes | The zone ID. | You can call the DescribeRegions operation to query the zones supported by the instance. |
InstanceChargeType | String | No | Yes | The billing method. | Valid values:
|
DbType | String | No | Yes | The architecture of the instance. | Valid values:
|
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Return values (Fn::GetAtt)
InstanceClassIds: the instance types.
InstanceClasses: details of the instance types.
Property | Type | Description | Constraint |
InstanceClassIds | List | The instance types. | None. |
InstanceClasses | List | Details of the instance types. | None. |
NodeType | String | The number of nodes in the instance. | None. |
NetworkType | String | The network type of the instance. | Valid values:
|
Engine | String | The storage engine of the instance. | None. |
Version | String | The version of the instance. | None. |
ZoneId | String | The zone ID. | None. |
DbType | String | The architecture of the instance. | Valid values:
|
Examples
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ZoneId": {
"Type": "String",
"Description": "The zone ID of the instance. You can call the DescribeRegions operation to query the most recent zone list. ",
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
},
"DbType": {
"Type": "String",
"Description": "The database engine type of the instance.\nnormal: replica set instance\nsharding: sharded cluster instance",
"Default": "normal"
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::MONGODB::InstanceClasses",
"Properties": {
"ZoneId": {
"Ref": "ZoneId"
},
"DbType": {
"Ref": "DbType"
}
}
}
},
"Outputs": {
"InstanceClasses": {
"Description": "The list of The instance classes.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InstanceClasses"
]
}
},
"InstanceClassIds": {
"Description": "The list of The instance class Ids.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InstanceClassIds"
]
}
}
}
}