云服务器内容精选

  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template:replace-template HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "huawei-nce-aoc-config-template:input": { "template-id": "2669355e-5c6c-4df4-bf68-5274309719cc", "template-content":"---\nhuawei-nce-e-vlan:vlan:\n- vlan-id: 1\n name: \"vlan1\"\n description: \"vlan1\"\n unknown-flow-drop: null\nhuawei-nce-e-snmp-user:snmp-user:\n agent-enable: true\n password-min-length: 10\n version: \"{snmp_user_version}\"", "content-type":"yaml" } }
  • 响应示例 返回状态码为204:成功 HTTP/1.1 204 No Content Date: Thu,21 Dec 2023 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: Thu,21 Dec 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 replace-template 是 REFERENCE 详细请参见表2。 copy template - 表2 replace-template-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:input REFERENCE 详细请参见表3。 input type - 表3 input对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 template-id 否 string 1~128个字符。 - 模板ID。 参数template-id与template-name必须选择其一写入请求参数中,且不能同时存在。 "2669355e-5c6c-4df4-bf68-5274309719cc" template-name 否 string 1~128个字符。 - 模板名称。 参数template-id与template-name必须选择其一写入请求参数中,且不能同时存在。 "test_template" template-content 是 string 0~2097152个字符。 - 模板内容 "---\\nhuawei-nce-e-vlan:vlan:\\n- vlan-id: 1\\n name: \\\"vlan1\\\"\\n description: \\\"vlan1\\\"\\n unknown-flow-drop: null\\nhuawei-nce-e-snmp-user:snmp-user:\\n agent-enable: true\\n password-min-length: 10\\n version: \\\"{snmp_user_version}\\\"" content-type 是 string json yaml - 模板内容格式Json/Yaml "yaml" ignore-anonymize-node 否 boolean true false true 是否替换敏感字段 true
  • 响应参数 返回状态码为200:成功 表1 create-temporary-job-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:output REFERENCE 详细请参见表2。 - - 表2 create-temporary-job-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 job-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 "5c261eb5-2f4a-4acc-a747-c77ee1d18083" 返回状态码为400:失败 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:成功 HTTP/1.1 200 OK Date: Thu,21 Dec 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "huawei-nce-aoc-config-template:output" : { "job-id" : "5c261eb5-2f4a-4acc-a747-c77ee1d18083" } } 返回状态码为400:失败 HTTP/1.1 400 Bad Request Date: Thu,21 Dec 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template:create-temporary-job HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 delete-temporary-job 是 REFERENCE 详细请参见表2。 delete temporary job - 表2 delete-temporary-job-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:input REFERENCE 详细请参见表3。 - - 表3 delete-temporary-job-input-body对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 job-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 "5c261eb5-2f4a-4acc-a747-c77ee1d18083"
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template:delete-temporary-job HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "huawei-nce-aoc-config-template:input": { "job-id": "5c261eb5-2f4a-4acc-a747-c77ee1d18083" } }
  • 响应示例 返回状态码为204:成功 HTTP/1.1 204 No Content Date: Thu,21 Dec 2023 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: Thu,21 Dec 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 execute-temporary-job 是 REFERENCE 详细请参见表2。 execute temporary job - 表2 execute-temporary-job-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:input REFERENCE 详细请参见表3。 - - 表3 execute-temporary-job-input-body对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 job-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 "5c261eb5-2f4a-4acc-a747-c77ee1d18083"
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template:execute-temporary-job HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "huawei-nce-aoc-config-template:input": { "job-id": "5c261eb5-2f4a-4acc-a747-c77ee1d18083" } }
  • 响应示例 返回状态码为204:成功 HTTP/1.1 204 No Content Date: Thu,21 Dec 2023 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: Thu,21 Dec 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:成功 表4 query-temporary-change-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:output REFERENCE 详细请参见表5。 - - 表5 query-temporary-change-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 change-template-infos ARRAY_REFERENCE 详细请参见表6。 template info - process int32 [0-65535] - 完成进度 50 total int32 [0-65535] - 总模板数量 10 表6 change-template-info对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 template-id string 0~128个字符。 - configure template id - template-name string 1~128个字符。 - template name - change-template-content string 0~1048576个字符。 - configure template content - error-message string 0~256个字符。 - error message - 返回状态码为400:失败 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:成功 HTTP/1.1 200 OK Date: Thu,21 Dec 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "huawei-nce-aoc-config-template:output" : { "change-template-infos" : [ { "template-id" : "58f9035e-ce63-4c6c-b588-7998c7c9168b", "template-name" : "test", "change-template-content": "---\nhuawei-nce-e-ifm:interface:\n- name: \"GE1/1/1\"\n ifm-class: \"main-interface\"\n type: \"GE\"\n number: \"1/1/1\"\n level: \"L2\"\n link-up-down-trap-enable: true\n admin-status: \"down\"\n description: \"description\"\n" } ], "process" : 50, "total" : 10 } } 返回状态码为400:失败 HTTP/1.1 400 Bad Request Date: Thu,21 Dec 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template:query-temporary-change HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "huawei-nce-aoc-config-template:input": { "job-id": "5c261eb5-2f4a-4acc-a747-c77ee1d18083", "content-type":"yaml" } }