Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
Yandex Compute Cloud
  • Начало работы
    • Обзор
    • Создание виртуальной машины Linux
    • Создание группы виртуальных машин
  • Пошаговые инструкции
    • Все инструкции
    • Создание виртуальной машины
      • Создать ВМ Linux
      • Создать ВМ из набора дисков
      • Создать ВМ с дисками из снимков
      • Создать ВМ из пользовательского образа
      • Создать ВМ с GPU
      • Сделать ВМ прерываемой
    • DSVM
      • Обзор
      • Создать ВМ из публичного образа DSVM
    • Группы размещения
      • Создать группу размещения
      • Удалить группу размещения
      • Создать ВМ в группе размещения
      • Добавить ВМ в группу размещения
      • Исключить ВМ из группы размещения
    • Образы с предустановленным ПО
      • Создать ВМ из публичного образа
      • Настроить ПО
      • Работа с ВМ на базе публичного образа
      • Получить список публичных образов
    • Получение информации о виртуальной машине
      • Получить информацию о ВМ
      • Получить вывод последовательного порта
    • Управление виртуальной машиной
      • Остановить и запустить ВМ
      • Подключить диск к ВМ
      • Отключить диск от ВМ
      • Перенести ВМ в другую зону доступности
      • Перенести ВМ в другой каталог
      • Перенести ВМ в другое облако
      • Привязать к ВМ публичный IP-адрес
      • Отвязать от ВМ публичный IP-адрес
      • Сделать публичный IP-адрес ВМ статическим
      • Изменить ВМ
      • Изменить вычислительные ресурсы ВМ
      • Удалить ВМ
    • Работа на виртуальной машине
      • Подключиться к ВМ по SSH
      • Подключиться к ВМ по RDP
      • Подключиться к ВМ через PowerShell
      • Работа с Yandex Cloud изнутри ВМ
      • Установить NVIDIA-драйверы
      • Восстановить доступ к ВМ
    • Управление агентом для сброса паролей
      • Установить агент
    • Создание диска
      • Создать пустой диск
      • Создать пустой диск с блоком большого размера
      • Создать нереплицируемый диск
      • Восстановить диск с помощью снимка
    • Управление диском
      • Изменить диск
      • Настроить создание снимков диска по расписаниям
      • Перенести диск в другой каталог
      • Удалить диск
    • Снимки дисков
      • Создать снимок
      • Удалить снимок
      • Создать расписание снимков
      • Изменить расписание снимков
      • Остановить и запустить расписание снимков
      • Удалить расписание снимков
    • Группы размещения дисков
      • Создать группу размещения дисков
      • Удалить диск из группы размещения
    • Создание образа
      • Подготовить образ диска
      • Загрузить свой образ
      • Создать образ из диска
      • Создать образ из снимка диска
      • Создать образ из другого пользовательского образа
    • Управление образом
      • Получить список образов
      • Удалить образ
    • Файловые хранилища
      • Создать файловое хранилище
      • Подключить файловое хранилище к ВМ
      • Отключить файловое хранилище от ВМ
      • Изменить файловое хранилище
      • Удалить файловое хранилище
    • Управление серийной консолью
      • Начало работы
      • Подключиться к серийной консоли по SSH
      • Подключиться к серийной консоли с помощью CLI
      • Запустить командную оболочку в Windows SAC
      • Отключить доступ к серийной консоли
    • Создание группы виртуальных машин
      • Создать группу ВМ фиксированного размера
      • Создать группу ВМ фиксированного размера с сетевым балансировщиком
      • Создать группу ВМ фиксированного размера с L7-балансировщиком
      • Создать автоматически масштабируемую группу ВМ
      • Создать группу ВМ с Container Optimized Image
      • Создать группу ВМ по YAML-спецификации
    • Получение информации о группе виртуальных машин
      • Получить список групп ВМ
      • Получить информацию о группе ВМ
      • Получить список ВМ в группе
    • Управление группой виртуальных машин
      • Изменить группу ВМ
      • Изменить группу ВМ по YAML-спецификации
      • Настроить проверку состояния приложения на ВМ
      • Обновить группу
        • Постепенное обновление
        • Обновление без простоя
      • Приостановить процессы в группе ВМ
      • Возобновить процессы в группе ВМ
      • Остановить группу ВМ
      • Запустить группу ВМ
      • Удалить группу ВМ
    • Выделенные хосты
      • Создать группу выделенных хостов
      • Создать ВМ в группе выделенных хостов
      • Создать ВМ на выделенном хосте
  • Yandex Container Solution
  • Практические руководства
    • Все руководства
    • Настройка синхронизации часов с помощью NTP
    • Работа с группой ВМ с автомасштабированием
    • Масштабирование группы ВМ по расписанию
    • Автомасштабирование группы ВМ для обработки сообщений из очереди
    • Обновление группы ВМ под нагрузкой
    • Передача логов с ВМ в Yandex Cloud Logging
    • Сборка образа ВМ с набором инфраструктурных инструментов с помощью Packer
    • Резервное копирование ВМ с помощью Hystax Acura Backup
  • Концепции
    • Взаимосвязь ресурсов
    • Виртуальные машины
      • Обзор
      • Платформы
      • Уровни производительности vCPU
      • Прерываемые виртуальные машины
      • Сеть на виртуальной машине
      • Программно-ускоренная сеть
      • Динамическая миграция
      • Группы размещения
      • Статусы
      • Метаданные
    • Графические ускорители
    • Диски и файловые хранилища
      • Обзор
      • Диски
      • Снимки дисков
      • Создание снимков по расписаниям
      • Группы размещения нереплицируемых дисков
      • Файловые хранилища
      • Операции чтения и записи
    • Образы
    • Группы виртуальных машин
      • Обзор
      • Доступ
      • YAML-спецификация
      • Шаблон виртуальной машины
      • Переменные в шаблоне виртуальной машины
      • Политики
        • Обзор
        • Политика распределения
        • Политика развертывания
        • Политика масштабирования
      • Типы масштабирования
      • Автоматическое восстановление
      • Обновление
        • Обзор
        • Распределение виртуальных машин по зонам
        • Алгоритм развертывания
        • Правила обновления виртуальных машин
        • Изменение дополнительных дисков в шаблоне виртуальной машины
      • Остановка группы и приостановка процессов
      • Статусы
    • Выделенный хост
    • Резервное копирование
    • Квоты и лимиты
  • Управление доступом
  • Правила тарификации
    • Действующие правила
    • Архив
      • До 1 января 2019 года
      • С 1 января до 1 марта 2019 года
      • С 1 марта до 1 мая 2019 года
  • Справочник API
    • Аутентификация в 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
        • createFromYaml
        • get
        • listAccessBindings
        • create
        • listLogRecords
        • update
        • start
        • delete
        • pauseProcesses
        • stop
        • setAccessBindings
        • listOperations
        • listInstances
        • updateAccessBindings
        • resumeProcesses
        • list
        • updateFromYaml
  • Вопросы и ответы
    • Общие вопросы
    • Виртуальные машины
    • Подключение
    • Диски, снимки, образы
    • Аварийное восстановление
    • Группы виртуальных машин
    • Мониторинг
    • Лицензирование
    • Все вопросы на одной странице
  1. Справочник API
  2. gRPC (англ.)
  3. ImageService

Compute Cloud API, gRPC: ImageService

Статья создана
Yandex Cloud
  • Calls ImageService
  • Get
    • GetImageRequest
    • Image
    • Os
  • GetLatestByFamily
    • GetImageLatestByFamilyRequest
    • Image
    • Os
  • List
    • ListImagesRequest
    • ListImagesResponse
    • Image
    • Os
  • Create
    • CreateImageRequest
    • Os
    • Operation
    • CreateImageMetadata
    • Image
  • Update
    • UpdateImageRequest
    • Operation
    • UpdateImageMetadata
    • Image
    • Os
  • Delete
    • DeleteImageRequest
    • Operation
    • DeleteImageMetadata
  • ListOperations
    • ListImageOperationsRequest
    • ListImageOperationsResponse
    • Operation

A set of methods for managing Image resources.

Call Description
Get Returns the specified Image resource.
GetLatestByFamily Returns the latest image that is part of an image family.
List Retrieves the list of Image resources in the specified folder.
Create Creates an image in the specified folder.
Update Updates the specified image.
Delete Deletes the specified image.
ListOperations Lists operations for the specified image.

Calls ImageService

Get

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

rpc Get (GetImageRequest) returns (Image)

GetImageRequest

Field Description
image_id string
Required. ID of the Image resource to return. To get the image ID, use a ImageService.List request. The maximum string length in characters is 50.

Image

Field Description
id string
ID of the image.
folder_id string
ID of the folder that the image belongs to.
created_at google.protobuf.Timestamp
name string
Name of the image. 1-63 characters long.
description string
Description of the image. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
family string
The name of the image family to which this image belongs.
You can get the most recent image from a family by using the yandex.cloud.compute.v1.ImageService.GetLatestByFamily request and create the disk from this image.
storage_size int64
The size of the image, specified in bytes.
min_disk_size int64
Minimum size of the disk which will be created from this image.
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 image.
  • CREATING: Image is being created.
  • READY: Image is ready to use.
  • ERROR: Image encountered a problem and cannot operate.
  • DELETING: Image is being deleted.
os Os
Operating system that is contained in the image.
pooled bool
When true, indicates there is an image pool for fast creation disks from the image.

Os

Field Description
type enum Type
Operating system type. The default is LINUX.
This field is used to correctly emulate a vCPU and calculate the cost of using an instance.
  • LINUX: Linux operating system.
  • WINDOWS: Windows operating system.

GetLatestByFamily

Returns the latest image that is part of an image family.

rpc GetLatestByFamily (GetImageLatestByFamilyRequest) returns (Image)

GetImageLatestByFamilyRequest

Field Description
folder_id string
Required. ID of the folder to get the image from. To get the folder ID, use a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50.
family string
Name of the image family to search for. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].

Image

Field Description
id string
ID of the image.
folder_id string
ID of the folder that the image belongs to.
created_at google.protobuf.Timestamp
name string
Name of the image. 1-63 characters long.
description string
Description of the image. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
family string
The name of the image family to which this image belongs.
You can get the most recent image from a family by using the yandex.cloud.compute.v1.ImageService.GetLatestByFamily request and create the disk from this image.
storage_size int64
The size of the image, specified in bytes.
min_disk_size int64
Minimum size of the disk which will be created from this image.
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 image.
  • CREATING: Image is being created.
  • READY: Image is ready to use.
  • ERROR: Image encountered a problem and cannot operate.
  • DELETING: Image is being deleted.
os Os
Operating system that is contained in the image.
pooled bool
When true, indicates there is an image pool for fast creation disks from the image.

Os

Field Description
type enum Type
Operating system type. The default is LINUX.
This field is used to correctly emulate a vCPU and calculate the cost of using an instance.
  • LINUX: Linux operating system.
  • WINDOWS: Windows operating system.

List

Retrieves the list of Image resources in the specified folder.

rpc List (ListImagesRequest) returns (ListImagesResponse)

ListImagesRequest

Field Description
folder_id string
Required. ID of the folder to list images 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 ListImagesResponse.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 ListImagesResponse.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 Image.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.

ListImagesResponse

Field Description
images[] Image
List of images.
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.

Image

Field Description
id string
ID of the image.
folder_id string
ID of the folder that the image belongs to.
created_at google.protobuf.Timestamp
name string
Name of the image. 1-63 characters long.
description string
Description of the image. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
family string
The name of the image family to which this image belongs.
You can get the most recent image from a family by using the yandex.cloud.compute.v1.ImageService.GetLatestByFamily request and create the disk from this image.
storage_size int64
The size of the image, specified in bytes.
min_disk_size int64
Minimum size of the disk which will be created from this image.
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 image.
  • CREATING: Image is being created.
  • READY: Image is ready to use.
  • ERROR: Image encountered a problem and cannot operate.
  • DELETING: Image is being deleted.
os Os
Operating system that is contained in the image.
pooled bool
When true, indicates there is an image pool for fast creation disks from the image.

Os

Field Description
type enum Type
Operating system type. The default is LINUX.
This field is used to correctly emulate a vCPU and calculate the cost of using an instance.
  • LINUX: Linux operating system.
  • WINDOWS: Windows operating system.

Create

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

rpc Create (CreateImageRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:CreateImageMetadata

    Operation.response:Image

CreateImageRequest

Field Description
folder_id string
Required. ID of the folder to create an image 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 image. Value must match the regular expression |[a-z]([-a-z0-9]{0,61}[a-z0-9])?.
description string
Description of the image. 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]*.
family string
The name of the image family to which this image belongs. For more information, see Image family.
To get an information about the most recent image from a family, use a ImageService.GetLatestByFamily request. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
min_disk_size int64
Minimum size of the disk that will be created from this image. Specified in bytes. Should be more than the volume of source data. Acceptable values are 4194304 to 4398046511104, inclusive.
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 this request. The maximum string length in characters for each value is 50.
source oneof: image_id, disk_id, snapshot_id or uri
  image_id string
ID of the source image to create the new image from. The maximum string length in characters is 50.
  disk_id string
ID of the disk to create the image from. The maximum string length in characters is 50.
  snapshot_id string
ID of the snapshot to create the image from. The maximum string length in characters is 50.
  uri string
URI of the source image to create the new image from. Currently only supports links to images that are stored in Object Storage. Currently only supports Qcow2, VMDK, and VHD formats.
os Os
Operating system that is contained in the image.
If not specified and you used the image_id or disk_id field to set the source, then the value can be inherited from the source resource.
pooled bool
When true, an image pool will be created for fast creation disks from the image.

Os

Field Description
type enum Type
Operating system type. The default is LINUX.
This field is used to correctly emulate a vCPU and calculate the cost of using an instance.
  • LINUX: Linux operating system.
  • WINDOWS: Windows operating system.

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<CreateImageMetadata>
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<Image>
if operation finished successfully.

CreateImageMetadata

Field Description
image_id string
ID of the image that is being created.

Image

Field Description
id string
ID of the image.
folder_id string
ID of the folder that the image belongs to.
created_at google.protobuf.Timestamp
name string
Name of the image. 1-63 characters long.
description string
Description of the image. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
family string
The name of the image family to which this image belongs.
You can get the most recent image from a family by using the yandex.cloud.compute.v1.ImageService.GetLatestByFamily request and create the disk from this image.
storage_size int64
The size of the image, specified in bytes.
min_disk_size int64
Minimum size of the disk which will be created from this image.
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 image.
  • CREATING: Image is being created.
  • READY: Image is ready to use.
  • ERROR: Image encountered a problem and cannot operate.
  • DELETING: Image is being deleted.
os Os
Operating system that is contained in the image.
pooled bool
When true, indicates there is an image pool for fast creation disks from the image.

Update

Updates the specified image.

rpc Update (UpdateImageRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateImageMetadata

    Operation.response:Image

UpdateImageRequest

Field Description
image_id string
Required. ID of the Image resource to update. To get the image ID, use a ImageService.List request. The maximum string length in characters is 50.
update_mask google.protobuf.FieldMask
Field mask that specifies which fields of the Image resource are going to be updated.
name string
Name of the image. Value must match the regular expression |[a-z]([-a-z0-9]{0,61}[a-z0-9])?.
description string
Description of the image. The maximum string length in characters is 256.
min_disk_size int64
Minimum size of the disk that can be created from this image. Specified in bytes. Should be more than the volume of source data and more than the virtual disk size. Acceptable values are 4194304 to 4398046511104, inclusive.
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<UpdateImageMetadata>
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<Image>
if operation finished successfully.

UpdateImageMetadata

Field Description
image_id string
ID of the Image resource that is being updated.

Image

Field Description
id string
ID of the image.
folder_id string
ID of the folder that the image belongs to.
created_at google.protobuf.Timestamp
name string
Name of the image. 1-63 characters long.
description string
Description of the image. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
family string
The name of the image family to which this image belongs.
You can get the most recent image from a family by using the yandex.cloud.compute.v1.ImageService.GetLatestByFamily request and create the disk from this image.
storage_size int64
The size of the image, specified in bytes.
min_disk_size int64
Minimum size of the disk which will be created from this image.
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 image.
  • CREATING: Image is being created.
  • READY: Image is ready to use.
  • ERROR: Image encountered a problem and cannot operate.
  • DELETING: Image is being deleted.
os Os
Operating system that is contained in the image.
pooled bool
When true, indicates there is an image pool for fast creation disks from the image.

Os

Field Description
type enum Type
Operating system type. The default is LINUX.
This field is used to correctly emulate a vCPU and calculate the cost of using an instance.
  • LINUX: Linux operating system.
  • WINDOWS: Windows operating system.

Delete

Deletes the specified image.
Deleting an image removes its data permanently and is irreversible.

rpc Delete (DeleteImageRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteImageMetadata

    Operation.response:google.protobuf.Empty

DeleteImageRequest

Field Description
image_id string
Required. ID of the image to delete. To get the image ID, use a ImageService.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<DeleteImageMetadata>
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.

DeleteImageMetadata

Field Description
image_id string
ID of the image that is being deleted.

ListOperations

Lists operations for the specified image.

rpc ListOperations (ListImageOperationsRequest) returns (ListImageOperationsResponse)

ListImageOperationsRequest

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

ListImageOperationsResponse

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

Была ли статья полезна?

Language / Region
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
В этой статье:
  • Calls ImageService
  • Get
  • GetImageRequest
  • Image
  • Os
  • GetLatestByFamily
  • GetImageLatestByFamilyRequest
  • Image
  • Os
  • List
  • ListImagesRequest
  • ListImagesResponse
  • Image
  • Os
  • Create
  • CreateImageRequest
  • Os
  • Operation
  • CreateImageMetadata
  • Image
  • Update
  • UpdateImageRequest
  • Operation
  • UpdateImageMetadata
  • Image
  • Os
  • Delete
  • DeleteImageRequest
  • Operation
  • DeleteImageMetadata
  • ListOperations
  • ListImageOperationsRequest
  • ListImageOperationsResponse
  • Operation