Problem description
The error message returned when you query the RDS instance information because the corresponding endpoint is not used during RAM user query. The following code snippet is displayed.
Cause
When you use a RAM user to query information about an RDS instance, the endpoint corresponding to the RAM user is not modified.
Solution
Take note of the following items:
- Before you perform high-risk operations such as modifying the configurations or data of an ApsaraDB for MongoDB instance, we recommend that you check the disaster recovery and fault tolerance capabilities of the instance to ensure data security.
- Before you modify the specifications or data of an Alibaba Cloud instance, such as an Elastic Compute Service (ECS) instance or an ApsaraDB RDS instance, we recommend that you create snapshots or enable backups for the instance. For example, you can enable log backups for an ApsaraDB RDS instance.
- If you have granted specific users the permissions on sensitive information, such as usernames and passwords, or submitted sensitive information in the Alibaba Cloud Management Console, we recommend that you modify the sensitive information at the earliest opportunity.
Endpoint is the API server address of an Alibaba Cloud service. Each service may have different endpoints in different regions. For example, the endpoint of RDS in the China (Hangzhou) region is rds-cn-hangzhou.aliyuncs.com, while the endpoint in the Japan (Tokyo) region is rds.ap-northeast-1.aliyuncs.com. Alibaba Cloud SDK has a built-in endpoint addressing module. When you call the SDK to initiate a request for a service, the SDK automatically finds the endpoint based on the region ID and product ID that you specified when you created the SDK Client. For more information, see User guide of the original SDK.
Edit the code and change the serverURL value to the endpoint of the corresponding region, as shown in the following example.
rds-cn-hangzhou.aliyuncs.com
Ideal For
- ApsaraDB RDS