{"id":23237,"library":"aliyun-python-sdk-rds","title":"Aliyun RDS SDK for Python","description":"Aliyun RDS SDK for Python is the official Alibaba Cloud SDK module for managing ApsaraDB RDS (Relational Database Service). Current version is 2.7.53, released monthly or as needed. It provides APIs to create, configure, and monitor RDS instances, including MySQL, SQL Server, PostgreSQL, and MariaDB.","status":"active","version":"2.7.53","language":"python","source_language":"en","source_url":"https://github.com/aliyun/aliyun-openapi-python-sdk/tree/master/aliyun-python-sdk-rds","tags":["aliyun","alibaba-cloud","rds","sdk","database"],"install":[{"cmd":"pip install aliyun-python-sdk-rds","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Core SDK dependency providing the base client and authentication.","package":"aliyun-python-sdk-core","optional":false}],"imports":[{"note":"The correct import path uses the versioned subpackage aliyunsdkrds.request.v20140815.","wrong":"","symbol":"Rds","correct":"from aliyunsdkrds.request.v20140815 import DescribeDBInstancesRequest"},{"note":"The client is from aliyunsdkcore, not aliyunsdkrds.","wrong":"from aliyunsdkrds.client import RdsClient","symbol":"RdsClient","correct":"from aliyunsdkcore.client import AcsClient"}],"quickstart":{"code":"from aliyunsdkcore.client import AcsClient\nfrom aliyunsdkrds.request.v20140815 import DescribeDBInstancesRequest\nimport json\n\n# Use environment variables or hardcode for testing (not production)\nclient = AcsClient(\n    os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_ID', 'your-access-key-id'),\n    os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_SECRET', 'your-access-key-secret'),\n    'cn-hangzhou'\n)\nrequest = DescribeDBInstancesRequest.DescribeDBInstancesRequest()\nresponse = client.do_action_with_exception(request)\nprint(json.loads(response))","lang":"python","description":"List all RDS instances in the 'cn-hangzhou' region."},"warnings":[{"fix":"Use 'from aliyunsdkrds.request.v20140815 import ...' instead.","message":"The old import from 'aliyun.api' or 'rds' module is deprecated. Use versioned requests from aliyunsdkrds.request.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Use Python 3.6+ and install the latest aliyun-python-sdk-core.","message":"The SDK requires Python 2.7+ or Python 3.4+ but Python 2 support was dropped in later core versions. For Python 3, ensure aliyun-python-sdk-core>=2.13.0.","severity":"breaking","affected_versions":">=2.3.0"},{"fix":"Always provide a valid region ID, e.g., 'cn-hangzhou'.","message":"Region ID must be specified when creating AcsClient; default region not set. Missing region leads to 'RequestId: ...' errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Instantiate request with no args, then call set_* methods like .set_DBInstanceId('xxx').","message":"Request classes are not instantiated with parameters; you must use set_* methods. Common mistake: passing parameters to constructor.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install with 'pip install aliyun-python-sdk-rds'.","cause":"Package not installed or environment path issue.","error":"ModuleNotFoundError: No module named 'aliyunsdkrds'"},{"fix":"Ensure aliyun-python-sdk-rds >= 2.0.0, import as 'from aliyunsdkrds.request.v20140815 import ...'","cause":"Incorrect import path or package version too old.","error":"AttributeError: module 'aliyunsdkrds.request' has no attribute 'v20140815'"},{"fix":"Provide a valid region ID like 'cn-hangzhou'.","cause":"Invalid or missing region ID in AcsClient.","error":"aliyunsdkcore.exception.ServerException: HTTP Status: 400 Error: InvalidRegionId.RegionId"},{"fix":"Use 'response = client.do_action_with_exception(request)'.","cause":"Calling client() instead of client.do_action_with_exception().","error":"TypeError: 'AcsClient' object is not callable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}