lightnode
cn
  • cn
  • en
  1. 主机
lightnode
cn
  • cn
  • en
  • API概览
  • API调用说明
  • 主机
    • 创建
      POST
    • 释放
      POST
    • 关机
      POST
    • 开机
      POST
    • 重启
      POST
    • 修改密码
      POST
    • 主机详情
      GET
    • 重装
      POST
  • 安全组
    • 安全组查询
      GET
  • 镜像
    • 镜像查询
      GET
  • 异步任务
    • 查询异步任务
      GET
  • 密钥对
    • 密钥对查询
      GET
  1. 主机

关机

POST
https://openapi.lightnode.com/instance/stop

接口介绍#

根据给定的云服务器ID,关闭云服务器。#

本接口为异步接口,当前关闭云服务器请求下发成功后会返回processResult,此时关闭云服务器并没有立即完成,需要通过调用查询任务的执行状态查询processResult,当processResult状态为 SUCCESS 时代表云服务器关闭成功。#

Request

Header Params

Body Params application/json

Example
{
    "ecsResourceUUID": "ecs-wr00007bgadt",
    "forceStop": true
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://openapi.lightnode.com/instance/stop' \
--header 'x-open-token: test-token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ecsResourceUUID": "ecs-wr00007bgadt",
    "forceStop": true
}'

Responses

🟢202成功
application/json
Body

Example
{
    "asyncTaskUUID": "cm00007dyy36",
    "httpStatus": 202,
    "rowCount": 0
}
Modified at 2025-09-23 08:07:38
Previous
释放
Next
开机
Built with