云服务器内容精选

  • 请求示例 HTTP的示例 DELETE /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-syslog:syslog-config 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 restconf-transaction-id: "00000000-0000-0000-0000-000000000000"
  • 响应示例 返回状态码为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 返回状态码为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
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-syslog:syslog-config 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 36个字符。满足正则表达[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}。 - 设备ID。 "00000000-0000-0000-0000-000000000000"
  • 响应示例 返回状态码为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 { "huawei-nce-e-syslog:syslog-config" : { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "global-parameter" : { "interface-name" : "1", "buffer-size" : 1, "log-timestamp" : "date-boot", "log-timezone" : true, "debug-timestamp" : "date-boot", "debug-timezone" : true, "trap-timestamp" : "date-boot", "trap-timezone" : true, "statistic-suppress" : true }, "server" : [ { "ipaddress" : "E2:1:1:1:1:1:1:1", "vrf-name" : "_public_", "port" : 453, "transport-mode" : "tcp", "channel-id" : 5, "facility" : "local7", "ssl-policy-name" : "default" } ], "info-center-source" : [ { "module-name" : "default", "channel-id" : 5, "enable-log" : "", "enable-log-level" : "", "enable-trap" : "", "enable-trap-level" : "" } ] } } 返回状态码为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:操作成功。 表3 syslog-config-info对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-syslog:syslog-config REFERENCE 详细请参见表4。 syslog配置 - 表4 syslog-config对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 config-status string reserved initial configuring-database configured-database-success configured-database-failed configuring-device configured-device-success configured-device-failed reserved 配置状态,对应保留未用状态、初始状态、数据库存储中状态、预配置状态、数据库存储失败状态、部署中状态、成功状态、失败状态;不支持编辑,仅查询返回。 "configured-database-success" last-committed-time string 0~255个字符。 - 最后提交时间,该特性最后提交时间;不支持编辑,仅查询返回。 "2022-01-01 00:00:00" related-pkg-version string 0~255个字符。 - 包版本,插件包版本;不支持编辑,仅查询返回。 "1.0.1" edit-state string RUNNING CANDIDATE UNDEPLOYING UNDEPLOYED - 编辑状态,对应运行状态、候选状态、取消部署状态、未部署状态;不支持编辑,仅查询返回。 "RUNNING" global-parameter REFERENCE 详细请参见表5。 全局配置 - server ARRAY_REFERENCE 0-8个列表项,详细请参见表6。 服务 - info-center-source ARRAY_REFERENCE 0-1000个列表项,详细请参见表7。 信息通道 - 表5 global-parameter对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 interface-name string 1~63个字符。 - 接口名称,1-63字符,需要和设备上的接口名称保持一致。 "1" buffer-size int32 [0-10240] - 日志条数, "合法范围1..10240,其中V200交换机合法范围0..1024" 1 log-timestamp string date-boot date-second date-tenthsecond date-millisecond shortdate-second shortdate-tenthsecond shortdate-millisecond formatdate-second formatdate-tenthsecond formatdate-millisecond - 日志时间类型-boot型,date型,short-date型,format-date型 "date-boot" log-timezone boolean true false true 日志时区 true debug-timestamp string date-boot date-second date-tenthsecond date-millisecond shortdate-second shortdate-tenthsecond shortdate-millisecond formatdate-second formatdate-tenthsecond formatdate-millisecond - debug时间类型-boot型,date型,short-date型,format-date型 "date-boot" debug-timezone boolean true false true debug时区 true trap-timestamp string date-boot date-second date-tenthsecond date-millisecond shortdate-second shortdate-tenthsecond shortdate-millisecond formatdate-second formatdate-tenthsecond formatdate-millisecond - trap时间类型-boot型,date型,short-date型,format-date型 "date-boot" trap-timezone boolean true false true trap时区 true statistic-suppress boolean true false - 连续重复日志的统计抑制功能 true 表6 syslog-config-server对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ipaddress string - - IP地址 "E2:1:1:1:1:1:1:1" vrf-name string 1~31个字符。 _public_ VPN名称,默认为__public__ "_public_" port int64 [1-65535] - 端口 453 transport-mode string udp tcp udp 传输模式 "tcp" channel-id int64 [0-9] - 通道ID 5 facility string local0 local1 local2 local3 local4 local5 local6 local7 local7 设施,枚举值,默认为local7 "local7" ssl-policy-name string 1~23个字符。满足正则表达[a-z0-9_]*。 - ssl策略名称 "default" 表7 syslog-config-info-center-source对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 module-name string 1~31个字符。满足正则表达[^A-Z]*。 - 模块名称."1-31位小写字母或数字,如a-z或0-9,例如:default,其他特性在设备产品文档"日志参考"中可以查到设备当前支持的所有模块名称,如aaa、am,具体以设备产品文档为准。" "default" channel-id int64 [0-9] - 通道ID 5 enable-log boolean true false - 使能日志 - enable-log-level string emergencies alert critical error warning notification informational debugging - 使能日志级别 - enable-trap boolean true false - 使能Trap - enable-trap-level string emergencies alert critical error warning notification informational debugging debugging 使能Trap级别 - 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-syslog:syslog-config 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 restconf-transaction-id: "00000000-0000-0000-0000-000000000000"
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-syslog:syslog-config 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 36个字符。满足正则表达[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}。 - 设备ID。 "00000000-0000-0000-0000-000000000000"
  • 请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 restconf-transaction-id 是 string - - 事务ID。 "00000000-0000-0000-0000-000000000000" 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 info-center-source 是 REFERENCE 详细请参见表4。 信息通道 - 表4 syslog-config-exactProperties-info-center-source-exclude-patch-false-augment对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-syslog:info-center-source 否 ARRAY_REFERENCE 0-1000个列表项,详细请参见表5。 信息通道 - 表5 syslog-config-exactProperties-info-center-source-patch-false对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 module-name 是 string 1~31个字符。满足正则表达[^A-Z]*。 - 模块名称."1-31位小写字母或数字,如a-z或0-9,例如:default,其他特性在设备产品文档"日志参考"中可以查到设备当前支持的所有模块名称,如aaa、am,具体以设备产品文档为准。" "default" channel-id 是 int64 [0-9] - 通道ID 5 enable-log 否 boolean true false - 使能日志 - enable-log-level 否 string emergencies alert critical error warning notification informational debugging - 使能日志级别 - enable-trap 否 boolean true false - 使能Trap - enable-trap-level 否 string emergencies alert critical error warning notification informational debugging - 使能Trap级别 -
  • 请求示例 HTTP的示例 PATCH /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-syslog:syslog-config/info-center-source 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 restconf-transaction-id: "00000000-0000-0000-0000-000000000000" { "huawei-nce-e-syslog:info-center-source" : [ { "module-name" : "default", "channel-id" : 5, "enable-log" : "", "enable-log-level" : "", "enable-trap" : "", "enable-trap-level" : "" } ] }
  • 响应示例 返回状态码为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 返回状态码为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
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-syslog:syslog-config/info-center-source 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 36个字符。满足正则表达[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}。 - 设备ID。 "00000000-0000-0000-0000-000000000000"
  • 请求示例 HTTP的示例 GET /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-syslog:syslog-config/info-center-source 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 restconf-transaction-id: "00000000-0000-0000-0000-000000000000"
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-syslog:syslog-config/info-center-source 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 36个字符。满足正则表达[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}。 - 设备ID。 "00000000-0000-0000-0000-000000000000"
  • 响应示例 返回状态码为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 { "huawei-nce-e-syslog:info-center-source" : [ { "module-name" : "default", "channel-id" : 5, "enable-log" : "", "enable-log-level" : "", "enable-trap" : "", "enable-trap-level" : "" } ] } 返回状态码为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:操作成功。 表3 info-center-source-list对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-syslog:info-center-source ARRAY_REFERENCE 详细请参见表4。 信息通道 - 表4 syslog-config-exactProperties-info-center-source对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 module-name string 1~31个字符。满足正则表达[^A-Z]*。 - 模块名称."1-31位小写字母或数字,如a-z或0-9,例如:default,其他特性在设备产品文档"日志参考"中可以查到设备当前支持的所有模块名称,如aaa、am,具体以设备产品文档为准。" "default" channel-id int64 [0-9] - 通道ID 5 enable-log boolean true false - 使能日志 - enable-log-level string emergencies alert critical error warning notification informational debugging - 使能日志级别 - enable-trap boolean true false - 使能Trap - enable-trap-level string emergencies alert critical error warning notification informational debugging debugging 使能Trap级别 - 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。