DenyAssignmentsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AuthorizationManagementClient's
<xref:deny_assignments> attribute.
- Inheritance
-
builtins.objectDenyAssignmentsOperations
Constructor
DenyAssignmentsOperations(*args, **kwargs)
Methods
get |
Get the specified deny assignment. |
get_by_id |
Gets a deny assignment by ID. |
list |
Gets all deny assignments for the subscription. |
list_for_resource |
Gets deny assignments for a resource. |
list_for_resource_group |
Gets deny assignments for a resource group. |
list_for_scope |
Gets deny assignments for a scope. |
get
Get the specified deny assignment.
get(scope: str, deny_assignment_id: str, **kwargs: Any) -> DenyAssignment
Parameters
Name | Description |
---|---|
scope
Required
|
The scope of the deny assignment. Required. |
deny_assignment_id
Required
|
The ID of the deny assignment to get. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
DenyAssignment or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_by_id
Gets a deny assignment by ID.
get_by_id(deny_assignment_id: str, **kwargs: Any) -> DenyAssignment
Parameters
Name | Description |
---|---|
deny_assignment_id
Required
|
The 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. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
DenyAssignment or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Gets all deny assignments for the subscription.
list(filter: str | None = None, **kwargs: Any) -> Iterable[DenyAssignment]
Parameters
Name | Description |
---|---|
filter
Required
|
The 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. Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either DenyAssignment or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_for_resource
Gets deny assignments for a resource.
list_for_resource(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, filter: str | None = None, **kwargs: Any) -> Iterable[DenyAssignment]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
resource_provider_namespace
Required
|
The namespace of the resource provider. Required. |
parent_resource_path
Required
|
The parent resource identity. Required. |
resource_type
Required
|
The resource type of the resource. Required. |
resource_name
Required
|
The name of the resource to get deny assignments for. Required. |
filter
Required
|
The 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. Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either DenyAssignment or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_for_resource_group
Gets deny assignments for a resource group.
list_for_resource_group(resource_group_name: str, filter: str | None = None, **kwargs: Any) -> Iterable[DenyAssignment]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
filter
Required
|
The 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. Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either DenyAssignment or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_for_scope
Gets deny assignments for a scope.
list_for_scope(scope: str, filter: str | None = None, **kwargs: Any) -> Iterable[DenyAssignment]
Parameters
Name | Description |
---|---|
scope
Required
|
The scope of the deny assignments. Required. |
filter
Required
|
The 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. Default value is None. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either DenyAssignment or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.authorization.v2022_04_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\authorization\\v2022_04_01\\models\\__init__.py'>
Azure SDK for Python