New-AzRedisCacheAccessPolicy
Add an Access Policy to the Redis Cache
Syntax
New-AzRedisCacheAccessPolicy
[-ResourceGroupName <String>]
-Name <String>
-AccessPolicyName <String>
-Permission <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzRedisCacheAccessPolicy
-TopLevelResourceObject <RedisCacheAttributes>
-AccessPolicyName <String>
-Permission <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Create an access policy for a Redis Cache.
Examples
Example 1: Create an access policy
New-AzRedisCacheAccessPolicy -Name "testCache" -AccessPolicyName "testAccessPolicy" -Permission "+get +hget"
This command creates access policy named testAccessPolicy on Redis Cache named testCache.
Parameters
-AccessPolicyName
The name of the access policy that is being added to the Redis cache.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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 |
-Name
Name of redis cache.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Permission
Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
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 |
-TopLevelResourceObject
Object of type RedisCacheAttributes
Type: | RedisCacheAttributes |
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 |