共用方式為


ResourceGroupsOperations 類別

警告

請勿直接具現化此類別。

您應該改為透過 存取下列作業

ResourceManagementClient's

<xref:resource_groups> 屬性。

繼承
builtins.object
ResourceGroupsOperations

建構函式

ResourceGroupsOperations(*args, **kwargs)

方法

begin_delete

刪除資源群組。

當您刪除資源群組時,也會刪除其所有資源。 刪除資源群組會刪除其所有範本部署和目前儲存的作業。

begin_export_template

將指定的資源群組擷取為範本。

check_existence

檢查資源群組是否存在。

create_or_update

建立或更新資源群組。

get

取得資源群組。

list

取得訂用帳戶的所有資源群組。

update

更新資源群組。

您可以透過簡單的 PATCH 作業將資源群組更新到群組位址。 要求的格式與建立資源群組的格式相同。 如果未指定欄位,則會保留目前的值。

begin_delete

刪除資源群組。

當您刪除資源群組時,也會刪除其所有資源。 刪除資源群組會刪除其所有範本部署和目前儲存的作業。

begin_delete(resource_group_name: str, force_deletion_types: str | None = None, **kwargs: Any) -> LROPoller[None]

參數

resource_group_name
str
必要

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

force_deletion_types
str
必要

您想要強制刪除的資源類型。 目前僅支援下列專案:forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets。 預設值為 [無]。

cls
callable

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

continuation_token
str

從已儲存狀態重新開機輪詢器的接續權杖。

polling
boolPollingMethod

根據預設,您的輪詢方法會是 ARMPolling。 傳入 False 表示此作業無法輪詢,或傳入您自己的已初始化輪詢物件,以取得個人輪詢策略。

polling_interval
int

如果沒有Retry-After標頭,則兩次輪詢 LRO 作業之間的預設等候時間。

傳回

LROPoller 的實例,會傳回 None 或 cls (回應的結果)

傳回類型

例外狀況

begin_export_template

將指定的資源群組擷取為範本。

begin_export_template(resource_group_name: str, parameters: _models.ExportTemplateRequest, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.ResourceGroupExportResult]

參數

resource_group_name
str
必要

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

parameters
ExportTemplateRequestIO
必要

匯出範本的參數。 這是 ExportTemplateRequest 類型或 IO 類型。 必要。

content_type
str

本文參數內容類型。 已知值為:'application/json'。 預設值為 [無]。

cls
callable

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

continuation_token
str

從已儲存狀態重新開機輪詢器的接續權杖。

polling
boolPollingMethod

根據預設,您的輪詢方法會是 ARMPolling。 傳入 False 表示此作業無法輪詢,或傳入您自己的已初始化輪詢物件,以取得個人輪詢策略。

polling_interval
int

如果沒有Retry-After標頭,則兩次輪詢 LRO 作業之間的預設等候時間。

傳回

會傳回 ResourceGroupExportResult 或 cls (回應結果的 LROPoller 實例)

傳回類型

例外狀況

check_existence

檢查資源群組是否存在。

check_existence(resource_group_name: str, **kwargs: Any) -> bool

參數

resource_group_name
str
必要

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

cls
callable

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

傳回

bool 或 cls (回應的結果)

傳回類型

例外狀況

create_or_update

建立或更新資源群組。

create_or_update(resource_group_name: str, parameters: _models.ResourceGroup, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ResourceGroup

參數

resource_group_name
str
必要

要建立或更新之資源組名。 可以包含英數位元、底線、括弧、連字號、句號 (,但結尾) 除外,以及符合允許字元的 Unicode 字元。 必要。

parameters
ResourceGroupIO
必要

提供給建立或更新資源群組的參數。 這是 ResourceGroup 類型或 IO 類型。 必要。

content_type
str

本文參數內容類型。 已知值為:'application/json'。 預設值為 [無]。

cls
callable

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

傳回

ResourceGroup 或 cls (回應的結果)

傳回類型

例外狀況

get

取得資源群組。

get(resource_group_name: str, **kwargs: Any) -> ResourceGroup

參數

resource_group_name
str
必要

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

cls
callable

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

傳回

ResourceGroup 或 cls (回應的結果)

傳回類型

例外狀況

list

取得訂用帳戶的所有資源群組。

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

參數

filter
str
必要

要套用至 operation.:code 的篩選準則:
:code: >><<<br> 您可以依標記名稱和值進行篩選。 例如,若要篩選標籤名稱和值,請使用 $filter=tagName eq 'tag1' 和 tagValue eq 'Value1'。 預設值為 [無]。

top
int
必要

要傳回的結果數目。 如果傳遞 null,則會傳回所有資源群組。 預設值為 [無]。

cls
callable

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

傳回

ResourceGroup 的實例或 cls (回應結果之類的反覆運算器)

傳回類型

例外狀況

update

更新資源群組。

您可以透過簡單的 PATCH 作業將資源群組更新到群組位址。 要求的格式與建立資源群組的格式相同。 如果未指定欄位,則會保留目前的值。

update(resource_group_name: str, parameters: _models.ResourceGroupPatchable, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ResourceGroup

參數

resource_group_name
str
必要

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

parameters
ResourceGroupPatchableIO
必要

提供用來更新資源群組的參數。 這是 ResourceGroupPatchable 類型或 IO 類型。 必要。

content_type
str

本文參數內容類型。 已知值為:'application/json'。 預設值為 [無]。

cls
callable

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

傳回

ResourceGroup 或 cls (回應的結果)

傳回類型

例外狀況

屬性

models

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