释放(删除)NAS 实例
释放指定实例,同步完成;释放后订阅结束、计费停止、共享授权与挂载关系一并清理。被挂载中的实例不可删除;已释放的实例再次删除直接返回成功。
DELETE
https://api.alayanew.com/api/osm/v1/nasStorage/instance/{id}鉴权(Authorizations)
bearerAuthAuthorizationString必填用户获取Authorization请求头后,通过该请求头完成身份认证。例如:Authorization: [your-auth-header]。
Path Parameters
idString必填实例 ID(来自分页查询 NAS 实例列表的 id)。例如:3f2b8c94-6d17-4a52-9c8e-7b1d0a5f6e21。
Response
application/json · 200statusInteger业务状态码,200 表示成功;失败时为错误码。
messageString响应信息,成功为 "OK";失败时为错误描述。
curl -X 'DELETE' \
'https://api.alayanew.com/api/osm/v1/nasStorage/instance/3f2b8c94-6d17-4a52-9c8e-7b1d0a5f6e21' \
-H 'accept: application/json' \
-H 'Authorization: [your-auth-header]'import requests
instance_id = "3f2b8c94-6d17-4a52-9c8e-7b1d0a5f6e21"
url = f"https://api.alayanew.com/api/osm/v1/nasStorage/instance/{instance_id}"
headers = {
"accept": "application/json",
"Authorization": "[your-auth-header]"
}
response = requests.delete(url, headers=headers)
print(response.json())const instanceId = '3f2b8c94-6d17-4a52-9c8e-7b1d0a5f6e21';
fetch(`https://api.alayanew.com/api/osm/v1/nasStorage/instance/${instanceId}`, {
method: 'DELETE',
headers: {
'accept': 'application/json',
'Authorization': '[your-auth-header]'
}
})
.then(res => res.json())
.then(console.log)
.catch(console.error);{
"status": 200,
"message": "OK"
}最后更新于
