校验 NAS 存储产品是否可开通
校验指定智算中心、指定资源规格的 NAS 存储产品当前是否已上架可开通。下单前可先调此接口判断产品可用性:返回 true 表示可开通、false 表示当前不可开通。可开通的产品规格信息可从NAS 存储产品列表获取。
POST
https://api.alayanew.com/v1/product/nas-storage-available鉴权(Authorizations)
bearerAuthAuthorizationString必填用户可通过已获取的 Open API Key 做验证。例如:Bearer [YOUR_API_KEY]。
Request body
application/jsonaidcCodeString智算中心编码。与 aidcId 二选一定位目标智算中心,两者均可标识同一智算中心。例如:"unite-8"。
resourceSpecCodeString资源规格编码,指定要校验的 NAS 存储规格。例如:"VC"。
aidcIdInteger智算中心 ID。与 aidcCode 二选一定位目标智算中心。例如:1。
Response
application/json · 200statusInteger业务状态码,200 表示成功。
messageString接口响应信息。例如:"OK"。
dataBoolean校验结果:true 表示该 NAS 存储产品已上架、可开通;false 表示当前不可开通。
curl -X 'POST' \
'https://api.alayanew.com/v1/product/nas-storage-available' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [YOUR_API_KEY]' \
-d '{
"aidcCode": "unite-8",
"resourceSpecCode": "VC",
"aidcId": 1
}'import requests
url = "https://api.alayanew.com/v1/product/nas-storage-available"
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer [YOUR_API_KEY]"
}
payload = {
"aidcCode": "unite-8",
"resourceSpecCode": "VC",
"aidcId": 1
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())const payload = {
aidcCode: 'unite-8',
resourceSpecCode: 'VC',
aidcId: 1
};
fetch('https://api.alayanew.com/v1/product/nas-storage-available', {
method: 'POST',
headers: {
'accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer [YOUR_API_KEY]'
},
body: JSON.stringify(payload)
})
.then(res => res.json())
.then(console.log)
.catch(console.error);{
"status": 200,
"message": "OK",
"data": true
}{
"status": 403,
"message": "Forbidden",
"data": {}
}{
"status": 500,
"message": "Internal Server Error",
"data": {}
}Last updated on
