You need to enable JavaScript to run this app.
导航

DescribeDBInstancePriceDifference

最近更新时间2023.12.14 10:51:50

首次发布时间2023.11.15 22:39:52

调用 DescribeDBInstancePriceDifference 接口查询实例差价。

请求类型

同步请求。

请求参数

名称类型是否必选示例值描述

InstanceId

String

postgres-5aeb3f0b****

实例 ID。

说明

当 ModifyType 取值为 Temporary 时,通过 InstanceId 指定的实例只能为预付费(包年包月)实例。

NodeInfo

Array of NodeInfoObject

请参见请求示例。

实例规格配置。Primary 节点有且只有1个,Secondary 节点有且只有 1 个,Read-Only 节点可选 0-10 个。关于 NodeInfo 的更多详情,请参见数据结构

说明

当 ModifyType 取值为 Temporary 时,需要指定 NodeId。

StorageTypeStringLocalSSD实例存储类型。取固定值 LocalSSD(本地 SSD 盘)。

StorageSpace

Integer

100

实例存储空间。取值范围:[20, 3000],单位为 GB,步长为 10GB。默认值:100。

说明

当 ModifyType 取值为 Temporary 时,该字段必选,且取值只能为实例当前的存储空间大小。

ChargeInfo

ChargeInfoObject

{
"ChargeType": "PostPaid"
}

付费信息。关于 ChargeInfo 的更多详情,请参见数据结构

说明

当 ModifyType 取值为 Temporary 时,ChargeType 取值只能为 PrePaid

ModifyType

String

Temporary

变配方式。取值为:

  • Usually:常规变配,即立即变配。默认值。
  • Temporary:弹性升配,即临时升配。

RollbackTime

String

2023-12-16T03:59:10.000Z

还原时间,时间格式为 yyyy-MM-ddTHH:mm:ss.sssZ(UTC 时间)。

说明

  • 当 ModifyType 取值为 Temporary 时生效。
  • 设置的还原时间的时间点与调用接口的时间点相差应不超过 2 分钟,实际的还原时间的时间点以调用接口的时间点为准。
  • 可多次发起临时升配延长临时升配期,但总时长不能超过 30 天(以第一次发起临时升配的时间为准)。
  • 可多次发起临时升配,但不允许缩短临时升配期。如实例已处于临时升配期:
    • 新的还原时间不能早于已生效的还原时间。
    • 距离包年包月实例的到期时间不足五天时,不允许再次发起临时升配。

返回参数

名称类型示例值描述
CurrencyString人民币货币单位。默认为人民币。
OriginalPriceDouble-17.5实例原价。
DiscountPriceDouble-17.5实例折扣价。
PayablePriceDouble-17.5实例应付价格。
ChargeItemPricesArray of ChargeItemPriceObject请参见返回示例费用明细。关于 ChargeItemPrices 的详细信息,请参见数据结构

请求示例

  • 查询为实例进行常规变配的价格差异

    POST /?Action=DescribeDBInstancePriceDifference&Version=2022-01-01 HTTP/1.1
    Content-Type: application/json
    Host: rds.volcengineapi.com
    X-Date: 20231002T101010Z
    Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
    {
            "InstanceId": "postgres-5aeb3f0b****",
            "NodeInfo": [{
                    "NodeSpec": "rds.postgres.1c2g",
                    "NodeType": "Primary"
            }, {
                    "NodeSpec": "rds.postgres.1c2g",
                    "NodeType": "Secondary"
            }],
            "StorageType": "LocalSSD",
            "StorageSpace": 100,
            "ChargeInfo": {
                    "ChargeType": "PrePaid"
            }
    }
    
  • 查询为实例进行临时升配的价格差异(升级节点规格)

    POST /?Action=DescribeDBInstancePriceDifference&Version=2022-01-01 HTTP/1.1
    Content-Type: application/json
    Host: rds.volcengineapi.com
    X-Date: 20231002T101010Z
    Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
    {
        "InstanceId": "postgres-3461581d****",
        "NodeInfo": [{
                    "NodeId":"postgres-3461581d****",
                    "NodeSpec": "rds.postgres.2c4g",
                    "NodeType": "Primary"
            }, {
                    "NodeId":"postgres-3461581d****-wjrh",
                    "NodeSpec": "rds.postgres.2c4g",
                    "NodeType": "Secondary"
            }, {
                    "NodeId":"postgres-3461581d****-ro6bf6",
                    "NodeSpec": "rds.postgres.2c4g",
                    "NodeType": "ReadOnly"
            }],
            "ChargeInfo": {
                    "ChargeType": "PrePaid"
            },
            "StorageType": "LocalSSD",
            "StorageSpace": 20,
            "ModifyType":"Temporary",
            "RollbackTime":"2023-12-16T03:49:10.000Z"
    }
    

返回示例

正常返回示例

{
    "ResponseMetadata": {
        "RequestId": "202306192156254A900086CBECA123D60F",
        "Action": "DescribeDBInstancePriceDifference",
        "Version": "2022-01-01",
        "Service": "rds_postgresql",
        "Region": "cn-beijing"
    },
    "Result": {
        "ChargeItemPrices": [
            {
                "ChargeItemKey": "rds.pg.d1.1c2g",
                "ChargeItemType": "Primary",
                "ChargeItemValue": 1,
                "DiscountPrice": 120.345,
                "OriginalPrice": 120.345,
                "PayablePrice": 120.345
            },
            {
                "ChargeItemKey": "rds.pg.d1.1c2g",
                "ChargeItemType": "Secondary",
                "ChargeItemValue": 1,
                "DiscountPrice": 120.345,
                "OriginalPrice": 120.345,
                "PayablePrice": 120.345
            },
            {
                "ChargeItemKey": "rds.pg.d1.localssd",
                "ChargeItemType": "Storage",
                "ChargeItemValue": 100,
                "DiscountPrice": 0.05368034,
                "NodeNumPerInstance": 2,
                "OriginalPrice": 0.25,
                "PayablePrice": 0.05368034
            }
        ],
        "Currency": "人民币",
        "DiscountPrice": -17.5,
        "OriginalPrice": -17.5,
        "PayablePrice": -17.5
    }
}