Creates a database link.
A database link can be used to connect two PolarDB for PostgreSQL(Compatible with Oracle) clusters, or connect a PolarDB for PostgreSQL(Compatible with Oracle) cluster to a user-created PostgreSQL database that is hosted on an Elastic Compute Service (ECS) instance. You can use database links to query data across clusters.
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 Resourcesis 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.
The ID of the resource group.
The ID of the source cluster that the database link connects.
Note You can call the DescribeDBClusters operation to query PolarDB clusters.
The name of the database link.
The ID of the destination cluster that the database link connects.
The account of the destination database.
Note You can call the DescribeAccounts operation to query the account of a PolarDB cluster.
The account password of the destination database.
The name of the destination database.
The name of the source database.
The IP address of the user-created Oracle database on an ECS instance.
The port number of the user-created Oracle database on an ECS instance.
The ID of the virtual private cloud (VPC).
Note You can call the DescribeVpcs operation to query information about VPCs.
The ID of the region.
Note You can call the DescribeRegions operation to query information about regions.
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. The token is case-sensitive.
Sample success responses
|HTTP status code
|The DBClusterId provided does not exist in our records.
|The specified DBClusterId parameter does not exist in the current record.
For a list of error codes, visit the Service error codes.
|Summary of changes
|The error codes of the API operation change.