Azure CLI 的 Azure Redis 缓存示例Azure CLI Samples for Azure Cache for Redis

下表包含指向使用 Azure CLI 生成的 bash 脚本的链接。The following table includes links to bash scripts built using the Azure CLI.

创建缓存Create cache
创建缓存Create a cache 创建资源组和基本层 Azure Redis 缓存。Creates a resource group and a basic tier Azure Cache for Redis.
创建具有群集功能的高级缓存Create a premium cache with clustering 创建资源组以及启用群集功能的高级层缓存。Creates a resource group and a premium tier cache with clustering enabled.
获取缓存详细信息Get cache details 获取 Azure Redis 缓存实例的详细信息,包括预配状态。Gets details of an Azure Cache for Redis instance, including provisioning status.
获取主机名、端口和密钥Get the hostname, ports, and keys 获取 Azure Redis 缓存实例的主机名、端口和密钥。Gets the hostname, ports, and keys for an Azure Cache for Redis instance.
Web 应用和缓存Web app plus cache
将 Web 应用连接到 Azure Redis 缓存Connect a web app to an Azure Cache for Redis 创建 Azure Web 应用和 Azure Redis 缓存,然后将 Redis 连接详细信息添加到应用设置。Creates an Azure web app and an Azure Cache for Redis, then adds the redis connection details to the app settings.
删除缓存Delete cache
删除缓存Delete a cache 删除 Azure Redis 缓存实例Deletes an Azure Cache for Redis instance

有关 Azure CLI 的详细信息,请参阅安装 Azure CLIAzure CLI 入门For more information about the Azure CLI, see Install the Azure CLI and Get started with Azure CLI.