ResourceGroupsOperations 類別

警告

請勿直接具現化此類別。

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

ResourceManagementClient's

<xref:resource_groups> 屬性。

繼承
builtins.object
ResourceGroupsOperations

建構函式

ResourceGroupsOperations(*args, **kwargs)

方法

begin_delete

刪除資源群組。

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

check_existence

檢查資源群組是否存在。

create_or_update

建立或更新資源群組。

export_template

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

get

取得資源群組。

list

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

update

更新資源群組。

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

begin_delete

刪除資源群組。

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

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

參數

resource_group_name
str
必要

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

cls
callable

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

continuation_token
str

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

polling
boolPollingMethod

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

polling_interval
int

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

傳回

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

傳回類型

例外狀況

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
必要

要建立或更新的資源群組名稱。 必要。

parameters
ResourceGroupIO
必要

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

content_type
str

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

cls
callable

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

傳回

ResourceGroup 或 cls 的結果 (回應)

傳回類型

例外狀況

export_template

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

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

參數

resource_group_name
str
必要

要匯出為範本的資源群組名稱。 必要。

parameters
ExportTemplateRequestIO
必要

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

content_type
str

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

cls
callable

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

傳回

ResourceGroupExportResult 或 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
必要

要套用至作業的篩選。 預設值為 [無]。

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

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

cls
callable

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

傳回

ResourceGroup 或 cls 的結果 (回應)

傳回類型

例外狀況

屬性

models

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