查看服务的自动扩缩配置详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
eas:DescribeServiceAutoScaler |
get |
*Service
|
无 | 无 |
请求语法
GET /api/v2/services/{ClusterId}/{ServiceName}/autoscaler HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ClusterId |
string |
是 |
服务所在地域 ID。 |
cn-shanghai |
| ServiceName |
string |
是 |
服务名称。如何查看服务名称,请参见ListServices 。 |
echo |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| RequestId |
string |
请求 ID。 |
40325405-579C-4D82**** |
| ServiceName |
string |
服务名称。 |
foo |
| MinReplica |
integer |
服务最小实例数。 |
3 |
| MaxReplica |
integer |
服务最大实例数。 |
8 |
| Behavior |
object |
额外扩缩容策略。例如触发扩缩容前的等待时间。 |
{ "behavior": { "scaleDown": { "stabilizationWindowSeconds": 150 } } } |
| ScaleStrategies |
array<object> |
伸缩策略列表。 |
|
|
object |
|||
| metricName |
string |
指标名称,可能值:
|
QPS |
| threshold |
number |
触发自动伸缩阈值。
|
10 |
| service |
string |
指标所属服务,不配置默认为当前服务。 |
demo_svc |
| CurrentMetrics |
array<object> |
当前指标列表。 |
|
|
object |
|||
| metricName |
string |
指标名称。可能值:
|
QPS |
| value |
number |
当前指标值。 |
10 |
| service |
string |
指标所属服务。 |
demo_svc |
示例
正常返回示例
JSON格式
{
"RequestId": "40325405-579C-4D82****",
"ServiceName": "foo",
"MinReplica": 3,
"MaxReplica": 8,
"Behavior": {
"behavior": {
"scaleDown": {
"stabilizationWindowSeconds": 150
}
}
},
"ScaleStrategies": [
{
"metricName": "QPS",
"threshold": 10,
"service": "demo_svc"
}
],
"CurrentMetrics": [
{
"metricName": "QPS",
"value": 10,
"service": "demo_svc"
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。