Modifying the Scaling Policy of a Queue Associated with an Elastic Resource Pool

Function

This API is used to modify the scaling policy of a queue associated with an elastic resource pool.

URI

Request

Table 2 Request parameter

Parameter

Mandatory

Type

Description

queue_scaling_policies

Yes

Array of objects

Scaling policy of a queue in an elastic resource pool. A policy contains the period, priority, and CU range. There must be a default scaling policy (period [00:00, 24:00]) for each queue. For details about the parameters, see Table 3.

Table 3 queue_scaling_policies

Parameter

Mandatory

Type

Description

impact_start_time

Yes

String

Time when a policy takes effect.

impact_stop_time

Yes

String

Time when a policy expires.

priority

Yes

Integer

Priority.

min_cu

Yes

Integer

Minimum number of CUs.

max_cu

Yes

Integer

Maximum number of CUs.

Response

Table 4 Response parameters

Parameter

Mandatory

Type

Description

is_success

No

Boolean

Whether the request is successfully executed. Value true indicates that the request is successfully executed.

message

No

String

System prompt. If execution succeeds, the message may be left blank.

Example Request

Modify the scaling policy of a queue associated with an elastic resource pool.

{
  "queue_scaling_policies" : [ {
    "priority" : 100,
    "impact_start_time" : "10:00",
    "impact_stop_time" : "22:00",
    "min_cu":"64",
    "max_cu":"752"
  }, {
    "priority" : 50,
    "impact_start_time" : "22:00",
    "impact_stop_time" : "10:00",
    "min_cu":"64",
    "max_cu":"752"
  } ]
}

Example Response

{
  "is_success" : true,
  "message" : ""
}

Status Codes

Status Code

Description

200

OK

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.