Skip to content

Commit ad54da7

Browse files
authored
Merge pull request #4372 from steved0x/sd726
Redis Cache - added more details for Import/Export documentation
2 parents fa5f249 + 8db6737 commit ad54da7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/ResourceManager/RedisCache/Commands.RedisCache/help/Export-AzureRmRedisCache.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ Specifies the Service SAS URL of container where this cmdlet exports data. You c
3737
```
3838
$storageAccountContext = New-AzureStorageContext -StorageAccountName "storageName" -StorageAccountKey "key"
3939
40-
$sasKeyForContainer = New-AzureStorageContainerSASToken -Name "containername" -Permission "rwdl" -StartTime ([System.DateTime]::Now).AddMinutes(-15) -ExpiryTime ([System.DateTime]::Now).AddHours(3) -Context $storageAccountContext -FullUri
40+
$sasKeyForContainer = New-AzureStorageContainerSASToken -Name "containername" -Permission "rwdl" -StartTime ([System.DateTime]::Now).AddMinutes(-15) -ExpiryTime ([System.DateTime]::Now).AddHours(5) -Context $storageAccountContext -FullUri
41+
42+
Export-AzureRmRedisCache -ResourceGroupName "ResourceGroupName" -Name "cacheName" -Prefix "blobprefix" -Container ($sasKeyForContainer)
4143
```
4244

4345
```yaml

src/ResourceManager/RedisCache/Commands.RedisCache/help/Import-AzureRmRedisCache.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ This command imports data from the blob that is specified by the SAS URL into Az
3232
## PARAMETERS
3333

3434
### -Files
35-
Specifies the SAS URLs of blobs whose content this cmdlet imports into the cache.
35+
Specifies the SAS URLs of blobs whose content this cmdlet imports into the cache. You can generate the SAS URLs using the following PowerShell commands:
36+
37+
```
38+
$storageAccountContext = New-AzureStorageContext -StorageAccountName "storageName" -StorageAccountKey "key"
39+
40+
$sasKeyForBlob = New-AzureStorageBlobSASToken -Container “containerName” -blob “blobName” -Permission "rwdl" -StartTime ([System.DateTime]::Now).AddMinutes(-15) -ExpiryTime ([System.DateTime]::Now).AddHours(5) -Context $storageAccountContext -FullUri
41+
42+
Import-AzureRmRedisCache -ResourceGroupName "ResourceGroupName" -Name "cacheName" -Files ($sasKeyForBlob) -Force
43+
```
3644

3745
```yaml
3846
Type: String[]

0 commit comments

Comments
 (0)