GetResourcePackagePrice

Overview

You can call this operation to query the price of a user’s resource package.

Request parameters

NameTypeRequiredDescription
ProductCodeStringYesThe type of the specified product. The value is the same as the value of productType returned by DescribeResourcePackageProduct.
packageTypeStringYesThe type of the specified resource package. The value is the same as the value of the Code value of the ResourcePackage object returned by DescribeResourcePackageProduct.
specificationStringYesThe sizes of the specified resource package. The value is the same as the value of Specification returned by DescribeResourcePackageProduct.
durationIntegerYesThe validity of the specified resource package. The value is the same as the validity of Specification.
PricingCycleStringNoThe validity of the resource package. Default value: Month. Valid values: Month, Year
effectiveDateStringNoThe effective date of the resource package. The resource package will take effect immediately if the effective date is unspecified. The date format follows the ISO8601 standard and uses UTC time. Format:
OrderTypeStringNoThe type of the specified order.Default value:BUY.Valid values: BUY: new order, RENEW: renewal order, UPGRADE: upgrade order.
InstanceIdStringNoThe ID of the specified instance. This parameter is required in an upgrade order to obtain the earlier configurations before the upgrade.

yyyy-MM-ddTHH:mm:ssZ|

Response parameters

NameTypeDescription
CurrencyStringThe currency used for payment.
OriginalPriceFloatThe original price. Unit: RMB.
TradePriceFloatThe trade price. Unit: RMB.
DiscountPriceFloatThe discount price. Unit: RMB.
PromotionsPromotionThe details of promotions. For more information, see Data dictionary 8.5.6

Error codes

Error codeDescriptionHTTP status codeDescription
NotApplicableThis API is not applicable for caller.400The error message returned when you are not authorized to use the API.
MissingParameterThe specified parameter xx is mandatory for this request.400The error message returned when the xx parameter is not specified.
InvalidParameterThe specified parameter xx is not valid.400The error message returned when the xx parameter is invalid.
InvalidModuleCodeThe specified moduleCode is not valid.400The error message returned when the specified moduleCode parameter is invalid.
InvalidConfigCodeThe specified configCode is not valid.400The error message returned when the specified configCode parameter is invalid.
InvalidOwnerThe specified owner doesn’t belong to caller.400The error message returned when the specified owner does not belong to the caller.
InvalidCallerThe specified caller doesn’t exists.400The error message returned when the caller is invalid.
InternalErrorThe request processing has failed due to some unknown error, exception or failure.400The error message returned when an unknown internal error occurs.
ProductNotFindCan not find inquired product, it may not exist.400The error message returned when the specified product is invalid.

Sample requests

https://business.ap-southeast-1.aliyuncs.com/?Action=GetResourcePackagePrice
&ProductCode=flowpack
&PackageType=FPT_generalnetwork_deadlineAcc_overseas_intl
&Duration=1
&PricingCycle=Month

Sample responses

"Data": {
    "DiscountPrice": 0,
    "Promotions": {
      "Promotion": []
    },
    "OriginalPrice": 33,
    "TradePrice": 33,
    "Currency": "USD"
  },