DisksOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ComputeManagementClient's

<xref:disks> attribute.

Constructor

DisksOperations(*args, **kwargs)

Methods

begin_create_or_update

Creates or updates a disk.

begin_delete

Deletes a disk.

begin_grant_access

Grants access to a disk.

begin_revoke_access

Revokes access to a disk.

begin_update

Updates (patches) a disk.

get

Gets information about a disk.

list

Lists all the disks under a subscription.

list_by_resource_group

Lists all the disks under a resource group.

begin_create_or_update

Creates or updates a disk.

async begin_create_or_update(resource_group_name: str, disk_name: str, disk: _models.Disk, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.Disk]

Parameters

Name Description
resource_group_name
Required
str

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

disk_name
Required
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. Required.

disk
Required
Disk or <xref:JSON> or IO[bytes]

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

Returns

Type Description

An instance of AsyncLROPoller that returns Disk. The Disk is compatible with MutableMapping

Exceptions

Type Description

begin_delete

Deletes a disk.

async begin_delete(resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

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

disk_name
Required
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. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns None

Exceptions

Type Description

begin_grant_access

Grants access to a disk.

async begin_grant_access(resource_group_name: str, disk_name: str, grant_access_data: _models.GrantAccessData, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.AccessUri]

Parameters

Name Description
resource_group_name
Required
str

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

disk_name
Required
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. Required.

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

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

Returns

Type Description

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

Exceptions

Type Description

begin_revoke_access

Revokes access to a disk.

async begin_revoke_access(resource_group_name: str, disk_name: str, **kwargs: Any) -> AsyncLROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

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

disk_name
Required
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. Required.

Returns

Type Description

An instance of AsyncLROPoller that returns None

Exceptions

Type Description

begin_update

Updates (patches) a disk.

async begin_update(resource_group_name: str, disk_name: str, disk: _models.DiskUpdate, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.Disk]

Parameters

Name Description
resource_group_name
Required
str

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

disk_name
Required
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. Required.

disk
Required
DiskUpdate or <xref:JSON> or IO[bytes]

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

Returns

Type Description

An instance of AsyncLROPoller that returns Disk. The Disk is compatible with MutableMapping

Exceptions

Type Description

get

Gets information about a disk.

async get(resource_group_name: str, disk_name: str, **kwargs: Any) -> Disk

Parameters

Name Description
resource_group_name
Required
str

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

disk_name
Required
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. Required.

Returns

Type Description

Disk. The Disk is compatible with MutableMapping

Exceptions

Type Description

list

Lists all the disks under a subscription.

list(**kwargs: Any) -> AsyncItemPaged[Disk]

Returns

Type Description

An iterator like instance of Disk

Exceptions

Type Description

list_by_resource_group

Lists all the disks under a resource group.

list_by_resource_group(resource_group_name: str, **kwargs: Any) -> AsyncItemPaged[Disk]

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 Disk

Exceptions

Type Description