Bearbeiten

Freigeben über


Get-AzRedisCacheFirewallRule

Get firewall rules set on Redis Cache.

Syntax

Get-AzRedisCacheFirewallRule
   [-ResourceGroupName <String>]
   -Name <String>
   [-RuleName <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

If RuleName parameter if provided, Get-AzRedisCacheFirewallRule 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

Get-AzRedisCacheFirewallRule -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

Get-AzRedisCacheFirewallRule -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:AzContext, 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

Inputs

String

Outputs

PSRedisFirewallRule