接口功能介绍
可以根据用户查询对应的文件系统关联的云主机列表
准备工作:
构造请求:在调用前需要了解如何构造请求,详情查看构造请求
认证鉴权:openapi请求需要进行加密调用,详细查看认证鉴权
接口约束
无
URI
GET /v4/ecs/sfs/vms-list
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
regionID | 是 | String | 资源池ID,您可以查看地域和可用区来了解资源池 获取: 查 资源池列表查询 |
7f8653e8657d11edbb550242ac110006 | |
fileSysID | 是 | String | 文件系统ID | 56644622-41d1-5c35-8794-df55bffaff88 |
请求参数
请求头header参数
无
请求体body参数
无
响应参数
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
statusCode | Integer | 返回状态码(800为成功,900为失败) | 800 | |
errorCode | String | 错误码,为product.module.code三段式码 | Openapi.PatternCheck.NotValid | |
error | String | 错误码,为product.module.code三段式码 | Openapi.PatternCheck.NotValid | |
message | String | 失败时的错误描述,一般为英文描述 | SUCCESS | |
description | String | 失败时的错误描述,一般为中文描述 | 成功 | |
returnObj | Object | 成功时返回的数据 | returnObj |
表 returnObj
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
currentCount | Integer | 当前页码 | 6 | |
totalCount | Integer | 总记录数 | 6 | |
results | Array of Objects | 分页明细 | results |
表 results
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
instanceId | String | 云主机ID | d1e21b53-54d3-4a8b-af2b-215f823ca7ce | |
option | String | 挂载参数 | vers=3,async,nolock,noatime,nodiratime,wsize=1048576,rsize=1048576,timeo=600 | |
fileSysRoute | String | 文件系统绝对路径 | 55.243.4.20:/mnt/sfs_cap/e3aacef1e0be40559b38a5c2158aa62e_mqfb3ej839cdz7ub | |
mountPoint | String | 挂载点 | /mnt/docs/111 | |
autoMount | Boolean | 是否开机自动挂载 | false | |
protocol | String | 挂载协议 | NFSv3 | |
fileSysID | String | 文件系统ID | 56644622-41d1-5c35-8794-df55bffaff88 | |
vmInfo | Object | 虚机信息 | vmInfo |
表 vmInfo
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
instanceStatus | String | 虚机状态 | ACTIVE | |
displayName | String | 虚机展示名称 | ecm-ad6f | |
instanceName | String | 名称 | ecm-ad6f-0001 | |
imageName | String | 镜像名称 | CentOS-8.2-x86_64-RelaseTest | |
instanceID | String | 虚机ID | d1e21b53-54d3-4a8b-af2b-215f823ca7c | |
projectID | String | 项目ID | 0 |
枚举参数
无
请求示例
请求url
GET .../v4/ecs/sfs/vms-list?regionID=7f8653e8657d11edbb550242ac110006&fileSysID=56644622-41d1-5c35-8794-df55bffaff88
请求头header
无
请求体body
无
响应示例
{
"returnObj": {
"currentCount": 6,
"totalCount": 6,
"results": [
{
"instanceId": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"option": "vers=3,async,nolock,noatime,nodiratime,wsize=1048576,rsize=1048576,timeo=600",
"fileSysRoute": "55.243.4.20:/mnt/sfs_cap/e3aacef1e0be40559b38a5c2158aa62e_mqfb3ej839cdz7ub",
"mountPoint": "/mnt/docs/111",
"autoMount": false,
"protocol": "NFSv3",
"fileSysID": "56644622-41d1-5c35-8794-df55bffaff88",
"vmInfo": {
"instanceStatus": "ACTIVE",
"displayName": "ecm-ad6f",
"instanceName": "ecm-ad6f",
"imageName": "CentOS-7.9-x86_64-ReleaseTest-FStest",
"instanceID": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"projectID": "0"
}
},
{
"instanceId": "d3010162-faaf-4556-beca-0f93f8431c45",
"option": "vers=3,async,nolock,noatime,nodiratime,wsize=1048576,rsize=1048576,timeo=600",
"fileSysRoute": "55.243.4.20:/mnt/sfs_cap/e3aacef1e0be40559b38a5c2158aa62e_mqfb3ej839cdz7ub",
"mountPoint": "/mnt/docs/6666",
"autoMount": true,
"protocol": "",
"fileSysID": "56644622-41d1-5c35-8794-df55bffaff88",
"vmInfo": {
"instanceStatus": "ACTIVE",
"displayName": "ecm-ad6f-0001",
"instanceName": "ecm-ad6f-0001",
"imageName": "CentOS-8.2-x86_64-RelaseTest",
"instanceID": "d3010162-faaf-4556-beca-0f93f8431c45",
"projectID": "0"
}
},
{
"instanceId": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"option": "vers=4,async,nolock,noatime,nodiratime,wsize=1048576,rsize=1048576,timeo=600",
"fileSysRoute": "55.243.4.20:/mnt/sfs_cap/e3aacef1e0be40559b38a5c2158aa62e_mqfb3ej839cdz7ub",
"mountPoint": "/mnt/docs/test1012",
"autoMount": true,
"protocol": "NFSv4",
"fileSysID": "56644622-41d1-5c35-8794-df55bffaff88",
"vmInfo": {
"instanceStatus": "ACTIVE",
"displayName": "ecm-ad6f",
"instanceName": "ecm-ad6f",
"imageName": "CentOS-7.9-x86_64-ReleaseTest-FStest",
"instanceID": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"projectID": "0"
}
},
{
"instanceId": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"option": "vers=3,async,nolock,noatime,nodiratime,wsize=1048576,rsize=1048576,timeo=600",
"fileSysRoute": "55.243.4.20:/mnt/sfs_cap/e3aacef1e0be40559b38a5c2158aa62e_mqfb3ej839cdz7ub",
"mountPoint": "/mnt/docs/1103/work/overtime",
"autoMount": true,
"protocol": "NFSv3",
"fileSysID": "56644622-41d1-5c35-8794-df55bffaff88",
"vmInfo": {
"instanceStatus": "ACTIVE",
"displayName": "ecm-ad6f",
"instanceName": "ecm-ad6f",
"imageName": "CentOS-7.9-x86_64-ReleaseTest-FStest",
"instanceID": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"projectID": "0"
}
},
{
"instanceId": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"option": "vers=3,async,nolock,noatime,nodiratime,wsize=1048576,rsize=1048576,timeo=600",
"fileSysRoute": "55.243.4.20:/mnt/sfs_cap/e3aacef1e0be40559b38a5c2158aa62e_mqfb3ej839cdz7ub",
"mountPoint": "/mnt.docs/1123",
"autoMount": true,
"protocol": "NFSv3",
"fileSysID": "56644622-41d1-5c35-8794-df55bffaff88",
"vmInfo": {
"instanceStatus": "ACTIVE",
"displayName": "ecm-ad6f",
"instanceName": "ecm-ad6f",
"imageName": "CentOS-7.9-x86_64-ReleaseTest-FStest",
"instanceID": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"projectID": "0"
}
},
{
"instanceId": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"option": "vers=3,async,nolock,noatime,nodiratime,wsize=1048576,rsize=1048576,timeo=600",
"fileSysRoute": "55.243.4.20:/mnt/sfs_cap/e3aacef1e0be40559b38a5c2158aa62e_mqfb3ej839cdz7ub",
"mountPoint": "/mnt/test1",
"autoMount": true,
"protocol": "NFSv3",
"fileSysID": "56644622-41d1-5c35-8794-df55bffaff88",
"vmInfo": {
"instanceStatus": "ACTIVE",
"displayName": "ecm-ad6f",
"instanceName": "ecm-ad6f",
"imageName": "CentOS-7.9-x86_64-ReleaseTest-FStest",
"instanceID": "d1e21b53-54d3-4a8b-af2b-215f823ca7ce",
"projectID": "0"
}
}
]
},
"details": "",
"message": "SUCCESS",
"description": "成功",
"statusCode": 800
}
状态码
请参考 状态码
错误码
请参考 错误码