You need to enable JavaScript to run this app.
文档中心
弹性伸缩

弹性伸缩

复制全文
下载 pdf
伸缩规则
EnableScalingPolicy - 启用一个伸缩规则
复制全文
下载 pdf
EnableScalingPolicy - 启用一个伸缩规则
启用一个伸缩规则。​
使用说明​
在同一个伸缩组中,您可以启用多条伸缩规则。当同时触发多个伸缩规则时,因其互为竞争关系,仅最先抢占的伸缩规则可以执行伸缩行为,且当伸缩组处于 冷却中 时,不允许执行伸缩行为。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:EnableScalingPolicy​
要执行的操作,取值:EnableScalingPolicy。​
​
Version string 必选 示例值:2020-01-01​
API的版本,取值:2020-01-01。​
​
ScalingPolicyId string 必选 示例值:sp-ybmvamf8uql8j1fl****​
伸缩规则的ID。您可以调用DescribeScalingPolicies 查询伸缩规则的ID和当前状态。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
ScalingPolicyId string 示例值:sp-ybmvamf8uql8j1fl****​
伸缩规则的ID。​
​
​
​
请求示例​
​
GET /?Action=EnableScalingPolicy&ScalingPolicyId=sp-ybmvamf8uql8j1fl****&Version=2020-01-01 HTTP/1.1​
Host: auto-scaling.cn-beijing.volcengineapi.com​
X-Date: 20240507T111730Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240507/cn-beijing/auto_scaling/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20240507191739040089122065F46BD9",​
"Version": "2020-01-01",​
"Service": "auto_scaling",​
"Region": "cn-beijing"​
},​
"Result": {​
"ScalingPolicyId": "sp-ybmvamf8uql8j1fl****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidScalingGroup.InvalidStatus​
The specified ScalingGroup is not in the correct status.​
指定的伸缩组当前状态不支持该操作。​
400​
MissingParameter.ScalingPolicyId​
The required parameter ScalingPolicyId is not supplied.​
伸缩规则ID不能为空。​
404​
InvalidScalingPolicyId.NotFound​
The specified ScalingPolicyId does not exist.​
指定的伸缩规则ID不存在。​
412​
OperationDenied.ResourceLocked​
The specified operation is denied as your resource is locked for another operation.​
指定的操作被拒绝,因为您的资源已被其他操作锁定。​
500​
InternalError​
An internal error has occurred.​
内部错误,请重试。如果多次尝试失败,请提交工单。​
​
​
最近更新时间:2025.08.27 19:18:33
这个页面对您有帮助吗?
有用
有用
无用
无用