You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/redis/scripts/create-manage-cache.md
+41-11Lines changed: 41 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
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.
4
4
5
5
6
6
ms.devlang: azurecli
@@ -15,9 +15,9 @@ appliesto:
15
15
16
16
# Create an Azure Redis cache using the Azure CLI
17
17
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.
19
19
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.
21
21
22
22
::: zone pivot="azure-managed-redis"
23
23
@@ -29,6 +29,9 @@ The scripts in this article uses the following commands. Select the links in the
29
29
|[az redisenterprise list-keys](/cli/azure/redis)| Lists access keys for an Azure Managed Redis instance. |
30
30
|[az redisenterprise delete](/cli/azure/redis)| Deletes an Azure Managed Redis instance. |
31
31
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
+
32
35
::: zone-end
33
36
34
37
::: zone pivot="azure-cache-redis"
@@ -46,7 +49,7 @@ The scripts in this article uses the following commands. Select the links in the
@@ -57,16 +60,33 @@ The scripts in this article uses the following commands. Select the links in the
57
60
This sample is broken. When it is fixed, we can fix this include.
58
61
-->
59
62
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).
@@ -128,16 +148,26 @@ az group delete --resource-group $resourceGroup -y
128
148
This sample is broken. When it is fixed, we can fix this include.
129
149
-->
130
150
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).
0 commit comments