该接口用于查询RDS实例的价格信息。
接口说明
适用引擎
- RDS MySQL
- RDS PostgreSQL
- RDS SQL Server
- RDS MariaDB
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
ClientToken | string | 否 | 用于保证请求的幂等性,防止重复提交请求。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过64个ASCII字符,且该参数值中不能包含非ASCII字符。 | ETnLKlblzczshOTUbOCz**** |
CommodityCode | string | 否 | 当前实例的商品码,取值:
说明查询只读实例时必须传入本参数。 | rds |
RegionId | string | 是 | 地域ID。可调用DescribeRegions获取。 | cn-hangzhou |
Engine | string | 是 | 数据库类型,取值:
| MySQL |
EngineVersion | string | 是 | 数据库版本,取值:
| 8.0 |
DBInstanceClass | string | 是 | 实例规格,详情请参见主实例规格表。 | mysql.x2.medium.xc |
DBInstanceStorage | integer | 是 | 实例存储空间,单位:GB。每5 GB进行递增,取值范围请参见实例规格表。 | 20 |
PayType | string | 否 | 实例的付费类型,取值:
| Prepaid |
ZoneId | string | 否 | 主节点可用区ID。可调用DescribeRegions获取。 说明指定了VPC和交换机时,为匹配交换机对应的可用区,该参数必填。 | cn-hangzhou-b |
UsedTime | integer | 否 | 指定购买时长,取值:
默认值:1。 | 1 |
TimeType | string | 否 | 包年包月的付费类型,当CommodityCode参数的值为RDS、rds_rordspre_public_cn、rds_intl或rds_rordspre_public_intl时必传。取值:
| Year |
Quantity | integer | 是 | 购买实例的数量,取值范围:0~30。 | 10 |
InstanceUsedType | integer | 否 | 实例类型,取值:
| 0 |
OrderType | string | 否 | 订单类型,取值:
| BUY |
DBInstanceStorageType | string | 否 | 实例存储类型,取值:
| local_ssd |
DBInstanceId | string | 否 | 变配或续费的实例ID。 说明 | rm-**** |
DBNode | object [] | 否 | 节点相关信息。 说明该参数用于MySQL集群版实例。 | |
ClassCode | string | 否 | 节点规格。 | mysql.x2.medium.xc |
ZoneId | string | 否 | 节点可用区ID。 | cn-hangzhou-j |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "CA0ADDDC-0BEB-4381-A3ED-73B4C79B8CC6",
"PriceInfo": {
"OriginalPrice": 10508,
"DiscountPrice": 0,
"Currency": "CNY",
"TradePrice": 10508,
"Coupons": {
"Coupon": [
{
"IsSelected": "true",
"CouponNo": "123456",
"Name": "test",
"Description": "test"
}
]
},
"RuleIds": {
"RuleId": [
"1001199213"
]
},
"ActivityInfo": {
"CheckErrMsg": "Error description",
"ErrorCode": " 123456",
"Success": "Success"
}
},
"Rules": {
"Rule": [
{
"Name": "Rule1",
"Description": "Activity Description",
"RuleId": 1020021003939076
}
]
},
"ShowDiscount": true
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | DBInstanceStorageFormatFault | DBInstanceStorageFormatFault | - |
400 | InvalidDBInstanceStorage.Format | InvalidDBInstanceStorage.Format | 实例存储大小不符合要求,请检查。 |
400 | DBNodeParameter.InvalidClassCode | The ClassCode of the item of the specified parameter DBNode is inconsistent. | 参数DBNode中的ClassCode配置不一致。 |
400 | DBNodeParameter.Required | The specified parameter DBNode is required. | 参数DBNode是必需的。 |
400 | DBNodeParameter.TooFewItems | The specified parameter DBNode has too few items. | 参数DBNode中的配置项过少。 |
400 | DBNodeParameter.TooManyItems | The specified parameter DBNode has too many items. | 参数DBNode中的配置项过多。 |
403 | CASH.BOOK.INSUFFICIENT | No payment method is specified for your account. We recommend that you add a payment method or maitain a minimum prepayment balance of INR 1000. | 帐户没有指定付款方式. |
404 | InvalidTimeType.NotFound | The parameter timeType does not exist. | 请检查 TimeType 参数。可选值为 Year、Month、Day |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-05-24 | OpenAPI 错误码发生变更,OpenAPI 返回结构发生变更 | |||||||||||
| ||||||||||||
2023-05-12 | OpenAPI 错误码发生变更 | |||||||||||
|