All Products
Search
Document Center

BSS OpenAPI:QuerySkuPriceList

Last Updated:Mar 01, 2024

Queries the stock keeping units (SKUs) of a service. In most cases, a service has one or more SKUs. A service may even have tens of thousands of SKUs. You can call this operation to query the SKUs of a specific service and the prices of the SKUs. You can configure request parameters to query the specified SKUs based on the configurations of the SKUs.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
bss:DescribeProductRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
CommodityCodestringYes

The code of the service.

ecs
PriceEntityCodestringYes

The code of the pricing object.

instance_type
PageSizeintegerYes

The number of entries to be returned on each page. Maximum value: 50.

20
NextPageTokenstringNo

The token that is used to retrieve the next page. You do not need to set this parameter if you query coverage details for the first time. The response returns a token that you can use to query coverage details of the next page. If a null value is returned for the NextPageToken parameter, no more coverage details can be queried.

080112060a0422020800180022490a470342000000315333303332363436363336333433393636333136333338333733373333333133373336363336323634363336363337333836333636333636313336363433363332
PriceFactorConditionMapobjectNo

The conditions of the pricing factors.

arrayNo

The values of the pricing factors.

stringNo

The key-value pair of the pricing factor.

{"vm_region_no":"cn-shiwei-shenshu"}

Response parameters

ParameterTypeDescriptionExample
object

The schema of the response.

RequestIdstring

The ID of the request.

F5B803CF-94D8-43AF-ADB3-D819AAD30E27
Codestring

The HTTP status code.

Success
Messagestring

The message that is returned.

Successful!
Successboolean

Indicates whether the request is successful.

true
Dataobject

The data that is returned.

SkuPricePageobject

The SKUs of the pricing object.

TotalCountinteger

The total number of SKUs.

18732
NextPageTokenstring

The token that is used to query the next page.

080112060a0422020800180022490a470342000000315333303332363436363336333433393636333136333338333733373333333133373336363336323634363336363337333836333636333636313336363433363332
SkuPriceListobject []

The SKUs.

SkuCodestring

The code of the SKU.

017c15a31507bc6de22aa93777461adc
CskuPriceListobject []

The prices of the SKUs.

CskuCodestring

The unique code of the SKU price.

ac74dd7b52ae6389ddef099283fb8275
Currencystring

The currency.

Enumeration Value:
  • USD: .
  • CNY: .
CNY
UsageUnitstring

The usage unit.

Count
PriceTypestring

The pricing type.

Enumeration Value:
  • usagePrice: .
  • monthPrice: .
  • dayPrice: .
  • hourPrice: .
  • weekPrice: .
  • yearPrice: .
  • fixedPrice: .
hourPrice
PriceModestring

The pricing mode.

STEP_ARRIVE
Pricestring

The price.

Enumeration Value:
  • STEP_ACCUMULATION: .
  • STEP_ARRIVE: .
  • NORMAL_PRICE: .
100
PriceUnitstring

The unit of the price.

USD (per unit)
RangeListobject []

If the PriceMode parameter is set to STEP_ACCUMULATION or STEP_ARRIVE, the value of this field exists and specifies the range. If the PriceMode parameter is set to NORMAL_PRICE, the value of this field is null.

FactorCodestring

The code of the pricing factor.

212fbd27866307fc79ecf06934a88b2c
Minstring

The minimum value.

1
Maxstring

The maximum value.

10
Typestring

The closure type of the interval.

Enumeration Value:
  • LORC: .
  • LCRO: .
  • LCRC: .
  • LORL: .
LORC
SkuFactorMapobject

The values of the pricing factors.

string

The key-value pair of the pricing factor.

{"vm_region_no","cn-qingdao-nebula"}

Examples

Sample success responses

JSONformat

{
  "RequestId": "F5B803CF-94D8-43AF-ADB3-D819AAD30E27",
  "Code": "Success",
  "Message": "Successful!",
  "Success": true,
  "Data": {
    "SkuPricePage": {
      "TotalCount": 18732,
      "NextPageToken": "080112060a0422020800180022490a470342000000315333303332363436363336333433393636333136333338333733373333333133373336363336323634363336363337333836333636333636313336363433363332",
      "SkuPriceList": [
        {
          "SkuCode": "017c15a31507bc6de22aa93777461adc",
          "CskuPriceList": [
            {
              "CskuCode": "ac74dd7b52ae6389ddef099283fb8275",
              "Currency": "CNY",
              "UsageUnit": "Count\n",
              "PriceType": "hourPrice",
              "PriceMode": "STEP_ARRIVE",
              "Price": "100",
              "PriceUnit": "USD (per unit)\n",
              "RangeList": [
                {
                  "FactorCode": "212fbd27866307fc79ecf06934a88b2c",
                  "Min": "1",
                  "Max": "10",
                  "Type": "LORC"
                }
              ]
            }
          ],
          "SkuFactorMap": {
            "key": "{\"vm_region_no\",\"cn-qingdao-nebula\"}"
          }
        }
      ]
    }
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-04The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Lang