GetPrice

Updated at:

Queries the prices of resources.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /api/v1/providers/{provider}/products/{product}/price/* HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

requestPath

string

No

The request path. Format: /api/v1/providers/{provider}/products/{product}/price/{resourceType}

Variables in the request path:

provider: the cloud provider. Currently, only Aliyun is supported.

product: the product code.

resourceType: the resource type. For example, for a Redis account, the resourceType is DBInstance/Account.

The following resources support price inquiry:

Redis DBInstance: /api/v1/providers/aliyun/products/Redis/price/DBInstance

ECS Instance: /api/v1/providers/aliyun/products/ECS/price/Instance

RDS DBInstance: /api/v1/providers/aliyun/products/RDS/price/DBInstance

SLB LoadBalancer: /api/v1/providers/aliyun/products/SLB/price/LoadBalancer

ClickHouse DBCluster: /api/v1/providers/aliyun/products/ClickHouse/price/DBCluster

AliKafka Instance: /api/v1/providers/aliyun/products/AliKafka/price/Instance.

Valid values:

  • /api/v1/providers/aliyun/products/Redis/price/DBInstance :

    Redis DBInstance

  • /api/v1/providers/aliyun/products/AliKafka/price/Instance :

    AliKafka Instance

  • /api/v1/providers/aliyun/products/ECS/price/Instance :

    ECS Instance

  • /api/v1/providers/aliyun/products/ClickHouse/price/DBCluster :

    ClickHouse DBCluster

  • /api/v1/providers/aliyun/products/RDS/price/DBInstance :

    RDS DBInstance

  • /api/v1/providers/aliyun/products/SLB/price/LoadBalancer :

    SLB LoadBalancer

/api/v1/providers/aliyun/products/SLB/price/LoadBalancer

Request parameters

Parameter

Type

Required

Description

Example

regionId

string

No

The region ID. This parameter is required if the cloud service is region-specific.

cn-beijing

resourceAttributes

object

No

The pricing attributes in JSON format.

{ "LoadBalancerName": "cc-test", "LoadBalancerSpec": "slb.s3.small", "InternetChargeType": "paybybandwidth", "AddressType": "internet", "PaymentType": "PayAsYouGo", "Bandwidth": 6 }

Response elements

Element

Type

Description

Example

object

The response schema.

price

object

The price.

currency

string

The currency. Valid values:

  • CNY: Chinese yuan

  • USD: US dollar

  • JPY: Japanese yen

Valid values:

  • JPY :

    JPY

  • USD :

    USD

  • CNY :

    CNY

CNY

discountPrice

number

The discount.

0.0

moduleDetails

array<object>

The price details of the billing modules.

object

The price details of the billing modules.

costAfterDiscount

number

The discounted price.

0.02

invoiceDiscount

number

The discount.

0.0

moduleCode

string

The code of the billing module.

InstanceRent

moduleName

string

The name of the billing module.

InstanceRent

originalCost

number

The original price.

1000.0

priceType

string

The price type.

1.0

originalPrice

number

The original price.

760.0

promotionDetails

array<object>

The promotion details.

object

The promotion details.

promotionDesc

string

The promotion description.

37284

promotionId

integer

The promotion ID.

15% off data disks

promotionName

string

The promotion name.

15% off data disks

tradePrice

number

The discounted price.

0.0

requestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Examples

Success response

JSON format

{
  "price": {
    "currency": "CNY",
    "discountPrice": 0,
    "moduleDetails": [
      {
        "costAfterDiscount": 0.02,
        "invoiceDiscount": 0,
        "moduleCode": "InstanceRent",
        "moduleName": "InstanceRent",
        "originalCost": 1000,
        "priceType": "1.0"
      }
    ],
    "originalPrice": 760,
    "promotionDetails": [
      {
        "promotionDesc": "37284",
        "promotionId": 0,
        "promotionName": "15% off on data cloud disks"
      }
    ],
    "tradePrice": 0
  },
  "requestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.