This API is used to create a scheduled CU change, that is, to create a scheduled CU change for a specified queue.
This API has been discarded and is not recommended.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID. |
queue_name |
Yes |
String |
Name of the queue for which you want to set a scheduled scaling plan. The name can contain only digits, letters, and underscores (_), but cannot contain only digits or start with an underscore (_). The name contains 1 to 128 characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
plan_name |
Yes |
String |
Name of a CU change. The name can contain only digits, letters, and underscores (_), but cannot contain only digits or start with an underscore (_). |
target_cu |
Yes |
Integer |
Target value of the CU in the scheduled CU change. |
start_hour |
Yes |
Integer |
Specifies the start hour of the scheduled CU change. |
start_minute |
Yes |
Integer |
Specifies the start minute of a scheduled CU change. |
repeat_day |
Yes |
Array of strings |
Specifies the repetition period of a scheduled CU change. You can select one or more days from Monday to Sunday, or do not select any day. If this parameter is not specified, the scheduled CU change will be executed at the time specified by start_hour: start_minute after the current time. Example: "repeat_day": ["MONDAY", "TUESDAY", "WEDNESDAY","SUNDAY"] |
valid_date_begin |
No |
Long |
Start time of the validity period (13-digit timestamp) |
valid_date_end |
No |
Long |
End time of the validity period (13-digit timestamp) |
activate |
No |
Boolean |
Indicates whether the scheduled CU change is activated. The default value is true, indicating that the change is activated. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_success |
No |
Boolean |
Indicates whether the request is successfully executed. Value true indicates that the request is successfully executed. |
message |
No |
String |
System prompt. If execution succeeds, the parameter setting may be left blank. |
Create a scaling plan named plan_A for the queue. According to the plan, the queue is scaled out at 20:30 on Monday, Tuesday, Wednesday, and Sunday, to 64 CUs.
{ "plan_name": "plan_A", "target_cu": 64, "start_hour": 20, "start_minute": 30, "repeat_day": [ "MONDAY", "TUESDAY", "WEDNESDAY", "SUNDAY" ], "valid_date_begin": 1590949800000, "valid_date_end": 1591727400000, "activate": true }
{ "is_success": true, "message": "" }
Table 4 describes status codes.
If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.
Error Code |
Error Message |
---|---|
DLI.0999 |
Queue plans create failed. The plan plan_A can not generate a scale plan, please check all time settings for the plan. |