Help Center/ Cloud Container Engine/ API Reference/ Out-of-Date APIs/ Cluster Management/ Obtaining the Number of Nodes in a VPC (To Be Discarded)
Updated on 2025-11-05 GMT+08:00

Obtaining the Number of Nodes in a VPC (To Be Discarded)

Function

This API is used to obtain the number of nodes in a specified VPC.

Calling Method

For details, see Calling APIs.

URI

GET /api/v2/projects/{project_id}/vpcnodesnumber/{vpc_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details about how to obtain the project ID, see How to Obtain Parameters in the API URI.

Constraints

N/A

Range

The project ID of the account

Default Value

N/A

vpc_id

Yes

String

Definition

VPC ID, which can be obtained from the VPC list on the console

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Definition

The request body type or format

Constraints

GET requests are not validated.

Range

  • application/json

  • application/json;charset=utf-8

  • application/x-pem-file

  • multipart/form-data (used when the FormData parameter is present)

Default Value

N/A

X-Auth-Token

Yes

String

Definition

Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details about how to obtain a token, see Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

current

Integer

Definition

Number of nodes in the current VPC

Constraints

N/A

Range

N/A

Default Value

N/A

quota

Integer

Definition

Maximum number of nodes in the current VPC

Constraints

N/A

Range

N/A

Default Value

N/A

Example Requests

N/A

Example Responses

Status code: 200

The node information in the VPC has been obtained.

{
  "current" : 1,
  "quota" : 1000
}

Status Codes

Status Code

Description

200

The node information in the VPC has been obtained.

Error Codes

See Error Codes.