Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c455adf

Browse files
committedMar 11, 2022
freshen and standardize parent files for samples
1 parent a39dc01 commit c455adf

10 files changed

+153
-211
lines changed
 

‎.openpublishing.redirection.json

+28-3
Original file line numberDiff line numberDiff line change
@@ -6293,31 +6293,56 @@
62936293
"redirect_url": "/azure/azure-cache-for-redis/policy-reference",
62946294
"redirect_document_id": false
62956295
},
6296+
{
6297+
"source_path_from_root": "/articles/azure-cache-for-redis/scripts/cache-keys-ports.md",
6298+
"redirect_url": "/azure/azure-cache-for-redis/scripts/create-cache-manage-cache",
6299+
"redirect_document_id": false
6300+
},
62966301
{
62976302
"source_path_from_root": "/articles/redis-cache/scripts/cache-keys-ports.md",
6298-
"redirect_url": "/azure/azure-cache-for-redis/scripts/cache-keys-ports",
6303+
"redirect_url": "/azure/azure-cache-for-redis/scripts/create-manage-cache",
6304+
"redirect_document_id": false
6305+
},
6306+
{
6307+
"source_path_from_root": "/articles/azure-cache-for-redis/scripts/create-cache.md",
6308+
"redirect_url": "/azure/azure-cache-for-redis/scripts/create-manage-cache",
62996309
"redirect_document_id": false
63006310
},
63016311
{
63026312
"source_path_from_root": "/articles/redis-cache/scripts/create-cache.md",
63036313
"redirect_url": "/azure/azure-cache-for-redis/scripts/create-cache",
63046314
"redirect_document_id": false
63056315
},
6316+
{
6317+
"source_path_from_root": "/articles/azure-cache-for-redis/scripts/create-premium-cache-cluster.md",
6318+
"redirect_url": "/azure/azure-cache-for-redis/scripts/create-manage-premium-cache-cluster",
6319+
"redirect_document_id": false
6320+
},
63066321
{
63076322
"source_path_from_root": "/articles/redis-cache/scripts/create-premium-cache-cluster.md",
63086323
"redirect_url": "/azure/azure-cache-for-redis/scripts/create-premium-cache-cluster",
63096324
"redirect_document_id": false
63106325
},
63116326
{
6312-
"source_path_from_root": "/articles/redis-cache/scripts/delete-cache.md",
6313-
"redirect_url": "/azure/azure-cache-for-redis/scripts/delete-cache",
6327+
"source_path_from_root": "/articles/azure-cache-for-redis/scripts/delete-cache.md",
6328+
"redirect_url": "/azure/azure-cache-for-redis/scripts/create-manage-cache",
6329+
"redirect_document_id": false
6330+
},
6331+
{
6332+
"source_path_from_root": "/articles/azure-cache-for-redis/scripts/delete-cache.md",
6333+
"redirect_url": "/azure/azure-cache-for-redis/scripts/create-manage-cache",
63146334
"redirect_document_id": false
63156335
},
63166336
{
63176337
"source_path_from_root": "/articles/redis-cache/scripts/show-cache.md",
63186338
"redirect_url": "/azure/azure-cache-for-redis/scripts/show-cache",
63196339
"redirect_document_id": false
63206340
},
6341+
{
6342+
"source_path_from_root": "/articles/azure-cache-for-redis/scripts/show-cache.md",
6343+
"redirect_url": "/azure/azure-cache-for-redis/scripts/create-manage-cache",
6344+
"redirect_document_id": false
6345+
},
63216346
{
63226347
"source_path_from_root": "/articles/storage/blobs/Storage-blob-performance-tiers.md",
63236348
"redirect_url": "/azure/storage/common/storage-account-overview",

‎articles/azure-cache-for-redis/TOC.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,21 @@
5959
href: cache-web-app-cache-aside-leaderboard.md
6060
- name: Deploy a machine learning model
6161
href: cache-ml.md
62-
- name: Manage with Azure PowerShell
63-
href: cache-how-to-manage-redis-cache-powershell.md
64-
- name: Manage with Azure CLI
65-
href: cli-samples.md
62+
- name: Samples
63+
items:
64+
- name: PowerShell samples
65+
items:
66+
- name: Manage with Azure PowerShell
67+
href: cache-how-to-manage-redis-cache-powershell.md
68+
69+
- name: Azure CLI samples
70+
items:
71+
- name: Overview
72+
href: cli-samples.md
73+
- name: Create and manage Azure Cache for Redis
74+
href: scripts/create-manage-cache.md
75+
- name: Create and managed premium Cache for Redis
76+
href: scripts/create-manage-premium-cache-cluster.md
6677
- name: Concepts
6778
items:
6879
- name: High availability

‎articles/azure-cache-for-redis/cli-samples.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,7 @@ The following table includes links to bash scripts built using the Azure CLI.
1515

1616
| Create cache | Description |
1717
| ------------ | ----------- |
18-
| [Create a cache](./scripts/create-cache.md) | Creates a resource group and a basic tier Azure Cache for Redis. |
19-
| [Create a premium cache with clustering](./scripts/create-premium-cache-cluster.md) | Creates a resource group and a premium tier cache with clustering enabled.|
20-
| [Get cache details](./scripts/show-cache.md) | Gets details of an Azure Cache for Redis instance, including provisioning status. |
21-
| [Get the hostname, ports, and keys](./scripts/cache-keys-ports.md) | Gets the hostname, ports, and keys for an Azure Cache for Redis instance. |
22-
|**Web app plus cache**| **Description**|
23-
| [Connect a web app to an Azure Cache for Redis](./../app-service/scripts/cli-connect-to-redis.md) | Creates an Azure web app and an Azure Cache for Redis, then adds the redis connection details to the app settings. |
24-
|**Delete cache**| **Description** |
25-
| [Delete a cache](./scripts/delete-cache.md) | Deletes an Azure Cache for Redis instance |
18+
| [Create and manage a cache](./scripts/create-manage-cache.md) | Creates a resource group and a basic tier Azure Cache for Redis. It then gets details of an Azure Cache for Redis instance, including provisioning status, the hostname, ports, and keys for an Azure Cache for Redis instance. Finally, it deletes the cache.|
19+
| [Create and manage a premium cache with clustering](./scripts/create-manage-premium-cache-cluster.md) | Creates a resource group and a premium tier cache with clustering enabled. It then gets details of an Azure Cache for Redis instance, including provisioning status, the hostname, ports, and keys for an Azure Cache for Redis instance. Finally, it deletes the cache.|
2620

2721
For more information about the Azure CLI, see [Install the Azure CLI](/cli/azure/install-azure-cli) and [Get started with Azure CLI](/cli/azure/get-started-with-azure-cli).

‎articles/azure-cache-for-redis/scripts/cache-keys-ports.md

-39
This file was deleted.

‎articles/azure-cache-for-redis/scripts/create-cache.md

-41
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Create, query, and delete an Azure Cache for Redis - Azure CLI
3+
description: This Azure CLI code sample shows how to create an Azure Cache for Redis instance using the command az redis create. It then gets details of an Azure Cache for Redis instance, including provisioning status, the hostname, ports, and keys for an Azure Cache for Redis instance. Finally, it deletes the cache.
4+
author: flang-msft
5+
tags: azure-service-management
6+
ms.service: cache
7+
ms.devlang: azurecli
8+
ms.topic: sample
9+
ms.date: 03/11/2022
10+
ms.author: franlanglois
11+
ms.custom: devx-track-azurecli
12+
---
13+
14+
# Create an Azure Cache for Redis using the Azure CLI
15+
16+
In this scenario, you learn how to create an Azure Cache for Redis. You then learn to get details of an Azure Cache for Redis instance, including provisioning status, the hostname, ports, and keys for an Azure Cache for Redis instance. Finally, you learn to delete the cache.
17+
18+
[!INCLUDE [quickstarts-free-trial-note](../../../includes/quickstarts-free-trial-note.md)]
19+
20+
[!INCLUDE [azure-cli-prepare-your-environment.md](../../../includes/azure-cli-prepare-your-environment.md)]
21+
22+
## Sample script
23+
24+
[!INCLUDE [cli-launch-cloud-shell-sign-in.md](../../../includes/cli-launch-cloud-shell-sign-in.md)]
25+
26+
### Run the script
27+
28+
:::code language="azurecli" source="~/azure_cli_scripts/redis-cache/create-cache/create-manage-cache.sh" id="FullScript":::
29+
30+
## Clean up resources
31+
32+
[!INCLUDE [cli-clean-up-resources.md](../../../../includes/cli-clean-up-resources.md)]
33+
34+
```azurecli
35+
az group delete --name $resourceGroup
36+
```
37+
38+
## Sample reference
39+
40+
This script uses the following commands to create a resource group and an Azure Cache for Redis. Each command in the table links to command specific documentation.
41+
42+
| Command | Notes |
43+
|---|---|
44+
| [az group create](/cli/azure/group) | Creates a resource group in which all resources are stored. |
45+
| [az redis create](/cli/azure/redis) | Create Azure Cache for Redis instance. |
46+
| [az redis show](/cli/azure/redis) | Retrieve details of an Azure Cache for Redis instance. |
47+
| [az redis list-keys](/cli/azure/redis) | Retrieve access keys for an Azure Cache for Redis instance. |
48+
| [az redis delete](/cli/azure/redis) | Delete Azure Cache for Redis instance. |
49+
50+
## Next steps
51+
52+
For more information on the Azure CLI, see [Azure CLI documentation](/cli/azure).
53+
54+
For an Azure Cache for Redis CLI script sample that creates a premium Azure Cache for Redis with clustering, see [Premium Azure Cache for Redis with Clustering](create-manage-premium-cache-cluster.md).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Create, query, and delete a Premium Azure Cache for Redis with clustering - Azure CLI
3+
description: This Azure CLI code sample shows how to create a 6 GB Premium tier Azure Cache for Redis with clustering enabled and two shards. It then gets details of an Azure Cache for Redis instance, including provisioning status, the hostname, ports, and keys for an Azure Cache for Redis instance. Finally, it deletes the cache.
4+
author: flang-msft
5+
ms.author: franlanglois
6+
tags: azure-service-management
7+
ms.service: cache
8+
ms.devlang: azurecli
9+
ms.topic: sample
10+
ms.date: 03/11/2022
11+
ms.custom: devx-track-azurecli
12+
---
13+
14+
# Create a Premium Azure Cache for Redis with clustering
15+
16+
In this scenario, you learn how to create a 6 GB Premium tier Azure Cache for Redis with clustering enabled and two shards. You then learn to get details of an Azure Cache for Redis instance, including provisioning status, the hostname, ports, and keys for an Azure Cache for Redis instance. Finally, you learn to delete the cache.
17+
18+
[!INCLUDE [quickstarts-free-trial-note](../../../includes/quickstarts-free-trial-note.md)]
19+
20+
[!INCLUDE [azure-cli-prepare-your-environment.md](../../../includes/azure-cli-prepare-your-environment.md)]
21+
22+
## Sample script
23+
24+
[!INCLUDE [cli-launch-cloud-shell-sign-in.md](../../../includes/cli-launch-cloud-shell-sign-in.md)]
25+
26+
### Run the script
27+
28+
:::code language="azurecli" source="~/azure_cli_scripts/redis-cache/create-premium-cache-cluster/create-manage-premium-cache-cluster.sh" id="FullScript":::
29+
30+
## Clean up resources
31+
32+
[!INCLUDE [cli-clean-up-resources.md](../../../../includes/cli-clean-up-resources.md)]
33+
34+
```azurecli
35+
az group delete --name $resourceGroup
36+
```
37+
38+
## Sample reference
39+
40+
This script uses the following commands to create a resource group and a Premium tier Azure Cache for Redis with clustering enable. Each command in the table links to command specific documentation.
41+
42+
| Command | Notes |
43+
|---|---|
44+
| [az group create](/cli/azure/group) | Creates a resource group in which all resources are stored. |
45+
| [az redis create](/cli/azure/redis) | Create Azure Cache for Redis instance. |
46+
| [az redis show](/cli/azure/redis) | Retrieve details of an Azure Cache for Redis instance. |
47+
| [az redis list-keys](/cli/azure/redis) | Retrieve access keys for an Azure Cache for Redis instance. |
48+
| [az redis delete](/cli/azure/redis) | Delete Azure Cache for Redis instance. |
49+
50+
## Next steps
51+
52+
For more information on the Azure CLI, see [Azure CLI documentation](/cli/azure).
53+
54+
For an Azure Cache for Redis CLI script sample that creates a basic Azure Cache for Redis, see [Azure Cache for Redis](create-manage-cache.md).

‎articles/azure-cache-for-redis/scripts/create-premium-cache-cluster.md

-40
This file was deleted.

‎articles/azure-cache-for-redis/scripts/delete-cache.md

-39
This file was deleted.

0 commit comments

Comments
 (0)