你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az redisenterprise

注意

此参考是 Azure CLI(版本 2.45.0 或更高版本)的 redisenterprise 扩展的一部分。 该扩展将在首次运行 az redisenterprise 命令时自动安装。 详细了解扩展。

管理 redisenterprise 缓存。

命令

名称 说明 类型 状态
az redisenterprise create

创建现有的缓存群集(覆盖/重新创建,并可能停机)。

扩展 GA
az redisenterprise database

管理 Redis Enterprise 数据库。

扩展 GA
az redisenterprise database create

创建数据库。

分机 GA
az redisenterprise database delete

删除单个数据库。

分机 GA
az redisenterprise database export

从目标数据库导出数据库文件。

分机 GA
az redisenterprise database flush

刷新此数据库中的所有密钥,并从其链接的数据库刷新。

扩展 GA
az redisenterprise database force-unlink

强行删除指向指定数据库资源的链接。

分机 GA
az redisenterprise database import

将数据库文件导入目标数据库。

扩展 GA
az redisenterprise database list

列出指定 RedisEnterprise 群集中的所有数据库。

分机 GA
az redisenterprise database list-keys

检索 RedisEnterprise 数据库的访问密钥。

分机 GA
az redisenterprise database regenerate-key

重新生成 RedisEnterprise 数据库的访问密钥。

扩展 GA
az redisenterprise database show

获取有关 RedisEnterprise 群集中的数据库的信息。

分机 GA
az redisenterprise database update

更新数据库。

扩展 GA
az redisenterprise database wait

将 CLI 置于等待状态,直到满足条件。

分机 GA
az redisenterprise delete

删除 RedisEnterprise 缓存群集。

分机 GA
az redisenterprise list

列出指定订阅中的所有 RedisEnterprise 群集。

扩展 GA
az redisenterprise operation-status

获取操作的状态。

扩展 GA
az redisenterprise operation-status show

获取操作的状态。

分机 GA
az redisenterprise show

获取有关 RedisEnterprise 群集的信息。

扩展 GA
az redisenterprise update

更新现有缓存群集(覆盖/重新创建,并可能停机)。

分机 GA
az redisenterprise wait

将 CLI 置于等待状态,直到满足条件。

分机 GA

az redisenterprise create

创建现有的缓存群集(覆盖/重新创建,并可能停机)。

az redisenterprise create --cluster-name
                          --resource-group
                          --sku {EnterpriseFlash_F1500, EnterpriseFlash_F300, EnterpriseFlash_F700, Enterprise_E10, Enterprise_E100, Enterprise_E20, Enterprise_E200, Enterprise_E400, Enterprise_E5, Enterprise_E50}
                          [--assigned-identities]
                          [--capacity]
                          [--client-protocol {Encrypted, Plaintext}]
                          [--clustering-policy {EnterpriseCluster, OSSCluster}]
                          [--eviction-policy {AllKeysLFU, AllKeysLRU, AllKeysRandom, NoEviction, VolatileLFU, VolatileLRU, VolatileRandom, VolatileTTL}]
                          [--group-nickname]
                          [--identity-resource-id]
                          [--identity-type {None, SystemAssigned, SystemAssigned, UserAssigned, UserAssigned}]
                          [--key-encryption-identity-type {systemAssignedIdentity, userAssignedIdentity}]
                          [--key-encryption-key-url]
                          [--linked-databases]
                          [--location]
                          [--minimum-tls-version {1.0, 1.1, 1.2}]
                          [--module]
                          [--no-database]
                          [--no-wait]
                          [--persistence]
                          [--port]
                          [--tags]
                          [--zones]

示例

创建缓存

az redisenterprise create --cluster-name "cache1" --location "East US" --minimum-tls-version "1.2" --sku "Enterprise_E20" --capacity 4 --tags tag1="value1" --zones "1" "2" "3" --client-protocol "Encrypted" --clustering-policy "EnterpriseCluster" --eviction-policy "NoEviction" --modules name="RedisBloom" args="ERROR_RATE 0.02 INITIAL_SIZE 400" --persistence aof-enabled=true aof-frequency="1s" --port 10000 --resource-group "rg1"

必需参数

--cluster-name --name -n

RedisEnterprise 群集的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--sku

要部署的 RedisEnterprise 群集的类型。 可能的值:(Enterprise_E10、EnterpriseFlash_F300等)。

接受的值: EnterpriseFlash_F1500, EnterpriseFlash_F300, EnterpriseFlash_F700, Enterprise_E10, Enterprise_E100, Enterprise_E20, Enterprise_E200, Enterprise_E400, Enterprise_E5, Enterprise_E50

可选参数

--assigned-identities --user-assigned-identities

与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。

--capacity

RedisEnterprise 群集的大小。 默认为 2 或 3,具体取决于 SKU。 对于企业 SKU,有效值为(2、4、6、...),对于 Flash SKU 为 (3、9、15、...)。

--client-protocol

指定 redis 客户端是否可以使用 TLS 加密协议或纯文本 redis 协议进行连接。 默认值为 TLS 加密。

接受的值: Encrypted, Plaintext
--clustering-policy

群集策略 - 默认值为 OSSCluster。 在创建时指定。

接受的值: EnterpriseCluster, OSSCluster
--eviction-policy

Redis 逐出策略 - 默认值为 VolatileLRU。

接受的值: AllKeysLFU, AllKeysLRU, AllKeysRandom, NoEviction, VolatileLFU, VolatileLRU, VolatileRandom, VolatileTTL
--group-nickname

链接数据库资源的组的名称。

--identity-resource-id --user-assigned-identity-resource-id

用户分配的标识用于访问密钥加密密钥 URL。 例如:/subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。

--identity-type

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

接受的值: None, SystemAssigned, SystemAssigned, UserAssigned, UserAssigned
--key-encryption-identity-type --key-identity-type

此 API 版本仅支持 userAssignedIdentity;将来可能支持其他类型的类型。

接受的值: systemAssignedIdentity, userAssignedIdentity
--key-encryption-key-url
--linked-databases

要链接到此数据库的数据库资源列表。

--location -l

Location。 az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。

--minimum-tls-version

要支持的群集的最低 TLS 版本,例如“1.2”。

接受的值: 1.0, 1.1, 1.2
--module --modules

在此数据库中启用的可选 redis 模块集 - 只能在创建时添加模块。

--no-database

高级。 不要自动创建默认数据库。 警告:在创建数据库之前,缓存将不可用。

默认值: False
--no-wait

不等待长时间运行的操作完成。

默认值: False
--persistence

持久性设置。

--port

数据库终结点的 TCP 端口。 在创建时指定。 默认为可用端口。

--tags

空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。

--zones -z

将部署此群集的可用性区域。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az redisenterprise delete

删除 RedisEnterprise 缓存群集。

az redisenterprise delete [--cluster-name]
                          [--ids]
                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                          [--resource-group]
                          [--subscription]
                          [--yes]

可选参数

--cluster-name --name -n

RedisEnterprise 群集的名称。

--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--no-wait

不等待长时间运行的操作完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--yes -y

不提示确认。

默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az redisenterprise list

列出指定订阅中的所有 RedisEnterprise 群集。

az redisenterprise list [--resource-group]

可选参数

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az redisenterprise show

获取有关 RedisEnterprise 群集的信息。

az redisenterprise show [--cluster-name]
                        [--ids]
                        [--resource-group]
                        [--subscription]

可选参数

--cluster-name --name -n

RedisEnterprise 群集的名称。

--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az redisenterprise update

更新现有缓存群集(覆盖/重新创建,并可能停机)。

az redisenterprise update [--add]
                          [--assigned-identities]
                          [--capacity]
                          [--cluster-name]
                          [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                          [--identity-resource-id]
                          [--identity-type {None, SystemAssigned, SystemAssigned, UserAssigned, UserAssigned}]
                          [--ids]
                          [--key-encryption-identity-type {systemAssignedIdentity, userAssignedIdentity}]
                          [--key-encryption-key-url]
                          [--minimum-tls-version {1.0, 1.1, 1.2}]
                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                          [--remove]
                          [--resource-group]
                          [--set]
                          [--sku {EnterpriseFlash_F1500, EnterpriseFlash_F300, EnterpriseFlash_F700, Enterprise_E10, Enterprise_E100, Enterprise_E20, Enterprise_E200, Enterprise_E400, Enterprise_E5, Enterprise_E50}]
                          [--subscription]
                          [--tags]
                          [--zones]

可选参数

--add

通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value、string 或 JSON 字符串>。

--assigned-identities --user-assigned-identities

与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

--capacity

RedisEnterprise 群集的大小。 默认为 2 或 3,具体取决于 SKU。 对于企业 SKU,有效值为(2、4、6、...),对于 Flash SKU 为 (3、9、15、...)。

--cluster-name --name -n

RedisEnterprise 群集的名称。

--force-string

使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--identity-resource-id --user-assigned-identity-resource-id

用户分配的标识用于访问密钥加密密钥 URL。 例如:/subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId。

--identity-type

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

接受的值: None, SystemAssigned, SystemAssigned, UserAssigned, UserAssigned
--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--key-encryption-identity-type --key-identity-type

此 API 版本仅支持 userAssignedIdentity;将来可能支持其他类型的类型。

接受的值: systemAssignedIdentity, userAssignedIdentity
--key-encryption-key-url

密钥加密密钥 URL,仅版本控制。 示例:https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78

--minimum-tls-version

要支持的群集的最低 TLS 版本,例如“1.2”。

接受的值: 1.0, 1.1, 1.2
--no-wait

不等待长时间运行的操作完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--remove

从列表中删除属性或元素。 示例:--remove property.list OR --remove propertyToRemove。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--set

通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=。

--sku

要部署的 RedisEnterprise 群集的类型。 可能的值:(Enterprise_E10、EnterpriseFlash_F300等)。

接受的值: EnterpriseFlash_F1500, EnterpriseFlash_F300, EnterpriseFlash_F700, Enterprise_E10, Enterprise_E100, Enterprise_E20, Enterprise_E200, Enterprise_E400, Enterprise_E5, Enterprise_E50
--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--tags

资源标记。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

--zones

将部署此群集的可用性区域。 支持速记语法、json-file 和 yaml-file。 请尝试“??” 以显示更多内容。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az redisenterprise wait

将 CLI 置于等待状态,直到满足条件。

az redisenterprise wait [--cluster-name]
                        [--created]
                        [--custom]
                        [--deleted]
                        [--exists]
                        [--ids]
                        [--interval]
                        [--resource-group]
                        [--subscription]
                        [--timeout]
                        [--updated]

可选参数

--cluster-name --name -n

RedisEnterprise 群集的名称。

--created

等待在“Succeeded”中使用“provisioningState”创建。

默认值: False
--custom

等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到删除为止。

默认值: False
--exists

等待资源存在。

默认值: False
--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--interval

轮询间隔(以秒为单位)。

默认值: 30
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--timeout

最大等待(以秒为单位)。

默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。