DenyAssignmentsOperations Class

DenyAssignmentsOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
DenyAssignmentsOperations

Constructor

DenyAssignmentsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

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.

async get(scope: str, deny_assignment_id: str, **kwargs: Any) -> azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignment

Parameters

scope
str
Required

The scope of the deny assignment.

deny_assignment_id
str
Required

The ID of the deny assignment to get.

cls
callable

A custom type or function that will be passed the direct response

Returns

DenyAssignment, or the result of cls(response)

Return type

Exceptions

get_by_id

Gets a deny assignment by ID.

async get_by_id(deny_assignment_id: str, **kwargs: Any) -> azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignment

Parameters

deny_assignment_id
str
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.

cls
callable

A custom type or function that will be passed the direct response

Returns

DenyAssignment, or the result of cls(response)

Return type

Exceptions

list

Gets all deny assignments for the subscription.

list(filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignmentListResult]

Parameters

filter
str
default value: None

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.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either DenyAssignmentListResult or the result of cls(response)

Return type

Exceptions

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: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignmentListResult]

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

resource_provider_namespace
str
Required

The namespace of the resource provider.

parent_resource_path
str
Required

The parent resource identity.

resource_type
str
Required

The resource type of the resource.

resource_name
str
Required

The name of the resource to get deny assignments for.

filter
str
default value: None

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.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either DenyAssignmentListResult or the result of cls(response)

Return type

Exceptions

list_for_resource_group

Gets deny assignments for a resource group.

list_for_resource_group(resource_group_name: str, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignmentListResult]

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

filter
str
default value: None

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.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either DenyAssignmentListResult or the result of cls(response)

Return type

Exceptions

list_for_scope

Gets deny assignments for a scope.

list_for_scope(scope: str, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignmentListResult]

Parameters

scope
str
Required

The scope of the deny assignments.

filter
str
default value: None

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.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either DenyAssignmentListResult or the result of cls(response)

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.authorization.v2018_07_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\authorization\\v2018_07_01_preview\\models\\__init__.py'>