云服务器内容精选

  • URI /controller/campus/v3/networkconfig/site-templates/{siteTemplateId}/snmp 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteTemplateId 是 string - - 站点模板标识,UUID格式。 "fbde1c5d-5b94-49e3-a912-48641015e45c"
  • 响应示例 返回状态码为200:站点模板SNMP配置结果,返回结构体参见SiteTemplateSnmpResponseDto。 HTTP/1.1 200 OK Date: Thu,13 Sep 2018 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode" : "0", "errmsg" : "", "data" : { "snmpEnable" : true, "protocolVersion" : "V3", "groupName" : null, "userInfos" : [ { "snmpUserName" : "Huawei-Guest", "snmpPasswd" : "********", "snmpAuth":"********" } ], "aclIps" : [ "192.168.1.1" ], "trapEnable" : true, "targetHosts" : [ { "hostIp" : "192.168.2.2", "hostName" : "Huawei-Guest" } ], "updownTrapEnable" : true } } 返回状态码为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的示例 GET /controller/campus/v3/networkconfig/site-templates/fbde1c5d-5b94-49e3-a912-48641015e45c/snmp 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
  • 请求示例 HTTP的示例 PUT /controller/campus/v3/networkconfig/site-templates/fbde1c5d-5b94-49e3-a912-48641015e45c/snmp?isForceOverride=true HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN:CA48D152F6B19D84:637C38259E6974E17788348128A430FEE150E874752CE754B6BF855281219925 { "snmpEnable" : true, "protocolVersion" : "V3", "userInfos" : [ { "snmpUserName" : "Huawei-Guest", "snmpPasswd" : "********", "snmpPrivateProtocol" : "AES128", "snmpAuth":"********", "snmpAuthProtocol" : "SHA" } ], "aclIps" : [ "192.168.1.1" ], "trapEnable" : true, "targetHosts" : [ { "hostIp" : "192.168.2.2", "hostName" : "Huawei-Guest" } ], "updownTrapEnable" : true }
  • 响应示例 返回状态码为200:站点模板SNMP配置结果,返回结构体参见SiteTemplateSnmpResponseDto。 HTTP/1.1 200 OK Date: Thu,13 Sep 2018 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode" : "0", "errmsg" : "", "data" : { "snmpEnable" : true, "protocolVersion" : "V3", "groupName" : null, "userInfos" : [ { "snmpUserName" : "Huawei-Guest", "snmpPasswd" : "********", "snmpPrivateProtocol" : "AES128", "snmpAuth":"********", "snmpAuthProtocol" : "SHA" } ], "aclIps" : [ "192.168.1.1" ], "trapEnable" : true, "targetHosts" : [ { "hostIp" : "192.168.2.2", "hostName" : "Huawei-Guest" } ], "updownTrapEnable" : true } } 返回状态码为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 /controller/campus/v3/networkconfig/site-templates/{siteTemplateId}/snmp 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteTemplateId 是 string - - 站点模板标识,UUID格式。 "fbde1c5d-5b94-49e3-a912-48641015e45c" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 isForceOverride 否 boolean true false - 是否强制覆盖。 true