Skip to content

Commit 59992c5

Browse files
committed
Updating point-in-time article with AZ PS cmdlet
1 parent 93355c4 commit 59992c5

File tree

1 file changed

+35
-9
lines changed

1 file changed

+35
-9
lines changed

articles/azure-app-configuration/concept-point-time-snapshot.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,54 @@
11
---
2-
title: Azure App Configuration point-in-time snapshot
3-
description: An overview of how point-in-time snapshot works in Azure App Configuration
2+
title: Retrieve key-value pairs from a point-in-time
3+
titleSuffix: Azure App Configuration
4+
description: Retrieve old key-value pairs using point-in-time snapshots in Azure App Configuration
45
services: azure-app-configuration
56
author: lisaguthrie
67
ms.author: lcozzens
78
ms.service: azure-app-configuration
89
ms.topic: conceptual
9-
ms.date: 02/24/2019
10+
ms.date: 02/20/2020
1011
---
1112

1213
# Point-in-time snapshot
1314

14-
Azure App Configuration keeps records of the precise times when a new key-value pair is created and then modified. These records form a complete timeline in key-value changes. An App Configuration store can reconstruct the history of any key value and replay its past value at any given moment, up to the present. With this feature, you can “time-travel” backward and retrieve an old key value. For example, you can get yesterday's configuration settings, just before the most recent deployment, in order to recover a previous configuration and roll back the application.
15+
Azure App Configuration maintains a record of changes made to key-value pairs. This records forms a complete timeline of key-value changes, beginning with the creation of each pair, for up to 7 days. An App Configuration store can reconstruct the history of any key-value and provide its past value at any given moment. Using this feature, you can “time-travel” backward and retrieve an old key-value. For example, you can recover configuration settings used prior to the most recent deployment in order to roll back the application to the previous configuration.
1516

1617
## Key-value retrieval
1718

18-
To retrieve past key values, specify a time at which key values are snapshot in the HTTP header of a REST API call. For example:
19+
You can use Azure PowerShell to retrieve past key values. Use `az appconfig revision list`, adding appropriate parameters to retrieve the required values. Specify the Azure App Configuration instance by providing either the store name (`--name {app-config-store-name}`) or by using a connection string (`--connection-string {your-connection-string}`). Restrict the output by specifying a specific point in time (`--datetime`) and by specifying the maximum number of items to return (`--top`).
1920

20-
```rest
21-
GET /kv HTTP/1.1
22-
Accept-Datetime: Sat, 1 Jan 2019 02:10:00 GMT
21+
[!INCLUDE [cloud-shell-try-it.md](../../../includes/cloud-shell-try-it.md)]
22+
23+
Retrieve all recorded changes to your key-values.
24+
25+
```azurepowershell
26+
az appconfig revision list --name {your-app-config-store-name}.
2327
```
2428

25-
Currently, App Configuration keeps seven days of change history.
29+
Retrieve all recorded changes for the key `environment` and the labels `test` and `prod`.
30+
31+
```azurepowershell
32+
az appconfig revision list --name {your-app-config-store-name} --key environment --label test,prod
33+
```
34+
35+
Retrieve all recorded changes in the hierarchical key space `environment:prod`.
36+
37+
```azurepowershell
38+
az appconfig revision list --name {your-app-config-store-name} --key environment:prod:*
39+
```
40+
41+
Retrieve all recorded changes for the key `color` at a specific point-in-time.
42+
43+
```azurepowershell
44+
az appconfig revision list --connection-string {your-app-config-connection-string} --key color --datetime "2019-05-01T11:24:12Z"
45+
```
46+
47+
Retrieve the last 10 recorded changes to your key-values and return only the values for `key`, `label`, and `last-modified` time stamp.
48+
49+
```azurepowershell
50+
az appconfig revision list --name {your-app-config-store-name} --top 10 --fields key,label,last-modified
51+
```
2652

2753
## Next steps
2854

0 commit comments

Comments
 (0)