Access Policy Assignment - Create Update
Creates/Updates a particular access policy assignment for a database
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}?api-version=2025-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
access
|
path | True |
string pattern: ^[A-Za-z0-9]{1,60}$ |
The name of the Redis Enterprise database access policy assignment. |
cluster
|
path | True |
string pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$ |
The name of the Redis Enterprise cluster. Name must be 1-60 characters long. Allowed characters(A-Z, a-z, 0-9) and hyphen(-). There can be no leading nor trailing nor consecutive hyphens |
database
|
path | True |
string pattern: ^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$ |
The name of the Redis Enterprise database. |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.accessPolicyName | True |
string pattern: ^([a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]|[a-zA-Z0-9])$ |
Name of access policy under specific access policy assignment. Only "default" policy is supported for now. |
properties.user | True |
The user associated with the access policy. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The database access policy assignment is being created. Check provisioningState and resourceState for detailed status. |
|
201 Created |
The database access policy assignment is being created. Check provisioningState and resourceState for detailed status. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
RedisEnterpriseAccessPolicyAssignmentCreateUpdate
Sample request
PUT https://management.azure.com/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default/accessPolicyAssignments/defaultTestEntraApp1?api-version=2025-04-01
{
"properties": {
"accessPolicyName": "default",
"user": {
"objectId": "6497c918-11ad-41e7-1b0f-7c518a87d0b0"
}
}
}
Sample response
{
"id": "subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroupsrg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default/accessPolicyAssignments/default-TestEntraApp1",
"name": "defaultTestEntraApp1",
"type": "Microsoft.Cache/redisEnterprise/accessPolicyAssignments",
"properties": {
"provisioningState": "Succeeded",
"accessPolicyName": "default",
"user": {
"objectId": "6497c918-11ad-41e7-1b0f-7c518a87d0b0"
}
}
}
{
"id": "/subscriptions/e7b5a9d2-6b6a-4d2f-9143-20d9a10f5b8f/resourceGroupsrg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default/accessPolicyAssignments/default-TestEntraApp1",
"name": "defaultTestEntraApp1",
"type": "Microsoft.Cache/redisEnterprise/accessPolicyAssignments",
"properties": {
"provisioningState": "Succeeded",
"accessPolicyName": "default",
"user": {
"objectId": "6497c918-11ad-41e7-1b0f-7c518a87d0b0"
}
}
}
Definitions
Name | Description |
---|---|
Access |
Describes the access policy assignment of Redis Enterprise database |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Provisioning |
Current provisioning status |
User |
The user associated with the access policy. |
AccessPolicyAssignment
Describes the access policy assignment of Redis Enterprise database
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties.accessPolicyName |
string pattern: ^([a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]|[a-zA-Z0-9])$ |
Name of access policy under specific access policy assignment. Only "default" policy is supported for now. |
properties.provisioningState |
Current provisioning status of the access policy assignment. |
|
properties.user |
The user associated with the access policy. |
|
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
ProvisioningState
Current provisioning status
Value | Description |
---|---|
Canceled | |
Creating | |
Deleting | |
Failed | |
Succeeded | |
Updating |
User
The user associated with the access policy.
Name | Type | Description |
---|---|---|
objectId |
string |
The object ID of the user. |