Help Center> Cloud Stream Service> API Reference> APIs> APIs Related to Cluster Management> Querying Quota Information About a Specified User

Querying Quota Information About a Specified User

Function

This API is used to query quota information about a specified user.

URI

  • URI format

    GET /v1.0/{project_id}/user_quota/{user_id}

  • Parameter description
    Table 1 URI parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

    user_id

    Yes

    User ID.

Request

None

Response

  • Example response
    {
    "message_id": "CS.10001",
      "message": "Querying of the user quota succeeds.",
      "current_time": 1533686888000,
      "payload": {
        "user_id": "ac4eaa303639409c8ab099d55eb1538e",
        "user_name": "cs_testuser",
        "spu_used": 20,
        "spu_quota": 100,
        "clusters": [
          {
            "id": 1000000,
            "name": "cluster_001"
          }
        ]
      }
    }
  • Parameter description
    Table 2 Response parameters

    Parameter

    Mandatory

    Type

    Description

    message_id

    No

    String

    Message type ID.

    message

    No

    String

    Message content.

    current_time

    No

    Int

    Current time, expressed by milliseconds.

    payload

    No

    None

    User quota information.

    user_id

    No

    String

    User ID.

    user_name

    No

    String

    Username.

    spu_used

    No

    String

    SPU quota used by a user.

    spu_quota

    No

    Int

    Maximum SPU quota of a user.

    clusters

    No

    None

    User cluster.

    id

    No

    Int

    Cluster ID.

    name

    No

    String

    Cluster name.

Status Code

Table 3 describes the status code.

Table 3 Status code

Status Code

Description

200

Querying quota information about a specified user succeeds.

400

The input parameters are invalid.

Error Code

For details, see Error Codes.