云服务器内容精选

  • 请求示例 HTTP的示例 PUT /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-route-policy:route-policy/policy1 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" { "huawei-nce-e-route-policy:route-policy" : [ { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "name" : "policy1", "nodes" : [ { "sequence" : 1, "match-mode" : "permit", "condition" : { "match-tag" : 1, "match-ipv4-type" : "ipv4-prefix", "match-ipv4-prefix" : "prefix1", "match-ipv6-type" : "ipv6-prefix", "match-ipv6-prefix" : "prefix1", "community-filter" : [ { "community-filter-name" : "communityFilterName1" } ], "ext-community-filter" : [ { "ext-community-filter-name" : "extCommunityFilterName1" } ] }, "action" : { "apply-tag" : 10, "apply-cost" : 10, "apply-local-preference" : 10, "apply-ext-community-color" : "100", "apply-community" : { "operation" : "replace", "set-community-type" : "inline", "communities" : [ "1:1" ] }, "apply-ext-community" : { "operation" : "replace", "ext-community-member" : [ { "value" : "1:1" } ] } } } ] } ] }
  • 响应示例 返回状态码为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
  • 请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 restconf-transaction-id 是 string - - 事务ID。 "00000000-0000-0000-0000-000000000000" 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-route-policy:route-policy 是 REFERENCE 详细请参见表4。 路由策略配置参数。 -
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-route-policy:route-policy/{name} 表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" name 是 string 1~200个字符。 - 名称,单一主键字段。 "policy1"
  • 请求示例 HTTP的示例 GET /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-route-policy:route-policy/policy1/nodes 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"
  • 响应参数 返回状态码为200:操作成功。 表3 nodes-list对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-route-policy:nodes ARRAY_REFERENCE 详细请参见表4。 节点。 - 表4 nes-ne-route-policy-exactProperties-nodes对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 sequence int64 [0-65535] - 序号,单一主键字段。 1 match-mode string permit deny - 匹配类型。 "permit" condition REFERENCE 详细请参见表6。 条件。 - action REFERENCE 详细请参见表9。 应用。 - 返回状态码为400:请求参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-route-policy:route-policy/{name}/nodes 表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" name 是 string 1~200个字符。 - 名称,单一主键字段。 "policy1"
  • 响应示例 返回状态码为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-route-policy:nodes" : [ { "sequence" : 1, "match-mode" : "permit", "condition" : { "match-tag" : 1, "match-ipv4-type" : "ipv4-prefix", "match-ipv4-prefix" : "prefix1", "match-ipv6-type" : "ipv6-prefix", "match-ipv6-prefix" : "prefix1", "community-filter" : [ { "community-filter-name" : "communityFilterName1" } ], "ext-community-filter" : [ { "ext-community-filter-name" : "extCommunityFilterName1" } ] }, "action" : { "apply-tag" : 10, "apply-cost" : 10, "apply-local-preference" : 10, "apply-ext-community-color" : "100", "apply-community" : { "operation" : "replace", "set-community-type" : "inline", "communities" : [ "1:1" ] }, "apply-ext-community" : { "operation" : "replace", "ext-community-member" : [ { "value" : "1:1" } ] } } } ] } 返回状态码为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
  • 请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 restconf-transaction-id 是 string - - 事务ID。 "00000000-0000-0000-0000-000000000000" 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 nodes 是 REFERENCE 详细请参见表4。 节点。 -
  • 请求示例 HTTP的示例 PUT /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-route-policy:route-policy/policy1/nodes/1 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-route-policy:nodes" : [ { "sequence" : 1, "match-mode" : "permit", "condition" : { "match-tag" : 1, "match-ipv4-type" : "ipv4-prefix", "match-ipv4-prefix" : "prefix1", "match-ipv6-type" : "ipv6-prefix", "match-ipv6-prefix" : "prefix1", "community-filter" : [ { "community-filter-name" : "communityFilterName1" } ], "ext-community-filter" : [ { "ext-community-filter-name" : "extCommunityFilterName1" } ] }, "action" : { "apply-tag" : 10, "apply-cost" : 10, "apply-local-preference" : 10, "apply-ext-community-color" : "100", "apply-community" : { "operation" : "replace", "set-community-type" : "inline", "communities" : [ "1:1" ] }, "apply-ext-community" : { "operation" : "replace", "ext-community-member" : [ { "value" : "1:1" } ] } } } ] }
  • 响应示例 返回状态码为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-route-policy:route-policy/{name}/nodes/{sequence} 表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" name 是 string 1~200个字符。 - 名称,单一主键字段。 "policy1" sequence 是 int64 [0-65535] - 序号,单一主键字段。 "1"
  • 响应示例 返回状态码为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-route-policy:route-policy" : [ { "config-status" : "configured-database-success", "last-committed-time" : "2022-01-01 00:00:00", "related-pkg-version" : "1.0.1", "edit-state" : "RUNNING", "name" : "policy1", "nodes" : [ { "sequence" : 1, "match-mode" : "permit", "condition" : { "match-tag" : 1, "match-ipv4-type" : "ipv4-prefix", "match-ipv4-prefix" : "prefix1", "match-ipv6-type" : "ipv6-prefix", "match-ipv6-prefix" : "prefix1", "community-filter" : [ { "community-filter-name" : "communityFilterName1" } ], "ext-community-filter" : [ { "ext-community-filter-name" : "extCommunityFilterName1" } ] }, "action" : { "apply-tag" : 10, "apply-cost" : 10, "apply-local-preference" : 10, "apply-ext-community-color" : "100", "apply-community" : { "operation" : "replace", "set-community-type" : "inline", "communities" : [ "1:1" ] }, "apply-ext-community" : { "operation" : "replace", "ext-community-member" : [ { "value" : "1:1" } ] } } } ] } ] } 返回状态码为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-route-policy:route-policy/{name} 表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" name 是 string 1~200个字符。 - 名称,单一主键字段。 "policy1"
  • 请求示例 HTTP的示例 GET /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-route-policy:route-policy/policy1 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"