You need to enable JavaScript to run this app.
文档中心
消息队列 Kafka版

消息队列 Kafka版

复制全文
下载 pdf
OpenAPIV2
ModifyInstanceChargeType - 变更实例的计费类型
复制全文
下载 pdf
ModifyInstanceChargeType - 变更实例的计费类型
调用 ModifyInstanceChargeType 接口变更实例的计费类型。​
使用说明​
此接口用于变更实例的计费类型,目前仅支持按量计费实例转为包年包月实例。此操作对实例的运行不会有任何影响。​
说明​
  • Kafka 实例的状态为“运行中”。​
  • 按量计费转包年包月时,您需要结算此按量计费实例的账单,并预付包年包月的金额。请确保账户中余额充足。​
  • 目前仅支持按量计费转包年包月,操作前请确认实例的计费方式为“按量计费”。​
  • 接口调用成功后,计费类型的调整预计在 30 秒内生效,请耐心等待。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:ModifyInstanceChargeType​
要执行的操作,取值:ModifyInstanceChargeType。​
​
Version string 必选 示例值:2022-05-01​
API的版本,取值:2022-05-01。​
​
ChargeInfo object 必选 示例值:--​
变更后的计费类型。​
ChargeType string 必选 示例值:PrePaid​
实例的计费类型。支持的类型包括:​
  • PostPaid :按量付费​
  • PrePaid:包年包月​
说明​
目前仅支持按量付费实例转为包年包月实例。​
​
Period integer 可选 示例值:1​
包年包月类型实例的购买时长。默认为 1。​
  • PeriodUnit 指定为 Month 时,取值范围为 1~9。​
  • PeriodUnit 指定为 Year 时,取值范围为 1~3。​
  • 仅包年包月类型的实例需要指定,即 ChargeType 指定为 PrePaid 时必选。​
​
PeriodUnit string 可选 示例值:Month​
包年包月类型实例的生命周期单位,即指定以月或以年为单位购买。支持设置为:​
  • Month:包月​
  • Year:包年​
  • 仅包年包月类型的实例需要指定,即 ChargeType 指定为 PrePaid 时必选。​
​
AutoRenew boolean 可选 示例值:true​
包年包月实例到期后是否自动续费。​
  • true:自动续费。​
  • false:不自动续费。到期后需要手动续费,否则实例将被关停。​
  • 仅包年包月类型的实例需要指定,即 ChargeType 指定为 PrePaid 时必选。​
​
​
InstanceId string 必选 示例值:kafka-cnngtp9xoxao****​
实例 ID。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
OrderId string 示例值:order-712089661643355****​
订单 ID。​
​
​
​
请求示例​
​
POST /?Action=ModifyInstanceChargeType&Version=2022-05-01 HTTP/1.1​
Content-Type: application/json​
Host: kafka.volcengineapi.com​
X-Date: 20210328T100802Z​
Authorization: HMAC-SHA256 Credential=AK********/20210328/cn-beijing/Kafka/request, SignedHeaders=x-date, Signature=********​
​
{​
"InstanceId": "kafka-cnng3s31v076****",​
"ChargeInfo": {​
"ChargeType": "PrePaid",​
"AutoRenew": true,​
"PeriodUnit": "Month",​
"Period": 9​
}​
}​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202302271903349B56E707EFFA7E695001",​
"Action": "ModifyInstanceChargeType",​
"Version": "2022-05-01",​
"Service": "Kafka",​
"Region": "cn-beijing"​
},​
"Result": {​
"OrderId": "Order720478887683310****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
OperationDenied.ChargeTypeIsPrepaid​
It's forbidden to release a prepaid instance within validity period.​
不支持在合同期内删除实例。​
400​
Forbidden.Authentication​
This operation is forbidden by Realname Authentication system.​
账户未实名认证。​
400​
OperationDenied.InstanceClosed​
The operation is not permitted due to the instance has overdue or expired.​
当前实例已关停,无法执行该操作。​
400​
InvalidParameter​
The specified parameter is not valid.​
参数值无效。​
400​
OperationDenied.InvalidRequest​
The request that you specified is not valid.​
请求异常,请检查后重试。​
400​
Insufficient.Balance​
The account balance is insufficient.​
您的账户余额不足。​
400​
OperationDenied.InstancePrepaid​
The operation is not permitted due to the instance charge type is prepaid.​
当前实例计费类型是预付费,无法执行该操作。​
400​
OperationDenied.ExistCreatingOrder​
The operation is not permitted due to exist creating instance order.​
已存在创建中的订单,无法执行该操作。​
400​
InvalidParameter.Unsupported​
The specified parameter %s is not supported.​
不支持%s参数。​
400​
InvalidParameter.Malformed​
The specified parameter %s is Malformed.​
%s参数不符合规范。​
400​
InstanceOrderCreateFailed​
Create instance order failed.​
创建订单失败。​
403​
OperationDenied.AccountNotAuthorized​
You are not authorized to perform this operation.​
您不具备相关权限 ,请授权或切换账号后重试。​
403​
OperationDenied.InvalidInstanceStatus​
The operation is not valid for the current status of the instance.​
当前实例状态不允许执行该操作。​
404​
InvalidInstanceId.NotFound​
The specified Instance ID does not exist.​
实例不存在。​
404​
InvalidInstance.NotFound​
The specified instance does not exist.​
该实例不存在。​
500​
InternalError​
The request failed due to some unknown error, exception or failure.​
内部错误,请稍后重试。​
​
​
最近更新时间:2025.08.08 17:47:27
这个页面对您有帮助吗?
有用
有用
无用
无用