Memperbarui konfigurasi Autoscaler suatu layanan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eas:UpdateServiceAutoScaler |
update |
*Service
|
None | None |
Sintaks permintaan
PUT /api/v2/services/{ClusterId}/{ServiceName}/autoscaler HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
ID region layanan. |
cn-shanghai |
| ServiceName |
string |
Yes |
Nama layanan. Untuk informasi selengkapnya tentang cara melakukan kueri nama layanan, lihat ListServices. |
foo |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Isi permintaan. |
|
| min |
integer |
Yes |
Jumlah minimum instance. Nilainya harus lebih besar dari 0. |
2 |
| max |
integer |
Yes |
Jumlah maksimum instance. Nilainya harus lebih besar dari nilai parameter min. |
8 |
| scaleStrategies |
array<object> |
Yes |
Kebijakan penskalaan otomatis. |
|
|
object |
No |
|||
| metricName |
string |
Yes |
Nama metrik untuk memicu penskalaan otomatis. Nilai yang valid:
|
qps |
| threshold |
number |
Yes |
Ambang batas metrik yang memicu penskalaan otomatis.
|
100 |
| service |
string |
No |
Layanan yang metriknya ditentukan. Jika Anda tidak menetapkan parameter ini, layanan saat ini akan ditentukan secara default. |
demo_svc |
| behavior |
object |
No |
Operasi Autoscaler. |
|
| scaleUp |
object |
No |
Operasi scale-out. |
|
| stabilizationWindowSeconds |
integer |
No |
The time window that is required before the scale-out operation is performed. Default value: 0. The scale-out operation can be performed only if the specified metric exceeds the specified threshold in the specified time window. |
0 |
| scaleDown |
object |
No |
Operasi scale-in. |
|
| stabilizationWindowSeconds |
integer |
No |
The time window that is required before the scale-in operation is performed. Default value: 300. The scale-in operation can be performed only if the specified metric drops below the threshold in the specified time window. |
300 |
| onZero |
object |
No |
Operasi yang mengurangi jumlah instance menjadi 0. |
|
| scaleDownGracePeriodSeconds |
integer |
No |
The time window that is required before the number of instances is reduced to 0. Default value: 600. The number of instances can be reduced to 0 only if no request is available or no traffic exists in the specified time window. |
600 |
| scaleUpActivationReplicas |
integer |
No |
The number of instances that you want to create at a time if the number of instances is scaled out from 0. Default value: 1. |
1 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter respons. |
||
| RequestId |
string |
ID permintaan. |
40325405-579C-4D82**** |
| Message |
string |
Pesan yang dikembalikan. |
Update auto scale for service [foo] successfully |
Contoh
Respons sukses
JSONformat
{
"RequestId": "40325405-579C-4D82****",
"Message": "Update auto scale for service [foo] successfully"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.