Elastic Compute Service (ECS) リソースの更新料金を照会します。サブスクリプションリソースのみがサポートされています。
操作説明
サブスクリプション ECS インスタンスを指定された期間で更新する料金、または統一有効期限日まで更新する料金のみがサポートされています。
- パラメーターを設定する際に、以下の点にご注意ください:
必須パラメーターのみを設定した場合、デフォルトでインスタンスを 1 か月更新する料金が返されます。
更新期間の料金と統一有効期限日の料金を同時にクエリすることはできません。更新期間パラメーター (
PeriodおよびPeriodUnit) と統一有効期限日パラメーター (ExpectedRenewDay) を同時に設定することはできません。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ecs:DescribeRenewalPrice |
get |
DedicatedHost
Instance
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
インスタンスのリージョン ID。 DescribeRegions を呼び出して、最新のリージョンリストをクエリできます。 |
cn-hangzhou |
| ResourceType |
string |
任意 |
更新料金をクエリするリソースのタイプ。有効な値: instance。 デフォルト値: instance。 |
instance |
| ResourceId |
string |
必須 |
更新料金をクエリするリソースの ID。 |
i-bp1f2o4ldh8l29zv**** |
| Period |
integer |
任意 |
更新期間。有効な値:
デフォルト値: 1。 説明
更新期間パラメーター ( |
1 |
| PriceUnit |
string |
任意 |
更新期間の単位。有効な値:
デフォルト値: Month。 |
Month |
| ExpectedRenewDay |
integer |
任意 |
統一有効期限日。このパラメーターを指定すると、インスタンスを統一有効期限日まで更新する料金が返されます。有効な値: 1~28。 統一有効期限日の特徴の詳細については、インスタンスの有効期限切れの設定項目 を参照してください。 説明
更新期間パラメーター ( |
5 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| PriceInfo |
object |
料金情報。料金および割引ルールの詳細を含みます。 |
|
| Rules |
object |
||
| Rule |
array<object> |
プロモーションルールオブジェクトの配列。 |
|
|
object |
|||
| Description |
string |
プロモーションルールの説明。 |
买满1年,立享官网价格8.5折优惠。 |
| RuleId |
integer |
プロモーション ID。 |
1234567890 |
| Price |
object |
料金。 |
|
| OriginalPrice |
number |
オリジナル価格。 |
4368 |
| DiscountPrice |
number |
割引額。 |
655.2 |
| Currency |
string |
通貨。 Alibaba Cloud 中国サイトでは CNY。 Alibaba Cloud 国際サイトでは USD。 |
CNY |
| TradePrice |
number |
最終価格。オリジナル価格から割引額を引いたものに等しいです。 |
3712.8 |
| DetailInfos |
object |
リソース固有の価格詳細のコレクション。 |
|
| DetailInfo |
array<object> |
各リソースの価格詳細を含むオブジェクトの配列。 |
|
|
array<object> |
|||
| Resource |
string |
価格設定されたリソースの名前。 |
instance |
| OriginalPrice |
number |
オリジナル価格。 |
4368 |
| DiscountPrice |
number |
割引額。 |
655.2 |
| TradePrice |
number |
最終価格。 |
3712.8 |
| SubRules |
object |
価格サブ-ルールのコレクション。 |
|
| Rule |
array<object> |
価格サブ-ルールオブジェクトの配列。 |
|
|
object |
|||
| Description |
string |
価格サブ-ルールの説明。 |
买满1年,立享官网价格8.5折优惠。 |
| RuleId |
integer |
価格サブ-ルールの ID。 |
1234567890 |
| RelatedPrice |
object |
||
| MarketplaceImagePrice |
object |
||
| Currency |
string |
CNY |
|
| OriginalPrice |
number |
200 |
|
| DiscountPrice |
number |
0 |
|
| TradePrice |
number |
200 |
例
成功レスポンス
JSONJSON
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"PriceInfo": {
"Rules": {
"Rule": [
{
"Description": "买满1年,立享官网价格8.5折优惠。",
"RuleId": 1234567890
}
]
},
"Price": {
"OriginalPrice": 4368,
"DiscountPrice": 655.2,
"Currency": "CNY",
"TradePrice": 3712.8,
"DetailInfos": {
"DetailInfo": [
{
"Resource": "instance",
"OriginalPrice": 4368,
"DiscountPrice": 655.2,
"TradePrice": 3712.8,
"SubRules": {
"Rule": [
{
"Description": "买满1年,立享官网价格8.5折优惠。",
"RuleId": 1234567890
}
]
}
}
]
}
},
"RelatedPrice": {
"MarketplaceImagePrice": {
"Currency": "CNY",
"OriginalPrice": 200,
"DiscountPrice": 0,
"TradePrice": 200
}
}
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidResourceType.ValueNotSupported | The specified parameter ResourceType is not valid. | |
| 400 | InvalidPeriod | The specified period is not valid. | |
| 400 | InvalidPriceUnit.ValueNotSupported | The specified parameter PriceUnit is not valid. | |
| 400 | Throttling | Request was denied due to request throttling. | |
| 400 | Throttling.User | Request was denied due to user flow control. | |
| 400 | InternalError | The request processing has failed due to some unknown error. | |
| 400 | InvalidPeriod.ExceededMaximumExpirationDate | The specified renewal period cannot exceed the maximum expiration date. We recommend you try shortening the renewal period at next attempt. | |
| 400 | InvalidExpectedRenewDay.Conflict | The specified expectedRenewDay is in conflict with period. | |
| 400 | InvalidExpectedRenewDay.ValueNotSupported | The specified parameter ExpectedRenewDay is not valid. | |
| 400 | InvalidPeriod.ExceededDedicatedHost | Instance expired date can not exceed dedicated host expired date. | |
| 400 | OperationRestricted.Renewal | The renewal operation has been restricted because the zone is closed. %s | |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 403 | ChargeTypeViolation | The operation is not permitted due to charge type of the instance. | |
| 403 | InvalidAction.Unauthorized | The specified action is not valid. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。