API网关 APIG-创建编排规则:请求示例
请求示例
-
创建list策略编排规则示例。
{ "orchestration_name" : "orchestration_demo_1", "orchestration_strategy" : "list", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" }, "orchestration_map" : [ { "map_param_list" : [ "10001", "10002" ], "mapped_param_value" : "1" }, { "map_param_list" : [ "10003", "10004" ], "mapped_param_value" : "2" } ], "is_preprocessing" : false }
-
创建range策略编排规则示例。
{ "orchestration_name" : "orchestration_demo_2", "orchestration_strategy" : "range", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" }, "orchestration_map" : [ { "map_param_range" : { "range_start" : "1", "range_end" : "1000" }, "mapped_param_value" : "1" } ] }
-
创建hash策略编排规则示例。
{ "orchestration_name" : "orchestration_demo_3", "orchestration_strategy" : "hash", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" } }
-
创建hash_range策略编排规则示例。
{ "orchestration_name" : "orchestration_demo_4", "orchestration_strategy" : "hash_range", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" }, "orchestration_map" : [ { "map_param_range" : { "range_start" : "1", "range_end" : "1000" }, "mapped_param_value" : "1" } ] }
-
创建none_value策略编排规则示例。
{ "orchestration_name" : "orchestration_demo_5", "orchestration_strategy" : "none_value", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" }, "orchestration_map" : [ { "mapped_param_value" : "1" } ] }
-
创建default策略编排规则示例。
{ "orchestration_name" : "orchestration_demo_6", "orchestration_strategy" : "default", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" }, "orchestration_map" : [ { "mapped_param_value" : "1" } ] }
-
创建head_n策略编排规则示例。
{ "orchestration_name" : "orchestration_demo_7", "orchestration_strategy" : "head_n", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" }, "orchestration_map" : [ { "intercept_length" : 10, "mapped_param_value" : "1" } ] }
-
创建tail_n策略编排规则示例。
{ "orchestration_name" : "orchestration_demo_8", "orchestration_strategy" : "tail_n", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" }, "orchestration_map" : [ { "intercept_length" : 10, "mapped_param_value" : "1" } ] }
-
创建tail_n预处理策略编排规则示例。
{ "orchestration_name" : "orchestration_demo_8", "orchestration_strategy" : "tail_n", "orchestration_mapped_param" : { "mapped_param_name" : "shared-tag", "mapped_param_type" : "number", "mapped_param_location" : "header" }, "orchestration_map" : [ { "intercept_length" : 10 } ], "is_preprocessing" : true }