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

## Overview

Check the list of available resource packs for purchase.






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `DescribeUFileAvailablePkg`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.sigcalcloud.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](/docs/api/summary/regionlist) |No|
| **Zone** | string | Availability Zones. See [List of Availability Zones](/docs/api/summary/regionlist) |No|
| **ProjectId** | string | Project ID. Leaving this field blank will default to the project ID. This is required for sub-accounts. Please refer to the [GetProjectList API](/docs/api/summary/get_project_list) |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **PkgList** | array[[*AvailablePkg*](#availablepkg)] | Available resource pack specifications |**Yes**|

#### Data Model


#### AvailablePkg

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Type** | int | Resource Type ID |No|
| **Name** | string | Resource Type Name |No|
| **Specs** | array[[*AvailablePkgSpecs*](#availablepkgspecs)] | Supported Purchase Quantity Specifications |No|
| **CommonDurations** | array[[*AvailablePkgDurations*](#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 Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Durations** | array[[*AvailablePkgDurations*](#availablepkgdurations)] | Durations effective only for the current specifications |**Yes**|
| **Amount** | int | Purchase Quantity |No|
| **Unit** | string | Units of quantity, such as: GB, TB |No|

#### AvailablePkgDurations

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Discount** | float | Discount |**Yes**|
| **Duration** | int | Purchasing Duration |No|
| **Unit** | string | Duration unit, such as: Month, Year |No|

## Example

### Request Example
    
```
https://api.sigcalcloud.com/?Action=DescribeUFileAvailablePkg
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=yTrzqOsP
```

### Response Example
    
```json
{
  "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
}
```





