API网关 APIG-更新VPC通道:请求示例

时间:2023-12-01 09:43:00

请求示例

  • 更新服务器类型的VPC通道

    {
      "balance_strategy" : 2,
      "member_type" : "ip",
      "name" : "VPC_demo",
      "port" : 22,
      "type" : 2,
      "vpc_health_config" : {
        "http_code" : "200",
        "path" : "/vpc/demo",
        "port" : 22,
        "protocol" : "http",
        "threshold_abnormal" : 5,
        "threshold_normal" : 2,
        "time_interval" : 10,
        "timeout" : 5,
        "enable_client_ssl" : false
      },
      "member_groups" : [ {
        "member_group_name" : "test",
        "member_group_weight" : 1,
        "member_group_remark" : "remark"
      }, {
        "member_group_name" : "default",
        "member_group_weight" : 2,
        "member_group_remark" : "remark"
      } ],
      "members" : [ {
        "host" : "192.168.0.5",
        "weight" : 1,
        "member_group_name" : "test"
      }, {
        "host" : "192.168.1.124",
        "weight" : 2,
        "member_group_name" : "default"
      } ]
    }
  • 更新微服务类型的VPC通道

    {
      "balance_strategy" : 1,
      "member_type" : "ip",
      "name" : "VPC_demo",
      "port" : 22,
      "type" : 3,
      "vpc_health_config" : {
        "http_code" : "200",
        "path" : "/vpc/demo",
        "port" : 22,
        "protocol" : "http",
        "threshold_abnormal" : 5,
        "threshold_normal" : 2,
        "time_interval" : 10,
        "timeout" : 5,
        "enable_client_ssl" : false
      },
      "member_groups" : [ {
        "member_group_name" : "test",
        "member_group_weight" : 1,
        "member_group_remark" : "remark",
        "microservice_version" : "v1",
        "microservice_port" : 80
      }, {
        "member_group_name" : "default",
        "member_group_weight" : 2,
        "member_group_remark" : "remark",
        "microservice_version" : "v2",
        "microservice_port" : 80,
        "microservice_labels" : [ {
          "label_name" : "cluster_id",
          "label_value" : "c429700c-5dc4-482a-9c0e-99f6c0635113"
        } ]
      } ],
      "members" : [ {
        "host" : "192.168.0.5",
        "weight" : 1,
        "member_group_name" : "test"
      }, {
        "host" : "192.168.1.124",
        "weight" : 2,
        "member_group_name" : "default"
      } ],
      "microservice_info" : {
        "service_type" : "CCE",
        "cce_info" : {
          "cluster_id" : "ab1485b4f91b45abbcd560be591f7309",
          "namespace" : "default",
          "workload_type" : "deployment",
          "app_name" : "testapp"
        }
      }
    }
support.huaweicloud.com/api-apig/UpdateVpcChannelV2.html