Queries the database links of a PolarDB for Oracle cluster.
Operation description
You can query only the database links that use a PolarDB for Oracle cluster as the source.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DescribeDBLinks |
get |
*dbcluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The ID of the cluster for which you want to query the database links. Note
You can call the DescribeDBClusters operation to query PolarDB clusters. |
pc-a************* |
| DBLinkName |
string |
No |
The name of the database link. If you leave this parameter empty, the system returns all the database links. |
dblink_test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
45D24263-7E3A-4140-9472-************ |
| DBLinkInfos |
array<object> |
Details about the database links. |
|
|
object |
|||
| DBInstanceName |
string |
The ID of the source cluster that the database link connects. |
pc-a************* |
| DBLinkName |
string |
The name of the database link. |
dblink_test |
| SourceDBName |
string |
The name of the source database of the database link. |
testdb1 |
| TargetDBName |
string |
The name of the destination database of the database link. |
testdb2 |
| TargetDBInstanceName |
string |
The ID of the destination cluster that the database link connects. Note
If the destination cluster is not a PolarDB for Oracle cluster, the returned value is empty. |
pc-b************ |
| TargetAccount |
string |
The account of the destination database of the database link. |
testacc |
| DBInstanceName |
string |
The ID of the cluster. |
pc-a************* |
Examples
Success response
JSON format
{
"RequestId": "45D24263-7E3A-4140-9472-************",
"DBLinkInfos": [
{
"DBInstanceName": "pc-a*************",
"DBLinkName": "dblink_test",
"SourceDBName": "testdb1",
"TargetDBName": "testdb2",
"TargetDBInstanceName": "pc-b************",
"TargetAccount": "testacc"
}
],
"DBInstanceName": "pc-a*************"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
| 404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.