All Products
Search
Document Center

Elastic Container Instance:DescribeContainerGroupPrice

Last Updated:Mar 10, 2023

Queries the price of an elastic container instance.

Operation Description

This operation does not support resource group authentication.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the instance resides. You can call the DescribeRegions operation to query the most recent region and zone list.

cn-hangzhou
CpufloatYes

The number of vCPUs.

2.0
MemoryfloatYes

The size of the memory. Unit: GiB.

4.0
InstanceTypestringNo

The instance type of the Elastic Compute Service (ECS) instance used to create the elastic container instance. For more information about ECS instance types that can be used to create elastic container instances, see Instance types.

ecs.c5.large
SpotStrategystringNo

The bidding policy for the elastic container instance. Valid values:

  • NoSpot: The instance is a regular pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is a preemptible instance with a user-defined maximum hourly price.
  • SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is automatically used as the bid price.

Default value: NoSpot.

SpotWithPriceLimit
ZoneIdstringNo

The zone ID of the instance. You can call the DescribeRegions operation to query the most recent region and zone list.

cn-hangzhou-g
SpotPriceLimitfloatNo

The maximum hourly price of the preemptible elastic container instance. The value can contain up to three decimal places. If you set the SpotStrategy parameter to SpotWithPriceLimit, you must specify the SpotPriceLimit parameter.

0.2
EphemeralStorageintegerNo

The storage size of the temporary storage space. Unit: GiB.

20

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

7A872585-33C7-4D69-AB8E-412E81EBA387
PriceInfoobject

The information about the price and discount rule.

SpotPricesarray

The details about the price of the preemptible elastic container instance.

object
ZoneIdstring

The zone ID of the instance.

cn-hangzhou-i
SpotPricefloat

The price of the preemptible elastic container instance.

0.056
InstanceTypestring

The instance type of the ECS instance.

ecs.c5.large
OriginPricefloat

The original price.

0.622
Priceobject

The price.

DiscountPricefloat

The discount.

0
TradePricefloat

The transaction price, which is equal to the original price minus the discount.

0.00012252
OriginalPricefloat

The original price.

0.00012252
DetailInfosarray

The details about the price.

object
Resourcestring

The name of the resource.

cpu
DiscountPricefloat

The discount.

0
TradePricefloat

The transaction price.

0.000098
OriginalPricefloat

The original price.

0.000098
Rulesarray

Details about the pricing rules.

object
Descriptionstring

The description of the promotion rule.

RuleIdlong

The ID of the promotion rule.

123456
Currencystring

The currency unit. Valid values:

  • CNY: The value is available only on the China site (aliyun.com).
  • USD: The value is available only on the international site (alibabacloud.com).
CNY
Rulesarray

Details about the promotion rules.

object
Descriptionstring

The description of the promotion rule.

RuleIdlong

The ID of the promotion rule.

123456

Examples

Sample success responses

JSONformat

{
  "RequestId": "7A872585-33C7-4D69-AB8E-412E81EBA387",
  "PriceInfo": {
    "SpotPrices": {
      "SpotPrice": [
        {
          "ZoneId": "cn-hangzhou-i",
          "SpotPrice": 0.056,
          "InstanceType": "ecs.c5.large",
          "OriginPrice": 0.622
        }
      ]
    },
    "Price": {
      "DiscountPrice": 0,
      "TradePrice": 0.00012252,
      "OriginalPrice": 0.00012252,
      "DetailInfos": {
        "DetailInfo": [
          {
            "Resource": "cpu",
            "DiscountPrice": 0,
            "TradePrice": 0.000098,
            "OriginalPrice": 0.000098,
            "Rules": {
              "Rule": [
                {
                  "Description": "",
                  "RuleId": 123456
                }
              ]
            }
          }
        ]
      },
      "Currency": "CNY"
    },
    "Rules": {
      "Rule": [
        {
          "Description": "",
          "RuleId": 123456
        }
      ]
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParam.CpuOrMemorySpecThe specified specification is invalid.The specified specification is invalid.
400TradeBidCommodityNotMatchThe trade ID and the commodity do not match.-
400InvalidSpotCpuMemorySpecThe specified CPU and memory are not allowed. You must create spot ECI using standard ECS specifications for CPU and memory.-
403Spot.NotMatched%s. We recommend that you use the create multi-zone function to avoid insufficient inventory. For more information, see https://help.aliyun.com/document_detail/157290.html-

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