路径参数
-
Atlas 项目/组 ID。
-
您的应用程序的 ObjectID。App Services API 项目和应用程序 ID 部分演示了如何查找此值。
-
服务的唯一
_id
值。
PATCH /groups/{groupId}/apps/{appId}/services/{serviceId}/config
curl \
--request PATCH 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/services/{serviceId}/config' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"clusterName":"Cluster0","readPreference":"primary","readPreferenceTagSets":["server1"],"wireProtocolEnabled":true}'
请求示例
Atlasclusterserviceconfig
{
"clusterName": "Cluster0",
"readPreference": "primary",
"readPreferenceTagSets": [
"server1"
],
"wireProtocolEnabled": true
}
{
"_id": "string",
"name": "mongodb-datafederation",
"type": "datalake",
"config": {
"dataLakeName": "string"
}
}
{
"name": "string",
"type": "aws",
"incoming_webhooks": [
{
"name": "string",
"function_source": "string",
"respond_result": true,
"options": {
"secret": "string",
"secretAsQueryParam": true
}
}
],
"version": 42
}