azure.mgmt.compute.v2018_09_30.operations module

class azure.mgmt.compute.v2018_09_30.operations.DisksOperations(client, config, serializer, deserializer)[source]

Bases: object

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.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_create_or_update(resource_group_name: str, disk_name: str, disk: ‘models.Disk’, **kwargs: Any) → LROPoller[‘models.Disk’][source]

Creates or updates a disk.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • 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.

  • disk (Disk) – Disk object supplied in the body of the Put disk operation.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[Disk]

Raises

HttpResponseError

begin_delete(resource_group_name: str, disk_name: str, **kwargs: Any) → LROPoller[None][source]

Deletes a disk.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • 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.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[None]

Raises

HttpResponseError

begin_grant_access(resource_group_name: str, disk_name: str, grant_access_data: ‘models.GrantAccessData’, **kwargs: Any) → LROPoller[‘models.AccessUri’][source]

Grants access to a disk.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • 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.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[AccessUri]

Raises

HttpResponseError

begin_revoke_access(resource_group_name: str, disk_name: str, **kwargs: Any) → LROPoller[None][source]

Revokes access to a disk.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • 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.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[None]

Raises

HttpResponseError

begin_update(resource_group_name: str, disk_name: str, disk: ‘models.DiskUpdate’, **kwargs: Any) → LROPoller[‘models.Disk’][source]

Updates (patches) a disk.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • 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.

  • disk (DiskUpdate) – Disk object supplied in the body of the Patch disk operation.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[Disk]

Raises

HttpResponseError

get(resource_group_name: str, disk_name: str, **kwargs: Any) → ’models.Disk’[source]

Gets information about a disk.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • 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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Disk, or the result of cls(response)

Return type

Disk

Raises

~azure.core.exceptions.HttpResponseError

list(**kwargs: Any) → Iterable[‘models.DiskList’][source]

Lists all the disks under a subscription.

Keyword Arguments

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

ItemPaged[DiskList]

Raises

~azure.core.exceptions.HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) → Iterable[‘models.DiskList’][source]

Lists all the disks under a resource group.

Parameters

resource_group_name (str) – The name of the resource group.

Keyword Arguments

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

ItemPaged[DiskList]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2018_09_30.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2018_09_30/models/__init__.py'>
class azure.mgmt.compute.v2018_09_30.operations.SnapshotsOperations(client, config, serializer, deserializer)[source]

Bases: object

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.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_create_or_update(resource_group_name: str, snapshot_name: str, snapshot: ‘models.Snapshot’, **kwargs: Any) → LROPoller[‘models.Snapshot’][source]

Creates or updates a snapshot.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • snapshot_name (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.

  • snapshot (Snapshot) – Snapshot object supplied in the body of the Put disk operation.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[Snapshot]

Raises

HttpResponseError

begin_delete(resource_group_name: str, snapshot_name: str, **kwargs: Any) → LROPoller[None][source]

Deletes a snapshot.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • snapshot_name (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.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[None]

Raises

HttpResponseError

begin_grant_access(resource_group_name: str, snapshot_name: str, grant_access_data: ‘models.GrantAccessData’, **kwargs: Any) → LROPoller[‘models.AccessUri’][source]

Grants access to a snapshot.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • snapshot_name (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.

  • grant_access_data (GrantAccessData) – Access data object supplied in the body of the get snapshot access operation.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[AccessUri]

Raises

HttpResponseError

begin_revoke_access(resource_group_name: str, snapshot_name: str, **kwargs: Any) → LROPoller[None][source]

Revokes access to a snapshot.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • snapshot_name (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.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[None]

Raises

HttpResponseError

begin_update(resource_group_name: str, snapshot_name: str, snapshot: ‘models.SnapshotUpdate’, **kwargs: Any) → LROPoller[‘models.Snapshot’][source]

Updates (patches) a snapshot.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • snapshot_name (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.

  • snapshot (SnapshotUpdate) – Snapshot object supplied in the body of the Patch snapshot operation.

Keyword Arguments
  • 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) – True for ARMPolling, False for no polling, or a polling object for 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

LROPoller[Snapshot]

Raises

HttpResponseError

get(resource_group_name: str, snapshot_name: str, **kwargs: Any) → ’models.Snapshot’[source]

Gets information about a snapshot.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • snapshot_name (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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Snapshot, or the result of cls(response)

Return type

Snapshot

Raises

~azure.core.exceptions.HttpResponseError

list(**kwargs: Any) → Iterable[‘models.SnapshotList’][source]

Lists snapshots under a subscription.

Keyword Arguments

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

ItemPaged[SnapshotList]

Raises

~azure.core.exceptions.HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any) → Iterable[‘models.SnapshotList’][source]

Lists snapshots under a resource group.

Parameters

resource_group_name (str) – The name of the resource group.

Keyword Arguments

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

ItemPaged[SnapshotList]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.compute.v2018_09_30.models' from '/home/vsts/work/1/s/sdk/compute/azure-mgmt-compute/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/compute/v2018_09_30/models/__init__.py'>