Skip to content

Commit c9b259e

Browse files
committed
add some stuff
1 parent a37e5db commit c9b259e

File tree

1 file changed

+41
-11
lines changed

1 file changed

+41
-11
lines changed

articles/redis/scripts/create-manage-cache.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Create, query, and delete a cache using Azure CLI
3-
description: These Azure CLI code samples show how to create an Azure Managed Redis or Azure Cache for Redis instance, get cache details like status, hostname, ports, and keys, and delete the cache.
3+
description: Use the Azure CLI to create an Azure Redis instance, get cache details like status, hostname, ports, and keys, and delete the cache.
44

55

66
ms.devlang: azurecli
@@ -15,9 +15,9 @@ appliesto:
1515

1616
# Create an Azure Redis cache using the Azure CLI
1717

18-
This article describes how how to create or delete an Azure Redis cache instance by using the Azure CLI. The article also shows how to use the CLI to get cache details including provisioning status, hostname, ports, and keys.
18+
This article describes how to create or delete an Azure Redis cache instance by using the Azure CLI. The article also shows how to use the Azure CLI to get cache details including provisioning status, hostname, ports, and keys.
1919

20-
The scripts in this article uses the following commands. Select the links in the table to access command-specific documentation.
20+
The scripts in this article use the following commands. Select the links in the table to access command documentation.
2121

2222
::: zone pivot="azure-managed-redis"
2323

@@ -29,6 +29,9 @@ The scripts in this article uses the following commands. Select the links in the
2929
| [az redisenterprise list-keys](/cli/azure/redis) | Lists access keys for an Azure Managed Redis instance. |
3030
| [az redisenterprise delete](/cli/azure/redis) | Deletes an Azure Managed Redis instance. |
3131

32+
>[!NOTE]
33+
>The [az redisenterprise](/cli/azure/redisenterprise) commands are part of the `redisenterprise` extension for the Azure CLI, version 2.61.0 or higher. The extension automatically installs the first time you run an `az redisenterprise` command.
34+
3235
::: zone-end
3336

3437
::: zone pivot="azure-cache-redis"
@@ -46,7 +49,7 @@ The scripts in this article uses the following commands. Select the links in the
4649
## Prerequisites
4750

4851
- [!INCLUDE [quickstarts-free-trial-note](~/reusable-content/ce-skilling/azure/includes/quickstarts-free-trial-note.md)]
49-
[!INCLUDE [azure-cli-prepare-your-environment-no-header.md](~/reusable-content/azure-cli/azure-cli-prepare-your-environment.md)]
52+
[!INCLUDE [azure-cli-prepare-your-environment-no-header.md](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
5053

5154
::: zone pivot="azure-managed-redis"
5255

@@ -57,16 +60,33 @@ The scripts in this article uses the following commands. Select the links in the
5760
This sample is broken. When it is fixed, we can fix this include.
5861
-->
5962

60-
The following example script sets variables, then creates a resource group and an Azure Managed Redis cache in the resource group.
63+
The following example script sets variables, then creates a resource group and an Azure Managed Redis cache in the resource group. Putting all your app resources in the same resource group lets you easily manage or delete them together.
64+
65+
The cache `name` must be a string of 1-63 characters that's unique in the region. The name can contain only numbers, letters, and hyphens, must start and end with a number or letter, and can't contain consecutive hyphens.
66+
67+
The `location` should be an [Azure region](https://azure.microsoft.com/regions/) near other services that use your cache. Use a cache [sku](https://azure.microsoft.com/pricing/details/cache/) and `size` that have the appropriate features and performance for your cache.
68+
69+
>[!IMPORTANT]
70+
>The following settings can be enabled or configured only at cache creation time. Gather the information you need to configure these settings before you create your cache.
71+
>
72+
>- You must enable modules at the time you create the cache instance. You can't change modules or enable module configuration after you create a cache.
73+
>- Managed Redis supports two clustering policies: Enterprise or OSS. You can't change the clustering policy after you create the cache.
74+
>- If you're using the cache in a geo-replication group, you can't change eviction policies after the cache is created.
75+
>- If you're using the [RediSearch](../redis-modules.md#redisearch) module, the Enterprise cluster policy is required, and No Eviction is the only eviction policy supported.
76+
77+
For security reasons, Microsoft Entra authentication and Transport Layer Security (TLS) encryption are enabled by default for new caches. Access keys authentication is disabled. You can choose to to enable access key authentication or non-TLS connections during or after cache creation, but disabling TLS isn't recommended.
78+
79+
>[!IMPORTANT]
80+
>Use Microsoft Entra ID with managed identities to authorize requests against your cache if possible. Authorization using Microsoft Entra ID and managed identity provides better security and is easier to use than shared access key authorization. For more information about using managed identities with your cache, see [Use Microsoft Entra ID for cache authentication](../../azure-cache-for-redis/cache-azure-active-directory-for-authentication.md).
6181
6282
```azurecli
6383
6484
# Variable block
6585
let "randomIdentifier=$RANDOM*$RANDOM"
6686
location="East US"
67-
resourceGroup="msdocs-redis-cache-rg-$randomIdentifier"
87+
resourceGroup="redis-cache-rg-$randomIdentifier"
6888
tag="create-manage-cache"
69-
cache="msdocs-redis-cache-$randomIdentifier"
89+
cache="redis-cache-$randomIdentifier"
7090
sku="Balanced_B1"
7191
7292
# Create a resource group
@@ -128,16 +148,26 @@ az group delete --resource-group $resourceGroup -y
128148
This sample is broken. When it is fixed, we can fix this include.
129149
-->
130150

131-
The following example script sets variables, then creates a resource group and an Azure Cache for Redis cache in the resource group.
151+
The following example script sets variables, then creates a resource group and an Azure Cache for Redis cache in the resource group. Putting all your app resources in the same resource group lets you easily manage or delete them together.
152+
153+
The cache `name` must be a string of 1-63 characters that's unique in the region. It can contain only numbers, letters, and hyphens, must start and end with a number or letter, and can't contain consecutive hyphens.
154+
155+
The `location` should be an [Azure region](https://azure.microsoft.com/regions/) near other services that use your cache. Use a cache [sku](https://azure.microsoft.com/pricing/details/cache/) and `size` that have the appropriate features and performance for your cache.
156+
157+
For security reasons, Microsoft Entra Authentication and TLS encryption are enabled by default for new caches. You can choose to enable access key authentication or non-TLS connections during or after cache creation.
158+
159+
>[!IMPORTANT]
160+
>
161+
Use Microsoft Entra ID with managed identities to authorize requests against your cache if possible. Authorization using Microsoft Entra ID and managed identity provides better security and is easier to use than shared access key authorization. For more information about using managed identities with your cache, see [Use Microsoft Entra ID for cache authentication](../../azure-cache-for-redis/cache-azure-active-directory-for-authentication.md).
132162

133163
```azurecli
134164
135165
# Variable block
136166
let "randomIdentifier=$RANDOM*$RANDOM"
137167
location="East US"
138-
resourceGroup="msdocs-redis-cache-rg-$randomIdentifier"
168+
resourceGroup="redis-cache-rg-$randomIdentifier"
139169
tag="create-manage-cache"
140-
cache="msdocs-redis-cache-$randomIdentifier"
170+
cache="redis-cache-$randomIdentifier"
141171
sku="basic"
142172
size="C0"
143173
@@ -177,7 +207,7 @@ echo "Secondary Key:" ${keys[1]}
177207

178208
## Clean up resources
179209

180-
The following script deletes an Azure Managed Redis cache, and then deletes the resource group that contains all cache resources.
210+
The following script deletes an Azure Cache for Redis cache, and then deletes the resource group that contains all cache resources.
181211

182212
```azurecli
183213
# Delete a redis cache

0 commit comments

Comments
 (0)