DATASOURCE::MONGODB::InstanceClasses is used to query the instance types that are supported by ApsaraDB for MongoDB in the specified zone.

Syntax

{
  "Type": "DATASOURCE::MONGODB::InstanceClasses",
  "Properties": {
    "ResourceGroupId": String,
    "ZoneId": String,
    "InstanceChargeType": String,
    "DbType": String
  }
}

Properties

Property Type Required Editable Description Constraint
ResourceGroupId String No Yes The ID of the resource group. None.
ZoneId String No Yes The ID of the zone. You can call the DescribeRegions operation to query available zones supported by the instance.
InstanceChargeType String No Yes The type of the billing method. Default value: PostPaid. Valid values:
  • PrePaid: subscription
  • PostPaid: pay-as-you-go
DbType String No Yes The database engine type of the instance. Valid values:
  • normal: replica set instance
  • sharding: sharded cluster instance

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:
  • Classic: classic network
  • VPC: virtual private cloud (VPC)
Engine String The storage engine of the instance. None.
Version String The database engine version of the instance. None.
ZoneId String The ID of the zone. None.
DbType String The database engine type of the instance. Valid values:
  • normal: replica set instance
  • sharding: sharded cluster instance

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"
        ]
      }
    }
  }
}