SnapshotsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ComputeManagementClient's

<xref:snapshots> attribute.

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

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

snapshot_name
Required
str

The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. Required.

snapshot
Required
Snapshot or <xref:JSON> or IO[bytes]

Snapshot object supplied in the body of the Put disk operation. Is one of the following types: Snapshot, JSON, IO[bytes] Required.

Returns

Type Description

An instance of LROPoller that returns Snapshot. The Snapshot is compatible with MutableMapping

Exceptions

Type Description

begin_delete

Deletes a snapshot.

begin_delete(resource_group_name: str, snapshot_name: str, **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

snapshot_name
Required
str

The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. Required.

Returns

Type Description

An instance of LROPoller that returns None

Exceptions

Type Description

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

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

snapshot_name
Required
str

The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. Required.

grant_access_data
Required
GrantAccessData or <xref:JSON> or IO[bytes]

Access data object supplied in the body of the get snapshot access operation. Is one of the following types: GrantAccessData, JSON, IO[bytes] Required.

Returns

Type Description

An instance of LROPoller that returns AccessUri. The AccessUri is compatible with MutableMapping

Exceptions

Type Description

begin_revoke_access

Revokes access to a snapshot.

begin_revoke_access(resource_group_name: str, snapshot_name: str, **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

snapshot_name
Required
str

The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. Required.

Returns

Type Description

An instance of LROPoller that returns None

Exceptions

Type Description

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

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

snapshot_name
Required
str

The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. Required.

snapshot
Required
SnapshotUpdate or <xref:JSON> or IO[bytes]

Snapshot object supplied in the body of the Patch snapshot operation. Is one of the following types: SnapshotUpdate, JSON, IO[bytes] Required.

Returns

Type Description

An instance of LROPoller that returns Snapshot. The Snapshot is compatible with MutableMapping

Exceptions

Type Description

get

Gets information about a snapshot.

get(resource_group_name: str, snapshot_name: str, **kwargs: Any) -> Snapshot

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

snapshot_name
Required
str

The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. Required.

Returns

Type Description

Snapshot. The Snapshot is compatible with MutableMapping

Exceptions

Type Description

list

Lists snapshots under a subscription.

list(**kwargs: Any) -> ItemPaged[Snapshot]

Returns

Type Description

An iterator like instance of Snapshot

Exceptions

Type Description

list_by_resource_group

Lists snapshots under a resource group.

list_by_resource_group(resource_group_name: str, **kwargs: Any) -> ItemPaged[Snapshot]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

Returns

Type Description

An iterator like instance of Snapshot

Exceptions

Type Description