DisksOperations Class
DisksOperations 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.objectDisksOperations
Constructor
DisksOperations(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 or updates a disk. |
| begin_delete |
Deletes a disk. |
| begin_grant_access |
Grants access to a disk. |
| begin_revoke_access |
Revokes access to a disk. |
| begin_update |
Updates (patches) a disk. |
| get |
Gets information about a disk. |
| list |
Lists all the disks under a subscription. |
| list_by_resource_group |
Lists all the disks under a resource group. |
begin_create_or_update
Creates or updates a disk.
begin_create_or_update(resource_group_name: str, disk_name: str, disk: _models.Disk, **kwargs: Any) -> LROPoller[_models.Disk]
Parameters
- disk_name
- str
The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
- 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 PollingMethod
By default, your polling method will be ARMPolling. 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 LROPoller that returns either Disk or the result of cls(response)
Return type
Exceptions
begin_delete
Deletes a disk.
begin_delete(resource_group_name: str, disk_name: str, **kwargs: Any) -> LROPoller[_models.OperationStatusResponse]
Parameters
- disk_name
- str
The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
- 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 PollingMethod
By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)
Return type
Exceptions
begin_grant_access
Grants access to a disk.
begin_grant_access(resource_group_name: str, disk_name: str, grant_access_data: _models.GrantAccessData, **kwargs: Any) -> LROPoller[_models.AccessUri]
Parameters
- disk_name
- str
The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
- grant_access_data
- GrantAccessData
Access data object supplied in the body of the get disk access operation.
- 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 PollingMethod
By default, your polling method will be ARMPolling. 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 LROPoller that returns either AccessUri or the result of cls(response)
Return type
Exceptions
begin_revoke_access
Revokes access to a disk.
begin_revoke_access(resource_group_name: str, disk_name: str, **kwargs: Any) -> LROPoller[_models.OperationStatusResponse]
Parameters
- disk_name
- str
The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
- 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 PollingMethod
By default, your polling method will be ARMPolling. 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 LROPoller that returns either OperationStatusResponse or the result of cls(response)
Return type
Exceptions
begin_update
Updates (patches) a disk.
begin_update(resource_group_name: str, disk_name: str, disk: _models.DiskUpdate, **kwargs: Any) -> LROPoller[_models.Disk]
Parameters
- disk_name
- str
The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
- 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 PollingMethod
By default, your polling method will be ARMPolling. 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 LROPoller that returns either Disk or the result of cls(response)
Return type
Exceptions
get
Gets information about a disk.
get(resource_group_name: str, disk_name: str, **kwargs: Any) -> _models.Disk
Parameters
- disk_name
- str
The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
Disk, or the result of cls(response)
Return type
Exceptions
list
Lists all the disks under a subscription.
list(**kwargs: Any) -> Iterable[_models.DiskList]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either DiskList or the result of cls(response)
Return type
Exceptions
list_by_resource_group
Lists all the disks under a resource group.
list_by_resource_group(resource_group_name: str, **kwargs: Any) -> Iterable[_models.DiskList]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either DiskList or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.compute.v2016_04_30_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\compute\\v2016_04_30_preview\\models\\__init__.py'>
Feedback
Submit and view feedback for