@@ -3,17 +3,17 @@ title: Azure CLI Script Sample - Work with key-values in an Azure App Configurat
3
3
description : Provides information on working with key-values in an Azure App Configuration store
4
4
services : azure-app-configuration
5
5
documentationcenter : ' '
6
- author : yegu-ms
7
- manager : balans
6
+ author : lisaguthrie
7
+ manager : maiye
8
8
editor : ' '
9
9
10
10
ms.service : azure-app-configuration
11
11
ms.devlang : azurecli
12
12
ms.topic : sample
13
13
ms.tgt_pltfrm : na
14
14
ms.workload : azure-app-configuration
15
- ms.date : 02/24 /2019
16
- ms.author : yegu
15
+ ms.date : 11/08 /2019
16
+ ms.author : lcozzens
17
17
ms.custom : mvc
18
18
---
19
19
@@ -38,6 +38,9 @@ You need to install the Azure App Configuration CLI extension first by executing
38
38
39
39
appConfigName=myTestAppConfigStore
40
40
newKey="TestKey"
41
+ refKey="KeyVaultReferenceTestKey"
42
+ uri="[URL to value stored in Key Vault]"
43
+ uri2="[URL to another value stored in Key Vault]"
41
44
42
45
# Create a new key-value
43
46
az appconfig kv set --name $appConfigName --key $newKey --value "Value 1"
@@ -46,14 +49,29 @@ az appconfig kv set --name $appConfigName --key $newKey --value "Value 1"
46
49
az appconfig kv list --name $appConfigName
47
50
48
51
# Update new key's value
49
- az appconfig kv set --name $appConfigName --value "Value 2"
52
+ az appconfig kv set --name $appConfigName --key $newKey --value "Value 2"
53
+
54
+ # List current key-values
55
+ az appconfig kv list --name $appConfigName
56
+
57
+ # Create a new key-value referencing a value stored in Azure Key Vault
58
+ az appconfig kv set --name $appConfigName --key $refKey --content-type "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8" --value "{\"uri\":\"$uri\"}"
59
+
60
+ # List current key-values
61
+ az appconfig kv list --name $appConfigName
62
+
63
+ # Update Key Vault reference
64
+ az appconfig kv set --name $appConfigName --key $refKey --value "{\"uri\":\"$uri2\"}"
50
65
51
66
# List current key-values
52
67
az appconfig kv list --name $appConfigName
53
68
54
69
# Delete new key
55
70
az appconfig kv delete --name $appConfigName --key $newKey
56
71
72
+ # Delete Key Vault reference
73
+ az appconfig kv delete --name $appConfigName --key $refKey
74
+
57
75
# List current key-values
58
76
az appconfig kv list --name $appConfigName
59
77
```
0 commit comments