Help Center/ TaurusDB/ API Reference/ APIs (Recommended)/ Traffic Management/ Terminating User Session Threads on a Node
Updated on 2025-10-21 GMT+08:00

Terminating User Session Threads on a Node

Function

This API is used to terminate specified user session threads on a TaurusDB node, excluding any internal session threads passed in. Before calling this API:

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    gaussdbformysql:instance:deleteProcesses

    Write

    instance *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    gaussdb:instance:deleteProcesses

    -

URI

DELETE /v3/{project_id}/instances/{instance_id}/nodes/{node_id}/processes

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints

N/A

Range

The value contains 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

The value contains 36 characters with a suffix of in07. Only letters and digits are allowed.

Default Value

N/A

node_id

Yes

String

Definition

Node ID, which uniquely identifies a node.

Constraints

N/A

Range

The value contains 36 characters with a suffix of no07. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

To obtain this value, call the IAM API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Request language type.

Constraints

N/A

Range

  • en-us

  • zh-cn

Default Value

en-us

Content-Type

Yes

String

Definition

Request body content type.

Constraints

N/A

Range

application/json

Default Value

N/A

Table 3 Request body parameter

Parameter

Mandatory

Type

Description

processes

Yes

Array of longs

Definition

IDs of user session threads to be terminated.

To obtain this value, call the API for querying user session threads on a node or run the show processlist command.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

processes_killed

Array of longs

Definition

IDs of terminated user session threads.

processes_not_found

Array of longs

Definition

IDs of user session threads that were not found.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Terminating specified user session threads on a TaurusDB node

DELETE https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/a23fb62bd61e4e9e9636fd2225f395bein07/nodes/18663926eacb443d98dc20f8620f28f2no07/processes

{
  "processes" : [ 2075425, 2075426 ]
}

Example Response

Status code: 200

Success.

{
  "processes_killed" : [ 2075425, 2075426 ],
  "processes_not_found" : [ ]
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.