ResourceGroupsOperations Class

ResourceGroupsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
ResourceGroupsOperations

Constructor

ResourceGroupsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

begin_delete

Deletes a resource group.

When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.

check_existence

Checks whether a resource group exists.

create_or_update

Creates or updates a resource group.

export_template

Captures the specified resource group as a template.

get

Gets a resource group.

list

Gets all the resource groups for a subscription.

update

Updates a resource group.

Resource groups can be updated through a simple PATCH operation to a group address. The format of the request is the same as that for creating a resource group. If a field is unspecified, the current value is retained.

begin_delete

Deletes a resource group.

When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.

begin_delete(resource_group_name: str, **kwargs: Any) -> azure.core.polling._poller.LROPoller[None]

Parameters

resource_group_name
str
Required

The name of the resource group to delete. The name is case insensitive.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or PollingMethod

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns either None or the result of cls(response)

Return type

Exceptions

check_existence

Checks whether a resource group exists.

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

Parameters

resource_group_name
str
Required

The name of the resource group to check. The name is case insensitive.

cls
callable

A custom type or function that will be passed the direct response

Returns

bool, or the result of cls(response)

Return type

Exceptions

create_or_update

Creates or updates a resource group.

create_or_update(resource_group_name: str, parameters: azure.mgmt.resource.resources.v2019_03_01.models._models_py3.ResourceGroup, **kwargs: Any) -> azure.mgmt.resource.resources.v2019_03_01.models._models_py3.ResourceGroup

Parameters

resource_group_name
str
Required

The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.

parameters
ResourceGroup
Required

Parameters supplied to the create or update a resource group.

cls
callable

A custom type or function that will be passed the direct response

Returns

ResourceGroup, or the result of cls(response)

Return type

Exceptions

export_template

Captures the specified resource group as a template.

export_template(resource_group_name: str, parameters: azure.mgmt.resource.resources.v2019_03_01.models._models_py3.ExportTemplateRequest, **kwargs: Any) -> azure.mgmt.resource.resources.v2019_03_01.models._models_py3.ResourceGroupExportResult

Parameters

resource_group_name
str
Required

The name of the resource group to export as a template.

parameters
ExportTemplateRequest
Required

Parameters for exporting the template.

cls
callable

A custom type or function that will be passed the direct response

Returns

ResourceGroupExportResult, or the result of cls(response)

Return type

Exceptions

get

Gets a resource group.

get(resource_group_name: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2019_03_01.models._models_py3.ResourceGroup

Parameters

resource_group_name
str
Required

The name of the resource group to get. The name is case insensitive.

cls
callable

A custom type or function that will be passed the direct response

Returns

ResourceGroup, or the result of cls(response)

Return type

Exceptions

list

Gets all the resource groups for a subscription.

list(filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) -> Iterable[azure.mgmt.resource.resources.v2019_03_01.models._models_py3.ResourceGroupListResult]

Parameters

filter
str
Required

The filter to apply on the operation.:code:
:code:>><<<br>You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. Default value is None.

top
int
Required

The number of results to return. If null is passed, returns all resource groups. Default value is None.

cls
callable

A custom type or function that will be passed the direct response

Returns

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

Return type

Exceptions

update

Updates a resource group.

Resource groups can be updated through a simple PATCH operation to a group address. The format of the request is the same as that for creating a resource group. If a field is unspecified, the current value is retained.

update(resource_group_name: str, parameters: azure.mgmt.resource.resources.v2019_03_01.models._models_py3.ResourceGroupPatchable, **kwargs: Any) -> azure.mgmt.resource.resources.v2019_03_01.models._models_py3.ResourceGroup

Parameters

resource_group_name
str
Required

The name of the resource group to update. The name is case insensitive.

parameters
ResourceGroupPatchable
Required

Parameters supplied to update a resource group.

cls
callable

A custom type or function that will be passed the direct response

Returns

ResourceGroup, or the result of cls(response)

Return type

Exceptions

Attributes

models

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