ResourcesOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:resources> attribute.
Constructor
ResourcesOperations(*args, **kwargs)
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 be moved must be in the same source resource group in the source subscription being used. 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 |
Update 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 be moved must be in the same source resource group in the source subscription being used. 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. This API currently works only for a limited set of Resource providers. In the event that a Resource provider does not implement this API, ARM will respond with a 405. The alternative then is to use the GET API to check for the existence of the resource. |
| 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.
begin_create_or_update(resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, parameters: _models.GenericResource, *, api_version: str, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.GenericResource]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group containing the resource to get. The name is case insensitive. Required. |
|
resource_provider_namespace
Required
|
The resource provider of the resource to check. Required. |
|
parent_resource_path
Required
|
The parent resource identity. Required. |
|
resource_type
Required
|
The resource type. Required. |
|
resource_name
Required
|
The name of the resource to check whether it exists. Required. |
|
parameters
Required
|
Resource create parameters. Is one of the following types: GenericResource, JSON, IO[bytes] Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns GenericResource. The GenericResource is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
begin_create_or_update_by_id
Create a resource by ID.
begin_create_or_update_by_id(resource_id: str, parameters: _models.GenericResource, *, api_version: str, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.GenericResource]
Parameters
| Name | Description |
|---|---|
|
resource_id
Required
|
Required. |
|
parameters
Required
|
Resource create parameters. Is one of the following types: GenericResource, JSON, IO[bytes] Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns GenericResource. The GenericResource is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
begin_delete
Deletes a resource.
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) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group containing the resource to get. The name is case insensitive. Required. |
|
resource_provider_namespace
Required
|
The resource provider of the resource to check. Required. |
|
parent_resource_path
Required
|
The parent resource identity. Required. |
|
resource_type
Required
|
The resource type. Required. |
|
resource_name
Required
|
The name of the resource to check whether it exists. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns None |
Exceptions
| Type | Description |
|---|---|
begin_delete_by_id
Deletes a resource by ID.
begin_delete_by_id(resource_id: str, *, api_version: str, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_id
Required
|
Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns None |
Exceptions
| Type | Description |
|---|---|
begin_move_resources
Moves resources from one resource group to another resource group.
The resources to be moved must be in the same source resource group in the source subscription being used. 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_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
|
The name of the resource group to get. The name is case insensitive. Required. |
|
parameters
Required
|
Parameters for moving resources. Is one of the following types: ResourcesMoveInfo, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns None |
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, parameters: _models.GenericResource, *, api_version: str, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.GenericResource]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group containing the resource to get. The name is case insensitive. Required. |
|
resource_provider_namespace
Required
|
The resource provider of the resource to check. Required. |
|
parent_resource_path
Required
|
The parent resource identity. Required. |
|
resource_type
Required
|
The resource type. Required. |
|
resource_name
Required
|
The name of the resource to check whether it exists. Required. |
|
parameters
Required
|
Resource create parameters. Is one of the following types: GenericResource, JSON, IO[bytes] Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns GenericResource. The GenericResource is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
begin_update_by_id
Update a resource by ID.
begin_update_by_id(resource_id: str, parameters: _models.GenericResource, *, api_version: str, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.GenericResource]
Parameters
| Name | Description |
|---|---|
|
resource_id
Required
|
Required. |
|
parameters
Required
|
Resource create parameters. Is one of the following types: GenericResource, JSON, IO[bytes] Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns GenericResource. The GenericResource is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
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 be moved must be in the same source resource group in the source subscription being used. 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.
begin_validate_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
|
The name of the resource group to get. The name is case insensitive. Required. |
|
parameters
Required
|
Parameters for moving resources. Is one of the following types: ResourcesMoveInfo, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns None |
Exceptions
| Type | Description |
|---|---|
check_existence
Checks whether a 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 containing the resource to get. The name is case insensitive. Required. |
|
resource_provider_namespace
Required
|
The resource provider of the resource to check. Required. |
|
parent_resource_path
Required
|
The parent resource identity. Required. |
|
resource_type
Required
|
The resource type. Required. |
|
resource_name
Required
|
The name of the resource to check whether it exists. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
bool |
Exceptions
| Type | Description |
|---|---|
check_existence_by_id
Checks by ID whether a resource exists. This API currently works only for a limited set of Resource providers. In the event that a Resource provider does not implement this API, ARM will respond with a 405. The alternative then is to use the GET API to check for the existence of the resource.
check_existence_by_id(resource_id: str, *, api_version: str, **kwargs: Any) -> bool
Parameters
| Name | Description |
|---|---|
|
resource_id
Required
|
Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
bool |
Exceptions
| Type | Description |
|---|---|
get
Gets a resource.
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 containing the resource to get. The name is case insensitive. Required. |
|
resource_provider_namespace
Required
|
The resource provider of the resource to check. Required. |
|
parent_resource_path
Required
|
The parent resource identity. Required. |
|
resource_type
Required
|
The resource type. Required. |
|
resource_name
Required
|
The name of the resource to check whether it exists. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
GenericResource. The GenericResource is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_by_id
Gets a resource by ID.
get_by_id(resource_id: str, *, api_version: str, **kwargs: Any) -> GenericResource
Parameters
| Name | Description |
|---|---|
|
resource_id
Required
|
Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
api_version
|
The API version to use for this operation. Required. |
Returns
| Type | Description |
|---|---|
|
GenericResource. The GenericResource is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
list
Get all the resources in a subscription.
list(*, filter: str | None = None, expand: str | None = None, top: int | None = None, **kwargs: Any) -> ItemPaged[GenericResourceExpanded]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
filter
|
The filter to apply on the operation. Default value: None
|
|
expand
|
Comma-separated list of additional properties to be included in the response.
Valid values include Default value: None
|
|
top
|
The number of recommendations per page if a paged version of this API is being used. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of GenericResourceExpanded |
Exceptions
| Type | Description |
|---|---|
list_by_resource_group
Get all the resources for a resource group.
list_by_resource_group(resource_group_name: str, *, filter: str | None = None, expand: str | None = None, top: int | None = None, **kwargs: Any) -> ItemPaged[GenericResourceExpanded]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group to get. The name is case insensitive. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
filter
|
The filter to apply on the operation. Default value: None
|
|
expand
|
Comma-separated list of additional properties to be included in the response.
Valid values include Default value: None
|
|
top
|
The number of results to return. If null is passed, returns all resources. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of GenericResourceExpanded |
Exceptions
| Type | Description |
|---|---|