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

Pin 命名空间

固定指定项目和集群的集合级查询延迟指标集合的命名空间列表。 此操作会初始化固定命名空间列表,或替换项目或集群的任何现有固定命名空间列表。

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

PUT /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 PUT '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"
]
}

后退

返回指标名称

在此页面上