Updated on 2024-04-11 GMT+08:00

Querying the Audit Instance List

Function

This API is used to query the audit instance list.

URI

GET /v1/{project_id}/dbss/audit/instances

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

String

Offset.

limit

No

String

Number of query records

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

servers

Array of AuditInstanceListBean objects

Instance information list

total

Integer

Total

Table 5 AuditInstanceListBean

Parameter

Type

Description

charge_model

String

Payment mode. Its value can be Period (yearly/monthly) or (Demand) pay-per-use.

comment

String

Remarks.

config_num

Integer

Total number of configured databases.

connect_ip

String

Connection address.

connect_ipv6

String

IPv6 address.

cpu

Integer

Number of CPUs

created

String

Creation time

database_limit

Integer

Total number of supported databases

effect

Integer

1: The resource is frozen and can be released. 2: The resource is frozen and cannot be released. 3: The resource is frozen and cannot be renewed.

If the preceding information is not involved, null is returned.

expired

String

Expired time of instances.

id

String

ID (This is an auto-increment parameter and is meaningless at present.)

keep_days

String

Days until expiration.

name

String

Instance alias

new_version

String

If a value is returned, the upgrade is required. If no value is returned, the value is null.

port_id

String

ID of the port that the EIP is bound to

ram

Integer

Memory

region

String

Region where the instance is located

remain_days

String

Days past the expiration date.

resource_id

String

Resource ID (DBSS instances ID, the instance ID is not in the basic information.)

This parameter can be obtained through the interface : GET /v1/{project_id}/dbss/audit/instances

resource_spec_code

String

Instance specifications

scene

String

Scenario: Dictionary Value[POLICE,ILLEGAL,VERIFY,PARTNER,ARREARS,null]

security_group_id

String

Security group

specification

String

Instance specifications

status

String

Instance status. Its value can be: SHUTOFF (disabled), ACTIVE (operations allowed), DELETING (no operations allowed), BUILD (no operations allowed), DELETED (not displayed), ERROR (only deletion allowed), HAWAIT (waiting for the standby to be created; no operations allowed), FROZEN (only renewal, binding, and unbinding allowed) UPGRADING (no operations allowed)

subnet_id

String

Subnet ID

task

String

Task status. Its value can be: powering-on (the instance is being started and can be bound or unbound), powering-off (the instance is being stopped and can be bound or unbound) rebooting (the instance is being restarted and can be bound or unbound), delete_wait (the instance is waiting to be deleted and no operations are allowed on the cluster or instance), NO_TASK (the instance is not displayed)

version

String

Current version of the instance

vpc_id

String

VPC

zone

String

AZ

upgrade_log

String

Database instance upgragde log.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 7 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 9 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 11 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Example Requests

/v1/{project_id}/dbss/audit/instances

Example Responses

Status code: 200

Success

{
  "servers" : [ {
    "name" : "DBSS-Test",
    "comment" : "",
    "connect_ipv6" : null,
    "status" : "ACTIVE",
    "task" : "NO_TASK",
    "id" : "8c53ed03-8ed7-4ff2-ad97-7b2d6d1dd364",
    "specification" : "Low | 3 Proxy",
    "zone" : "region-01-7a",
    "created" : "2021-04-21 04:37:54",
    "expired" : null,
    "subnet_id" : "97ef0bb5-3759-4db4-aa49-0d087ed49ce5",
    "cpu" : 4,
    "ram" : 16384,
    "region" : "eu-de",
    "version" : "21.04.16.164614",
    "charge_model" : "Demand",
    "remain_days" : null,
    "config_num" : 1,
    "effect" : null,
    "scene" : null,
    "connect_ip" : "192.168.0.229",
    "port_id" : "dc4bd420-e01c-4d12-a7ff-814f17c63079",
    "resource_id" : "062212d8-8e30-4783-9671-43f3f1f3bb1e",
    "vpc_id" : "76d98391-5abc-46ed-b8a8-f664202cb166",
    "security_group_id" : "f0fbec06-bcf6-4c7e-99fa-f0ddfbb1d9bd",
    "resource_spec_code" : "dbss.bypassaudit.low",
    "keep_days" : null,
    "new_version" : null,
    "database_limit" : 3
  } ],
  "total" : 1
}

Status code: 400

Failure

{
  "error" : {
    "error_code" : "DBSS.XXXX",
    "error_msg" : "XXX"
  }
}

Status Codes

Status Code

Description

200

Success

400

Failure

403

Authentication failed.

500

Server error.

Error Codes

See Error Codes.