Get-AzureRmRedisCacheFirewallRule
Get firewall rules set on Redis Cache.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRmRedisCacheFirewallRule
[-ResourceGroupName <String>]
-Name <String>
[-RuleName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
If RuleName parameter if provided, Get-AzureRmRedisCacheFirewallRule cmdlet gets detail about the specified firewall rule on Azure Redis Cache. If only Name is specified this operation gets all firewall rules available on that Redis Cache.
Examples
Example 1: Get a single firewall rule
PS C:\>Get-AzureRmRedisCacheFirewallRule -Name "mycache" -RuleName "ruleone"
ResourceGroupName : myGroup
Name : mycache
FirewallRuleId : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/myGroup/providers/Microsoft.Cache/Redis/mycache/firewallRules/ruleone
RuleName : ruleone
Type : Microsoft.Cache/Redis/firewallRules
StartIP : 10.0.0.1
EndIP : 10.0.0.32
This command gets firewall rule named ruleone from Redis Cache named mycache.
Example 2: Get all firewall rules
PS C:\>Get-AzureRmRedisCacheFirewallRule -Name "mycache"
ResourceGroupName : myGroup
Name : mycache
FirewallRuleId : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/myGroup/providers/Microsoft.Cache/Redis/mycache/firewallRules/ruleone
RuleName : ruleone
Type : Microsoft.Cache/Redis/firewallRules
StartIP : 10.0.0.1
EndIP : 10.0.0.32
ResourceGroupName : myGroup
Name : mycache
FirewallRuleId : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/myGroup/providers/Microsoft.Cache/Redis/mycache/firewallRules/ruletwo
RuleName : ruletwo
Type : Microsoft.Cache/Redis/firewallRules
StartIP : 10.0.0.33
EndIP : 10.0.0.64
This command gets all firewall rules from Redis Cache named mycache.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Name of redis cache.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Name of resource group in which cache exists.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RuleName
Name of firewall rule.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |