Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Import-AzRedisCache
- Module:
- Az.RedisCache Module
Imports data from blobs to Azure Redis Cache.
Syntax
Default (Default)
Import-AzRedisCache
[-ResourceGroupName <String>]
-Name <String>
-Files <String[]>
[-Format <String>]
[-PreferredDataArchiveAuthMethod <String>]
[-StorageSubscriptionId <String>]
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Import-AzRedisCache cmdlet imports data from blobs into Azure Redis Cache.
Examples
Example 1: Import data
Import-AzRedisCache -ResourceGroupName "ResourceGroup13" -Name "RedisCache06" -Files @("https://mystorageaccount.blob.core.windows.net/container22/blobname") -Force
This command imports data from the blob that is specified by the SAS URL into Azure Redis Cache.
Example 2: Import data using managed identity
Import-AzRedisCache -ResourceGroupName "ResourceGroup13" -Name "RedisCache06" -Files @("https://mystorageaccount.blob.core.windows.net/container22/blobname") -Force -PreferredDataArchiveAuthMethod ManagedIdentity
This command imports data from the blob that is specified into Azure Redis Cache using managed identity as the authorization method. It assumes that both the cache and storage account have been configured to use managed identity.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-Files
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: $storageAccountContext = New-AzStorageContext -StorageAccountName "storageName" -StorageAccountKey "key" $sasKeyForBlob = New-AzStorageBlobSASToken -Container "containerName" -blob "blobName" -Permission "rwdl" -StartTime ([System.DateTime]::Now).AddMinutes(-15) -ExpiryTime ([System.DateTime]::Now).AddHours(5) -Context $storageAccountContext -FullUri Import-AzRedisCache -ResourceGroupName "ResourceGroupName" -Name "cacheName" -Files ($sasKeyForBlob) -Force
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Format
Specifies the format of the blob. Currently rdb is the only supported format.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specifies the name of a cache.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PassThru
Indicates that this cmdlet returns a Boolean that indicates whether the operation succeeds. By default, this cmdlet does not generate any output.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PreferredDataArchiveAuthMethod
Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
Specifies the name of the resource group that contains the cache.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-StorageSubscriptionId
Subscription id of the storage container containing files to import using Managed Identity.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
String
Outputs
Boolean
Notes
- Keywords: azure, azurerm, arm, resource, management, manager, redis, cache, web, webapp, website
Related Links
Azure PowerShell
Feedback
Was this page helpful?
