云服务器内容精选

  • 响应示例 返回状态码为200:更新成功返回。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "totalRecords" : 100, "data" : [ { "parentId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "tenant1", "isExclusiveResource" : false, "vpnNumber" : 100, "bandWidth" : 100, "siteNumber" : 100, "sdwanBandwidth" : 100, "encryptedSdwanBandwidth" : 100, "vxlanBandwidth" : 100, "status" : 0, "role" : "Interworking Gateway", "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "site1" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 PUT /controller/sdwan/v1/naas/virtual/device HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN: x-yyyyyy { "deviceInfos" : [ { "parentId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "tenant1", "isExclusiveResource" : false, "vpnNumber" : 100, "bandWidth" : 100, "siteNumber" : 100, "sdwanBandwidth" : 100, "encryptedSdwanBandwidth" : 100, "vxlanBandwidth" : 100, "status" : 0, "role" : "Interworking Gateway", "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "site1" } ] }
  • 响应示例 返回状态码为200:查询成功返回。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "totalRecords" : 100, "data" : [ { "parentId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "tenant1", "isExclusiveResource" : false, "vpnNumber" : 100, "bandWidth" : 100, "siteNumber" : 100, "sdwanBandwidth" : 100, "encryptedSdwanBandwidth" : 100, "vxlanBandwidth" : 100, "status" : 0, "role" : "Interworking Gateway", "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "site1" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /controller/sdwan/v1/naas/virtual/device/batch-query HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "parentId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "tenant1", "deviceId" : "00000000-0000-0000-0000-000000000000", "status" : 0, "sort" : "+deviceName,-deviceName", "pageIndex" : 1, "pageSize" : 10 }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 queryPara 是 REFERENCE 详细请参见表2。 子设备信息。 - 表2 VirtualDeviceQueryRequest对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 parentId 否 string 0~128个字符。 - 父设备ID。 "00000000-0000-0000-0000-000000000000" deviceName 否 string 0~128个字符。 - 设备名称。 "tenant1" deviceId 否 string 0~128个字符。 - 设备ID。 "00000000-0000-0000-0000-000000000000" status 否 int32 [0-4] - 子设备状态。0:注册异常,1:上线异常,2:离线异常,3:在线,4:离线。 0 sort 否 string 0~128个字符。 - 排序。 "+deviceName,-deviceName" pageIndex 否 int32 [1-1000] - 页面索引,不填时默认为1。 1 pageSize 否 int32 [1-100] - 页面大小。 10
  • 响应参数 返回状态码为200:正常响应返回体。 表3 VirtualDeviceDeleteResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" success ARRAY_REFERENCE 0-100个列表项,详细请参见表4。 成功删除列表。 - fail ARRAY_REFERENCE 0-100个列表项,详细请参见表4。 失败删除列表。 - 表4 VirtualDeviceDeleteInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 deviceId string 0~64个字符。 - 设备ID。 "00000000-0000-0000-0000-000000000000" deviceName string 0~64个字符。 - 设备名称。 "tenant1" errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:正常响应返回体。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "success" : [ { "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "tenant1", "errcode" : "0", "errmsg" : "" } ], "fail" : [ { "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "tenant1", "errcode" : "0", "errmsg" : "" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /controller/sdwan/v1/naas/virtual/device/batch-delete HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "deviceIds" : [ "00000000-0000-0000-0000-000000000000" ] }
  • 响应示例 返回状态码为201:创建成功返回。 HTTP/1.1 201 Created Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "totalRecords" : 100, "data" : [ { "parentId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "tenant1", "isExclusiveResource" : false, "vpnNumber" : 100, "bandWidth" : 100, "siteNumber" : 100, "sdwanBandwidth" : 100, "encryptedSdwanBandwidth" : 100, "vxlanBandwidth" : 100, "status" : 0, "role" : "Interworking Gateway", "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "site1" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /controller/sdwan/v1/naas/virtual/device HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "deviceInfos" : [ { "parentId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "deviceName" : "tenant1", "isExclusiveResource" : false, "vpnNumber" : 100, "bandWidth" : 100, "siteNumber" : 100, "sdwanBandwidth" : 100, "encryptedSdwanBandwidth" : 100, "vxlanBandwidth" : 100, "status" : 0, "role" : "Interworking Gateway", "siteId" : "00000000-0000-0000-0000-000000000000", "siteName" : "site1" } ] }
  • 响应参数 返回状态码为201:创建成功返回。 表4 VirtualDeviceResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" totalRecords int32 - - 总数。 100 data ARRAY_REFERENCE 0-32个列表项,详细请参见表5。 子设备列表。 - 表5 VirtualDeviceInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 parentId string 0~128个字符。 - 父设备ID。 "00000000-0000-0000-0000-000000000000" deviceId string 0~64个字符。 - 子设备ID, 创建时不使用。 "00000000-0000-0000-0000-000000000000" deviceName string 1~63个字符。 - 子设备名称。 "tenant1" isExclusiveResource boolean true false - 是否独占资源。 false vpnNumber int32 [1-1024] - VPN数量。 100 bandWidth int32 [10-10240] - 带宽,废弃,由sdwan带宽,sdwan加密带宽,vxlan带宽替代。 100 siteNumber int32 [1-1024] - 站点数量。 100 sdwanBandwidth int32 [0-10000] - sdwan带宽,Mbit/s。 100 encryptedSdwanBandwidth int32 [0-2000] - sdwan加密带宽,Mbit/s。 100 vxlanBandwidth int32 [0-10000] - VXLAN带宽,Mbit/s。 100 status int32 [0-6] - 子设备状态,非配置字段,查询时返回。0:注册异常,1:上线异常,2:离线异常,3:在线,4:离线。 0 role string 1~32个字符。 - 设备角色。取值范围:Interworking Gateway。不填默认Interworking Gateway。 "Interworking Gateway" siteId string 1~64个字符。 - 站点ID。 "00000000-0000-0000-0000-000000000000" siteName string 0~64个字符。 - 站点名称。 "site1" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 VirtualDevice 是 REFERENCE 详细请参见表2。 子设备信息。 - 表2 VirtualDeviceRequest对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceInfos 否 ARRAY_REFERENCE 1-100个列表项,详细请参见表3。 子设备列表。 - 表3 VirtualDeviceInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 parentId 否 string 0~128个字符。 - 父设备ID。 "00000000-0000-0000-0000-000000000000" deviceId 否 string 0~64个字符。 - 子设备ID, 创建时不使用。 "00000000-0000-0000-0000-000000000000" deviceName 否 string 1~63个字符。 - 子设备名称。 "tenant1" isExclusiveResource 否 boolean true false - 是否独占资源。 false vpnNumber 否 int32 [1-1024] - VPN数量。 100 bandWidth 否 int32 [10-10240] - 带宽,废弃,由sdwan带宽,sdwan加密带宽,vxlan带宽替代。 100 siteNumber 否 int32 [1-1024] - 站点数量。 100 sdwanBandwidth 否 int32 [0-10000] - sdwan带宽,Mbit/s。 100 encryptedSdwanBandwidth 否 int32 [0-2000] - sdwan加密带宽,Mbit/s。 100 vxlanBandwidth 否 int32 [0-10000] - VXLAN带宽,Mbit/s。 100 status 否 int32 [0-6] - 子设备状态,非配置字段,查询时返回。0:注册异常,1:上线异常,2:离线异常,3:在线,4:离线。 0 role 否 string 1~32个字符。 - 设备角色。取值范围:Interworking Gateway。不填默认Interworking Gateway。 "Interworking Gateway" siteId 否 string 1~64个字符。 - 站点ID。 "00000000-0000-0000-0000-000000000000" siteName 否 string 0~64个字符。 - 站点名称。 "site1"
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 switchSiteParam 是 REFERENCE 详细请参见表2。 子设备切换站点入参。 - 表2 VirtualDeviceSwitchSiteParam对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deviceId 否 string 1~64个字符。 - 子设备id。 "00000000-0000-0000-0000-000000000000" siteId 否 string 0~64个字符。 - 切换的站点id。 "00000000-0000-0000-0000-000000000000"
  • 请求示例 HTTP的示例 POST /controller/sdwan/v1/naas/virtual/device/switch-site HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "deviceId" : "00000000-0000-0000-0000-000000000000", "siteId" : "00000000-0000-0000-0000-000000000000" }
  • 响应参数 返回状态码为200:子设备切换站点结果。 表3 VirtualDeviceSwitchSiteResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表4。 返回结果。 - 表4 VirtualDeviceSwitchSiteParam对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 deviceId string 1~64个字符。 - 子设备id。 "00000000-0000-0000-0000-000000000000" siteId string 0~64个字符。 - 切换的站点id。 "00000000-0000-0000-0000-000000000000" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。