ResourceGroupsOperations Class

ResourceGroupsOperations async 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

Delete resource group.

check_existence

Checks whether resource group exists.

create_or_update

Create a resource group.

export_template

Captures the specified resource group as a template.

get

Get a resource group.

list

Gets a collection of resource groups.

list_resources

Get all of the resources under a subscription.

patch

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 groups, though if a field is unspecified current value will be carried over.

begin_delete

Delete resource group.

async begin_delete(resource_group_name: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]

Parameters

resource_group_name
str
Required

The name of the resource group to be deleted. 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 AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. 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 AsyncLROPoller that returns either None or the result of cls(response)

Return type

Exceptions

check_existence

Checks whether resource group exists.

async 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

Create a resource group.

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

Parameters

resource_group_name
str
Required

The name of the resource group to be created or updated.

parameters
ResourceGroup
Required

Parameters supplied to the create or update resource group service operation.

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.

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

Parameters

resource_group_name
str
Required

The name of the resource group to be created or updated.

parameters
ExportTemplateRequest
Required

Parameters supplied to the export template resource group operation.

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

Get a resource group.

async get(resource_group_name: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2016_02_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 a collection of resource groups.

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

Parameters

filter
str
Required

The filter to apply on the operation. Default value is None.

top
int
Required

Query parameters. 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

list_resources

Get all of the resources under a subscription.

list_resources(resource_group_name: str, filter: Optional[str] = None, expand: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.resource.resources.v2016_02_01.models._models_py3.ResourceListResult]

Parameters

resource_group_name
str
Required

Query parameters. If null is passed returns all resource groups.

filter
str
Required

The filter to apply on the operation. Default value is None.

expand
str
Required

Comma-separated list of additional properties to be included in the response. Valid values include createdTime, changedTime and provisioningState. For example, $expand=createdTime,changedTime. Default value is None.

top
int
Required

Query parameters. 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 ResourceListResult or the result of cls(response)

Return type

Exceptions

patch

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 groups, though if a field is unspecified current value will be carried over.

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

Parameters

resource_group_name
str
Required

The name of the resource group to be created or updated. The name is case insensitive.

parameters
ResourceGroup
Required

Parameters supplied to the update state resource group service operation.

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.v2016_02_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\resource\\resources\\v2016_02_01\\models\\__init__.py'>