All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeDBInstanceAttribute

Last Updated:Oct 28, 2024

Queries the details of an ApsaraDB for MongoDB instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dds:DescribeDBInstanceAttributeget
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EnginestringNo

The database engine. Set the value to MongoDB.

MongoDB
DBInstanceIdstringYes

The instance ID.

dds-bp11483712c1****
ResourceGroupIdstringNo

The ID of the resource group. For more information, see View the basic information of a resource group.

Note This parameter is available only if you use the China site (aliyun.com).
rg-acfmyiu4ekp****
IsDeletebooleanNo

Specifies whether to query instances that are deleted. Valid values:

  • false: queries instances that are running.
  • true: queries instance that are deleted.
false

Response parameters

ParameterTypeDescriptionExample
object

The instance information.

RequestIdstring

The request ID.

A935A8EE-A6CC-53DE-98BA-20ABAA7E632B
DBInstancesarray<object>

The instance details.

DBInstanceobject

The instance details.

CreationTimestring

The time when the instance was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-01-02T07:43:59Z
ReplicaSetsarray<object>

The information of the replica set instance.

Note This parameter is returned if the instance is a replica set instance.
ReplicaSetobject

The details of the replica set instance.

Note This parameter is returned if the instance is a replica set instance.
VSwitchIdstring

The vSwitch ID of the instance.

Note This parameter is returned if the network type of the instance is virtual private cloud (VPC).
vpc-bp1jk5vwkcri27qme****
ConnectionPortstring

The port number that is used to connect to the node.

3717
ReplicaSetRolestring

The role of the node. Valid values:

  • Primary
  • Secondary
Primary
ConnectionDomainstring

The endpoint of the node.

dds-bp11483712c1****.mongodb.rds.aliyuncs.com
VPCCloudInstanceIdstring

The instance ID.

Note This parameter is returned if the network type of the instance is VPC.
dds-bp11483712c1****
NetworkTypestring

The network type of the instance. Valid values:

  • Classic: classic network
  • VPC: VPC
VPC
VPCIdstring

The VPC ID of the instance.

Note This parameter is returned if the network type of the instance is VPC.
vpc-bp1jk5vwkcri27qme****
ReplacateIdstring

The logical ID of the replica set instance.

Note ApsaraDB for MongoDB does not support new instances of this type. This parameter applies only to previous-version replica set instances.
bls-m****
Tagsarray<object>

The details of the instance tags.

Tagobject

The details of the instance tag.

Keystring

The tag key.

test
Valuestring

The tag value.

api
VpcAuthModestring

Indicates whether password-free access within the VPC is enabled. Valid values:

  • Open: Password-free access within the VPC is enabled.
  • Close: Password-free access within the VPC is disabled, and you must use a password for access.
  • NotSupport: Password-free access within the VPC is not supported.
Open
NetworkTypestring

The network type of the instance. Valid values:

  • Classic: classic network
  • VPC: VPC
VPC
LockModestring

The lock status of the instance. Valid values:

  • Unlock: The instance is not locked.
  • ManualLock: The instance is manually locked.
  • LockByExpiration: The instance is automatically locked due to instance expiration.
  • LockByRestoration: The instance is automatically locked before the instance is rolled back.
  • LockByDiskQuota: The instance is automatically locked after the storage space is exhausted.
  • Released: The instance is released.
Unlock
EngineVersionstring

The database engine version of the instance.

  • 6.0
  • 5.0
  • 4.4
  • 4.2
  • 4.0
4.4
MaxIOPSinteger

The maximum IOPS of the instance.

1000
MaxMBPSinteger

The maximum MBPS of the instance.

350
VPCCloudInstanceIdsstring

The instance ID.

Note This parameter is returned if the network type of the instance is VPC.
dds-bp11483712c1****
MongosListarray<object>

The details of the mongos node.

Note This parameter is returned if the instance is a sharded cluster instance.
MongosAttributeobject

The details of the mongos node.

Note This parameter is returned if the instance is a sharded cluster instance.
VpcCloudInstanceIdstring

The ID of the mongos node.

s-bp1d8c262a158****
LockModestring

The lock status of the instance. Valid values:

  • Unlock: The instance is not locked.
  • ManualLock: The instance is manually locked.
  • LockByExpiration: The instance is automatically locked due to instance expiration.
  • LockByRestoration: The instance is automatically locked before a rollback.
  • LockByDiskQuota: The instance is automatically locked because its storage capacity is exhausted and the instance is inaccessible.
Unlock
MaxIOPSinteger

The maximum IOPS of the mongos node.

800
VSwitchIdstring

The vSwitch ID of the instance.

Note This parameter is returned if the network type of the instance is VPC.
vsw-bp1vj604nj5a9zz74****
NodeClassstring

The instance type of the mongos node.

dds.mongos.mid
MaxConnectionsinteger

The maximum number of connections to the mongos node.

1000
Portinteger

The port number that is used to connect to the mongos node.

3717
VPCIdstring

The VPC ID of the instance.

Note This parameter is returned if the network type of the instance is VPC.
vpc-bp1n3i15v90el48nx****
ConnectStingstring

The endpoint of the mongos node.

s-bp1d8c262a15****.mongodb.rds.aliyuncs.com
NodeDescriptionstring

The name of the mongos node.

mongos1
NodeIdstring

The ID of the mongos node.

s-bp1d8c262a15****
Statusstring

The status of the mongos node. For more information, see Instance states.

Running
CurrentKernelVersionstring

The minor version of the current MongoDB kernel.

mongodb_20220518_4.0.21
ProtocolTypestring

The access protocol type of the instance. Valid values:

  • mongodb
  • dynamodb
Note This parameter is returned if the instance is a sharded cluster instance.
mongodb
DBInstanceDescriptionstring

The name of the instance.

Test database
CurrentKernelVersionstring

The minor version of the current database in the instance.

5.0.5-20220721143518_0
DBInstanceReleaseProtectionboolean

Indicates whether release protection is enabled for the instance. Valid values:

  • true
  • false
false
ExpireTimestring

The time when the subscription instance expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

Note This parameter is returned if the instance is a subscription instance.
2022-02-05T16:00Z
MaintainStartTimestring

The start time of the maintenance window. The time follows the ISO 8601 standard in the HH:mmZ format. The time is displayed in UTC.

18:00Z
DBInstanceTypestring

The architecture of the instance. Valid values:

  • replicate: replica set instance
  • sharding: sharded cluster instance
replicate
LastDowngradeTimestring

The date when the last downgrade operation was performed on the instance.

2022-01-08
ShardListarray<object>

The details of the shard node.

Note This parameter is returned if the instance is a sharded cluster instance.
ShardAttributeobject

The details of the shard node.

Note This parameter is returned if the instance is a sharded cluster instance.
LockModestring

The lock status of the shard node. Valid values:

  • Unlock: The instance is not locked.
  • ManualLock: The instance is manually locked.
  • LockByExpiration: The instance is automatically locked due to instance expiration.
  • LockByRestoration: The instance is automatically locked before a rollback.
  • LockByDiskQuota: The instance is automatically locked because its storage capacity is exhausted and the instance is inaccessible.
Unlock
MaxIOPSinteger

The maximum IOPS of the shard node.

8000
ConnectStringstring

The endpoint of the shard node.

d-bp1af0680a9c6d3****.mongodb.rds.aliyuncs.com:****
NodeClassstring

The instance type of the shard node.

dds.shard.mid
MaxConnectionsinteger

The maximum number of connections to the shard node.

8000
Portinteger

The port number that is used to connect to the shard node.

3717
NodeDescriptionstring

The name of the shard node.

testshard
NodeIdstring

The ID of the shard node.

d-bp16e09d9c5d****
NodeStorageinteger

The storage capacity of the shard node. Unit: GB.

10
ReadonlyReplicasinteger

The number of read-only nodes in the shard node. Valid values: 0 to 5. The value must be an integer.

0
Statusstring

The status of the shard node. For more information, see Instance states.

Running
MaxDiskMbpsstring

The maximum MBPS of the shard node.

350
CurrentKernelVersionstring

The minor version of the current MongoDB kernel.

mongodb_20230613_4.0.25
MaintainEndTimestring

The end time of the maintenance window. The time follows the ISO 8601 standard in the HH:mmZ format. The time is displayed in UTC.

03:00Z
DBInstanceStatusstring

The status of the instance. For more information, see Instance states.

Running
VPCIdstring

The VPC ID of the instance.

Note This parameter is returned if the network type of the instance is VPC.
vpc-bp1n3i15v90el48nx****
RegionIdstring

The region ID of the instance.

cn-hangzhou
DBInstanceStorageinteger

The storage capacity of the instance.

10
ReplicaSetNamestring

The name of the replica set instance.

Note This parameter is returned if the instance is a replica set instance.
mgset-10ace****
VSwitchIdstring

The vSwitch ID of the instance.

Note This parameter is returned if the network type of the instance is VPC.
vsw-bp1oo2a7isyrb8igf****
StorageEnginestring

The storage engine of the instance.

WiredTiger
ConfigserverListarray<object>

The details of the ConfigServer node.

Note This parameter is returned if the instance is a sharded cluster instance.
ConfigserverAttributeobject

The details of the ConfigServer node.

Note This parameter is returned if the instance is a sharded cluster instance.
MaxIOPSinteger

The maximum IOPS of the Configserver node.

1000
LockModestring

The lock status of the Configserver node. Valid values:

  • Unlock: The instance is not locked.
  • ManualLock: The instance is manually locked.
  • LockByExpiration: The instance is automatically locked due to instance expiration.
  • LockByRestoration: The instance is automatically locked before a rollback.
  • LockByDiskQuota: The instance is automatically locked because its storage capacity is exhausted and the instance is inaccessible.
Unlock
ConnectStringstring

The endpoint of the Configserver node.

dds-bp18b0934e7053e4-cs****.mongodb.rds.aliyuncs.com
NodeClassstring

The instance type of the Configserver node.

dds.cs.mid
MaxConnectionsinteger

The maximum number of connections to the Configserver node.

1000
Portinteger

The port number that is used to connect to the Configserver node.

3717
NodeDescriptionstring

The name of the Configserver node.

testConfigserver
NodeIdstring

The ID of the Configserver node.

dds-bp11483712c1****-cs
NodeStorageinteger

The storage capacity of the Configserver node. Unit: GB.

20
Statusstring

The status of the Configserver node. For more information, see Instance states.

Running
CurrentKernelVersionstring

The minor version of the current MongoDB kernel.

mongodb_20230613_4.0.25
ResourceGroupIdstring

The ID of the resource group to which the instance belongs.

Note This parameter is returned only if you use the China site (aliyun.com).
rg-acfmyiu4ekp****
ZoneIdstring

The ID of the zone in which the instance resides.

cn-hangzhou-b
MaxConnectionsinteger

The maximum number of connections to the instance.

500
DBInstanceIdstring

The instance ID.

dds-bp11483712c1****
DBInstanceClassstring

The instance type of the instance.

dds.mongo.mid
Enginestring

The database engine of the instance.

MongoDB
ReadonlyReplicasstring

The number of read-only nodes in the instance.

1
ReplicationFactorstring

The number of nodes in the instance.

Note This parameter is returned if the instance is a replica set instance.
3
KindCodestring

The kind code of the instance. Valid values:

  • 0: physical machine
  • 1: Elastic Compute Service (ECS) instance
  • 2: Docker cluster
  • 18: Kubernetes cluster
1
CapacityUnitstring

The read and write throughput consumed by the instance.

100
ChargeTypestring

The billing method of the instance. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
PostPaid
StorageTypestring

The storage type of the instance. Valid values:

cloud_essd1: ESSD PL1 cloud_essd2: ESSD PL2 cloud_essd3: ESSD PL3 local_ssd: local SSD cloud_essd_dbfs_s: DBFS disk

cloud_essd1
DestroyTimestring

The time when the instance data was destroyed. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-12-10T16:00:00Z
DBInstanceOrderStatusstring

The status of the orders generated for the instance. Valid values:

  • all_completed: All orders are being produced or complete.
  • order_unpaid: The instance has unpaid orders.
  • order_wait_for_produce: Orders are being delivered for production.
Note The order production process includes the following steps: place an order, pay for an order, deliver an order for production, produce an order, and complete the production.
  • If an order is in the order_wait_for_produce state for a long time, an error occurs when the order is being delivered for production. The system will automatically retry.
  • The instance status changes only when the order is in the producing and complete state, such as changing configurations and running.
all_completed
Encryptedboolean

Indicates whether disk encryption is enabled.

true
EncryptionKeystring

The Key Management Service (KMS) key used for disk encryption.

07609cc3-3109-408f-a35e-c548e776da0b
SyncPercentstring

The progress of data synchronization in percentage. When you are changing the configurations of the instance, you must synchronize the data of the instance. You can obtain the data synchronization progress based on the value returned for this parameter.

0.8
UseClusterBackupboolean

Indicates whether the cluster backup mode is enabled. Valid values:

  • true: The cluster backup mode is enabled.
  • false: The cluster backup mode is disabled.
true
BurstingEnabledboolean

Indicates whether performance burst is enabled for the ESSD AutoPL disk.

true
ProvisionedIopslong

The provisioned performance of the ESSD AutoPL disk.

1960

Examples

Sample success responses

JSONformat

{
  "RequestId": "A935A8EE-A6CC-53DE-98BA-20ABAA7E632B",
  "DBInstances": {
    "DBInstance": [
      {
        "CreationTime": "2022-01-02T07:43:59Z",
        "ReplicaSets": {
          "ReplicaSet": [
            {
              "VSwitchId": "vpc-bp1jk5vwkcri27qme****",
              "ConnectionPort": "3717",
              "ReplicaSetRole": "Primary",
              "ConnectionDomain": "dds-bp11483712c1****.mongodb.rds.aliyuncs.com",
              "VPCCloudInstanceId": "dds-bp11483712c1****",
              "NetworkType": "VPC",
              "VPCId": "vpc-bp1jk5vwkcri27qme****"
            }
          ]
        },
        "ReplacateId": "bls-m****",
        "Tags": {
          "Tag": [
            {
              "Key": "test",
              "Value": "api"
            }
          ]
        },
        "VpcAuthMode": "Open",
        "NetworkType": "VPC",
        "LockMode": "Unlock",
        "EngineVersion": "4.4",
        "MaxIOPS": 1000,
        "MaxMBPS": 350,
        "VPCCloudInstanceIds": "dds-bp11483712c1****",
        "MongosList": {
          "MongosAttribute": [
            {
              "VpcCloudInstanceId": "s-bp1d8c262a158****",
              "LockMode": "Unlock",
              "MaxIOPS": 800,
              "VSwitchId": "vsw-bp1vj604nj5a9zz74****",
              "NodeClass": "dds.mongos.mid",
              "MaxConnections": 1000,
              "Port": 3717,
              "VPCId": "vpc-bp1n3i15v90el48nx****",
              "ConnectSting": "s-bp1d8c262a15****.mongodb.rds.aliyuncs.com",
              "NodeDescription": "mongos1",
              "NodeId": "s-bp1d8c262a15****",
              "Status": "Running",
              "CurrentKernelVersion": "mongodb_20220518_4.0.21"
            }
          ]
        },
        "ProtocolType": "mongodb",
        "DBInstanceDescription": "Test database\n",
        "CurrentKernelVersion": "5.0.5-20220721143518_0",
        "DBInstanceReleaseProtection": false,
        "ExpireTime": "2022-02-05T16:00Z",
        "MaintainStartTime": "18:00Z",
        "DBInstanceType": "replicate",
        "LastDowngradeTime": "2022-01-08",
        "ShardList": {
          "ShardAttribute": [
            {
              "LockMode": "Unlock",
              "MaxIOPS": 8000,
              "ConnectString": "d-bp1af0680a9c6d3****.mongodb.rds.aliyuncs.com:****",
              "NodeClass": "dds.shard.mid",
              "MaxConnections": 8000,
              "Port": 3717,
              "NodeDescription": "testshard",
              "NodeId": "d-bp16e09d9c5d****",
              "NodeStorage": 10,
              "ReadonlyReplicas": 0,
              "Status": "Running",
              "MaxDiskMbps": "350",
              "CurrentKernelVersion": "mongodb_20230613_4.0.25"
            }
          ]
        },
        "MaintainEndTime": "03:00Z",
        "DBInstanceStatus": "Running",
        "VPCId": "vpc-bp1n3i15v90el48nx****",
        "RegionId": "cn-hangzhou",
        "DBInstanceStorage": 10,
        "ReplicaSetName": "mgset-10ace****",
        "VSwitchId": "vsw-bp1oo2a7isyrb8igf****",
        "StorageEngine": "WiredTiger",
        "ConfigserverList": {
          "ConfigserverAttribute": [
            {
              "MaxIOPS": 1000,
              "LockMode": "Unlock",
              "ConnectString": "dds-bp18b0934e7053e4-cs****.mongodb.rds.aliyuncs.com",
              "NodeClass": "dds.cs.mid",
              "MaxConnections": 1000,
              "Port": 3717,
              "NodeDescription": "testConfigserver",
              "NodeId": "dds-bp11483712c1****-cs",
              "NodeStorage": 20,
              "Status": "Running",
              "CurrentKernelVersion": "mongodb_20230613_4.0.25"
            }
          ]
        },
        "ResourceGroupId": "rg-acfmyiu4ekp****",
        "ZoneId": "cn-hangzhou-b",
        "MaxConnections": 500,
        "DBInstanceId": "dds-bp11483712c1****",
        "DBInstanceClass": "dds.mongo.mid",
        "Engine": "MongoDB",
        "ReadonlyReplicas": "1",
        "ReplicationFactor": "3",
        "KindCode": "1",
        "CapacityUnit": "100",
        "ChargeType": "PostPaid",
        "StorageType": "cloud_essd1",
        "SecondaryZoneId": "cn-hangzhou-i",
        "HiddenZoneId": "cn-hangzhou-h",
        "DestroyTime": "2021-12-10T16:00:00Z",
        "DBInstanceOrderStatus": "all_completed",
        "Encrypted": true,
        "EncryptionKey": "07609cc3-3109-408f-a35e-c548e776da0b",
        "SyncPercent": "0.8",
        "UseClusterBackup": true,
        "BurstingEnabled": true,
        "ProvisionedIops": 1960
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
400VpcCloudInstanceIdNumErrorGet vpcCloudInstanceId number error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-22The Error code has changed. The response structure of the API has changedView Change Details
2024-08-13The Error code has changed. The response structure of the API has changedView Change Details
2024-08-12The Error code has changed. The response structure of the API has changedView Change Details
2024-01-04The Error code has changed. The response structure of the API has changedView Change Details
2023-09-27The Error code has changed. The response structure of the API has changedView Change Details
2023-08-24The Error code has changed. The response structure of the API has changedView Change Details
2023-07-12The Error code has changed. The response structure of the API has changedView Change Details
2023-06-05The Error code has changed. The response structure of the API has changedView Change Details