Modifying the Queue CIDR

Function

This function is used to modify the CIDR of the queues using the yearly/monthly packages.

If the queue whose CIDR is to be modified contains jobs that are being submitted or running, or the queue is bound to an enhanced datasource queue, the CIDR cannot be modified.

Debugging

You can debug this API in API Explorer.

URI

  • URI format

    PUT /v1.0/{project_id}/queues/{queue_name}

  • Parameter description
    Table 1 URI parameter

    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

    Specifies the queue name of the CIDR block to be modified.

Request

Table 2 Request parameters

Parameter

Mandatory

Type

Description

cidr_in_vpc

No

String

Queue VPC CIDR.

CIDR block range supported by queues with different CU specifications:

  • 16 CUs:

    10.0.0.0/8 to 10.255.255.0/24

    172.16.0.0/12 to 172.31.255.0/24

    192.168.0.0/16 to 192.168.255.0/24

  • 64 CUs:

    10.0.0.0/8 to 10.255.252.0/24

    172.16.0.0/12 to 172.31.252.0/24

    192.168.0.0/16 to 192.168.252.0/24

  • 256 CUs:

    10.0.0.0/8 ~ 10.255.252.0/22

    172.16.0.0/12 to 172.31.252.0/22

    192.168.0.0/16 ~ 192.168.252.0/22

  • 512 CUs:

    10.0.0.0/8 to 10.255.252.0/21

    172.16.0.0/12 to 172.31.252.0/21

    192.168.0.0/16 to 192.168.252.0/21

Response

Table 3 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 parameter setting may be left blank.

Example

  • Example request
    {
        "cidr_in_vpc": "172.16.0.0/12"
    }
  • Example response (successful request)
    {
        "is_success": true,
        "message": ""
    }

Status Codes

Table 4 describes the status code.

Table 4 Status codes

Status Code

Description

201

The modification operations are successful.

400

Request error.

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