ResourcesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ResourceManagementClient's

<xref:resources> attribute.

Inheritance
builtins.object
ResourcesOperations

Constructor

ResourcesOperations(*args, **kwargs)

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.

begin_move_resources(source_resource_group_name: str, parameters: _models.ResourcesMoveInfo, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
source_resource_group_name
Required
str

Source resource group name. Required.

parameters
Required

move resources' parameters. Is either a ResourcesMoveInfo type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

begin_update

Updates a resource.

begin_update(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, parameters: _models.GenericResource, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.GenericResource]

Parameters

Name Description
resource_group_name
Required
str

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

resource_provider_namespace
Required
str

The namespace of the resource provider. Required.

parent_resource_path
Required
str

The parent resource identity. Required.

resource_type
Required
str

The resource type of the resource to update. Required.

resource_name
Required
str

The name of the resource to update. Required.

api_version
Required
str

The API version to use for the operation. Required.

parameters
Required

Parameters for updating the resource. Is either a GenericResource type or a IO[bytes] type. Required.

Returns

Type Description

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

Exceptions

Type Description

check_existence

Checks whether resource exists.

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

Name Description
resource_group_name
Required
str

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

resource_provider_namespace
Required
str

Resource identity. Required.

parent_resource_path
Required
str

Resource identity. Required.

resource_type
Required
str

Resource identity. Required.

resource_name
Required
str

Resource identity. Required.

api_version
Required
str

Required.

Returns

Type Description

bool or the result of cls(response)

Exceptions

Type Description

create_or_update

Create a resource.

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: _models.GenericResource, *, content_type: str = 'application/json', **kwargs: Any) -> _models.GenericResource

Parameters

Name Description
resource_group_name
Required
str

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

resource_provider_namespace
Required
str

Resource identity. Required.

parent_resource_path
Required
str

Resource identity. Required.

resource_type
Required
str

Resource identity. Required.

resource_name
Required
str

Resource identity. Required.

api_version
Required
str

Required.

parameters
Required

Create or update resource parameters. Is either a GenericResource type or a IO[bytes] type. Required.

Returns

Type Description

GenericResource or the result of cls(response)

Exceptions

Type Description

delete

Delete resource and all of its resources.

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

Name Description
resource_group_name
Required
str

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

resource_provider_namespace
Required
str

Resource identity. Required.

parent_resource_path
Required
str

Resource identity. Required.

resource_type
Required
str

Resource identity. Required.

resource_name
Required
str

Resource identity. Required.

api_version
Required
str

Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Returns a resource belonging to a resource group.

get(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) -> GenericResource

Parameters

Name Description
resource_group_name
Required
str

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

resource_provider_namespace
Required
str

Resource identity. Required.

parent_resource_path
Required
str

Resource identity. Required.

resource_type
Required
str

Resource identity. Required.

resource_name
Required
str

Resource identity. Required.

api_version
Required
str

Required.

Returns

Type Description

GenericResource or the result of cls(response)

Exceptions

Type Description

list

Get all of the resources under a subscription.

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

Parameters

Name Description
filter
Required
str

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

expand
Required
str

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
Required
int

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

Returns

Type Description

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

Exceptions

Type Description

Attributes

models

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