All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::MONGODB::Instances

最終更新日:Nov 28, 2024

DATASOURCE::MONGODB::Instances is used to query the 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 version of the database engine.

Valid values:

  • 5.0

  • 4.4

  • 4.2

  • 4.0

  • 3.4

ReplicationFactor

String

No

Yes

The number of nodes in the replica set instance.

Valid values:

  • 3

  • 5

  • 7

DBInstanceStatus

String

No

Yes

The status of the instance.

For more information about the valid values, see Instance states.

ZoneId

String

No

Yes

The zone ID.

You can call the DescribeRegions operation to query the zones supported by the instance.

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

DBInstanceClass

String

No

Yes

The instance type.

For more information about the valid values, see Instance types.

VSwitchId

String

No

Yes

The vSwitch ID.

None.

DBInstanceType

String

No

Yes

The architecture of the instance.

Valid values:

  • sharding: sharded cluster instance

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

  • serverless: serverless instance

Expired

Boolean

No

Yes

Specifies whether the instance has expired.

Valid values:

  • true

  • false

ConnectionDomain

String

No

Yes

The endpoint of the node.

You can call the DescribeDBInstanceAttribute operation to query the endpoint of the node.

VpcId

String

No

Yes

The ID of the virtual private cloud (VPC).

None.

DBInstanceId

String

No

Yes

The instance ID.

None.

ChargeType

String

No

Yes

The billing method of the instance.

Valid values:

  • PrePaid: subscription

  • PostPaid: pay-as-you-go

NetworkType

String

No

Yes

The network type of the instance.

Valid values:

  • Classic

  • VPC

DBInstanceDescription

String

No

Yes

The description of the instance.

None.

Tags

List

No

Yes

The tags of the instance.

You can add up to 20 tags.

For more information, see Tags properties.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

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

  • Always: refreshes data source resources when the stack is updated.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Value

String

No

No

The tag value of the instance.

The tag value must be 1 to 128 characters in length. It cannot start with aliyun, acs:, http://, or https://.

Key

String

Yes

No

The tag key of the instance.

The tag key must be 1 to 128 characters in length. It cannot start with aliyun, acs:, http://, or https://.

Return values (Fn::GetAtt)

  • InstanceIds: the IDs of the instances.

  • Instances: details of the instances.

Property

Type

Description

Constraint

InstanceIds

List

The IDs of the instances.

None.

Instances

List

Details of the instances.

None.

ChargeType

String

The billing method of the instance.

Valid values:

  • PrePaid: subscription

  • PostPaid: pay-as-you-go

Tags

List

The tags of the instance.

None.

VpcAuthMode

String

Indicates whether password-free access over a VPC is enabled.

Valid values:

  • Open

  • Close

NetworkType

String

The network type of the instance.

Valid values:

  • Classic

  • VPC

LockMode

String

The lock mode of the instance.

Valid values:

  • Unlock: The instance is not locked.

  • ManualLock: The instance is manually locked.

  • LockByExpiration: The instance is automatically locked when it expires.

  • LockByRestoration: The instance is automatically locked before it is rolled back.

  • LockByDiskQuota: The instance is automatically locked when its disk capacity is exhausted.

  • Released: The instance is released. The instance is released and cannot be unlocked. You can create an instance only from a backup. This process takes some time.

EngineVersion

String

The version of the database engine.

None.

MongosList

List

Details of the mongos nodes.

This property is returned if DBInstanceType is set to sharding.

DBInstanceDescription

String

The description of the instance.

None.

DBInstanceType

String

The architecture of the instance.

Valid values:

  • sharding: sharded cluster instance

  • replicate: replica set instance or standalone instance

  • serverless: serverless instance

ShardList

List

Details of the shard nodes.

This property is returned if DBInstanceType is set to sharding.

DBInstanceStatus

String

The status of the instance.

For more information about the valid values, see Instance states.

DBInstanceStorage

Number

The storage capacity of the instance.

None.

ResourceGroupId

String

The ID of the resource group.

None.

ZoneId

String

The zone ID of the instance.

None.

DBInstanceId

String

The instance ID.

None.

DBInstanceClass

String

The instance type.

For more information about the valid values, see Instance specifications.

Engine

String

The database engine.

None.

ReplicationFactor

String

The number of nodes in the instance.

This property is returned if DBInstanceType is set to 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.

This property is returned if DBInstanceType is set to 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"
        ]
      }
    }
  }
}