启用/禁用托管 已弃用

修补 /groups/{groupId}/apps/{appId}/hosting/config

启用或禁用应用程序的 App Services 托管。托管更改最长需要 15 分钟才能生效。该端点不会通知您更改何时生效,只会通知您服务器已成功接收更改操作。

您可以通过调用获取托管配置终结点来查看托管启用/禁用是否已完成。

路径参数

application/json

body

  • enabled 布尔

    设置为 true 可启用 App Services 托管。设置为 false 可禁用 App Services 托管。

响应

  • 204

    已成功启用/禁用 App Services 托管。

PATCH /groups/{groupId}/apps/{appId}/hosting/config
curl \
 --request PATCH 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/hosting/config' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"enabled":true}'
请求示例
{
  "enabled": true
}