ResourcesOperations Class

ResourcesOperations 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
ResourcesOperations

Constructor

ResourcesOperations(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_move_resources

Move resources from one resource group to another. The resources being moved should all be in the same resource group.

begin_update

Updates a resource.

check_existence

Checks whether resource exists.

create_or_update

Create a resource.

delete

Delete resource and all of its resources.

get

Returns a resource belonging to a resource group.

list

Get all of the resources under a subscription.

begin_move_resources

Move resources from one resource group to another. The resources being moved should all be in the same resource group.

async begin_move_resources(source_resource_group_name: str, parameters: azure.mgmt.resource.resources.v2016_02_01.models._models_py3.ResourcesMoveInfo, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]

Parameters

source_resource_group_name
str
Required

Source resource group name.

parameters
ResourcesMoveInfo
Required

move resources' parameters.

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

begin_update

Updates a resource.

async begin_update(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, parameters: azure.mgmt.resource.resources.v2016_02_01.models._models_py3.GenericResource, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.resource.resources.v2016_02_01.models._models_py3.GenericResource]

Parameters

resource_group_name
str
Required

The name of the resource group for the resource. The name is case insensitive.

resource_provider_namespace
str
Required

The namespace of the resource provider.

parent_resource_path
str
Required

The parent resource identity.

resource_type
str
Required

The resource type of the resource to update.

resource_name
str
Required

The name of the resource to update.

api_version
str
Required

The API version to use for the operation.

parameters
GenericResource
Required

Parameters for updating the resource.

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 GenericResource or the result of cls(response)

Return type

Exceptions

check_existence

Checks whether resource exists.

async check_existence(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) -> bool

Parameters

resource_group_name
str
Required

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

resource_provider_namespace
str
Required

Resource identity.

parent_resource_path
str
Required

Resource identity.

resource_type
str
Required

Resource identity.

resource_name
str
Required

Resource identity.

api_version
str
Required
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.

async create_or_update(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, parameters: azure.mgmt.resource.resources.v2016_02_01.models._models_py3.GenericResource, **kwargs: Any) -> azure.mgmt.resource.resources.v2016_02_01.models._models_py3.GenericResource

Parameters

resource_group_name
str
Required

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

resource_provider_namespace
str
Required

Resource identity.

parent_resource_path
str
Required

Resource identity.

resource_type
str
Required

Resource identity.

resource_name
str
Required

Resource identity.

api_version
str
Required
parameters
GenericResource
Required

Create or update resource parameters.

cls
callable

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

Returns

GenericResource, or the result of cls(response)

Return type

Exceptions

delete

Delete resource and all of its resources.

async delete(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) -> None

Parameters

resource_group_name
str
Required

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

resource_provider_namespace
str
Required

Resource identity.

parent_resource_path
str
Required

Resource identity.

resource_type
str
Required

Resource identity.

resource_name
str
Required

Resource identity.

api_version
str
Required
cls
callable

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

Returns

None, or the result of cls(response)

Return type

Exceptions

get

Returns a resource belonging to a resource group.

async get(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2016_02_01.models._models_py3.GenericResource

Parameters

resource_group_name
str
Required

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

resource_provider_namespace
str
Required

Resource identity.

parent_resource_path
str
Required

Resource identity.

resource_type
str
Required

Resource identity.

resource_name
str
Required

Resource identity.

api_version
str
Required
cls
callable

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

Returns

GenericResource, or the result of cls(response)

Return type

Exceptions

list

Get all of the resources under a subscription.

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

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

The number of results to return. If null is passed, returns all resources. 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

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'>