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 directly this class, but create a Client instance that will create it for you and attach it as attribute.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
- Variables
api_version – Client Api Version. Constant value: “2018-09-30”.
-
create_or_update
(resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns Disk or ClientRawResponse<Disk> if raw==True
- Return type
AzureOperationPoller[Disk] or AzureOperationPoller[ClientRawResponse[Disk]]
- Raises
CloudError
-
delete
(resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True
- Return type
AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]
- Raises
CloudError
-
get
(resource_group_name, disk_name, custom_headers=None, raw=False, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Disk or ClientRawResponse if raw=true
- Return type
Disk or ClientRawResponse
- Raises
CloudError
-
grant_access
(resource_group_name, disk_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config)[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.
access (str or AccessLevel) – Possible values include: ‘None’, ‘Read’, ‘Write’
duration_in_seconds (int) – Time duration in seconds until the SAS access expires.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns AccessUri or ClientRawResponse<AccessUri> if raw==True
- Return type
AzureOperationPoller[AccessUri] or AzureOperationPoller[ClientRawResponse[AccessUri]]
- Raises
CloudError
-
list
(custom_headers=None, raw=False, **operation_config)[source]¶ Lists all the disks under a subscription.
-
list_by_resource_group
(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]¶ Lists all the disks under a resource group.
- Parameters
- Returns
An iterator like instance of Disk
- Return type
- Raises
CloudError
-
revoke_access
(resource_group_name, disk_name, custom_headers=None, raw=False, polling=True, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True
- Return type
AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]
- Raises
CloudError
-
update
(resource_group_name, disk_name, disk, custom_headers=None, raw=False, polling=True, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns Disk or ClientRawResponse<Disk> if raw==True
- Return type
AzureOperationPoller[Disk] or AzureOperationPoller[ClientRawResponse[Disk]]
- Raises
CloudError
-
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 directly this class, but create a Client instance that will create it for you and attach it as attribute.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
- Variables
api_version – Client Api Version. Constant value: “2018-09-30”.
-
create_or_update
(resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns Snapshot or ClientRawResponse<Snapshot> if raw==True
- Return type
AzureOperationPoller[Snapshot] or AzureOperationPoller[ClientRawResponse[Snapshot]]
- Raises
CloudError
-
delete
(resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True
- Return type
AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]
- Raises
CloudError
-
get
(resource_group_name, snapshot_name, custom_headers=None, raw=False, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Snapshot or ClientRawResponse if raw=true
- Return type
Snapshot or ClientRawResponse
- Raises
CloudError
-
grant_access
(resource_group_name, snapshot_name, access, duration_in_seconds, custom_headers=None, raw=False, polling=True, **operation_config)[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.
access (str or AccessLevel) – Possible values include: ‘None’, ‘Read’, ‘Write’
duration_in_seconds (int) – Time duration in seconds until the SAS access expires.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns AccessUri or ClientRawResponse<AccessUri> if raw==True
- Return type
AzureOperationPoller[AccessUri] or AzureOperationPoller[ClientRawResponse[AccessUri]]
- Raises
CloudError
-
list
(custom_headers=None, raw=False, **operation_config)[source]¶ Lists snapshots under a subscription.
- Parameters
- Returns
An iterator like instance of Snapshot
- Return type
- Raises
CloudError
-
list_by_resource_group
(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]¶ Lists snapshots under a resource group.
- Parameters
- Returns
An iterator like instance of Snapshot
- Return type
- Raises
CloudError
-
revoke_access
(resource_group_name, snapshot_name, custom_headers=None, raw=False, polling=True, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True
- Return type
AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]
- Raises
CloudError
-
update
(resource_group_name, snapshot_name, snapshot, custom_headers=None, raw=False, polling=True, **operation_config)[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.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns Snapshot or ClientRawResponse<Snapshot> if raw==True
- Return type
AzureOperationPoller[Snapshot] or AzureOperationPoller[ClientRawResponse[Snapshot]]
- Raises
CloudError
-
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'>¶