All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeShardingNetworkAddress

Last Updated:Mar 15, 2024

Queries connection information about an ApsaraDB for MongoDB sharded cluster instance.

Operation description

This operation is applicable only to sharded cluster instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:DescribeShardingNetworkAddressREAD
  • DBInstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

dds-bpxxxxxxxx
NodeIdstringNo

The ID of the mongos, shard, or Configserver node in the sharded cluster instance.

Note You can call the DescribeDBInstanceAttribute operation to view the ID of the mongos, shard, or Configserver node.
d-bpxxxxxxxx

Response parameters

ParameterTypeDescriptionExample
object
CompatibleConnectionsobject []

The endpoints of DynamoDB-compatible instances.

VswitchIdstring

The ID of the vSwitch in the Virtual Private Cloud (VPC).

Note This parameter is returned when the network type is VPC.
vsw-bpxxxxxxxx
ExpiredTimestring

The remaining duration of the classic network endpoint. Unit: seconds.

2591963
NetworkTypestring

The network type of the instance.

  • VPC: virtual private cloud
  • Classic: classic network
  • Public: the Internet
VPC
Portstring

The port that is used to connect to the instance.

3717
NetworkAddressstring

The endpoint of the instance.

dds-bpxxxxxxxxxxxxxx.mongodb.rds.aliyuncs.com
VPCIdstring

The VPC ID of the instance.

Note This parameter is returned when the network type is VPC.
vpc-bpxxxxxxxx
IPAddressstring

The IP address of the instance.

10.140.xxx.xx
RequestIdstring

The request ID.

18D8AAFD-6BEB-420F-8164-810CB0C0AA39
NetworkAddressesobject []

The endpoints of ApsaraDB for MongoDB instances.

NodeTypestring

The type of the node. Valid values:

  • mongos: mongos node
  • shard: shard node
  • configserver: Configserver node
mongos
VswitchIdstring

The ID of the vSwitch in the VPC.

Note This parameter is returned when the network type is VPC.
vsw-bpxxxxxxxx
ExpiredTimestring

The remaining duration of the classic network endpoint. Unit: seconds.

2591963
NetworkTypestring

The network type of the instance.

  • VPC: virtual private cloud
  • Classic: classic network
  • Public: the Internet
VPC
Rolestring

The role of the node. Valid values:

  • Primary
  • Secondary
Primary
Portstring

The port that is used to connect to the instance.

3717
VPCIdstring

The VPC ID of the instance.

Note This parameter is returned when the network type is VPC.
vpc-bpxxxxxxxx
NetworkAddressstring

The connection string of the instance.

s-bpxxxxxxxx.mongodb.rds.aliyuncs.com
NodeIdstring

The ID of the mongos node.

s-bpxxxxxxxx
IPAddressstring

The IP address of the instance.

10.140.xxx.xx

Examples

Sample success responses

JSONformat

{
  "CompatibleConnections": {
    "CompatibleConnection": [
      {
        "VswitchId": "vsw-bpxxxxxxxx",
        "ExpiredTime": "2591963",
        "NetworkType": "VPC",
        "Port": "3717",
        "NetworkAddress": "dds-bpxxxxxxxxxxxxxx.mongodb.rds.aliyuncs.com",
        "VPCId": "vpc-bpxxxxxxxx",
        "IPAddress": "10.140.xxx.xx"
      }
    ]
  },
  "RequestId": "18D8AAFD-6BEB-420F-8164-810CB0C0AA39",
  "NetworkAddresses": {
    "NetworkAddress": [
      {
        "NodeType": "mongos",
        "VswitchId": "vsw-bpxxxxxxxx",
        "ExpiredTime": "2591963",
        "NetworkType": "VPC",
        "Role": "Primary",
        "Port": "3717",
        "VPCId": "vpc-bpxxxxxxxx",
        "NetworkAddress": "s-bpxxxxxxxx.mongodb.rds.aliyuncs.com",
        "NodeId": "s-bpxxxxxxxx",
        "IPAddress": "10.140.xxx.xx"
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history