Modifier

Partager via


Clear-AzRedisCache

Flush all data from an Azure Cache for Redis instance.

Syntax

Clear-AzRedisCache
     [-ResourceGroupName <String>]
     -Name <String>
     [-Force]
     [-PassThru]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Clear-AzRedisCache
     -ResourceId <String>
     [-Force]
     [-PassThru]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Clear-AzRedisCache
     -InputObject <RedisCacheAttributes>
     [-Force]
     [-PassThru]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

The Clear-AzRedisCache cmdlet flushes all data of an Azure Redis Cache instance.

Examples

Example: Flush all data from a redis cache

Clear-AzRedisCache -ResourceGroupName "ResourceGroup13" -Name "RedisCache06"

This command flushes all data from the redis cache named RedisCache06 in the resource group named ResourceGroup13.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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

-Force

Do not ask for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Object of type RedisCacheAttributes

Type:RedisCacheAttributes
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

-PassThru

Indicates that this cmdlet returns a Boolean that indicates whether the operation succeeds. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Name of resource group under which cache exists.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ResourceId

ARM Id of Redis Cache

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

Boolean