• Distributed Cache Service

dcs
  1. Help Center
  2. Distributed Cache Service
  3. API Reference
  4. APIs Used for Maintaining DCS Instances
  5. Querying the Number of DCS Instances in Different Statuses

Querying the Number of DCS Instances in Different Statuses

Function

This API is used to query the number of DCS instances in different statuses.

URI

  • URI format:

    GET /v1.0/{project_id}/instances/status?includeFailure={includeFailure}

  • Parameter description:

    Table 1 describes the parameters of this API.

Table 1 Parameter description

Name

Type

Mandatory or Not

Description

project_id

String

Yes

Project ID.

includeFailure

String

No

An indicator of whether the number of DCS instances that failed to be created will be returned to the API caller.

Options:

  • true: The number of DCS instances that failed to be created will be returned to the API caller.
  • false or others: The number of DCS instances that failed to be created will not be returned to the API caller.
  • Example URI:
    GET /v1.0/{project_id}/instances/status?includeFailure=true

Request

None.

Response

  • Status code:

    If status code "200 OK" is returned, this request is fulfilled. For description of other status codes, see API Usage Guidelines.

  • Response parameter:

    Table 2 describes response parameters.

Table 2 Parameter description

Name

Type

Description

closed_count

Integer

Number of instances that have been stopped.

creating_count

Integer

Number of instances that are being created.

starting_count

Integer

Number of instances that are being started.

deleting_count

Integer

Number of instances that are being deleted.

closing_count

Integer

Number of instances that are being stopped.

running_count

Integer

Number of running instances.

error_count

Integer

Number of abnormal instances.

restarting_count

Integer

Number of instances that are being restarted.

createfailed_count

Integer

Number of instances that fail to be created.

extending_count

Integer

Number of instances that are being scaled up.

  • Example response:
    { 
        "closed_count": 0, 
        "extending_count": 0, 
        "creating_count": 0, 
        "starting_count": 0, 
        "deleting_count": 0, 
        "closing_count": 0, 
        "running_count": 16, 
        "error_count": 0, 
        "restarting_count": 0, 
        "createfailed_count": 44 
    }