SnapshotsOperations Class

SnapshotsOperations 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.object
SnapshotsOperations

Constructor

SnapshotsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

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, snapshot_name, snapshot, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

snapshot_name
str
Required

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.

snapshot
Snapshot
Required

Snapshot object supplied in the body of the Put disk 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 Snapshot or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_delete

Deletes a snapshot.

begin_delete(resource_group_name, snapshot_name, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

snapshot_name
str
Required

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.

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_grant_access

Grants access to a snapshot.

begin_grant_access(resource_group_name, snapshot_name, grant_access_data, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

snapshot_name
str
Required

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.

grant_access_data
GrantAccessData
Required

Access data object supplied in the body of the get snapshot 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

~azure.core.exceptions.HttpResponseError

begin_revoke_access

Revokes access to a snapshot.

begin_revoke_access(resource_group_name, snapshot_name, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

snapshot_name
str
Required

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.

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 None or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

begin_update

Updates (patches) a snapshot.

begin_update(resource_group_name, snapshot_name, snapshot, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

snapshot_name
str
Required

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.

snapshot
SnapshotUpdate
Required

Snapshot object supplied in the body of the Patch snapshot 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 Snapshot or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get

Gets information about a snapshot.

get(resource_group_name, snapshot_name, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

snapshot_name
str
Required

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.

cls
callable

A custom type or function that will be passed the direct response

Returns

Snapshot, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

list

Lists snapshots under a subscription.

list(**kwargs)

Parameters

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either SnapshotList or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

list_by_resource_group

Lists snapshots under a resource group.

list_by_resource_group(resource_group_name, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either SnapshotList or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

Attributes

models

models = <module 'azure.mgmt.compute.v2018_09_30.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.6.8\\x64\\lib\\site-packages\\azure\\mgmt\\compute\\v2018_09_30\\models\\__init__.py'>