Membuat kebijakan tugas terjadwal untuk Kluster serverless.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:CreateCronJobPolicyServerless |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
ID kluster. |
pc-xxxxxxxxxx |
| RegionId |
string |
Yes |
ID wilayah. |
cn-hangzhou |
| CronExpression |
string |
Yes |
Ekspresi cron. |
0 0 13 * * ? |
| ScaleMin |
string |
No |
Jumlah minimum PolarDB Basis Data Relasional Cloud-Native Capacity Units (PCU). Nilai harus dari 0,25 hingga 32 dan harus kurang dari atau sama dengan nilai ScaleMax. |
1 |
| ScaleMax |
string |
No |
Jumlah maksimum PCU. Nilai harus dari 1 hingga 32. |
3 |
| ScaleRoNumMin |
string |
No |
Jumlah minimum node read-only. Nilai valid: 0 hingga 15. |
2 |
| ScaleRoNumMax |
string |
No |
Jumlah maksimum node read-only. Nilai valid: 0 hingga 15. Nilai harus lebih besar dari atau sama dengan nilai ScaleRoNumMin. |
4 |
| AllowShutDown |
string |
No |
Apakah akan mengaktifkan suspensi tanpa aktivitas. Nilai valid:
|
true |
| SecondsUntilAutoPause |
string |
No |
Periode tidak aktif dalam menit sebelum kluster dijeda secara otomatis. Nilai harus kelipatan 5 dan berkisar dari 5 hingga 1440. |
10 |
| ScaleApRoNumMin |
string |
No |
Jumlah minimum node penyimpanan kolom read-only. Nilai valid: 0 hingga 15. |
1 |
| ScaleApRoNumMax |
string |
No |
Jumlah maksimum node penyimpanan kolom read-only. Nilai valid: 0 hingga 15. |
1 |
| ServerlessRuleCpuEnlargeThreshold |
string |
No |
Persentase penggunaan CPU yang memicu scale-up. Nilai valid: 40 hingga 100. |
60 |
| ServerlessRuleCpuShrinkThreshold |
string |
No |
Persentase penggunaan CPU yang memicu scale-down. Nilai valid: 10 hingga 100. Nilai ServerlessRuleCpuEnlargeThreshold dikurangi nilai parameter ini harus 30 atau lebih besar. |
30 |
| ServerlessRuleMode |
string |
No |
Sensitivitas penskalaan. Nilai valid:
|
normal |
| StartTime |
string |
No |
Waktu mulai tugas. Gunakan format |
2020-11-14T00:00Z |
| EndTime |
string |
Yes |
Waktu berakhir tugas. Gunakan format |
2021-09-23T01:01:00Z |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
45D24263-7E3A-4140-9472-************ |
| JobId |
string |
The ID of the scheduled task. |
1fa3c0e7-b568-4f41-b703-463c96a91bd8 |
| DBClusterId |
string |
The cluster ID. |
pc-**************** |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| Status |
string |
The status of the task. Valid values:
|
working |
| CronExpression |
string |
The Cron expression. |
0 0 8 * * ? |
| Action |
string |
The action of the scheduled task. The value is fixed as |
ModifyDBClusterServerlessConf |
| StartTime |
string |
The start time of the task. The time is in the |
2020-05-01T00:00Z |
| EndTime |
string |
The end time of the task. The time is in the |
2021-04-07T04:00Z |
Contoh
Respons sukses
JSONformat
{
"RequestId": "45D24263-7E3A-4140-9472-************",
"JobId": "1fa3c0e7-b568-4f41-b703-463c96a91bd8",
"DBClusterId": "pc-****************",
"RegionId": "cn-hangzhou",
"Status": "working",
"CronExpression": "0 0 8 * * ?",
"Action": "ModifyDBClusterServerlessConf",
"StartTime": "2020-05-01T00:00Z",
"EndTime": "2021-04-07T04:00Z"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidRegionId.Malformed | The specified parameter RegionId is not valid. | |
| 400 | InvalidStartTime.Malformed | The specified parameter StartTime is not valid. | |
| 400 | InvalidEndTime.Malformed | The specified parameter EndTime is not valid. | |
| 400 | InvalidCronJobParam.Type | The specified type is not valid. | |
| 400 | InvalidCronJobParam.InstanceId | The specified instanceId is not valid. | |
| 400 | InvalidCronJobParam.CronExpression | The specified cronExpression is not valid. | |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | |
| 409 | InvalidCronJob.DuplicateJob | This instance has tasks with duplicate crontab expressions. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.