All Products
Search
Document Center

ENS:DescribePrice

Last Updated:Jul 26, 2024

Queries the most recent price of an Edge Node Service (ENS) instance.

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
ens:DescribePriceget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceTypestringYes

The specifications of instances.

ens.sn1.tiny
EnsRegionIdstringYes

The ID of the ENS node.

cn-shanghai-unicom
PeriodintegerYes

The subscription duration of the instance.

  • If you leave the PeriodUnit parameter empty, the instance is purchased on a monthly basis. Valid values: Day and Month.
  • If you set PeriodUnit to Day, you can set Period only to 3.
  • If you set PeriodUnit to Month, you can set Period to a number from 1 to 9, or set Period to 12.
1
SystemDisk.SizeintegerYes

The size of the system disk. Unit: GB.

20
QuantityintegerYes

The number of instances.

1
DataDisk.1.SizeintegerNo

The size of the data disk. Unit: GB. If you specify this parameter, this parameter takes precedence over the Size property in DataDisks.

50
InternetChargeTypestringYes

The bandwidth metering method of the instance. Valid values:

  • BandwidthByDay: Pay by daily peak bandwidth
  • 95BandwidthByMonth: Pay by monthly 95th percentile bandwidth
  • PayByBandwidth4thMonth: Pay by monthly fourth peak bandwidth
  • PayByBandwidth: Pay by fixed bandwidth
95BandwidthByMonth
DataDisksarray<object>No

If you leave DataDisk.1.Size empty, the value that you specified for this parameter is used.

objectNo
CategorystringNo

The category of the disk.

cloud_efficiency
SizelongNo

The size of the data disk. Unit: GB.

50
PeriodUnitstringNo

The billing cycle of the ENS instance. Valid values:

  • Month (default):
  • Day
Month

Response parameters

ParameterTypeDescriptionExample
object
PriceInfoobject

The price information.

Priceobject

The price.

Currencystring

The type of currency.

  • USD: US dollar
  • JPY: Japanese Yen
USD
DiscountPricefloat

The discount.

1
OriginalPricefloat

The original price.

16125.00
TradePricefloat

The final price.

126.75
RequestIdstring

The ID of the request.

694EB8FF-446C-5B1E-8146-9629E492551F

Examples

Sample success responses

JSONformat

{
  "PriceInfo": {
    "Price": {
      "Currency": "USD",
      "DiscountPrice": 1,
      "OriginalPrice": 16125,
      "TradePrice": 126.75
    }
  },
  "RequestId": "694EB8FF-446C-5B1E-8146-9629E492551F"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterThe input parameter that is mandatory for processing this request is not supplied.-
400InstanceIdNotFoundThe input parameter instancdId that is not found.The specified instance ID does not exist.
400NoPermissionPermission denied.-
400InvalidParameterThe input parameter is Invalid.-
400StockNotEnoughThe specified configuration is unavailable. Reconfigure and try again.-
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-
400InvalidParameterThe errorMessage is %s. Please check it again.-
400StockNotEnoughThe specified EnsRegionId is unavailable. Reconfigure and try again.-
400StockNotEnoughThe specified InstanceSpec is unavailable. Reconfigure and try again.-
400CallInterfaceCall Interface Happen Error.An error occurred when you call the operation.

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

Change history

Change timeSummary of changesOperation
2023-12-26The Error code has changedView Change Details