云服务器内容精选

  • 响应示例 返回状态码为200:接口调用成功,响应体参考QueryExternalPortResponse。 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" : 200, "pageSize" : 20, "pageIndex" : 1, "data" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } ] } 返回状态码为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
  • 响应参数 返回状态码为200:接口调用成功,响应体参考QueryExternalPortResponse。 表2 QueryExternalPortResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" totalRecords int32 - - 总的数据条数。 200 pageSize int32 - - 每页显示数量。 20 pageIndex int32 - - 当前页数。 1 data ARRAY_REFERENCE 0-1000个列表项,详细请参见表8。 外部接口信息。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/overlay-network/external-ports?pageIndex=1&pageSize=20&sort=name&siteId=a99f794e-b510-438c-a75d-de59f02347eb&id=a99f794e-b510-438c-a75d-de59f02347eb 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
  • URI /controller/campus/v1/sdwan/overlay-network/external-ports 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 pageIndex 否 int32 [0-65535] 1 当前页数,默认是1。 1 pageSize 否 int32 [0-65535] 20 每页显示数量,默认是20,当为空或者为0时,表示不使用。 20 sort 否 string 0~255个字符。 - 排序字段,默认情况下不排序,未使用。 "name" siteId 否 uuid - - 站点ID,不指定外部接口ID时,必须指定。格式是uuid。 "a99f794e-b510-438c-a75d-de59f02347eb" id 否 uuid - - 外部接口ID。格式是uuid。 "a99f794e-b510-438c-a75d-de59f02347eb"
  • 响应示例 返回状态码为200:接口调用成功,响应体参考ExternalPortResponse,返回的外部接口信息中仅包含对应的ID。 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" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } } ] } 返回状态码为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/campus/v1/sdwan/overlay-network/external-ports/action/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 { "externalPorts" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } ] }
  • 响应示例 返回状态码为201:接口调用成功,响应体参考ExternalPortResponse。 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" : "", "success" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } } ] } 返回状态码为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
  • 响应参数 返回状态码为201:接口调用成功,响应体参考ExternalPortResponse。 表7 ExternalPortResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" success ARRAY_REFERENCE 0-100个列表项,详细请参见表8。 创建或者更新成功的外部接口信息。 - fail ARRAY_REFERENCE 0-100个列表项,详细请参见表12。 创建或者更新失败的外部接口信息。 - 表8 ExternalPortInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id uuid - - ExternalPort ID,创建时不填,自动生成,更新时必填。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515a7l6" name string 0~64个字符。 - 外部接口名称。创建时必填。 "Connect to PE" siteId uuid - - 站点ID。创建时必填。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515a7l6" deviceId uuid - - 设备ID。创建时必填。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515a7l6" portId uuid - - 物理端口ID。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515a7l6" isSubInterface boolean true false false 是否子接口。 true vlanId int32 [1-4094] - 子接口号。 2 isEnableMpls boolean true false - 接口是否使能mpls。创建时,默认值为false。 true ipConnection REFERENCE 详细请参见表9。 外部接口的ip链接信息。 - attributes REFERENCE 详细请参见表11。 外部接口属性。 - description string 0~200个字符。 - ExternalPort对应的描述。 - 表9 ExternalPortIpConnection对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ipv4 REFERENCE 详细请参见表10。 Ipv4外部接口信息。 - 表10 ExternalPortIpv4对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ipMode string 4~6个字符。 - ip分配模式:Static。创建时必填。 "Static" customerAddress string 0~15个字符。 - IP地址。 "192.168.0.1" prefixLength int32 [1-32] - 掩码。 24 表11 ExternalPortAttributes对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 mtu int32 [68-9202] 1500 MTU 取值范围:68-9202,默认1500。 1500 TCPmss int32 [128-2048] 1200 TCPmss 取值范围:128-2048,默认1200。 1200 表12 FailExternalPortInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表8。 - - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/overlay-network/external-ports 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 { "externalPorts" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } ] }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 externalPortInfos 是 REFERENCE 详细请参见表2。 外部接口信息 - 表2 ExternalPortInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 externalPorts 否 ARRAY_REFERENCE 1-100个列表项,详细请参见表3。 - - 表3 ExternalPortInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 uuid - - ExternalPort ID,创建时不填,自动生成,更新时必填。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515a7l6" name 否 string 0~64个字符。 - 外部接口名称。创建时必填。 "Connect to PE" siteId 否 uuid - - 站点ID。创建时必填。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515a7l6" deviceId 否 uuid - - 设备ID。创建时必填。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515a7l6" portId 否 uuid - - 物理端口ID。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515a7l6" isSubInterface 否 boolean true false false 是否子接口。 true vlanId 否 int32 [1-4094] - 子接口号。 2 isEnableMpls 否 boolean true false - 接口是否使能mpls。创建时,默认值为false。 true ipConnection 否 REFERENCE 详细请参见表4。 外部接口的ip链接信息。 - attributes 否 REFERENCE 详细请参见表6。 外部接口属性。 - description 否 string 0~200个字符。 - ExternalPort对应的描述。 - 表4 ExternalPortIpConnection对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ipv4 否 REFERENCE 详细请参见表5。 Ipv4外部接口信息。 - 表5 ExternalPortIpv4对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ipMode 否 string 4~6个字符。 - ip分配模式:Static。创建时必填。 "Static" customerAddress 否 string 0~15个字符。 - IP地址。 "192.168.0.1" prefixLength 否 int32 [1-32] - 掩码。 24 表6 ExternalPortAttributes对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 mtu 否 int32 [68-9202] 1500 MTU 取值范围:68-9202,默认1500。 1500 TCPmss 否 int32 [128-2048] 1200 TCPmss 取值范围:128-2048,默认1200。 1200
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/sdwan/overlay-network/external-ports 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 { "externalPorts" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } ] }
  • 响应示例 返回状态码为200:接口调用成功,响应体参考ExternalPortResponse。 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" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "id" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "name" : "Connect to PE", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "portId" : "fbb684c8-0d37-496f-bafa-4b06d515a7l6", "isSubInterface" : true, "vlanId" : 2, "isEnableMpls" : true, "ipConnection" : { "ipv4" : { "ipMode" : "Static", "customerAddress" : "192.168.0.1", "prefixLength" : 24 } }, "attributes" : { "mtu" : 1500, "TCPmss" : 1200 }, "description" : "" } } ] } 返回状态码为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