更新日志转发器。

修补 /groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}

路径参数

application/json

body 必需

日志转发器配置

  • 名称 字符串 必需
  • 残疾人 布尔 必需
  • log_types array[string] 必需

    取值为 authendpointfunctiongraphqlpushschemaservicesynctriggertrigger_error_handler

  • log_statuses array[string] 必需

    值为 errorsuccess

  • policy 对象 必需
    隐藏策略属性 显示策略属性 对象
    • 类型 字符串

      值为 singlebatch

  • 操作 对象 必需
    隐藏动作属性 显示动作属性 对象
    • 类型 字符串

      值为 collectionfunction

    • 名称 字符串
    • data_source 字符串
    • database 字符串
    • 集合 字符串

响应

  • 200 application/json

    正常

    隐藏响应属性 显示响应属性 对象
    • _id 字符串
    • 名称 字符串 必需
    • 残疾人 布尔 必需
    • log_types array[string] 必需

      取值为 authendpointfunctiongraphqlpushschemaservicesynctriggertrigger_error_handler

    • log_statuses array[string] 必需

      值为 errorsuccess

    • policy 对象 必需
      隐藏策略属性 显示策略属性 对象
      • 类型 字符串

        值为 singlebatch

    • 操作 对象 必需
      隐藏动作属性 显示动作属性 对象
      • 类型 字符串

        值为 collectionfunction

      • 名称 字符串
      • data_source 字符串
      • database 字符串
      • 集合 字符串
PATCH /groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}
curl \
 --request PATCH 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","disabled":true,"log_types":["auth"],"log_statuses":["error"],"policy":{"type":"single"},"action":{"type":"collection","name":"string","data_source":"string","database":"string","collection":"string"}}'
请求示例
{
  "name": "string",
  "disabled": true,
  "log_types": [
    "auth"
  ],
  "log_statuses": [
    "error"
  ],
  "policy": {
    "type": "single"
  },
  "action": {
    "type": "collection",
    "name": "string",
    "data_source": "string",
    "database": "string",
    "collection": "string"
  }
}
响应示例 (200)
{
  "_id": "string",
  "name": "string",
  "disabled": true,
  "log_types": [
    "auth"
  ],
  "log_statuses": [
    "error"
  ],
  "policy": {
    "type": "single"
  },
  "action": {
    "type": "collection",
    "name": "string",
    "data_source": "string",
    "database": "string",
    "collection": "string"
  }
}