All Products
Search
Document Center

:QueryServicePackAndPrice

Last Updated:Aug 08, 2025

Call the QueryServicePackAndPrice operation to query information about purchased service packs, the current pay-as-you-go billing status, and the total number of cores in a cluster.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ehpc:QueryServicePackAndPrice

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response parameters

Parameter

Type

Description

Example

object

OriginalAmount

integer

The total number of cores in all clusters in the region.

3191

RequestId

string

The request ID.

3B2E8108-7068-413E-BCA7-CAAB25D46408

DiscountPrice

number

The discounted hourly price for pay-as-you-go resources. Unit: CNY.

0.418

TradePrice

number

The final hourly price for pay-as-you-go resources. Unit: CNY.

2.922

OriginalPrice

number

The original hourly price for pay-as-you-go resources. Unit: CNY.

3.34

ChargeAmount

integer

The number of cores that are billed on a pay-as-you-go basis. This value is the total number of cores in the cluster minus the cores covered by service packs and free tiers.

167

Currency

string

The currency unit.

CNY

RegionId

string

The region ID.

cn-hangzhou

ServicePack

object

ServicePackInfo

array<object>

A list of E-HPC service packs.

object

A list of E-HPC service packs.

EndTime

integer

The expiration time of the service pack. The value is a UNIX timestamp, which is the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970.

1612705988

Capacity

integer

The specifications of the service pack. Unit: cores.

2000

StartTime

integer

The purchase time of the service pack. The value is a UNIX timestamp, which is the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970.

1610027588

InstanceName

string

The name of the service pack.

EHPCBAG-cn-78v12vbme0****

Examples

Success response

JSON format

{
  "OriginalAmount": 3191,
  "RequestId": "3B2E8108-7068-413E-BCA7-CAAB25D46408",
  "DiscountPrice": 0.418,
  "TradePrice": 2.922,
  "OriginalPrice": 3.34,
  "ChargeAmount": 167,
  "Currency": "CNY",
  "RegionId": "cn-hangzhou",
  "ServicePack": {
    "ServicePackInfo": [
      {
        "EndTime": 1612705988,
        "Capacity": 2000,
        "StartTime": 1610027588,
        "InstanceName": "EHPCBAG-cn-78v12vbme0****"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParams The specified parameter %s is invalid. The specified parameter %s is invalid.
500 UnknownError An unknown error occurred. An unknown error occurred.
503 ServiceUnavailable The request has failed due to a temporary failure of the server The request has failed due to a temporary failure of the server.
406 OrderError An order request error occurred. An order request error occurred.
406 EcsError An error occurred while calling the ECS API operation. ECS API call error. %s
406 DbError A database service error occurred. Database request failed.
406 AliyunError An Alibaba Cloud product error occurred. Alibaba Cloud product error. %s
407 NotAuthorized You are not authorized by RAM for this request. The request is not authorized by RAM.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.