Estos contenidos se han traducido de forma automática para su comodidad, pero Huawei Cloud no garantiza la exactitud de estos. Para consultar los contenidos originales, acceda a la versión en inglés.
Actualización más reciente 2025-12-22 GMT+08:00

Modificación de un complemento

Función

Esta API se utiliza para modificar un complemento.

  • Los nombres de los complementos deben ser únicos.

  • El tipo de complemento y el ámbito no se pueden modificar.

Método de invocación

Para obtener más información, véase invocación de API.

URI

PUT /v2/{project_id}/apigw/instances/{instance_id}/plugins/{plugin_id}

Tabla 1 Parámetros de ruta

Parámetro

Obligatorio

Tipo

Descripción

project_id

String

ID del proyecto. Para obtener más información sobre cómo obtenerlo, véase Obtención de un ID de proyecto.

instance_id

String

ID de gateway, que se puede obtener de la información de gateway en la consola de APIG.

plugin_id

String

ID de complemento.

Parámetros de solicitud

Tabla 2 Parámetros de encabezado de solicitud

Parámetro

Obligatorio

Tipo

Descripción

X-Auth-Token

String

Token de usuario. Se puede obtener invocando a la API de IAM utilizada para obtener un token de usuario. El valor de X-Subject-Token en el encabezado de respuesta es un token.

Tabla 3 Parámetros del cuerpo de solicitud

Parámetro

Obligatorio

Tipo

Descripción

plugin_name

String

Nombre del complemento. Ingrese de 3 a 255 caracteres, comenzando con una letra. Solo se permiten letras, dígitos y guiones bajos (_).

plugin_type

String

Tipo de complemento

  • cors: intercambio de recursos entre orígenes.

  • set_resp_headers: gestión de encabezados de respuesta HTTP.

  • kafka_log: empuje de log de Kafka.

  • breaker: interruptor.

  • rate_limit: Solicitud de limitación.

  • Third_auth: Autenticación de terceros.

  • proxy_cache: Caché de respuestas.

  • proxy_mirror: duplicación de solicitudes

plugin_scope

String

Alcance del complemento. global: Visible para todos los gateways.

plugin_content

String

Contenido del complemento en formato JSON. Para obtener más información, consulte la definición del modelo.

  • CorsPluginContent

  • SetRespHeadersContent

  • KafkaLogContent

  • BreakerContent

  • RateLimitContent

  • ThirdAuthContent

  • ProxyCacheContent

  • ProxyMirrorContent

Máximo: 65535

remark

No

String

Descripción del complemento, con un máximo de 255 caracteres.

Máximo: 255

Parámetros de respuesta

Código de estado: 200

Tabla 4 Parámetros del cuerpo de respuesta

Parámetro

Tipo

Descripción

plugin_id

String

ID de complemento.

plugin_name

String

Nombre del complemento. Se comienza con una letra y solo se incluye letras, dígitos, guiones (-) y guiones bajos (_). (de 3 a 255 caracteres)

plugin_type

String

Tipo de complemento

  • cors: intercambio de recursos entre orígenes.

  • set_resp_headers: gestión de encabezados de respuesta HTTP.

  • kafka_log: empuje de log de Kafka.

  • breaker: interruptor.

  • rate_limit: Solicitud de limitación.

  • Third_auth: Autenticación de terceros.

  • proxy_cache: Caché de respuestas.

  • proxy_mirror: duplicación de solicitudes

plugin_scope

String

Alcance del complemento. global: Visible para todos los gateways.

plugin_content

String

Contenido del complemento en formato JSON. Para obtener más información, consulte la definición del modelo.

  • CorsPluginContent

  • SetRespHeadersContent

  • KafkaLogContent

  • BreakerContent

  • RateLimitContent

  • ThirdAuthContent

  • ProxyCacheContent

  • ProxyMirrorContent

Máximo: 65535

remark

String

Descripción del complemento, con un máximo de 255 caracteres.

Máximo: 255

create_time

String

Tiempo de creación.

update_time

String

Tiempo de actualización.

Código de estado: 400

Tabla 5 Parámetros del cuerpo de respuesta

Parámetro

Tipo

Descripción

error_code

String

Código de error.

error_msg

String

Mensaje de error.

Código de estado: 401

Tabla 6 Parámetros del cuerpo de respuesta

Parámetro

Tipo

Descripción

error_code

String

Código de error.

error_msg

String

Mensaje de error.

Código de estado: 403

Tabla 7 Parámetros del cuerpo de respuesta

Parámetro

Tipo

Descripción

error_code

String

Código de error.

error_msg

String

Mensaje de error.

Código de estado: 404

Tabla 8 Parámetros del cuerpo de respuesta

Parámetro

Tipo

Descripción

error_code

String

Código de error.

error_msg

String

Mensaje de error.

Código de estado: 500

Tabla 9 Parámetros del cuerpo de respuesta

Parámetro

Tipo

Descripción

error_code

String

Código de error.

error_msg

String

Mensaje de error.

Ejemplo de las solicitudes

  • Updating a CORS plug-in

    {
      "plugin_name" : "CORS",
      "plugin_type" : "cors",
      "plugin_scope" : "global",
      "plugin_content" : "{\"allow_origin\": \"*\",\"allow_methods\": \"GET,POST,PUT\",\"allow_headers\": \"Content-Type,Accept,Accept-Ranges,Cache-Control\",\"expose_headers\": \"X-Request-Id,X-Apig-Latency\",\"max_age\": 172800,\"allow_credentials\": true}",
      "remark" : "Cross-origin resource sharing"
    }
  • Actualización de un complemento de encabezado de respuesta de HTTP

    {
      "plugin_name" : "HTTP Response Header Plug-in",
      "plugin_type" : "set_resp_headers",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"response_headers\\\":[{\\\"name\\\":\\\"x-demo\\\",\\\"value_type\\\":\\\"custom_value\\\",\\\"value\\\":\\\"sss\\\",\\\"action\\\":\\\"append\\\"}]}",
      "remark" : "HTTP response header management"
    }
  • Actualización de un complemento de limitación de solicitudes

    {
      "plugin_name" : "Request Throttling Plug-in",
      "plugin_type" : "rate_limit",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"scope\\\":\\\"basic\\\",\\\"default_time_unit\\\":\\\"minute\\\",\\\"default_interval\\\":1,\\\"api_limit\\\":50,\\\"app_limit\\\":0,\\\"user_limit\\\":0,\\\"ip_limit\\\":0,\\\"algorithm\\\":\\\"counter\\\",\\\"specials\\\":[],\\\"parameters\\\":[],\\\"rules\\\":[]}",
      "remark" : "Request throttling"
    }
  • Actualización de un complemento de inserción de logs de Kafka

    {
      "plugin_name" : "Kafka Log Plug-in",
      "plugin_type" : "kafka_log",
      "plugin_scope" : "app",
      "plugin_content" : "{\\\"broker_list\\\":[\\\"0.0.0.0:11\\\"],\\\"topic\\\":\\\"topic\\\",\\\"key\\\":\\\"\\\",\\\"max_retry_count\\\":0,\\\"retry_backoff\\\":1,\\\"sasl_config\\\":{\\\"security_protocol\\\":\\\"PLAINTEXT\\\",\\\"sasl_mechanisms\\\":\\\"PLAIN\\\",\\\"sasl_username\\\":\\\"\\\",\\\"sasl_password\\\":\\\"\\\",\\\"ssl_ca_content\\\":\\\"\\\"},\\\"meta_config\\\":{\\\"system\\\":{\\\"start_time\\\":true,\\\"request_id\\\":true,\\\"client_ip\\\":true,\\\"api_id\\\":false,\\\"user_name\\\":false,\\\"app_id\\\":false,\\\"access_model1\\\":false,\\\"request_time\\\":true,\\\"http_status\\\":true,\\\"server_protocol\\\":false,\\\"scheme\\\":true,\\\"request_method\\\":true,\\\"host\\\":false,\\\"api_uri_mode\\\":false,\\\"uri\\\":false,\\\"request_size\\\":false,\\\"response_size\\\":false,\\\"upstream_uri\\\":false,\\\"upstream_addr\\\":true,\\\"upstream_status\\\":true,\\\"upstream_connect_time\\\":false,\\\"upstream_header_time\\\":false,\\\"upstream_response_time\\\":true,\\\"all_upstream_response_time\\\":false,\\\"region_id\\\":false,\\\"auth_type\\\":false,\\\"http_x_forwarded_for\\\":true,\\\"http_user_agent\\\":true,\\\"error_type\\\":true,\\\"access_model2\\\":false,\\\"inner_time\\\":false,\\\"proxy_protocol_vni\\\":false,\\\"proxy_protocol_vpce_id\\\":false,\\\"proxy_protocol_addr\\\":false,\\\"body_bytes_sent\\\":false,\\\"api_name\\\":false,\\\"app_name\\\":false,\\\"provider_app_id\\\":false,\\\"provider_app_name\\\":false,\\\"custom_data_log01\\\":false,\\\"custom_data_log02\\\":false,\\\"custom_data_log03\\\":false,\\\"custom_data_log04\\\":false,\\\"custom_data_log05\\\":false,\\\"custom_data_log06\\\":false,\\\"custom_data_log07\\\":false,\\\"custom_data_log08\\\":false,\\\"custom_data_log09\\\":false,\\\"custom_data_log10\\\":false,\\\"response_source\\\":false},\\\"call_data\\\":{\\\"log_request_header\\\":false,\\\"request_header_filter\\\":\\\"\\\",\\\"log_request_query_string\\\":false,\\\"request_query_string_filter\\\":\\\"\\\",\\\"log_request_body\\\":false,\\\"log_response_header\\\":false,\\\"response_header_filter\\\":\\\"\\\",\\\"log_response_body\\\":false,\\\"custom_authorizer\\\":{\\\"frontend\\\":[],\\\"backend\\\":[]}}}}",
      "remark" : "Kafka log push"
    }
  • Actualización de un complemento de disyuntor

    {
      "plugin_name" : "Circuit Breaker Plug-in",
      "plugin_type" : "breaker",
      "plugin_scope" : "app",
      "plugin_content" : "{\\\"breaker_condition\\\":{\\\"breaker_type\\\":\\\"timeout\\\",\\\"breaker_mode\\\":\\\"counter\\\",\\\"unhealthy_condition\\\":\\\"\\\",\\\"unhealthy_threshold\\\":30,\\\"min_call_threshold\\\":20,\\\"unhealthy_percentage\\\":51,\\\"time_window\\\":15,\\\"open_breaker_time\\\":15},\\\"downgrade_default\\\":null,\\\"downgrade_parameters\\\":null,\\\"downgrade_rules\\\":null,\\\"scope\\\":\\\"basic\\\"}",
      "remark" : "Circuit breaker"
    }
  • Actualización de un complemento de autenticación de terceros

    {
      "plugin_name" : "Third-Party Authentication Plug-in",
      "remark" : "This is a third-party authentication plug-in that contains a rule expression blacklist.",
      "plugin_type" : "third_auth",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"auth_request\\\":{\\\"method\\\":\\\"POST\\\",\\\"protocol\\\":\\\"HTTP\\\",\\\"url_domain\\\":\\\"xxx.xxx.xxx.xxx:1234\\\",\\\"timeout\\\":10,\\\"path\\\":\\\"/check\\\",\\\"vpc_channel_enabled\\\":false,\\\"vpc_channel_info\\\":{\\\"vpc_proxy_host\\\":\\\"abc.com\\\",\\\"vpc_id\\\":\\\"3c113f40a54a40369ceb1eb1409a32ee\\\"}},\\\"identities\\\":{\\\"headers\\\":[{\\\"name\\\":\\\"token\\\"}],\\\"query\\\":[{\\\"name\\\":\\\"user\\\"}]},\\\"carry_body\\\":{\\\"enabled\\\":true,\\\"max_body_size\\\":10000},\\\"carry_path_enabled\\\":false,\\\"return_resp_body_enabled\\\":true,\\\"carry_resp_headers\\\":[\\\"x-message-result\\\"],\\\"simple_auth_mode_enabled\\\":false,\\\"match_auth\\\":{\\\"key\\\":\\\"x-message-result\\\",\\\"value\\\":\\\"success\\\"},\\\"rule_enabled\\\":true,\\\"rule_type\\\":\\\"deny\\\",\\\"parameters\\\":[{\\\"value\\\":\\\"reqPath\\\",\\\"type\\\":\\\"path\\\",\\\"name\\\":\\\"reqPath\\\"},{\\\"value\\\":\\\"method\\\",\\\"type\\\":\\\"method\\\",\\\"name\\\":\\\"method\\\"},{\\\"value\\\":\\\"Host\\\",\\\"type\\\":\\\"header\\\",\\\"name\\\":\\\"Host\\\"}],\\\"rules\\\":[{\\\"match_regex\\\": \\\"[\\\\\\\"OR\\\\\\\", [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/xxl-job-admin/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/leave/infor/v1/addLeaveLnfor\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/v1/charge/home/modifyChargeSync\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/mweb/campaign/api/v1/getActivityConfig\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/mp/vehicle/owner/home\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/mweb/campaign/api/v1/getTime\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/c-showroom-service/v1/vehicleDetails/upload\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/operation-charging-bff/carOwnerRights/certificate/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/api/2c/v1/sales-bff/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/2c/v1/vehicleDetails/upload\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/operation-admin/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/settings/api/v1/receiveClk\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/vehicle/relative/yTSendVehicleControl.json\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/appoint/getAppointmentByTestDrive\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdPay\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdOrder\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/getUserToken\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdCoupon\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/task/busTriggerTaskEvent.json\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/datacenter-log-center/api/trackApi/commonAdd.json\\\\\\\"]]\\\", \\\"rule_name\\\": \\\"allow2\\\"}],\\\"custom_forbid_limit\\\":100,\\\"auth_downgrade_enabled\\\":false}"
    }
  • Actualización del complemento de caché de respuestas

    {
      "plugin_name" : "Response Cache Plug-in",
      "remark" : "This is a response cache plug-in.",
      "plugin_type" : "proxy_cache",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"cache_key\\\": {\\\"system_params\\\": [\\\"$context.sourceIp\\\",\\\"$context.requestId\\\"],\\\"parameters\\\": [\\\"demo_parameter\\\"],\\\"headers\\\": [\\\"demo_header\\\"]},\\\"cache_http_status_and_ttl\\\": [{\\\"http_status\\\": [200],\\\"ttl\\\": 300},{\\\"http_status\\\": [300],\\\"ttl\\\": 200}],\\\"client_cache_control\\\": {\\\"mode\\\": \\\"apps\\\",\\\"datas\\\": [\\\"demo_app_id_1,demo_app_id_2\\\"]},\\\"cacheable_headers\\\": [\\\"demo_cacheable_headers_1,demo_cacheable_headers_2\\\"]}"
    }
  • Actualización de un complemento de duplicación de solicitudes

    {
      "plugin_name" : "Request mirroring plug-in",
      "remark" : "This is a request mirroring plug-in.",
      "plugin_type" : "proxy_mirror",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"protocol\\\": \\\"http\\\",\\\"host\\\": \\\"xxx.xxx.xxx.xxx:1234\\\",\\\"path\\\": \\\"/test\\\",\\\"path_concat_mode\\\": \\\"replace\\\",\\\"sample_ratio\\\": 1,\\\"timeout\\\": 5000,\\\"mirror_request_body_enabled\\\": true}"
    }

Ejemplo de respuestas

Código de estado: 200

Aceptar

  • {
      "plugin_id" : "5b729aa252764739b3s237ef0d66dc63",
      "plugin_name" : "CORS Plug-in",
      "plugin_type" : "cors",
      "plugin_scope" : "global",
      "plugin_content" : "{\"allow_origin\": \"*\",\"allow_methods\": \"GET,POST,PUT\",\"allow_headers\": \"Content-Type,Accept,Accept-Ranges,Cache-Control\",\"expose_headers\": \"X-Request-Id,X-Apig-Latency\",\"max_age\": 172800,\"allow_credentials\": true}",
      "remark" : "Cross-origin resource sharing.",
      "create_time" : "2020-11-02T12:31:23.353Z",
      "update_time" : "2020-11-02T12:31:23.353Z"
    }
  • {
      "plugin_id" : "8a688dce7d0c45cf84edac3d7b071769",
      "plugin_name" : "HTTP Response Header Plug-in",
      "plugin_type" : "set_resp_headers",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"response_headers\\\":[{\\\"name\\\":\\\"x-demo\\\",\\\"value\\\":\\\"sss\\\",\\\"action\\\":\\\"append\\\"}]}",
      "remark" : "HTTP response header management",
      "create_time" : "2022-11-02T12:31:23.353Z",
      "update_time" : "2022-11-02T12:31:23.353Z"
    }
  • {
      "plugin_id" : "9642ff2b9a86481689ca9d28babcfd7f",
      "plugin_name" : "Request Throttling Plug-in",
      "plugin_type" : "rate_limit",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"scope\\\":\\\"basic\\\",\\\"default_time_unit\\\":\\\"minute\\\",\\\"default_interval\\\":1,\\\"api_limit\\\":50,\\\"app_limit\\\":0,\\\"user_limit\\\":0,\\\"ip_limit\\\":0,\\\"algorithm\\\":\\\"counter\\\",\\\"specials\\\":[],\\\"parameters\\\":[],\\\"rules\\\":[]}",
      "remark" : "Request throttling",
      "create_time" : "2022-11-02T12:31:23.353Z",
      "update_time" : "2022-11-02T12:31:23.353Z"
    }
  • {
      "plugin_id" : "92284ece6ec7466da2c2ac2416f46d5d",
      "plugin_name" : "Kafka Log Plug-in",
      "plugin_type" : "kafka_log",
      "plugin_scope" : "app",
      "plugin_content" : "{\\\"broker_list\\\":[\\\"0.0.0.0:11\\\"],\\\"topic\\\":\\\"topic\\\",\\\"key\\\":\\\"\\\",\\\"max_retry_count\\\":0,\\\"retry_backoff\\\":1,\\\"sasl_config\\\":{\\\"security_protocol\\\":\\\"PLAINTEXT\\\",\\\"sasl_mechanisms\\\":\\\"PLAIN\\\",\\\"sasl_username\\\":\\\"\\\",\\\"sasl_password\\\":\\\"\\\",\\\"ssl_ca_content\\\":\\\"\\\"},\\\"meta_config\\\":{\\\"system\\\":{\\\"start_time\\\":true,\\\"request_id\\\":true,\\\"client_ip\\\":true,\\\"api_id\\\":false,\\\"user_name\\\":false,\\\"app_id\\\":false,\\\"access_model1\\\":false,\\\"request_time\\\":true,\\\"http_status\\\":true,\\\"server_protocol\\\":false,\\\"scheme\\\":true,\\\"request_method\\\":true,\\\"host\\\":false,\\\"api_uri_mode\\\":false,\\\"uri\\\":false,\\\"request_size\\\":false,\\\"response_size\\\":false,\\\"upstream_uri\\\":false,\\\"upstream_addr\\\":true,\\\"upstream_status\\\":true,\\\"upstream_connect_time\\\":false,\\\"upstream_header_time\\\":false,\\\"upstream_response_time\\\":true,\\\"all_upstream_response_time\\\":false,\\\"region_id\\\":false,\\\"auth_type\\\":false,\\\"http_x_forwarded_for\\\":true,\\\"http_user_agent\\\":true,\\\"error_type\\\":true,\\\"access_model2\\\":false,\\\"inner_time\\\":false,\\\"proxy_protocol_vni\\\":false,\\\"proxy_protocol_vpce_id\\\":false,\\\"proxy_protocol_addr\\\":false,\\\"body_bytes_sent\\\":false,\\\"api_name\\\":false,\\\"app_name\\\":false,\\\"provider_app_id\\\":false,\\\"provider_app_name\\\":false,\\\"custom_data_log01\\\":false,\\\"custom_data_log02\\\":false,\\\"custom_data_log03\\\":false,\\\"custom_data_log04\\\":false,\\\"custom_data_log05\\\":false,\\\"custom_data_log06\\\":false,\\\"custom_data_log07\\\":false,\\\"custom_data_log08\\\":false,\\\"custom_data_log09\\\":false,\\\"custom_data_log10\\\":false,\\\"response_source\\\":false},\\\"call_data\\\":{\\\"log_request_header\\\":false,\\\"request_header_filter\\\":\\\"\\\",\\\"log_request_query_string\\\":false,\\\"request_query_string_filter\\\":\\\"\\\",\\\"log_request_body\\\":false,\\\"log_response_header\\\":false,\\\"response_header_filter\\\":\\\"\\\",\\\"log_response_body\\\":false,\\\"custom_authorizer\\\":{\\\"frontend\\\":[],\\\"backend\\\":[]}}}}",
      "remark" : "Kafka log push",
      "create_time" : "2022-11-02T12:31:23.353Z",
      "update_time" : "2022-11-02T12:31:23.353Z"
    }
  • {
      "plugin_id" : "8b5253ed723c4a878e7b8532c08763b4",
      "plugin_name" : "Circuit Breaker Plug-in",
      "plugin_type" : "breaker",
      "plugin_scope" : "app",
      "plugin_content" : "{\\\"breaker_condition\\\":{\\\"breaker_type\\\":\\\"timeout\\\",\\\"breaker_mode\\\":\\\"counter\\\",\\\"unhealthy_condition\\\":\\\"\\\",\\\"unhealthy_threshold\\\":30,\\\"min_call_threshold\\\":20,\\\"unhealthy_percentage\\\":51,\\\"time_window\\\":15,\\\"open_breaker_time\\\":15},\\\"downgrade_default\\\":null,\\\"downgrade_parameters\\\":null,\\\"downgrade_rules\\\":null,\\\"scope\\\":\\\"basic\\\"}",
      "remark" : "Circuit breaker",
      "create_time" : "2022-11-02T12:31:23.353Z",
      "update_time" : "2022-11-02T12:31:23.353Z"
    }
  • {
      "plugin_id" : "235d97683439437585aff06020059720",
      "plugin_name" : "Third-Party Authentication Plug-in",
      "plugin_type" : "third_auth",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"auth_request\\\":{\\\"method\\\":\\\"POST\\\",\\\"protocol\\\":\\\"HTTP\\\",\\\"url_domain\\\":\\\"xxx.xxx.xxx.xxx:1234\\\",\\\"path\\\":\\\"/check\\\",\\\"timeout\\\":10,\\\"vpc_channel_enabled\\\":false,\\\"vpc_channel_info\\\":null},\\\"identities\\\":{\\\"headers\\\":[{\\\"name\\\":\\\"token\\\"}],\\\"queries\\\":null},\\\"carry_body\\\":{\\\"enabled\\\":true,\\\"max_body_size\\\":10000},\\\"carry_path_enabled\\\":false,\\\"return_resp_body_enabled\\\":true,\\\"carry_resp_headers\\\":[\\\"x-message-result\\\"],\\\"simple_auth_mode_enabled\\\":false,\\\"match_auth\\\":{\\\"key\\\":\\\"x-message-result\\\",\\\"value\\\":\\\"success\\\"},\\\"parameters\\\":[{\\\"type\\\":\\\"path\\\",\\\"name\\\":\\\"reqPath\\\",\\\"value\\\":\\\"reqPath\\\"},{\\\"type\\\":\\\"method\\\",\\\"name\\\":\\\"method\\\",\\\"value\\\":\\\"method\\\"},{\\\"type\\\":\\\"header\\\",\\\"name\\\":\\\"Host\\\",\\\"value\\\":\\\"Host\\\"}],\\\"rules\\\":[{\\\"rule_name\\\":\\\"allow2\\\",\\\"match_regex\\\":\\\"[\\\\\\\"OR\\\\\\\", [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/xxl-job-admin/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/leave/infor/v1/addLeaveLnfor\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/v1/charge/home/modifyChargeSync\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/mweb/campaign/api/v1/getActivityConfig\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/mp/vehicle/owner/home\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/mweb/campaign/api/v1/getTime\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/c-showroom-service/v1/vehicleDetails/upload\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/operation-charging-bff/carOwnerRights/certificate/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/api/2c/v1/sales-bff/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/2c/v1/vehicleDetails/upload\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/operation-admin/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/settings/api/v1/receiveClk\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/vehicle/relative/yTSendVehicleControl.json\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/appoint/getAppointmentByTestDrive\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdPay\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdOrder\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/getUserToken\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdCoupon\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/task/busTriggerTaskEvent.json\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/datacenter-log-center/api/trackApi/commonAdd.json\\\\\\\"]]\\\"}],\\\"rule_type\\\":\\\"allow\\\",\\\"rule_enabled\\\":true,\\\"custom_forbid_limit\\\":100,\\\"auth_downgrade_enable\\\":false}",
      "remark" : "This is a third-party authentication plug-in that contains a rule expression blacklist.",
      "create_time" : "2023-05-06T06:54:59.296181801Z",
      "update_time" : "2023-05-06T07:07:18.369017889Z"
    }
  • {
      "plugin_id" : "d5bf25cf31e04e888907b8ad72563f45",
      "plugin_name" : "Response Cache Plug-in",
      "plugin_type" : "proxy_cache",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"cache_key\\\": {\\\"system_params\\\": [\\\"$context.sourceIp\\\",\\\"$context.requestId\\\"],\\\"parameters\\\": [\\\"demo_parameter\\\"],\\\"headers\\\": [\\\"demo_header\\\"]},\\\"cache_http_status_and_ttl\\\": [{\\\"http_status\\\": [200],\\\"ttl\\\": 300},{\\\"http_status\\\": [300],\\\"ttl\\\": 200}],\\\"client_cache_control\\\": {\\\"mode\\\": \\\"apps\\\",\\\"datas\\\": [\\\"demo_app_id_1,demo_app_id_2\\\"]},\\\"cacheable_headers\\\": [\\\"demo_cacheable_headers_1,demo_cacheable_headers_2\\\"]}",
      "remark" : "This is a response cache plug-in.",
      "create_time" : "2024-03-18T12:31:23.353Z",
      "update_time" : "2024-03-18T12:31:23.353Z"
    }
  • {
      "plugin_id" : "d5bf25cf31e04e888907b8ad72563f45",
      "plugin_name" : "Request mirroring plug-in",
      "plugin_type" : "proxy_mirror",
      "plugin_scope" : "global",
      "plugin_content" : "{\\\"protocol\\\": \\\"http\\\",\\\"host\\\": \\\"xxx.xxx.xxx.xxx:1234\\\",\\\"path\\\": \\\"/test\\\",\\\"path_concat_mode\\\": \\\"replace\\\",\\\"sample_ratio\\\": 1,\\\"timeout\\\": 5000,\\\"mirror_request_body_enabled\\\": true}",
      "remark" : "This is a request mirroring plug-in.",
      "create_time" : "2024-03-18T12:31:23.353Z",
      "update_time" : "2024-03-18T12:31:23.353Z"
    }

Código de estado: 400

Error en la solicitud

{
  "error_code" : "APIG.3326",
  "error_msg" : "The plugin name already exists"
}

Código de estado: 401

Sin autorización

{
  "error_code" : "APIG.1002",
  "error_msg" : "Incorrect token or token resolution failed"
}

Código de estado: 403

Prohibido

{
  "error_code" : "APIG.1005",
  "error_msg" : "No permissions to request this method"
}

Código de estado: 404

No se ha encontrado

{
  "error_code" : "APIG.3068",
  "error_msg" : "Plugin b294018ee0554156a875b3513e02e5b9 does not exist"
}

Código de estado: 500

Error del servidor interno

{
  "error_code" : "APIG.9999",
  "error_msg" : "System error"
}

Códigos de estado

Código de estado

Descripción

200

Aceptar

400

Error en la solicitud

401

Sin autorización

403

Prohibido

404

No se ha encontrado

500

Error del servidor interno

Códigos de error

Consulte Códigos de error.