许可证申请
许可证申请
Redis 企业软件 |
---|
方法 | 路径 | 描述 |
---|---|---|
获取 | /v1/license |
获取许可证详细信息 |
放 | /v1/license |
更新许可证 |
获取许可证
GET /v1/license
返回许可证详细信息,包括许可证字符串、过期时间、 和支持的功能。
所需权限
权限名称 |
---|
view_license |
请求
HTTP 请求示例
GET /v1/license
请求标头
钥匙 | 价值 | 描述 |
---|---|---|
主机 | cnm.cluster.fqdn 中 | 域名 |
接受 | 应用程序/JSON | 接受的媒体类型 |
响应
返回包含许可证详细信息的 JSON 对象:
名字 | 类型/值 | 描述 |
---|---|---|
许可证 | 字符串 | 许可证数据 |
cluster_name | 字符串 | 群集名称 (FQDN) |
过期 | 布尔 | 如果群集密钥已过期 (true 或false ) |
activation_date | 字符串 | 集群密钥激活的日期 |
expiration_date | 字符串 | 集群密钥的到期日期 |
钥匙 | 字符串 | 许可证密钥 |
特征 | 字符串数组 | 集群支持的功能 |
所有者 | 字符串 | 许可证所有者 |
shards_limit | 整数 | 集群密钥允许的分片总数 |
ram_shards_limit | 整数 | 集群密钥允许的 RAM 分片数(截至 v7.2) |
ram_shards_in_use | 整数 | 正在使用的 RAM 分片数 |
flash_shards_limit | 整数 | 集群密钥允许的 Flash 分片数 (Auto Tiering)(截至 v7.2) |
flash_shards_in_use | 整数 | 正在使用的 Flash 分片数 |
示例 JSON 正文
{
"license": "----- LICENSE START -----\\ndi+iK...KniI9\\n----- LICENSE END -----\\n",
"expired": true,
"activation_date":"2018-12-31T00:00:00Z",
"expiration_date":"2019-12-31T00:00:00Z",
"ram_shards_in_use": 0,
"ram_shards_limit": 300,
"flash_shards_in_use": 0,
"flash_shards_limit": 100,
"shards_limit": 400,
"features": ["bigstore"],
"owner": "Redis",
"cluster_name": "mycluster.local",
"key": "----- LICENSE START -----\\ndi+iK...KniI9\\n----- LICENSE END -----\\n"
}
Status codes
Code
Description
200 OK
License is returned in the response body.
404 Not Found
No license is installed.
Update license
PUT /v1/license
Validate and install a new license string.
If you do not provide a valid license, the cluster behaves as if the license was deleted. See Expired cluster license for a list of available actions and restrictions.
Required permissions
Permission name
install_new_license
Request
The request must be a JSON object with a single key named "license".
Example HTTP request
PUT /v1/license
Example JSON body
{
"license": "----- LICENSE START -----\ndi+iK...KniI9\n----- LICENSE END -----\n"
}
Request headers
Key
Value
Description
Accept
application/json
Accepted media type
Request body
Include a JSON object that contains the new license
string in the request body.
Response
Returns an error if the new license is not valid.
Status codes
Code
Description
200 OK
License installed successfully.
400 Bad Request
Invalid request, either bad JSON object or corrupted license was supplied.
406 Not Acceptable
License violation. A response body provides more details on the specific cause.
On this page