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.objectResourcesOperations
Constructor
ResourcesOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| begin_create_or_update |
Creates a resource. |
| begin_create_or_update_by_id |
Create a resource by ID. |
| begin_delete |
Deletes a resource. |
| begin_delete_by_id |
Deletes a resource by ID. |
| begin_move_resources |
Moves resources from one resource group to another resource group. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. |
| begin_update |
Updates a resource. |
| begin_update_by_id |
Updates a resource by ID. |
| begin_validate_move_resources |
Validates whether resources can be moved from one resource group to another resource group. This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. |
| check_existence |
Checks whether a resource exists. |
| check_existence_by_id |
Checks by ID whether a resource exists. |
| get |
Gets a resource. |
| get_by_id |
Gets a resource by ID. |
| list |
Get all the resources in a subscription. |
| list_by_resource_group |
Get all the resources for a resource group. |
begin_create_or_update
Creates a resource.
async begin_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.v2018_02_01.models._models_py3.GenericResource, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.GenericResource]
Parameters
- resource_group_name
- str
The name of the resource group for the resource. 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 GenericResource or the result of cls(response)
Return type
Exceptions
begin_create_or_update_by_id
Create a resource by ID.
async begin_create_or_update_by_id(resource_id: str, api_version: str, parameters: azure.mgmt.resource.resources.v2018_02_01.models._models_py3.GenericResource, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.GenericResource]
Parameters
- resource_id
- str
The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}.
- 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
begin_delete
Deletes a resource.
async begin_delete(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- resource_group_name
- str
The name of the resource group that contains the resource 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 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_delete_by_id
Deletes a resource by ID.
async begin_delete_by_id(resource_id: str, api_version: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- resource_id
- str
The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}.
- 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_move_resources
Moves resources from one resource group to another resource group.
The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes.
async begin_move_resources(source_resource_group_name: str, parameters: azure.mgmt.resource.resources.v2018_02_01.models._models_py3.ResourcesMoveInfo, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- source_resource_group_name
- str
The name of the resource group containing the resources to move.
- 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.v2018_02_01.models._models_py3.GenericResource, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.GenericResource]
Parameters
- resource_group_name
- str
The name of the resource group for the resource. 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 GenericResource or the result of cls(response)
Return type
Exceptions
begin_update_by_id
Updates a resource by ID.
async begin_update_by_id(resource_id: str, api_version: str, parameters: azure.mgmt.resource.resources.v2018_02_01.models._models_py3.GenericResource, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.GenericResource]
Parameters
- resource_id
- str
The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}.
- 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
begin_validate_move_resources
Validates whether resources can be moved from one resource group to another resource group.
This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation.
async begin_validate_move_resources(source_resource_group_name: str, parameters: azure.mgmt.resource.resources.v2018_02_01.models._models_py3.ResourcesMoveInfo, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- source_resource_group_name
- str
The name of the resource group containing the resources to validate for move.
- 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 a 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
The name of the resource group containing the resource 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
check_existence_by_id
Checks by ID whether a resource exists.
async check_existence_by_id(resource_id: str, api_version: str, **kwargs: Any) -> bool
Parameters
- resource_id
- str
The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}.
- 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
get
Gets a resource.
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.v2018_02_01.models._models_py3.GenericResource
Parameters
- resource_group_name
- str
The name of the resource group containing the resource to get. The name is case insensitive.
- 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
get_by_id
Gets a resource by ID.
async get_by_id(resource_id: str, api_version: str, **kwargs: Any) -> azure.mgmt.resource.resources.v2018_02_01.models._models_py3.GenericResource
Parameters
- resource_id
- str
The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}.
- 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 the resources in a subscription.
list(filter: Optional[str] = None, expand: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.ResourceListResult]
Parameters
- top
- int
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
list_by_resource_group
Get all the resources for a resource group.
list_by_resource_group(resource_group_name: str, filter: Optional[str] = None, expand: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.resource.resources.v2018_02_01.models._models_py3.ResourceListResult]
Parameters
- expand
- 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
- int
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.v2018_02_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\resource\\resources\\v2018_02_01\\models\\__init__.py'>
Feedback
Submit and view feedback for