Skip to main content

deny_assignments

Creates, updates, deletes, gets or lists a deny_assignments resource.

Overview

Namedeny_assignments
TypeResource
Idazure.authorization.deny_assignments

Fields

The following fields are returned by SELECT queries:

OK - Returns an array of deny assignments.

NameDatatypeDescription
idstringThe deny assignment ID.
namestringThe deny assignment name.
propertiesobjectDeny assignment properties.
typestringThe deny assignment type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_for_resourceselectsubscriptionId, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName$filterGets deny assignments for a resource.
list_for_resource_groupselectsubscriptionId, resourceGroupName$filterGets deny assignments for a resource group.
getselectscope, denyAssignmentIdGet the specified deny assignment.
listselectsubscriptionId$filterGets all deny assignments for the subscription.
get_by_idselectdenyAssignmentIdGets a deny assignment by ID.
list_for_scopeselectscope$filterGets deny assignments for a scope.

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
denyAssignmentIdstringThe fully qualified deny assignment ID. For example, use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for subscription level deny assignments, or /providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for tenant level deny assignments.
parentResourcePathstringThe parent resource identity.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
resourceNamestringThe name of the resource to get deny assignments for.
resourceProviderNamespacestringThe namespace of the resource provider.
resourceTypestringThe resource type of the resource.
scopestringThe scope of the deny assignments.
subscriptionIdstringThe ID of the target subscription.
$filterstringThe filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.

SELECT examples

Gets deny assignments for a resource.

SELECT
id,
name,
properties,
type
FROM azure.authorization.deny_assignments
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND resourceProviderNamespace = '{{ resourceProviderNamespace }}' -- required
AND parentResourcePath = '{{ parentResourcePath }}' -- required
AND resourceType = '{{ resourceType }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND $filter = '{{ $filter }}'
;