def InquirePriceCreateDBInstances(self, request): """本接口用于创建数据库实例询价。本接口参数中必须传入region参数,否则无法通过校验。本接口仅允许针对购买限制范围内的实例配置进行询价。 :param request: Request instance for InquirePriceCreateDBInstances. :type request: :class:`tencentcloud.mongodb.v20190725.models.InquirePriceCreateDBInstancesRequest` :rtype: :class:`tencentcloud.mongodb.v20190725.models.InquirePriceCreateDBInstancesResponse` """ try: params = request._serialize() body = self.call("InquirePriceCreateDBInstances", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.InquirePriceCreateDBInstancesResponse() 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)
def InquirePriceCreateDBInstances(self, request): """This API is used to query price of instance creation. The `region` parameter must be passed in this API, otherwise verification will fail. This API allows queries only for purchasable instance specifications. :param request: Request instance for InquirePriceCreateDBInstances. :type request: :class:`tencentcloud.mongodb.v20190725.models.InquirePriceCreateDBInstancesRequest` :rtype: :class:`tencentcloud.mongodb.v20190725.models.InquirePriceCreateDBInstancesResponse` """ try: params = request._serialize() body = self.call("InquirePriceCreateDBInstances", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.InquirePriceCreateDBInstancesResponse() 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)