创建弹性伸缩规则
创建弹性伸缩规则
Path Parameters
The service id.
The scalePlan id.
Request Body required
弹性伸缩规则标识
scale_rule_time object
基于时间弹性伸缩
弹性伸缩日期
time object required
时刻
小时
分钟
Possible values: <= 100
弹性伸缩目标副本数量
scale_rule_metric object
基于指标弹性伸缩
Possible values: [REPLICA_QUERY_PER_SECOND
]
扩缩容指标名称
扩缩容阈值
Possible values: >= 1
and <= 100
最小副本数
Possible values: >= 1
and <= 100
最大副本数
扩容生效时长
缩容生效时长
副本数缩容到0生效时长
- 200
- default
OK
Schema
弹性伸缩规则标识
scale_rule_time object
基于时间弹性伸缩
弹性伸缩日期
time object required
时刻
小时
分钟
Possible values: <= 100
弹性伸缩目标副本数量
scale_rule_metric object
基于指标弹性伸缩
Possible values: [REPLICA_QUERY_PER_SECOND
]
扩缩容指标名称
扩缩容阈值
Possible values: >= 1
and <= 100
最小副本数
Possible values: >= 1
and <= 100
最大副本数
扩容生效时长
缩容生效时长
副本数缩容到0生效时长
{
"name": "string",
"scale_rule_time": {
"week_day": [
"string"
],
"time": {
"hour": 0,
"minute": 0
},
"target_nums": 0
},
"scale_rule_metric": {
"metric_name": "REPLICA_QUERY_PER_SECOND",
"threshold": 0,
"min_replica": 0,
"max_replica": 0,
"scaleout_duration": 0,
"scalein_duration": 0,
"scalezero_duration": 0
}
}
Default error response
Schema
- Array [
- ]
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details object[]
A list of messages that carry the error details. There is a common set of message types for APIs to use.
The type of the serialized message.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}