API网关 APIG-导入微服务:请求示例

时间:2024-11-11 18:22:32

请求示例

  • 导入 CS E微服务

    {
      "group_info" : {
        "group_id" : "6329eaa17736412b988536179cd8d662",
        "group_name" : "",
        "app_id" : ""
      },
      "service_type" : "CSE",
      "protocol" : "HTTPS",
      "apis" : [ {
        "name" : "api1",
        "req_method" : "ANY",
        "req_uri" : "/test",
        "match_mode" : "SWA"
      } ],
      "backend_timeout" : 5000,
      "auth_type" : "NONE",
      "cors" : false,
      "cse_info" : {
        "engine_id" : "fde2c21c-5bd9-40f0-ad6a-81e4b6782805a",
        "service_id" : "92919f98fba80c2df13cc285c983946c90e635ff",
        "version" : "1.0.0"
      }
    }
  • 导入CCE工作负载,负载类型为无状态负载Deployment

    {
      "group_info" : {
        "group_id" : "6329eaa17736412b988536179cd8d662",
        "group_name" : "",
        "app_id" : ""
      },
      "service_type" : "CCE",
      "protocol" : "HTTPS",
      "apis" : [ {
        "name" : "dp",
        "req_method" : "ANY",
        "req_uri" : "/test",
        "match_mode" : "SWA"
      } ],
      "backend_timeout" : 5000,
      "auth_type" : "NONE",
      "cors" : false,
      "cce_info" : {
        "cluster_id" : "11069278-f9f8-11ec-b1b2-0255ac100b06",
        "namespace" : "test",
        "workload_type" : "deployment",
        "app_name" : "dp",
        "port" : 80,
        "labels" : [ {
          "label_name" : "cluster_id",
          "label_value" : "c429700c-5dc4-482a-9c0e-99f6c0635113"
        } ]
      }
    }
support.huaweicloud.com/api-apig/ImportMicroservice.html