azure.mgmt.authorization.v2018_07_01_preview.operations module

class azure.mgmt.authorization.v2018_07_01_preview.operations.DenyAssignmentsOperations(*args, **kwargs)[source]

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through AuthorizationManagementClient’s deny_assignments attribute.

get(scope: str, deny_assignment_id: str, **kwargs: Any)azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignment[source]

Get the specified deny assignment.

Parameters
  • scope (str) – The scope of the deny assignment. Required.

  • deny_assignment_id (str) – The ID of the deny assignment to get. Required.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

DenyAssignment or the result of cls(response)

Return type

DenyAssignment

Raises

HttpResponseError

get_by_id(deny_assignment_id: str, **kwargs: Any)azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignment[source]

Gets a deny assignment by ID.

Parameters

deny_assignment_id (str) – 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 Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

DenyAssignment or the result of cls(response)

Return type

DenyAssignment

Raises

HttpResponseError

list(filter: Optional[str] = None, **kwargs: Any)Iterable[azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignment][source]

Gets all deny assignments for the subscription.

Parameters

filter (str) – 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 Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[DenyAssignment]

Raises

HttpResponseError

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)Iterable[azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignment][source]

Gets deny assignments for a resource.

Parameters
  • resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.

  • resource_provider_namespace (str) – The namespace of the resource provider. Required.

  • parent_resource_path (str) – The parent resource identity. Required.

  • resource_type (str) – The resource type of the resource. Required.

  • resource_name (str) – The name of the resource to get deny assignments for. Required.

  • filter (str) – 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 Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[DenyAssignment]

Raises

HttpResponseError

list_for_resource_group(resource_group_name: str, filter: Optional[str] = None, **kwargs: Any)Iterable[azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignment][source]

Gets deny assignments for a resource group.

Parameters
  • resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.

  • filter (str) – 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 Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[DenyAssignment]

Raises

HttpResponseError

list_for_scope(scope: str, filter: Optional[str] = None, **kwargs: Any)Iterable[azure.mgmt.authorization.v2018_07_01_preview.models._models_py3.DenyAssignment][source]

Gets deny assignments for a scope.

Parameters
  • scope (str) – The scope of the deny assignments. Required.

  • filter (str) – 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 Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

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

Return type

ItemPaged[DenyAssignment]

Raises

HttpResponseError

models = <module 'azure.mgmt.authorization.v2018_07_01_preview.models' from '/mnt/vss/_work/1/s/sdk/authorization/azure-mgmt-authorization/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/authorization/v2018_07_01_preview/models/__init__.py'>