ResourceGroupsOperations 類別

警告

請勿直接具現化此類別。

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

ResourceManagementClient's

<xref:resource_groups> 屬性。

繼承
builtins.object
ResourceGroupsOperations

建構函式

ResourceGroupsOperations(*args, **kwargs)

方法

begin_delete

刪除資源群組。

check_existence

檢查資源群組是否存在。

create_or_update

建立資源群組。

export_template

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

get

取得資源群組。

list

取得資源群組的集合。

list_resources

取得訂閱下的所有資源。

patch

您可以透過簡單的 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

本文參數內容類型。 已知值為:'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

本文參數內容類型。 已知值為:'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 (回應結果之類的反覆運算器)

傳回類型

例外狀況

list_resources

取得訂閱下的所有資源。

list_resources(resource_group_name: str, filter: str | None = None, expand: str | None = None, top: int | None = None, **kwargs: Any) -> Iterable[GenericResourceExpanded]

參數

resource_group_name
str
必要

查詢參數。 如果傳遞 null 會傳回所有資源群組。 必要。

filter
str
必要

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

expand
str
必要

要包含在回應中的其他屬性逗號分隔清單。 有效值包括 createdTimechangedTimeprovisioningState 。 例如: $expand=createdTime,changedTime 。 預設值為 [無]。

top
int
必要

查詢參數。 如果傳遞 null 會傳回所有資源群組。 預設值為 [無]。

cls
callable

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

傳回

一個反覆運算器,例如 GenericResourceExpanded 的實例或 cls (回應的結果)

傳回類型

例外狀況

patch

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

patch(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

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

cls
callable

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

傳回

ResourceGroup 或 cls (回應的結果)

傳回類型

例外狀況

屬性

models

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