SnapshotsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:snapshots> attribute.
- Inheritance
-
builtins.objectSnapshotsOperations
Constructor
SnapshotsOperations(*args, **kwargs)
Methods
begin_create_or_update |
Creates or updates a snapshot. |
begin_delete |
Deletes a snapshot. |
begin_grant_access |
Grants access to a snapshot. |
begin_revoke_access |
Revokes access to a snapshot. |
begin_update |
Updates (patches) a snapshot. |
get |
Gets information about a snapshot. |
list |
Lists snapshots under a subscription. |
list_by_resource_group |
Lists snapshots under a resource group. |
begin_create_or_update
Creates or updates a snapshot.
begin_create_or_update(resource_group_name: str, snapshot_name: str, snapshot: _models.Snapshot, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.Snapshot]
Parameters
- snapshot_name
- str
The name of the snapshot within the given subscription and resource group. Required.
Snapshot object supplied in the body of the Put disk operation. Is either a Snapshot type or a IO[bytes] type. Required.
Returns
An instance of LROPoller that returns either Snapshot or the result of cls(response)
Return type
Exceptions
begin_delete
Deletes a snapshot.
begin_delete(resource_group_name: str, snapshot_name: str, **kwargs: Any) -> LROPoller[OperationStatusResponse]
Parameters
- snapshot_name
- str
The name of the snapshot within the given subscription and resource group. Required.
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 snapshot.
begin_grant_access(resource_group_name: str, snapshot_name: str, grant_access_data: _models.GrantAccessData, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.AccessUri]
Parameters
- snapshot_name
- str
The name of the snapshot within the given subscription and resource group. Required.
- grant_access_data
- GrantAccessData or IO[bytes]
Access data object supplied in the body of the get snapshot access operation. Is either a GrantAccessData type or a IO[bytes] type. Required.
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 snapshot.
begin_revoke_access(resource_group_name: str, snapshot_name: str, **kwargs: Any) -> LROPoller[OperationStatusResponse]
Parameters
- snapshot_name
- str
The name of the snapshot within the given subscription and resource group. Required.
Returns
An instance of LROPoller that returns either OperationStatusResponse or the result of cls(response)
Return type
Exceptions
begin_update
Updates (patches) a snapshot.
begin_update(resource_group_name: str, snapshot_name: str, snapshot: _models.SnapshotUpdate, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.Snapshot]
Parameters
- snapshot_name
- str
The name of the snapshot within the given subscription and resource group. Required.
- snapshot
- SnapshotUpdate or IO[bytes]
Snapshot object supplied in the body of the Patch snapshot operation. Is either a SnapshotUpdate type or a IO[bytes] type. Required.
Returns
An instance of LROPoller that returns either Snapshot or the result of cls(response)
Return type
Exceptions
get
Gets information about a snapshot.
get(resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Snapshot
Parameters
- snapshot_name
- str
The name of the snapshot within the given subscription and resource group. Required.
Returns
Snapshot or the result of cls(response)
Return type
Exceptions
list
Lists snapshots under a subscription.
list(**kwargs: Any) -> Iterable[Snapshot]
Returns
An iterator like instance of either Snapshot or the result of cls(response)
Return type
Exceptions
list_by_resource_group
Lists snapshots under a resource group.
list_by_resource_group(resource_group_name: str, **kwargs: Any) -> Iterable[Snapshot]
Parameters
Returns
An iterator like instance of either Snapshot 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.11.7\\x64\\Lib\\site-packages\\azure\\mgmt\\compute\\v2016_04_30_preview\\models\\__init__.py'>
Azure SDK for Python
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for