aliyun / aliyun/aliyun-openapi-python-sdk
Can't override default region for DescribeDBInstancesRequest
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 578
- PR merge metrics
- No merged PRs in 30d
Description
- Python Version: 3.11
- aliyunsdkcore Version: 2.13.36
- API: aliyunsdkrds.request.v20140815.DescribeDBInstancesRequest
When calling DescribeDBInstancesRequest through the CLI, I can override the default region by using the flag --RegionId. The same behaviour is not observed when using the python sdk.
I have already fixed this problem on my end by implement a get_RegionId and a set_RegionId to the DescribeDBInstancesRequest class, similar to the existing set_ZoneId and get_ZoneId, like so:
def get_RegionId(self): # String
return self.get_query_params().get('RegionId')
def set_RegionId(self, RegionId): # String
self.add_query_param('RegionId', RegionId)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Find the aliyunsdkrds.request.v20140815.DescribeDBInstancesRequest class and compare its request-parameter accessors with the existing ZoneId accessors. Reproduce the Python SDK call using RegionId, then verify that the region override is included in the request and does not change existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100