All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeShardingNetworkAddress

Last Updated:Jun 10, 2026

Mengambil informasi koneksi untuk instans kluster sharded MongoDB.

Deskripsi operasi

This API is for sharded cluster instances only.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

dds:DescribeShardingNetworkAddress

get

*Instance

acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DBInstanceId

string

Yes

ID instans.

dds-bpxxxxxxxx

NodeId

string

No

ID node Mongos (Proxy Layanan), shard, atau Configserver dalam instans kluster sharded.

Catatan

Anda dapat memanggil operasi DescribeDBInstanceAttribute untuk mengkueri ID node Mongos (Proxy Layanan), shard, dan Configserver.

d-bpxxxxxxxx

NetworkType

string

No

Jenis jaringan. Nilai valid:

  • VPC: virtual private cloud.

  • Classic: jaringan klasik.

  • Public: jaringan publik.

VPC

Elemen respons

Element

Type

Description

Example

object

CompatibleConnections

object

CompatibleConnection

array<object>

Connection details for instances compatible with the DynamoDB protocol.

object

VswitchId

string

The ID of the vSwitch in the VPC.

Catatan

This parameter is returned when the network type is VPC.

vsw-bpxxxxxxxx

ExpiredTime

string

The remaining validity period of the classic network endpoint, in seconds.

2591963

NetworkType

string

The network type.

  • VPC: VPC.

  • Classic: classic network.

  • Public: public network.

VPC

Port

string

The connection port.

3717

NetworkAddress

string

The endpoint.

dds-bpxxxxxxxxxxxxxx.mongodb.rds.aliyuncs.com

VPCId

string

The ID of the VPC.

Catatan

This parameter is returned when the network type is VPC.

vpc-bpxxxxxxxx

IPAddress

string

The IP address.

10.140.xxx.xx

RequestId

string

The request ID.

18D8AAFD-6BEB-420F-8164-810CB0C0AA39

NetworkAddresses

object

NetworkAddress

array<object>

Connection details for instances that use the MongoDB protocol.

object

NodeType

string

The node type. Valid values:

  • mongos: a Mongos node.

  • shard: a shard node.

  • configserver: a Configserver node.

mongos

VswitchId

string

The ID of the vSwitch in the VPC.

Catatan

This parameter is returned when the network type is VPC.

vsw-bpxxxxxxxx

ExpiredTime

string

The remaining validity period of the classic network endpoint, in seconds.

2591963

NetworkType

string

The network type.

  • VPC: VPC.

  • Classic: classic network.

  • Public: public network.

VPC

Role

string

The node role. Valid values:

  • Primary: the primary node.

  • Secondary: a secondary node.

Primary

Port

string

The connection port.

3717

VPCId

string

The ID of the VPC.

Catatan

This parameter is returned when the network type is VPC.

vpc-bpxxxxxxxx

NetworkAddress

string

The endpoint string.

s-bpxxxxxxxx.mongodb.rds.aliyuncs.com

NodeId

string

The ID of the Mongos node.

s-bpxxxxxxxx

IPAddress

string

The IP address.

10.140.xxx.xx

ConnectionType

string

The type of the public endpoint. Valid values:

  • SRV

  • Normal

SRV

TxtRecord

string

The TXT record. It stores MongoDB metadata, such as version information and configuration parameters. You can use it with SRV records to implement features such as service discovery and configuration delivery.

mongo.example.com. IN TXT "config=replicaSet=myReplicaSet"

ConnectionStringSuffix

string

The suffix of the connection string.

.mongodb.rds.aliyuncs.com

Contoh

Respons sukses

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",
        "ConnectionType": "SRV",
        "TxtRecord": "mongo.example.com. IN TXT \"config=replicaSet=myReplicaSet\""
      }
    ]
  },
  "ConnectionStringSuffix": ".mongodb.rds.aliyuncs.com"
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.