All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::MONGODB::Instances

Last Updated:Jun 03, 2026

Queries information about ApsaraDB for MongoDB instances.

Syntax

{
  "Type": "DATASOURCE::MONGODB::Instances",
  "Properties": {
    "EngineVersion": String,
    "ReplicationFactor": String,
    "DBInstanceStatus": String,
    "ZoneId": String,
    "ResourceGroupId": String,
    "DBInstanceClass": String,
    "VSwitchId": String,
    "DBInstanceType": String,
    "Expired": Boolean,
    "ConnectionDomain": String,
    "VpcId": String,
    "DBInstanceId": String,
    "ChargeType": String,
    "NetworkType": String,
    "DBInstanceDescription": String,
    "Tags": List,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

EngineVersion

String

No

Yes

The database engine version.

Valid values:

  • 5.0

  • 4.4

  • 4.2

  • 4.0

  • 3.4

ReplicationFactor

String

No

Yes

The number of nodes in a replica set instance.

Valid values:

  • 3

  • 5

  • 7

DBInstanceStatus

String

No

Yes

The instance status.

Valid values: Instance states.

ZoneId

String

No

Yes

The zone ID.

Call DescribeRegions to query supported zones.

ResourceGroupId

String

No

Yes

The resource group ID.

None.

DBInstanceClass

String

No

Yes

The instance type.

Valid values: Instance types.

VSwitchId

String

No

Yes

The vSwitch ID.

None

DBInstanceType

String

No

Yes

The instance architecture.

Valid values:

  • sharding: sharded cluster instance

  • replicate (default): replica set instance or standalone instance

  • serverless: serverless instance

Expired

Boolean

No

Yes

Whether the instance has expired.

Valid values:

  • true

  • false

ConnectionDomain

String

No

Yes

The node endpoint.

Call DescribeDBInstanceAttribute to query node endpoints.

VpcId

String

No

Yes

The VPC ID.

None.

DBInstanceId

String

No

Yes

The instance ID.

None.

ChargeType

String

No

Yes

The billing method.

Valid values:

  • PrePaid: subscription

  • PostPaid: pay-as-you-go

NetworkType

String

No

Yes

The network type.

Valid values:

  • Classic

  • VPC

DBInstanceDescription

String

No

Yes

The instance description.

None.

Tags

List

No

Yes

The instance tags.

Maximum: 20 tags.

Tags properties.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack updates.

Valid values:

  • Never (default): does not refresh data source resources when the stack updates.

  • Always: refreshes data source resources when the stack updates.

Tags syntax

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags properties

Property

Type

Required

Editable

Description

Constraint

Value

String

No

No

The tag value.

1 to 128 characters. Cannot start with aliyun, acs:, http://, or https://.

Key

String

Yes

No

The tag key.

1 to 128 characters. Cannot start with aliyun, acs:, http://, or https://.

Return values (Fn::GetAtt)

  • InstanceIds: the instance IDs.

  • Instances: instance details.

Property

Type

Description

Constraint

InstanceIds

List

The instance IDs.

None.

Instances

List

Instance details.

None.

ChargeType

String

The billing method.

Valid values:

  • PrePaid: subscription

  • PostPaid: pay-as-you-go

Tags

List

The instance tags.

None.

VpcAuthMode

String

Whether password-free access over VPC is enabled.

Valid values:

  • Open

  • Close

NetworkType

String

The network type.

Valid values:

  • Classic

  • VPC

LockMode

String

The instance lock mode.

Valid values:

  • Unlock: not locked.

  • ManualLock: manually locked.

  • LockByExpiration: automatically locked upon expiration.

  • LockByRestoration: automatically locked before rollback.

  • LockByDiskQuota: automatically locked when disk capacity is exhausted.

  • Released: the instance is released and cannot be unlocked. You can only restore from a backup.

EngineVersion

String

The database engine version.

None.

MongosList

List

The mongos node details.

Returned only when DBInstanceType is sharding.

DBInstanceDescription

String

The instance description.

None.

DBInstanceType

String

The instance architecture.

Valid values:

  • sharding: sharded cluster instance

  • replicate: replica set instance or standalone instance

  • serverless: serverless instance

ShardList

List

The shard node details.

Returned only when DBInstanceType is sharding.

DBInstanceStatus

String

The instance status.

Valid values: Instance states.

DBInstanceStorage

Number

The storage capacity of the instance.

None.

ResourceGroupId

String

The resource group ID.

None.

ZoneId

String

The zone ID.

None.

DBInstanceId

String

The instance ID.

None.

DBInstanceClass

String

The instance type.

Valid values: Instance specifications.

Engine

String

The database engine.

None.

ReplicationFactor

String

The number of nodes in the instance.

Returned only when DBInstanceType is replicate.

KindCode

String

The kind code of the instance.

Valid values:

  • 0: physical machine

  • 1: Elastic Compute Service (ECS) instance

  • 2: Docker cluster

  • 18: Kubernetes cluster

CapacityUnit

String

The read and write throughput consumed by the instance.

Returned only when DBInstanceType is serverless.

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