Updated on 2024-08-19 GMT+08:00

Viewing a Scheduled CU Change (Discarded)

Function

This API is used to query the scheduled CU changes and list the changes of a specified queue.

This API has been discarded and is not recommended.

URI

  • URI format

    GET /v1/{project_id}/queues/{queue_name}/plans

  • Parameter description
    Table 1 URI parameters

    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 the scheduled CU change is to be deleted. The name contains 1 to 128 characters. Use commas (,) to separate multiple queue names.

Request

None

Response

Table 2 Response parameters

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.

plans

No

Array of objects

Scheduled scaling plan information. For details, see Table 3.

Table 3 plans parameters

Parameter

Mandatory

Type

Description

id

No

Long

ID of a scheduled CU change.

plan_name

No

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

No

Integer

Target value of the CU in the scheduled CU change.

start_hour

No

Integer

Start hour of a queue scaling plan, in the 24-hour format.

start_minute

No

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.

last_execute_time

No

Long

Time when the scaling plan was last executed.

Example Request

None

Example Response

{
    "is_success": true,
    "message": "",
    "plans": [
        {
            "id": 1,
            "plan_name": "plan_Aa",
            "target_cu": 32,
            "start_hour": 11,
            "start_minute": 15,
            "repeat_day": [
                "MONDAY",
                "TUESDAY",
                "WEDNESDAY",
                "SUNDAY"
            ],
            "activate": true,
            "last_execute_time": 1593573428857
        },
        {
            "id": 6,
            "plan_name": "plan_Ab",
            "target_cu": 16,
            "start_hour": 14,
            "start_minute": 25,
            "repeat_day": [
                "MONDAY",
                "TUESDAY",
                "WEDNESDAY",
                "SUNDAY",
                "THURSDAY",
                "FRIDAY",
                "SATURDAY"
            ],
            "activate": true,
            "last_execute_time": 1593584829260
        }
    ]
}

Status Codes

Table 4 describes status codes.

Table 4 Status codes

Status Code

Description

200

The query is successful.

400

Request failure.

500

Internal service error.

Error 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.

Table 5 Error codes

Error Code

Error Message

DLI.0008

There is no queue named queue1.