def DescribeRegions(self, request): """本接口 (DescribeRegions) 用于查询售卖地域信息。 :param request: 调用DescribeRegions所需参数的结构体。 :type request: :class:`tencentcloud.postgres.v20170312.models.DescribeRegionsRequest` :rtype: :class:`tencentcloud.postgres.v20170312.models.DescribeRegionsResponse` """ try: params = request._serialize() body = self.call("DescribeRegions", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.DescribeRegionsResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise e else: raise TencentCloudSDKException(e.message, e.message)
def DescribeRegions(self, request): """This API is used to query the purchasable regions. :param request: Request instance for DescribeRegions. :type request: :class:`tencentcloud.postgres.v20170312.models.DescribeRegionsRequest` :rtype: :class:`tencentcloud.postgres.v20170312.models.DescribeRegionsResponse` """ try: params = request._serialize() body = self.call("DescribeRegions", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.DescribeRegionsResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)