All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::MONGODB::InstanceClasses

Last Updated:Jun 16, 2026

Queries ApsaraDB for MongoDB instance types available for creation in a specified 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.

Call the DescribeRegions operation to query supported zones.

InstanceChargeType

String

No

Yes

The billing method.

Valid values:

  • PrePaid: subscription

  • PostPaid (default): pay-as-you-go

DbType

String

No

Yes

The architecture of the instance.

Valid values:

  • normal: replica set instance

  • sharding: sharded cluster instance

RefreshOptions

String

No

Yes

The data source refresh policy on stack update.

Valid values:

  • Never (default): does not refresh data source resources on stack update.

  • Always: refreshes data source resources on stack update.

Return values (Fn::GetAtt)

  • InstanceClassIds: instance type IDs.

  • InstanceClasses: detailed information about 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 version of the instance.

None.

ZoneId

String

The zone ID.

None.

DbType

String

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