Updated on 2023-11-24 GMT+08:00

Killing Sessions of an Instance Node

Description

This API is used to kill sessions of an instance node.

Restrictions

  • Community Edition 3.4 and 4.0 instances are supported.
  • Inactive sessions cannot be terminated.

URI

  • URI format

    POST https://{Endpoint}/v3/{project_id}/nodes/{node_id}/session

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/nodes/520c58ba00a3497e97ce0b9604874dd6no02/session

Table 1 Request parameters

Name

Type

IN

Mandatory

Description

X-Auth-Token

string

header

Yes

User token obtained from IAM. For details, see Authentication.

project_id

string

path

Yes

Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

node_id

string

path

Yes

The node ID.

  • Select the mongos node in a cluster instance.
  • Select the primary or secondary node in a replica set instance.

Requests

  • Parameter description
    Table 2 Request body parameters

    Parameter

    Type

    Mandatory

    Description

    sessions

    Array of strings

    Yes

    The IDs of sessions to be terminated.

    For details, see the session ID returned in Table 4.

Example Request

Killing sessions of an instance node based on the session ID list
{ 
  "sessions" : [ "34631", "34703" ] 
}

Responses

{}

SDK

Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.