共用方式為


DenyAssignmentsOperations 類別

警告

請勿直接具現化此類別。

相反地,您應該透過 存取下列作業

AuthorizationManagementClient's

<xref:deny_assignments> 屬性。

繼承
builtins.object
DenyAssignmentsOperations

建構函式

DenyAssignmentsOperations(*args, **kwargs)

方法

get

取得指定的拒絕指派。

get_by_id

依識別碼取得拒絕指派。

list

取得訂用帳戶的所有拒絕指派。

list_for_resource

取得資源的拒絕指派。

list_for_resource_group

取得資源群組的拒絕指派。

list_for_scope

取得範圍的拒絕指派。

get

取得指定的拒絕指派。

get(scope: str, deny_assignment_id: str, **kwargs: Any) -> DenyAssignment

參數

scope
str
必要

拒絕指派的範圍。 必要。

deny_assignment_id
str
必要

要取得之拒絕指派的識別碼。 必要。

cls
callable

將傳遞直接回應的自訂類型或函式

傳回

DenyAssignment 或 cls 的結果 (回應)

傳回類型

例外狀況

get_by_id

依識別碼取得拒絕指派。

get_by_id(deny_assignment_id: str, **kwargs: Any) -> DenyAssignment

參數

deny_assignment_id
str
必要

完整拒絕指派識別碼。 例如,針對租使用者層級拒絕指派,請使用 /subscriptions/{guid}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} 的格式,或租使用者層級拒絕指派的 /providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} 格式。 必要。

cls
callable

將傳遞直接回應的自訂類型或函式

傳回

DenyAssignment 或 cls 的結果 (回應)

傳回類型

例外狀況

list

取得訂用帳戶的所有拒絕指派。

list(filter: str | None = None, **kwargs: Any) -> Iterable[DenyAssignment]

參數

filter
str
必要

要套用至作業的篩選。 使用 $filter=atScope () 傳回範圍或更新版本的所有拒絕指派。 使用 $filter=denyAssignmentName eq '{name}' 搜尋指定範圍中的拒絕指派。 使用 $filter=principalId eq '{id}' 傳回指定主體範圍上方和下方的所有拒絕指派。 使用 $filter=gdprExportPrincipalId eq '{id}' 傳回指定主體範圍上方和下方的所有拒絕指派。 此篩選與 principalId 篩選準則不同,因為它不僅傳回包含指定主體的拒絕指派是 [主體] 清單,也會傳回包含指定主體的拒絕指派是 ExcludePrincipals 清單。 此外,使用 gdprExportPrincipalId 篩選時,只會傳回拒絕指派名稱和描述屬性。 預設值為 [無]。

cls
callable

將傳遞直接回應的自訂類型或函式

傳回

Iterator,例如 DenyAssignment 的實例或 cls 的結果 (回應)

傳回類型

例外狀況

list_for_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]

參數

resource_group_name
str
必要

資源群組的名稱。 名稱不區分大小寫。 必要。

resource_provider_namespace
str
必要

資源提供者的命名空間。 必要。

parent_resource_path
str
必要

父資源識別。 必要。

resource_type
str
必要

資源的資源類型。 必要。

resource_name
str
必要

要取得拒絕指派的資源名稱。 必要。

filter
str
必要

要套用至作業的篩選。 使用 $filter=atScope () 傳回範圍或更新版本的所有拒絕指派。 使用 $filter=denyAssignmentName eq '{name}' 搜尋指定範圍中的拒絕指派。 使用 $filter=principalId eq '{id}' 傳回指定主體範圍上方和下方的所有拒絕指派。 使用 $filter=gdprExportPrincipalId eq '{id}' 傳回指定主體範圍上方和下方的所有拒絕指派。 此篩選與 principalId 篩選準則不同,因為它不僅傳回包含指定主體的拒絕指派是 [主體] 清單,也會傳回包含指定主體的拒絕指派是 ExcludePrincipals 清單。 此外,使用 gdprExportPrincipalId 篩選時,只會傳回拒絕指派名稱和描述屬性。 預設值為 [無]。

cls
callable

將傳遞直接回應的自訂類型或函式

傳回

Iterator,例如 DenyAssignment 的實例或 cls 的結果 (回應)

傳回類型

例外狀況

list_for_resource_group

取得資源群組的拒絕指派。

list_for_resource_group(resource_group_name: str, filter: str | None = None, **kwargs: Any) -> Iterable[DenyAssignment]

參數

resource_group_name
str
必要

資源群組的名稱。 名稱不區分大小寫。 必要。

filter
str
必要

要套用至作業的篩選。 使用 $filter=atScope () 傳回範圍或更新版本的所有拒絕指派。 使用 $filter=denyAssignmentName eq '{name}' 搜尋指定範圍中的拒絕指派。 使用 $filter=principalId eq '{id}' 傳回指定主體範圍上方和下方的所有拒絕指派。 使用 $filter=gdprExportPrincipalId eq '{id}' 傳回指定主體範圍上方和下方的所有拒絕指派。 此篩選與 principalId 篩選準則不同,因為它不僅傳回包含指定主體的拒絕指派是 [主體] 清單,也會傳回包含指定主體的拒絕指派是 ExcludePrincipals 清單。 此外,使用 gdprExportPrincipalId 篩選時,只會傳回拒絕指派名稱和描述屬性。 預設值為 [無]。

cls
callable

將傳遞直接回應的自訂類型或函式

傳回

Iterator,例如 DenyAssignment 的實例或 cls 的結果 (回應)

傳回類型

例外狀況

list_for_scope

取得範圍的拒絕指派。

list_for_scope(scope: str, filter: str | None = None, **kwargs: Any) -> Iterable[DenyAssignment]

參數

scope
str
必要

拒絕指派的範圍。 必要。

filter
str
必要

要套用至作業的篩選。 使用 $filter=atScope () 傳回範圍或更新版本的所有拒絕指派。 使用 $filter=denyAssignmentName eq '{name}' 搜尋指定範圍中的拒絕指派。 使用 $filter=principalId eq '{id}' 傳回指定主體範圍上方和下方的所有拒絕指派。 使用 $filter=gdprExportPrincipalId eq '{id}' 傳回指定主體範圍上方和下方的所有拒絕指派。 此篩選與 principalId 篩選準則不同,因為它不僅傳回包含指定主體的拒絕指派是 [主體] 清單,也會傳回包含指定主體的拒絕指派是 ExcludePrincipals 清單。 此外,使用 gdprExportPrincipalId 篩選時,只會傳回拒絕指派名稱和描述屬性。 預設值為 [無]。

cls
callable

將傳遞直接回應的自訂類型或函式

傳回

Iterator,例如 DenyAssignment 的實例或 cls 的結果 (回應)

傳回類型

例外狀況

屬性

models

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