Share via


az redis access-policy

Manage Access Policies for Redis Cache.

Commands

Name Description Type Status
az redis access-policy create

Add an Access Policy to the Redis Cache.

Core GA
az redis access-policy delete

Delete the Access Policy.

Core GA
az redis access-policy list

Get the list of Access Policies associated with the Redis Cache.

Core GA
az redis access-policy show

Get the detailed information about an Access Policy of the Redis Cache.

Core GA
az redis access-policy update

Update an Access Policy of the Redis Cache.

Core GA

az redis access-policy create

Add an Access Policy to the Redis Cache.

az redis access-policy create --access-policy-name
                              --name
                              --permissions
                              --resource-group

Examples

Create a custom Access Policy with the given permissions

az redis access-policy create -g testResourceGroup -n testCacheName --access-policy-name testAccessPolicy --permissions "+get +hget"

Required Parameters

--access-policy-name

The name of the access policy that is being assigned.

--name -n

Name of the Redis cache.

--permissions

Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis access-policy delete

Delete the Access Policy.

az redis access-policy delete --access-policy-name
                              [--ids]
                              [--name]
                              [--resource-group]
                              [--subscription]

Examples

Delete the custom Access Policy

az redis access-policy delete -g testResourceGroup -n testCacheName --access-policy-name testAccessPolicy

Required Parameters

--access-policy-name

The name of the access policy that is being assigned.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the Redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis access-policy list

Get the list of Access Policies associated with the Redis Cache.

az redis access-policy list --name
                            --resource-group

Examples

List the Access Policies of the Redis Cache

az redis access-policy list -g testResourceGroup -n testCacheName

Required Parameters

--name -n

Name of the Redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis access-policy show

Get the detailed information about an Access Policy of the Redis Cache.

az redis access-policy show --access-policy-name
                            [--ids]
                            [--name]
                            [--resource-group]
                            [--subscription]

Examples

Show the permissions of the custom Access Policy

az redis access-policy show -g testResourceGroup -n testCacheName --access-policy-name testAccessPolicy

Required Parameters

--access-policy-name

The name of the access policy that is being assigned.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the Redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis access-policy update

Update an Access Policy of the Redis Cache.

az redis access-policy update --access-policy-name
                              --permissions
                              [--ids]
                              [--name]
                              [--resource-group]
                              [--subscription]

Examples

Update the permissions of the custom Access Policy

az redis access-policy update -g testResourceGroup -n testCacheName --access-policy-name testAccessPolicy --permissions "+get"

Required Parameters

--access-policy-name

The name of the access policy that is being assigned.

--permissions

Permissions for the access policy. Learn how to configure permissions at https://aka.ms/redis/AADPreRequisites.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the Redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.