Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs 菜单
Docs 主页
/
Cloud Manager
/ / / /

添加固定命名空间

将命名空间列表添加到现有固定命名空间列表,用于指定项目和集群的集合级查询延迟指标集合。

基本 URL: https://cloud.mongodb.com/api/public/v1.0

PATCH /groups/{PROJECT-ID}/clusters/{hostClusterId}/collStats/pinned
Parameter
类型
说明

PROJECT-ID

字符串

(必需。) 唯一的 24-十六进制数字string ,用于标识包含要固定的命名空间的项目。

hostClusterId

字符串

(必需。) 包含要固定的命名空间的集群的唯一标识符。

所有参数都是可选的。

名称
类型
说明
默认

pretty

布尔

false

envelope

布尔

指示是否要将响应封装在信封中。

false

名称
类型
说明
默认

namespaces

阵列

包含要添加到固定命名空间的每个命名空间空间的列表。

名称
类型
说明

clusterId

字符串

标识集群的唯一string 。

groupId

字符串

用于标识项目的唯一的 24 位十六进制数字字符串。

pinnedNamespaces

阵列

更新完成后,包含每个固定命名空间的列表。

curl --user '{PUBLIC-KEY}:{PRIVATE-KEY}' --digest \
--header 'Accept: application/json' \
--include \
--request PATCH 'https://{CLOUD-MANAGER-HOST}:{PORT}/api/public/v1.0/groups/{PROJECT-ID}/clusters/{hostClusterId}/collStats/pinned?pretty=true'
--data '{
"namespaces": ["testDb.collection1", "testDb.collection2"]
}'
HTTP/1.1 201 Created
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
{
"clusterId": "{hostClusterId}",
"groupId": "{PROJECT-ID}",
"pinnedNamespaces": [
"testDb.collection1",
"testDb.collection2"
]
}

后退

Pin 命名空间

在此页面上