Skip to Content
Object-based Storage(US3)DescribeUFileAvailablePkg

Check the list of available resource packs for purchase. - DescribeUFileAvailablePkg

Overview

Check the list of available resource packs for purchase.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeUFileAvailablePkg.Yes
PublicKeystringThe user’s public key can be obtained from Console Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesNo
ZonestringAvailability Zones. See List of Availability ZonesNo
ProjectIdstringProject ID. Leaving this field blank will default to the project ID. This is required for sub-accounts. Please refer to the GetProjectList APINo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
PkgListarray[AvailablePkg]Available resource pack specificationsYes

Data Model

AvailablePkg

Field NameTypeDescription InformationRequired
TypeintResource Type IDNo
NamestringResource Type NameNo
Specsarray[AvailablePkgSpecs]Supported Purchase Quantity SpecificationsNo
CommonDurationsarray[AvailablePkgDurations]The duration of public support for purchases, when a Spec is configured with independent Durations, it will take effect according to the independent configuration of Durations; otherwise, it will take effect according to CommonDurations.No

AvailablePkgSpecs

Field NameTypeDescription InformationRequired
Durationsarray[AvailablePkgDurations]Durations effective only for the current specificationsYes
AmountintPurchase QuantityNo
UnitstringUnits of quantity, such as: GB, TBNo

AvailablePkgDurations

Field NameTypeDescription InformationRequired
DiscountfloatDiscountYes
DurationintPurchasing DurationNo
UnitstringDuration unit, such as: Month, YearNo

Example

Request Example

https://api.dezai.com/?Action=DescribeUFileAvailablePkg &Region=cn-zj &Zone=cn-zj-01 &ProjectId=yTrzqOsP

Response Example

{ "Action": "DescribeUFileAvailablePkgResponse", "PkgList": [ { "CommonDurations": [ { "Duration": 1, "Unit": "Month" }, { "Duration": 2, "Unit": "Month" }, { "Duration": 3, "Unit": "Month" }, { "Duration": 4, "Unit": "Month" }, { "Duration": 6, "Unit": "Month" }, { "Duration": 12, "Unit": "Month" }, { "Duration": 24, "Unit": "Month" } ], "Name": "StandardStorage", "Specs": [ { "Amount": 40, "Durations": [ { "Duration": 6, "Unit": "Month" }, { "Duration": 12, "Unit": "Month" }, { "Duration": 24, "Unit": "Month" } ], "Unit": "GB" }, { "Amount": 100, "Unit": "GB" }, { "Amount": 500, "Unit": "GB" }, { "Amount": 1, "Unit": "TB" } ], "Type": 0 } ], "RetCode": 0 }