Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Compute Cloud
  • Getting started
    • Overview
    • Creating a Linux VM
    • Creating instance groups
  • Step-by-step instructions
    • All instructions
    • Creating VMs
      • Creating a Linux 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
      • 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
      • Installing the agent
    • Creating a disk
      • Creating an empty disk
      • Creating an empty disk with a large block
      • Creating a non-replicated disk
    • Disk management
      • Updating a disk
      • Configuring disk snapshot schedules
      • Moving a disk to another folder
      • Deleting a disk
    • Disk snapshots
      • Creating snapshots
      • Deleting snapshots
      • Creating a snapshot schedule
      • Changing a snapshot schedule
      • Interrupting and starting a snapshot schedule
      • Deleting a snapshot schedule
    • Disk placement groups
      • Creating a disk placement group
      • Removing a disk from a placement group
    • Creating an image
      • Preparing a disk image
      • Uploading your image
      • Creating an image from a disk
      • Creating an image from a disk 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 the 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 group of dedicated hosts
      • Creating a VM in a group of dedicated hosts
      • Creating a VM on a dedicated host
  • Yandex Container Solution
  • Practical guidelines
    • All tutorials
    • Configuring clock synchronization using NTP
    • Running instance groups with auto scaling
    • Automatically scaling an instance group for handling messages from a queue
    • Updating an instance group under load
    • Transferring logs from a VM instance to Yandex Cloud Logging
    • Building a VM image with a set of infrastructure tools using Packer
    • 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
    • Graphics accelerators
    • Disks and file storage
      • Overview
      • Disks
      • Disk snapshots
      • Creating scheduled 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 hosts
    • 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
    • Instance groups
    • Monitoring
    • Licensing
    • All questions on one page
  1. API reference
  2. gRPC
  3. SnapshotService

Compute Cloud API, gRPC: SnapshotService

Written by
Yandex Cloud
  • Calls SnapshotService
  • Get
    • GetSnapshotRequest
    • Snapshot
  • List
    • ListSnapshotsRequest
    • ListSnapshotsResponse
    • Snapshot
  • Create
    • CreateSnapshotRequest
    • Operation
    • CreateSnapshotMetadata
    • Snapshot
  • Update
    • UpdateSnapshotRequest
    • Operation
    • UpdateSnapshotMetadata
    • Snapshot
  • Delete
    • DeleteSnapshotRequest
    • Operation
    • DeleteSnapshotMetadata
  • ListOperations
    • ListSnapshotOperationsRequest
    • ListSnapshotOperationsResponse
    • Operation

A set of methods for managing Snapshot resources.

Call Description
Get Returns the specified Snapshot resource.
List Retrieves the list of Snapshot resources in the specified folder.
Create Creates a snapshot of the specified disk.
Update Updates the specified snapshot.
Delete Deletes the specified snapshot.
ListOperations Lists operations for the specified snapshot.

Calls SnapshotService

Get

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

rpc Get (GetSnapshotRequest) returns (Snapshot)

GetSnapshotRequest

Field Description
snapshot_id string
Required. ID of the Snapshot resource to return. To get the snapshot ID, use a SnapshotService.List request. The maximum string length in characters is 50.

Snapshot

Field Description
id string
ID of the snapshot.
folder_id string
ID of the folder that the snapshot belongs to.
created_at google.protobuf.Timestamp
name string
Name of the snapshot. 1-63 characters long.
description string
Description of the snapshot. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
storage_size int64
Size of the snapshot, specified in bytes.
disk_size int64
Size of the disk when the snapshot was created, 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 snapshot.
  • CREATING: Snapshot is being created.
  • READY: Snapshot is ready to use.
  • ERROR: Snapshot encountered a problem and cannot operate.
  • DELETING: Snapshot is being deleted.
source_disk_id string
ID of the source disk used to create this snapshot.

List

Retrieves the list of Snapshot resources in the specified folder.

rpc List (ListSnapshotsRequest) returns (ListSnapshotsResponse)

ListSnapshotsRequest

Field Description
folder_id string
Required. ID of the folder to list snapshots 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 ListSnapshotsResponse.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 ListSnapshotsResponse.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 Snapshot.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.

ListSnapshotsResponse

Field Description
snapshots[] Snapshot
List of snapshots.
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 ListSnapshotsRequest.page_size, use the next_page_token as the value for the ListSnapshotsRequest.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.

Snapshot

Field Description
id string
ID of the snapshot.
folder_id string
ID of the folder that the snapshot belongs to.
created_at google.protobuf.Timestamp
name string
Name of the snapshot. 1-63 characters long.
description string
Description of the snapshot. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
storage_size int64
Size of the snapshot, specified in bytes.
disk_size int64
Size of the disk when the snapshot was created, 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 snapshot.
  • CREATING: Snapshot is being created.
  • READY: Snapshot is ready to use.
  • ERROR: Snapshot encountered a problem and cannot operate.
  • DELETING: Snapshot is being deleted.
source_disk_id string
ID of the source disk used to create this snapshot.

Create

Creates a snapshot of the specified disk.

rpc Create (CreateSnapshotRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:CreateSnapshotMetadata

    Operation.response:Snapshot

CreateSnapshotRequest

Field Description
folder_id string
Required. ID of the folder to create a snapshot in. To get the folder ID use a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50.
disk_id string
Required. ID of the disk to create the snapshot from. To get the disk ID use a yandex.cloud.compute.v1.DiskService.List request. The maximum string length in characters is 50.
name string
Name of the snapshot. Value must match the regular expression |[a-z]([-a-z0-9]{0,61}[a-z0-9])?.
description string
Description of the snapshot. 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]*.

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<CreateSnapshotMetadata>
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<Snapshot>
if operation finished successfully.

CreateSnapshotMetadata

Field Description
snapshot_id string
ID of the snapshot that is being created.
disk_id string
ID of the source disk used to create this snapshot.

Snapshot

Field Description
id string
ID of the snapshot.
folder_id string
ID of the folder that the snapshot belongs to.
created_at google.protobuf.Timestamp
name string
Name of the snapshot. 1-63 characters long.
description string
Description of the snapshot. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
storage_size int64
Size of the snapshot, specified in bytes.
disk_size int64
Size of the disk when the snapshot was created, 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 snapshot.
  • CREATING: Snapshot is being created.
  • READY: Snapshot is ready to use.
  • ERROR: Snapshot encountered a problem and cannot operate.
  • DELETING: Snapshot is being deleted.
source_disk_id string
ID of the source disk used to create this snapshot.

Update

Updates the specified snapshot.
Values of omitted parameters are not changed.

rpc Update (UpdateSnapshotRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateSnapshotMetadata

    Operation.response:Snapshot

UpdateSnapshotRequest

Field Description
snapshot_id string
Required. ID of the Snapshot resource to update. To get the snapshot ID use a SnapshotService.List request. The maximum string length in characters is 50.
update_mask google.protobuf.FieldMask
Field mask that specifies which fields of the Snapshot resource are going to be updated.
name string
Name of the snapshot. Value must match the regular expression |[a-z]([-a-z0-9]{0,61}[a-z0-9])?.
description string
Description of the snapshot. 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]*.

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<UpdateSnapshotMetadata>
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<Snapshot>
if operation finished successfully.

UpdateSnapshotMetadata

Field Description
snapshot_id string
ID of the Snapshot resource that is being updated.

Snapshot

Field Description
id string
ID of the snapshot.
folder_id string
ID of the folder that the snapshot belongs to.
created_at google.protobuf.Timestamp
name string
Name of the snapshot. 1-63 characters long.
description string
Description of the snapshot. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
storage_size int64
Size of the snapshot, specified in bytes.
disk_size int64
Size of the disk when the snapshot was created, 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 snapshot.
  • CREATING: Snapshot is being created.
  • READY: Snapshot is ready to use.
  • ERROR: Snapshot encountered a problem and cannot operate.
  • DELETING: Snapshot is being deleted.
source_disk_id string
ID of the source disk used to create this snapshot.

Delete

Deletes the specified snapshot.
Deleting a snapshot removes its data permanently and is irreversible.

rpc Delete (DeleteSnapshotRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteSnapshotMetadata

    Operation.response:google.protobuf.Empty

DeleteSnapshotRequest

Field Description
snapshot_id string
Required. ID of the snapshot to delete. To get the snapshot ID, use a SnapshotService.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<DeleteSnapshotMetadata>
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.

DeleteSnapshotMetadata

Field Description
snapshot_id string
ID of the snapshot that is being deleted.

ListOperations

Lists operations for the specified snapshot.

rpc ListOperations (ListSnapshotOperationsRequest) returns (ListSnapshotOperationsResponse)

ListSnapshotOperationsRequest

Field Description
snapshot_id string
Required. ID of the Snapshot 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 ListSnapshotOperationsResponse.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 ListSnapshotOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.

ListSnapshotOperationsResponse

Field Description
operations[] operation.Operation
List of operations for the specified snapshot.
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 ListSnapshotOperationsRequest.page_size, use the next_page_token as the value for the ListSnapshotOperationsRequest.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.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Calls SnapshotService
  • Get
  • GetSnapshotRequest
  • Snapshot
  • List
  • ListSnapshotsRequest
  • ListSnapshotsResponse
  • Snapshot
  • Create
  • CreateSnapshotRequest
  • Operation
  • CreateSnapshotMetadata
  • Snapshot
  • Update
  • UpdateSnapshotRequest
  • Operation
  • UpdateSnapshotMetadata
  • Snapshot
  • Delete
  • DeleteSnapshotRequest
  • Operation
  • DeleteSnapshotMetadata
  • ListOperations
  • ListSnapshotOperationsRequest
  • ListSnapshotOperationsResponse
  • Operation