Help Center/ Database Security Service/ API Reference/ API/ Audit Instance/ Creating an Audit Instance in Pay-Per-Use Billing Mode
Updated on 2025-09-10 GMT+08:00

Creating an Audit Instance in Pay-Per-Use Billing Mode

Function

Create an audit instance in pay-per-use billing mode.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. You can obtain the token by calling the IAM API used to query the user token. The token is the value of X-Subject-Token in the response header.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

server

Yes

server object

Creating information

Table 4 server

Parameter

Mandatory

Type

Description

flavor_ref

Yes

String

Flavor ID

region_id

Yes

String

region ID

enterprise_project_id

No

String

Enterprise project ID, which is mandatory for interconnecting with EPS.

name

Yes

String

Instance name

comment

No

String

Remarks

vpc_id

Yes

String

VPC ID

security_groups

Yes

Array of security_groups objects

Security Group

nics

Yes

Array of nics objects

Subnet

resource_spec_code

Yes

String

Resource specification code.

availability_zone

Yes

String

Availability zone

tags

No

Array of tags objects

Label

Table 5 security_groups

Parameter

Mandatory

Type

Description

id

Yes

String

Security group ID.

Table 6 nics

Parameter

Mandatory

Type

Description

subnet_id

Yes

String

Subnet ID

Table 7 tags

Parameter

Mandatory

Type

Description

key

Yes

String

Key

value

No

String

Value

Response Parameters

Status code: 200

Table 8 Response body parameters

Parameter

Type

Description

result

String

Operation Result

  • success: Request succeeded

  • failed: failed

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

details

Array of DbssErrorDetail objects

PDP5 authentication exception information

encoded_authorization_message

String

PDP5 authentication exception information

error_code

String

Error Codes

error_msg

String

Error message.

Table 10 DbssErrorDetail

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

PDP5 error information

Status code: 403

Table 11 Response body parameters

Parameter

Type

Description

details

Array of DbssErrorDetail objects

PDP5 authentication exception information

encoded_authorization_message

String

PDP5 authentication exception information

error_code

String

Error Codes

error_msg

String

Error message.

Table 12 DbssErrorDetail

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

PDP5 error information

Status code: 500

Table 13 Response body parameters

Parameter

Type

Description

details

Array of DbssErrorDetail objects

PDP5 authentication exception information

encoded_authorization_message

String

PDP5 authentication exception information

error_code

String

Error Codes

error_msg

String

Error message.

Table 14 DbssErrorDetail

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

PDP5 error information

Example Requests

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

{
  "server" : {
    "flavor_ref" : "c3.xlarge.4",
    "region_id" : "cn-north-7",
    "enterprise_project_id" : "0",
    "name" : "DBSS-b200",
    "comment" : "aaa",
    "vpc_id" : "4c035747-f77b-4c6d-b23b-cb3a2b96c7e6",
    "security_groups" : [ {
      "id" : "007e5cf5-1bc7-4b03-bdbe-77ed96ca46c0"
    } ],
    "nics" : [ {
      "subnet_id" : "6201dcf2-1374-43ec-ae8b-78b4081572d3"
    } ],
    "resource_spec_code" : "dbss.bypassaudit.entry",
    "availability_zone" : "cn-north-7c",
    "tags" : [ {
      "key" : "2",
      "value" : "333"
    } ]
  }
}

Example Responses

Status code: 200

Success

{
  "result" : "success"
}

Status code: 400

Failed

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

Status Codes

Status Code

Description

200

Success

400

Failed

403

Authorization failed.

500

Server error.

Error Codes

See Error Codes.