Skip to main content

access_policy_assignment

Creates, updates, deletes, gets or lists an access_policy_assignment resource.

Overview

Nameaccess_policy_assignment
TypeResource
Idazure.redis.access_policy_assignment

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
accessPolicyNamestringThe name of the access policy that is being assigned. Required.
objectIdstringObject Id to assign access policy to. Required.
objectIdAliasstringUser friendly name for object id. Also represents username for token based authentication. Required.
provisioningStatestringProvisioning state of an access policy assignment set. Known values are: "Updating", "Succeeded", "Deleting", "Deleted", "Canceled", and "Failed". (Updating, Succeeded, Deleting, Deleted, Canceled, Failed)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, cache_name, access_policy_assignment_name, subscription_idGets the list of assignments for an access policy of a redis cache.
listselectresource_group_name, cache_name, subscription_idGets the list of access policy assignments associated with this redis cache.
create_updateinsertresource_group_name, cache_name, access_policy_assignment_name, subscription_idAdds the access policy assignment to the specified users.
create_updatereplaceresource_group_name, cache_name, access_policy_assignment_name, subscription_idAdds the access policy assignment to the specified users.
deletedeleteresource_group_name, cache_name, access_policy_assignment_name, subscription_idDeletes the access policy assignment from a redis cache.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
access_policy_assignment_namestringThe name of the access policy assignment. Required.
cache_namestringThe name of the Redis cache. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets the list of assignments for an access policy of a redis cache.

SELECT
id,
name,
accessPolicyName,
objectId,
objectIdAlias,
provisioningState,
systemData,
type
FROM azure.redis.access_policy_assignment
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cache_name = '{{ cache_name }}' -- required
AND access_policy_assignment_name = '{{ access_policy_assignment_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Adds the access policy assignment to the specified users.

INSERT INTO azure.redis.access_policy_assignment (
properties,
resource_group_name,
cache_name,
access_policy_assignment_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ cache_name }}',
'{{ access_policy_assignment_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Adds the access policy assignment to the specified users.

REPLACE azure.redis.access_policy_assignment
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cache_name = '{{ cache_name }}' --required
AND access_policy_assignment_name = '{{ access_policy_assignment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes the access policy assignment from a redis cache.

DELETE FROM azure.redis.access_policy_assignment
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND cache_name = '{{ cache_name }}' --required
AND access_policy_assignment_name = '{{ access_policy_assignment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;