Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 Yandex.Cloud LLC
Yandex Compute Cloud
  • Getting started
    • Overview
    • Creating a Linux VM
    • Creating a Windows VM
    • Creating instance groups
  • Step-by-step instructions
    • All instructions
    • Creating VMs
      • Creating a Linux VM
      • Creating a Windows VM
      • Creating a VM from a set of disks
      • Creating a VM with disks from snapshots
      • Creating a VM from a custom image
      • Creating a VM with a GPU
      • Making a VM preemptible
    • DSVM
      • Overview
      • Creating a VM from a public DSVM image
    • Placement groups
      • Creating a placement group
      • Deleting a placement group
      • Creating a VM in a placement group
      • Adding a VM to a placement group
      • Removing a VM from a placement group
    • Images with pre-installed software
      • Creating a VM from a public image
      • Configuring software
      • Running a VM based on a public image
      • Getting a list of public images
    • Getting information about a VM
      • Getting information about a VM
      • Getting serial port's output
    • Managing VMs
      • Stopping and starting a VM
      • Resetting a VM user password
      • Attaching a disk to a VM
      • Detaching a disk from a VM
      • Moving a VM to a different availability zone
      • Moving a VM to another folder
      • Attaching a public IP address to a VM
      • Detaching a public IP address from a VM
      • Making a VM's public IP address static
      • Updating a VM
      • Changing VM computing resources
      • Deleting a VM
    • Working on VMs
      • Connecting to a VM via SSH
      • Connecting to a VM via RDP
      • Connecting to a VM via PowerShell
      • Working with Yandex Cloud from inside a VM
      • Installing NVIDIA drivers
      • Restoring access to a VM
    • Managing the password reset agent
      • Verifying agent operation
      • Installing the agent
      • Deleting the agent
    • Creating new disks
      • Creating an empty disk
      • Creating an empty disk with a large block
      • Creating a non-replicated disk
    • Disk management
      • Creating a disk snapshot
      • Updating a disk
      • Moving a disk to another folder
      • Deleting a disk
      • Deleting a disk snapshot
    • Disk placement groups
      • Creating a disk placement group
      • Removing a disk from a placement group
    • Creating new images
      • Preparing a disk image
      • Uploading your image
      • Creating an image from a disk
      • Creating an image from a snapshot
      • Creating an image from other custom image
    • Managing images
      • Getting a list of images
      • Deleting a disk image
    • File storage
      • Creating file storage
      • Attaching file storage to a VM
      • Detaching file storage from a VM
      • Updating file storage
      • Deleting file storage
    • Managing the serial console
      • Getting started
      • Connecting to a serial console via SSH
      • Connecting to a serial console via CLI
      • Starting your terminal in the Windows serial console (SAC)
      • Disabling access to the serial console
    • Creating instance groups
      • Creating a fixed-size instance group
      • Creating a fixed-size instance group with a network load balancer
      • Creating a fixed-size instance group with an L7 load balancer
      • Creating an automatically scaled instance group
      • Creating an instance group from a Container Optimized Image
      • Creating an instance group based on the YAML specification
    • Getting information about instance groups
      • Getting a list of instance groups
      • Getting information about an instance group
      • Getting a list of instances in a group
    • Managing instance groups
      • Editing an instance group
      • Edit an instance group based on the YAML specification
      • Configuring application health check on the VM
      • Updating a group
        • Incremental update
        • Uninterrupted updates
      • Pausing an instance group
      • Resuming an instance group
      • Stopping an instance group
      • Starting an instance group
      • Deleting an instance group
    • Dedicated hosts
      • Creating a VM in a group of dedicated hosts
      • Creating a VM on a dedicated host
  • Yandex Container Solution
  • Practical guidelines
    • Configuring NTP time synchronization
    • Running instance groups with auto scaling
    • Automatically scaling an instance group for handling messages from a queue
    • Updating an instance group under load
    • Deploying Remote Desktop Gateway
    • Transferring logs from a VM instance to Yandex Cloud Logging
    • Creating a VM backup with Hystax Acura Backup
  • Concepts
    • Relationship between resources
    • Virtual machines
      • Overview
      • Platforms
      • vCPU performance levels
      • Preemptible VMs
      • Network on a VM
      • Software-accelerated network
      • Live migration
      • Placement groups
      • Statuses
      • Metadata
      • Resetting a Windows VM password
    • Graphics accelerators
    • Disks and file storage
      • Overview
      • Disks
      • Disk snapshots
      • Non-replicated disk placement groups
      • File storage
      • Read and write operations
    • Images
    • Instance groups
      • Overview
      • Access
      • YAML specification
      • Instance template
      • Variables in an instance template
      • Policies
        • Overview
        • Allocation policy
        • Deployment policy
        • Scaling policy
      • Scaling types
      • Auto-healing
      • Updating
        • Overview
        • Allocating instances across zones
        • Deployment algorithm
        • Rules for updating virtual machines
        • Changing secondary disks in an instance template
      • Stopping and pausing an instance group
      • Statuses
    • Dedicated host
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1 to May 1, 2019
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • DiskPlacementGroupService
      • DiskService
      • DiskTypeService
      • FilesystemService
      • HostGroupService
      • HostTypeService
      • ImageService
      • InstanceService
      • PlacementGroupService
      • SnapshotScheduleService
      • SnapshotService
      • ZoneService
      • InstanceGroupService
      • OperationService
    • REST
      • Overview
      • DiskPlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listDisks
        • listOperations
        • update
      • Disk
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • move
        • update
      • DiskType
        • Overview
        • get
        • list
      • Filesystem
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • HostGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listHosts
        • listInstances
        • listOperations
        • update
      • HostType
        • Overview
        • get
        • list
      • Image
        • Overview
        • create
        • delete
        • get
        • getLatestByFamily
        • list
        • listOperations
        • update
      • Instance
        • Overview
        • addOneToOneNat
        • attachDisk
        • attachFilesystem
        • create
        • delete
        • detachDisk
        • detachFilesystem
        • get
        • getSerialPortOutput
        • list
        • listOperations
        • move
        • removeOneToOneNat
        • restart
        • start
        • stop
        • update
        • updateMetadata
        • updateNetworkInterface
      • PlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listInstances
        • listOperations
        • update
      • SnapshotSchedule
        • Overview
        • create
        • delete
        • disable
        • enable
        • get
        • list
        • listDisks
        • listOperations
        • listSnapshots
        • update
        • updateDisks
      • Snapshot
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • Zone
        • Overview
        • get
        • list
      • Operation
        • Overview
        • get
      • InstanceGroup
        • Overview
        • list
        • get
        • listLogRecords
        • updateFromYaml
        • updateAccessBindings
        • pauseProcesses
        • stop
        • start
        • delete
        • listInstances
        • createFromYaml
        • update
        • setAccessBindings
        • listOperations
        • create
        • listAccessBindings
        • resumeProcesses
  • Questions and answers
    • General questions
    • Virtual machines
    • Connection
    • Disks, snapshots, and images
    • Disaster recovery
    • Monitoring
    • Licensing
    • All questions on the same page
  1. API reference
  2. gRPC
  3. DiskService

DiskService

Written by
Yandex Cloud
  • Calls DiskService
  • Get
    • GetDiskRequest
    • Disk
    • DiskPlacementPolicy
  • List
    • ListDisksRequest
    • ListDisksResponse
    • Disk
    • DiskPlacementPolicy
  • Create
    • CreateDiskRequest
    • DiskPlacementPolicy
    • Operation
    • CreateDiskMetadata
    • Disk
    • DiskPlacementPolicy
  • Update
    • UpdateDiskRequest
    • DiskPlacementPolicy
    • Operation
    • UpdateDiskMetadata
    • Disk
    • DiskPlacementPolicy
  • Delete
    • DeleteDiskRequest
    • Operation
    • DeleteDiskMetadata
  • ListOperations
    • ListDiskOperationsRequest
    • ListDiskOperationsResponse
    • Operation
  • Move
    • MoveDiskRequest
    • Operation
    • MoveDiskMetadata
    • Disk
    • DiskPlacementPolicy
  • ListSnapshotSchedules
    • ListDiskSnapshotSchedulesRequest
    • ListDiskSnapshotSchedulesResponse
    • SnapshotSchedule
    • SchedulePolicy
    • SnapshotSpec

A set of methods for managing Disk resources.

Call Description
Get Returns the specified Disk resource.
List Retrieves the list of Disk resources in the specified folder.
Create Creates a disk in the specified folder.
Update Updates the specified disk.
Delete Deletes the specified disk.
ListOperations Lists operations for the specified disk.
Move Moves the specified disk to another folder of the same cloud.
ListSnapshotSchedules List snapshot schedules containing the disk

Calls DiskService

Get

Returns the specified Disk resource.
To get the list of available Disk resources, make a List request.

rpc Get (GetDiskRequest) returns (Disk)

GetDiskRequest

Field Description
disk_id string
Required. ID of the Disk resource to return. To get the disk ID use a DiskService.List request. The maximum string length in characters is 50.

Disk

Field Description
id string
ID of the disk.
folder_id string
ID of the folder that the disk belongs to.
created_at google.protobuf.Timestamp
name string
Name of the disk. 1-63 characters long.
description string
Description of the disk. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
type_id string
ID of the disk type.
zone_id string
ID of the availability zone where the disk resides.
size int64
Size of the disk, specified in bytes.
block_size int64
Block size of the disk, specified in bytes.
product_ids[] string
License IDs that indicate which licenses are attached to this resource. License IDs are used to calculate additional charges for the use of the virtual machine.
The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
If you know the license IDs, specify them when you create the image. For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost. You can specify them in the yandex.cloud.compute.v1.ImageService.Create request.
status enum Status
Current status of the disk.
  • CREATING: Disk is being created.
  • READY: Disk is ready to use.
  • ERROR: Disk encountered a problem and cannot operate.
  • DELETING: Disk is being deleted.
source oneof: source_image_id or source_snapshot_id
  source_image_id string
ID of the image that was used for disk creation.
  source_snapshot_id string
ID of the snapshot that was used for disk creation.
instance_ids[] string
Array of instances to which the disk is attached.
disk_placement_policy DiskPlacementPolicy
Placement policy configuration.

DiskPlacementPolicy

Field Description
placement_group_id string
Placement group ID.

List

Retrieves the list of Disk resources in the specified folder.

rpc List (ListDisksRequest) returns (ListDisksResponse)

ListDisksRequest

Field Description
folder_id string
Required. ID of the folder to list disks in. To get the folder ID use a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50.
page_size int64
The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListDisksResponse.next_page_token that can be used to get the next page of results in subsequent list requests. The maximum value is 1000.
page_token string
Page token. To get the next page of results, set page_token to the ListDisksResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.
filter string
A filter expression that filters resources listed in the response. The expression must specify:
  1. The field name. Currently you can use filtering only on the Disk.name field.
  2. An = operator.
  3. The value in double quotes ("). Must be 3-63 characters long and match the regular expression [a-z]([-a-z0-9]{,61}[a-z0-9])?.
The maximum string length in characters is 1000.

ListDisksResponse

Field Description
disks[] Disk
List of Disk resources.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListDisksRequest.page_size, use the next_page_token as the value for the ListDisksRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

Disk

Field Description
id string
ID of the disk.
folder_id string
ID of the folder that the disk belongs to.
created_at google.protobuf.Timestamp
name string
Name of the disk. 1-63 characters long.
description string
Description of the disk. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
type_id string
ID of the disk type.
zone_id string
ID of the availability zone where the disk resides.
size int64
Size of the disk, specified in bytes.
block_size int64
Block size of the disk, specified in bytes.
product_ids[] string
License IDs that indicate which licenses are attached to this resource. License IDs are used to calculate additional charges for the use of the virtual machine.
The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
If you know the license IDs, specify them when you create the image. For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost. You can specify them in the yandex.cloud.compute.v1.ImageService.Create request.
status enum Status
Current status of the disk.
  • CREATING: Disk is being created.
  • READY: Disk is ready to use.
  • ERROR: Disk encountered a problem and cannot operate.
  • DELETING: Disk is being deleted.
source oneof: source_image_id or source_snapshot_id
  source_image_id string
ID of the image that was used for disk creation.
  source_snapshot_id string
ID of the snapshot that was used for disk creation.
instance_ids[] string
Array of instances to which the disk is attached.
disk_placement_policy DiskPlacementPolicy
Placement policy configuration.

DiskPlacementPolicy

Field Description
placement_group_id string
Placement group ID.

Create

Creates a disk in the specified folder.
You can create an empty disk or restore it from a snapshot or an image. Method starts an asynchronous operation that can be cancelled while it is in progress.

rpc Create (CreateDiskRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:CreateDiskMetadata

    Operation.response:Disk

CreateDiskRequest

Field Description
folder_id string
Required. ID of the folder to create a disk in. To get the folder ID use a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50.
name string
Name of the disk. Value must match the regular expression |[a-z]([-a-z0-9]{0,61}[a-z0-9])?.
description string
Description of the disk. The maximum string length in characters is 256.
labels map<string,string>
Resource labels as key:value pairs. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]*. The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]*.
type_id string
ID of the disk type. To get a list of available disk types use the yandex.cloud.compute.v1.DiskTypeService.List request. The maximum string length in characters is 50.
zone_id string
Required. ID of the availability zone where the disk resides. To get a list of available zones use the yandex.cloud.compute.v1.ZoneService.List request. The maximum string length in characters is 50.
size int64
Required. Size of the disk, specified in bytes. If the disk was created from a image, this value should be more than the yandex.cloud.compute.v1.Image.min_disk_size value. Acceptable values are 4194304 to 28587302322176, inclusive.
source oneof: image_id or snapshot_id
  image_id string
ID of the image to create the disk from. The maximum string length in characters is 50.
  snapshot_id string
ID of the snapshot to restore the disk from. The maximum string length in characters is 50.
block_size int64
Block size used for disk, specified in bytes. The default is 4096.
disk_placement_policy DiskPlacementPolicy
Placement policy configuration.
snapshot_schedule_ids[] string
Snapshot schedules

DiskPlacementPolicy

Field Description
placement_group_id string
Placement group ID.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<CreateDiskMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<Disk>
if operation finished successfully.

CreateDiskMetadata

Field Description
disk_id string
ID of the disk that is being created.

Disk

Field Description
id string
ID of the disk.
folder_id string
ID of the folder that the disk belongs to.
created_at google.protobuf.Timestamp
name string
Name of the disk. 1-63 characters long.
description string
Description of the disk. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
type_id string
ID of the disk type.
zone_id string
ID of the availability zone where the disk resides.
size int64
Size of the disk, specified in bytes.
block_size int64
Block size of the disk, specified in bytes.
product_ids[] string
License IDs that indicate which licenses are attached to this resource. License IDs are used to calculate additional charges for the use of the virtual machine.
The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
If you know the license IDs, specify them when you create the image. For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost. You can specify them in the yandex.cloud.compute.v1.ImageService.Create request.
status enum Status
Current status of the disk.
  • CREATING: Disk is being created.
  • READY: Disk is ready to use.
  • ERROR: Disk encountered a problem and cannot operate.
  • DELETING: Disk is being deleted.
source oneof: source_image_id or source_snapshot_id
  source_image_id string
ID of the image that was used for disk creation.
  source_snapshot_id string
ID of the snapshot that was used for disk creation.
instance_ids[] string
Array of instances to which the disk is attached.
disk_placement_policy DiskPlacementPolicy
Placement policy configuration.

DiskPlacementPolicy

Field Description
placement_group_id string
Placement group ID.

Update

Updates the specified disk.

rpc Update (UpdateDiskRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateDiskMetadata

    Operation.response:Disk

UpdateDiskRequest

Field Description
disk_id string
Required. ID of the Disk resource to update. To get the disk ID use a DiskService.List request. The maximum string length in characters is 50.
update_mask google.protobuf.FieldMask
Field mask that specifies which fields of the Disk resource are going to be updated.
name string
Name of the disk. Value must match the regular expression |[a-z]([-a-z0-9]{0,61}[a-z0-9])?.
description string
Description of the disk. The maximum string length in characters is 256.
labels map<string,string>
Resource labels as key:value pairs.
Existing set of labels is completely replaced by the provided set. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]*. The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]*.
size int64
Size of the disk, specified in bytes. Acceptable values are 4194304 to 4398046511104, inclusive.
disk_placement_policy DiskPlacementPolicy
Placement policy configuration.

DiskPlacementPolicy

Field Description
placement_group_id string
Placement group ID.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<UpdateDiskMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<Disk>
if operation finished successfully.

UpdateDiskMetadata

Field Description
disk_id string
ID of the Disk resource that is being updated.

Disk

Field Description
id string
ID of the disk.
folder_id string
ID of the folder that the disk belongs to.
created_at google.protobuf.Timestamp
name string
Name of the disk. 1-63 characters long.
description string
Description of the disk. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
type_id string
ID of the disk type.
zone_id string
ID of the availability zone where the disk resides.
size int64
Size of the disk, specified in bytes.
block_size int64
Block size of the disk, specified in bytes.
product_ids[] string
License IDs that indicate which licenses are attached to this resource. License IDs are used to calculate additional charges for the use of the virtual machine.
The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
If you know the license IDs, specify them when you create the image. For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost. You can specify them in the yandex.cloud.compute.v1.ImageService.Create request.
status enum Status
Current status of the disk.
  • CREATING: Disk is being created.
  • READY: Disk is ready to use.
  • ERROR: Disk encountered a problem and cannot operate.
  • DELETING: Disk is being deleted.
source oneof: source_image_id or source_snapshot_id
  source_image_id string
ID of the image that was used for disk creation.
  source_snapshot_id string
ID of the snapshot that was used for disk creation.
instance_ids[] string
Array of instances to which the disk is attached.
disk_placement_policy DiskPlacementPolicy
Placement policy configuration.

DiskPlacementPolicy

Field Description
placement_group_id string
Placement group ID.

Delete

Deletes the specified disk.
Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots or images previously made from the disk. You must delete snapshots and images separately.
It is not possible to delete a disk that is attached to an instance.

rpc Delete (DeleteDiskRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteDiskMetadata

    Operation.response:google.protobuf.Empty

DeleteDiskRequest

Field Description
disk_id string
Required. ID of the disk to delete. To get the disk ID use a DiskService.List request. The maximum string length in characters is 50.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<DeleteDiskMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<google.protobuf.Empty>
if operation finished successfully.

DeleteDiskMetadata

Field Description
disk_id string
ID of the disk that is being deleted.

ListOperations

Lists operations for the specified disk.

rpc ListOperations (ListDiskOperationsRequest) returns (ListDiskOperationsResponse)

ListDiskOperationsRequest

Field Description
disk_id string
Required. ID of the Disk resource to list operations for. The maximum string length in characters is 50.
page_size int64
The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListDiskOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. The maximum value is 1000.
page_token string
Page token. To get the next page of results, set page_token to the ListDiskOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.

ListDiskOperationsResponse

Field Description
operations[] operation.Operation
List of operations for the specified disk.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListDiskOperationsRequest.page_size, use the next_page_token as the value for the ListDiskOperationsRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any
The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any.

Move

Moves the specified disk to another folder of the same cloud.

rpc Move (MoveDiskRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:MoveDiskMetadata

    Operation.response:Disk

MoveDiskRequest

Field Description
disk_id string
Required. ID of the disk to move.
To get the disk ID, make a DiskService.List request. The maximum string length in characters is 50.
destination_folder_id string
Required. ID of the folder to move the disk to.
To get the folder ID, make a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<MoveDiskMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<Disk>
if operation finished successfully.

MoveDiskMetadata

Field Description
disk_id string
ID of the disk that is being moved.
source_folder_id string
ID of the folder that the disk is being moved from.
destination_folder_id string
ID of the folder that the disk is being moved to.

Disk

Field Description
id string
ID of the disk.
folder_id string
ID of the folder that the disk belongs to.
created_at google.protobuf.Timestamp
name string
Name of the disk. 1-63 characters long.
description string
Description of the disk. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
type_id string
ID of the disk type.
zone_id string
ID of the availability zone where the disk resides.
size int64
Size of the disk, specified in bytes.
block_size int64
Block size of the disk, specified in bytes.
product_ids[] string
License IDs that indicate which licenses are attached to this resource. License IDs are used to calculate additional charges for the use of the virtual machine.
The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
If you know the license IDs, specify them when you create the image. For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost. You can specify them in the yandex.cloud.compute.v1.ImageService.Create request.
status enum Status
Current status of the disk.
  • CREATING: Disk is being created.
  • READY: Disk is ready to use.
  • ERROR: Disk encountered a problem and cannot operate.
  • DELETING: Disk is being deleted.
source oneof: source_image_id or source_snapshot_id
  source_image_id string
ID of the image that was used for disk creation.
  source_snapshot_id string
ID of the snapshot that was used for disk creation.
instance_ids[] string
Array of instances to which the disk is attached.
disk_placement_policy DiskPlacementPolicy
Placement policy configuration.

DiskPlacementPolicy

Field Description
placement_group_id string
Placement group ID.

ListSnapshotSchedules

List snapshot schedules containing the disk

rpc ListSnapshotSchedules (ListDiskSnapshotSchedulesRequest) returns (ListDiskSnapshotSchedulesResponse)

ListDiskSnapshotSchedulesRequest

Field Description
disk_id string
ID of the Disk resource to list snapshot schedules for.
page_size int64
The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListDiskOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests.
page_token string
Page token. To get the next page of results, set page_token to the ListDiskSnapshotSchedulesResponse.next_page_token returned by a previous list request.

ListDiskSnapshotSchedulesResponse

Field Description
snapshot_schedules[] SnapshotSchedule
List of snapshot schedules for the specified disk.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListDiskSnapshotSchedulesRequest.page_size, use the next_page_token as the value for the ListDiskSnapshotSchedulesRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

SnapshotSchedule

Field Description
id string
ID of the snapshot schedule policy.
folder_id string
ID of the folder that the scheduler policy belongs to.
created_at google.protobuf.Timestamp
name string
Name of the schedule policy. The name is unique within the folder.
description string
Description of the schedule policy.
labels map<string,string>
Resource labels as key:value pairs.
status enum Status
schedule_policy SchedulePolicy
schedule properties
retention_policy oneof: retention_period or snapshot_count
  retention_period google.protobuf.Duration
  snapshot_count int64
snapshot_spec SnapshotSpec
properties to create snapshot with.

SchedulePolicy

Field Description
start_at google.protobuf.Timestamp
start time for the first run.
expression string
cron format (* * * * *)

SnapshotSpec

Field Description
description string
Description of the created snapshot.
labels map<string,string>
Resource labels as key:value pairs.

Was the article helpful?

Language / Region
© 2022 Yandex.Cloud LLC
In this article:
  • Calls DiskService
  • Get
  • GetDiskRequest
  • Disk
  • DiskPlacementPolicy
  • List
  • ListDisksRequest
  • ListDisksResponse
  • Disk
  • DiskPlacementPolicy
  • Create
  • CreateDiskRequest
  • DiskPlacementPolicy
  • Operation
  • CreateDiskMetadata
  • Disk
  • DiskPlacementPolicy
  • Update
  • UpdateDiskRequest
  • DiskPlacementPolicy
  • Operation
  • UpdateDiskMetadata
  • Disk
  • DiskPlacementPolicy
  • Delete
  • DeleteDiskRequest
  • Operation
  • DeleteDiskMetadata
  • ListOperations
  • ListDiskOperationsRequest
  • ListDiskOperationsResponse
  • Operation
  • Move
  • MoveDiskRequest
  • Operation
  • MoveDiskMetadata
  • Disk
  • DiskPlacementPolicy
  • ListSnapshotSchedules
  • ListDiskSnapshotSchedulesRequest
  • ListDiskSnapshotSchedulesResponse
  • SnapshotSchedule
  • SchedulePolicy
  • SnapshotSpec