群集策略请求
群集策略请求
Redis 企业软件 |
---|
方法 | 路径 | 描述 |
---|---|---|
获取 | /v1/cluster/policy |
获取群集策略设置 |
放 | /v1/cluster/policy |
更新群集策略设置 |
获取群集策略
GET /v1/cluster/policy
获取群集的当前策略设置。
所需权限
权限名称 |
---|
view_cluster_info |
请求
HTTP 请求示例
GET /v1/cluster/policy
请求标头
钥匙 | 价值 | 描述 |
---|---|---|
主机 | cnm.cluster.fqdn 中 | 域名 |
接受 | 应用程序/JSON | 接受的媒体类型 |
响应
示例 JSON 正文
{
"db_conns_auditing": false,
"default_non_sharded_proxy_policy": "single",
"default_provisioned_redis_version": "6.0",
"default_sharded_proxy_policy": "single",
"default_shards_placement": "dense",
"redis_upgrade_policy": "major",
"// additional fields..."
}
Status codes
Code
Description
200 OK
Success
Update cluster policy
PUT /v1/cluster/policy
Update cluster policy settings.
Required permissions
Permission name
update_cluster
Request
Example HTTP request
PUT /v1/cluster/policy
Example JSON body
{
"default_shards_placement": "sparse",
"default_sharded_proxy_policy": "all-nodes"
}
Request headers
Key
Value
Description
Host
cnm.cluster.fqdn
Domain name
Accept
application/json
Accepted media type
Request body
Include a cluster settings object with updated fields in the request body.
Response
Returns a status code that indicates the success or failure of the cluster settings update.
Status codes
Code
Description
200 OK
Success
400 Bad Request
Failed to set parameters
On this page