ResourcesOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:resources> attribute.
- Inheritance
-
builtins.objectResourcesOperations
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
|
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
|
The name of the resource group for the resource. The name is case insensitive. Required. |
resource_provider_namespace
Required
|
The namespace of the resource provider. Required. |
parent_resource_path
Required
|
The parent resource identity. Required. |
resource_type
Required
|
The resource type of the resource to update. Required. |
resource_name
Required
|
The name of the resource to update. Required. |
api_version
Required
|
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
|
The name of the resource group. The name is case insensitive. Required. |
resource_provider_namespace
Required
|
Resource identity. Required. |
parent_resource_path
Required
|
Resource identity. Required. |
resource_type
Required
|
Resource identity. Required. |
resource_name
Required
|
Resource identity. Required. |
api_version
Required
|
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
|
The name of the resource group. The name is case insensitive. Required. |
resource_provider_namespace
Required
|
Resource identity. Required. |
parent_resource_path
Required
|
Resource identity. Required. |
resource_type
Required
|
Resource identity. Required. |
resource_name
Required
|
Resource identity. Required. |
api_version
Required
|
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
|
The name of the resource group. The name is case insensitive. Required. |
resource_provider_namespace
Required
|
Resource identity. Required. |
parent_resource_path
Required
|
Resource identity. Required. |
resource_type
Required
|
Resource identity. Required. |
resource_name
Required
|
Resource identity. Required. |
api_version
Required
|
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
|
The name of the resource group. The name is case insensitive. Required. |
resource_provider_namespace
Required
|
Resource identity. Required. |
parent_resource_path
Required
|
Resource identity. Required. |
resource_type
Required
|
Resource identity. Required. |
resource_name
Required
|
Resource identity. Required. |
api_version
Required
|
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
|
The filter to apply on the operation. Default value is None. |
expand
Required
|
Comma-separated list of additional properties to be included in the response.
Valid values include |
top
Required
|
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'>
Azure SDK for Python