调用QueryInstanceGaapCost查询实例的月费用分摊,需要使用主账号的AK查询财务数据。每月初4号中午12:00后可拉取上月全量GAAP账单,此时间前拉取GAAP账单可能不全。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

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

系统规定参数。取值:QueryInstanceGaapCost

PageNum Integer 1

页码,默认值为1。

PageSize Integer 20

每页数量,默认值:20,最大值:100。

BillingCycle String 2020-03

账单日期,YYYY-MM。

ProductCode String rds

产品代码。

ProductType String rds

产品类型。

SubscriptionType String PayAsYouGo

订阅类型。取值:

  • Subscription:预付费。
  • PayAsYouGo:后付费。

返回数据

名称 类型 示例值 描述
Code String Success

状态码。

Message String Successful!

错误信息。

RequestId String CCBB1BB9-22F1-4177-867B-7A75D665B488

请求数据。

Success Boolean true

是否成功。

Data Object

返回数据。

PageNum Integer 1

页码。

PageSize Integer 20

每页显示条数。

TotalCount Integer 20

总记录数。

HostId String 1.1.1.1

主机ID。

Modules Array of Module

费用信息。

Module
GaapDeductedByCashCoupons String 0

已分摊代金券抵扣。

SubscriptionType String PayAsYouGo

订阅类型。取值:

  • Subscription:预付费。
  • PayAsYouGo:后付费。
MonthGaapPretaxAmount String 0

本月分摊优惠后金额。

DeductedByCoupons String 0

优惠券抵扣。

SubOrderId String 12434345

子订单号。

Region String cn-hangzhou

地域。

OrderType String New

订单类型:

  • New(新购)。
  • Renewal(续费)。
  • Upgrade(升级)。
  • Degrade(降级)。
MonthGaapDeductedByPrepaidCard String 0

本月分摊储值卡抵扣。

UnallocatedDeductedByCashCoupons String 0

未分摊代金券抵扣。

PretaxAmountLocal String 0

本币币种已分摊优惠后金额(国际)。

BillingCycle String 2020-03

账期YYYY-MM。

PayerAccount String 23534534

付款人账户。

MonthGaapPretaxAmountLocal String 0.99

本币币种对应的本月分摊优惠后金额(国际)。

AccountingUnit String

财务核算单元。为预留字段,暂不支持。

GaapPretaxAmountLocal String 0

本币币种已分摊优惠后金额。

UnallocatedDeductedByPrepaidCard String 0

未分摊储值卡抵扣。

ProductType String rds

产品类型。

PaymentAmount String 0

现金。

MonthGaapPretaxGrossAmount String 0.99

本月分摊原始金额。

BillType String SubscriptionOrder

账单类型:

  • SubscriptionOrder (预付订单)。
  • PayAsYouGoBill (后付账单)。
  • Refund (退款)。
  • Adjustment (调账)。
PayTime String 2018-06-15 15:59:57

支付时间。

PretaxGrossAmount String 123

原始金额。

OrderId String 213123213123

订单号。

UnallocatedPricingDiscount String 0

未分摊询价优惠。

MonthGaapDeductedByCashCoupons String 0.75

本月分摊代金券抵扣。

UnallocatedPretaxGrossAmount String 0

未分摊原始金额。

InstanceID String OSSBAG-cn-0xl0xxxxxx

实例ID。

Tag String tag

标签。

Currency String CNY

币种。取值:

  • CNY。
  • USD。
  • JPY。
GaapDeductedByCoupons String 0

已分摊优惠券抵扣。

DeductedByCashCoupons String 0

代金券抵扣。

GaapDeductedByPrepaidCard String 0

已分摊储值卡抵扣。

GaapPaymentAmount String 0

已分摊现金。

UnallocatedPretaxAmountLocal String 0

本币币种未分摊优惠后金额。

MonthGaapPricingDiscount String 0,.25

本月分摊询价优惠。

PricingDiscount String 1

询价优惠。

GaapPricingDiscount String 0

已分摊询价优惠。

ResourceGroup String 默认资源组

资源组。

UnallocatedDeductedByCoupons String 0

未分摊优惠券抵扣。

PretaxAmount String 0

优惠后金额。

UnallocatedPretaxAmount String 0

未分摊优惠后金额。

GaapPretaxGrossAmount String 0

已分摊原始金额。

UnallocatedPaymentAmount String 0

未分摊现金。

PaymentCurrency String CNY

支付币种(国际)。

OwnerID String 123213123123

所有者ID。

DeductedByPrepaidCard String 0

储值卡抵扣。

GaapPretaxAmount String 0

已分摊优惠后金额。

MonthGaapDeductedByCoupons String 0

本月分摊优惠券抵扣。

MonthGaapPaymentAmount String 0

本月分摊现金。

UsageEndDate String 2019-05-01 00:00:00

服务结束时间。

UsageStartDate String 2019-04-01 00:00:00

服务起始时间。

ProductCode String rds

产品代码。

示例

请求示例

http(s)://[Endpoint]/?Action=QueryInstanceGaapCost
&BillingCycle=2020-03
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<QueryInstanceGaapCostResponse>
    <Data>
        <TotalCount>2</TotalCount>
        <Modules>
            <Module>
                <PayerAccount>null</PayerAccount>
                <GaapDeductedByCashCoupons>0</GaapDeductedByCashCoupons>
                <PricingDiscount>0</PricingDiscount>
                <MonthGaapPretaxAmount>0.74</MonthGaapPretaxAmount>
                <MonthGaapDeductedByCoupons>0</MonthGaapDeductedByCoupons>
                <PretaxAmount>0</PretaxAmount>
                <UnallocatedPaymentAmount>0</UnallocatedPaymentAmount>
                <UnallocatedPretaxGrossAmount>0</UnallocatedPretaxGrossAmount>
                <UnallocatedPretaxAmount>0</UnallocatedPretaxAmount>
                <UnallocatedPricingDiscount>0</UnallocatedPricingDiscount>
                <PayTime>2018-06-15 14:06:53</PayTime>
                <PaymentCurrency>CNY</PaymentCurrency>
                <ProductType>ossbag</ProductType>
                <UnallocatedDeductedByCoupons>0</UnallocatedDeductedByCoupons>
                <OrderType>Renewal</OrderType>
                <UnallocatedPretaxAmountLocal>0</UnallocatedPretaxAmountLocal>
                <PretaxGrossAmount>0</PretaxGrossAmount>
                <Currency>CNY</Currency>
                <GaapPretaxAmountLocal>0</GaapPretaxAmountLocal>
                <GaapPaymentAmount>0</GaapPaymentAmount>
                <SubscriptionType>Subscription</SubscriptionType>
                <BillingCycle>2019-04</BillingCycle>
                <ProductCode>flowpack</ProductCode>
                <InstanceID>OSSBAG-cn-0xl0njdtx002</InstanceID>
                <PretaxAmountLocal>0</PretaxAmountLocal>
                <GaapDeductedByCoupons>0</GaapDeductedByCoupons>
                <GaapPretaxAmount>0</GaapPretaxAmount>
                <OrderId>202143356070333</OrderId>
                <GaapDeductedByPrepaidCard>0</GaapDeductedByPrepaidCard>
                <DeductedByPrepaidCard>0</DeductedByPrepaidCard>
                <GaapPretaxGrossAmount>0</GaapPretaxGrossAmount>
                <SubOrderId>202143356070333</SubOrderId>
                <MonthGaapPaymentAmount>0</MonthGaapPaymentAmount>
                <DeductedByCoupons>0</DeductedByCoupons>
                <UsageEndDate>2019-05-01 00:00:00</UsageEndDate>
                <UnallocatedDeductedByPrepaidCard>0</UnallocatedDeductedByPrepaidCard>
                <MonthGaapDeductedByPrepaidCard>0</MonthGaapDeductedByPrepaidCard>
                <UsageStartDate>2019-04-01 00:00:00</UsageStartDate>
                <MonthGaapPretaxGrossAmount>0.99</MonthGaapPretaxGrossAmount>
                <PaymentAmount>0</PaymentAmount>
                <MonthGaapPricingDiscount>0.25</MonthGaapPricingDiscount>
                <DeductedByCashCoupons>0</DeductedByCashCoupons>
                <OwnerID>1028728862215453</OwnerID>
                <MonthGaapDeductedByCashCoupons>0.74</MonthGaapDeductedByCashCoupons>
                <UnallocatedDeductedByCashCoupons>0</UnallocatedDeductedByCashCoupons>
                <MonthGaapPretaxAmountLocal>0.74</MonthGaapPretaxAmountLocal>
                <GaapPricingDiscount>0</GaapPricingDiscount>
                <BillType>SubscriptionOrder</BillType>
            </Module>
        </Modules>
        <PageSize>20</PageSize>
        <HostId>cn</HostId>
        <PageNum>1</PageNum>
    </Data>
    <Message>Successful!</Message>
    <RequestId>AEAA504C-FCCA-4FB9-9E05-162CABC6EB40</RequestId>
    <Success>true</Success>
    <Code>Success</Code>
</QueryInstanceGaapCostResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Data" : {
    "TotalCount" : 2,
    "Modules" : {
      "Module" : {
        "PayerAccount" : "null",
        "GaapDeductedByCashCoupons" : 0,
        "PricingDiscount" : 0,
        "MonthGaapPretaxAmount" : 0.74,
        "MonthGaapDeductedByCoupons" : 0,
        "PretaxAmount" : 0,
        "UnallocatedPaymentAmount" : 0,
        "UnallocatedPretaxGrossAmount" : 0,
        "UnallocatedPretaxAmount" : 0,
        "UnallocatedPricingDiscount" : 0,
        "PayTime" : "2018-06-15 14:06:53",
        "PaymentCurrency" : "CNY",
        "ProductType" : "ossbag",
        "UnallocatedDeductedByCoupons" : 0,
        "OrderType" : "Renewal",
        "UnallocatedPretaxAmountLocal" : 0,
        "PretaxGrossAmount" : 0,
        "Currency" : "CNY",
        "GaapPretaxAmountLocal" : 0,
        "GaapPaymentAmount" : 0,
        "SubscriptionType" : "Subscription",
        "BillingCycle" : "2019-04",
        "ProductCode" : "flowpack",
        "InstanceID" : "OSSBAG-cn-0xl0njdtx002",
        "PretaxAmountLocal" : 0,
        "GaapDeductedByCoupons" : 0,
        "GaapPretaxAmount" : 0,
        "OrderId" : 202143356070333,
        "GaapDeductedByPrepaidCard" : 0,
        "DeductedByPrepaidCard" : 0,
        "GaapPretaxGrossAmount" : 0,
        "SubOrderId" : 202143356070333,
        "MonthGaapPaymentAmount" : 0,
        "DeductedByCoupons" : 0,
        "UsageEndDate" : "2019-05-01 00:00:00",
        "UnallocatedDeductedByPrepaidCard" : 0,
        "MonthGaapDeductedByPrepaidCard" : 0,
        "UsageStartDate" : "2019-04-01 00:00:00",
        "MonthGaapPretaxGrossAmount" : 0.99,
        "PaymentAmount" : 0,
        "MonthGaapPricingDiscount" : 0.25,
        "DeductedByCashCoupons" : 0,
        "OwnerID" : 1028728862215453,
        "MonthGaapDeductedByCashCoupons" : 0.74,
        "UnallocatedDeductedByCashCoupons" : 0,
        "MonthGaapPretaxAmountLocal" : 0.74,
        "GaapPricingDiscount" : 0,
        "BillType" : "SubscriptionOrder"
      }
    },
    "PageSize" : 20,
    "HostId" : "cn",
    "PageNum" : 1
  },
  "Message" : "Successful!",
  "RequestId" : "AEAA504C-FCCA-4FB9-9E05-162CABC6EB40",
  "Success" : true,
  "Code" : "Success"
}

错误码

访问错误中心查看更多错误码。