Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't override default region for DescribeDBInstancesRequest #486

Open
juarezjsonar opened this issue May 16, 2023 · 0 comments
Open

Can't override default region for DescribeDBInstancesRequest #486

juarezjsonar opened this issue May 16, 2023 · 0 comments

Comments

@juarezjsonar
Copy link

juarezjsonar commented May 16, 2023

  • 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant