Getting a list of public images
Written by
Updated at November 5, 2024
When creating a VM, you need to select its image with the software that you want to use.
Management console
CLI
API
You can view a list of public images when creating a virtual machine:
- In the management console
, select the folder to create the virtual machine in. - At the top right, click Create resource.
- In the list that opens, select Virtual machine instance.
- Under Boot disk image, click Show all Marketplace products. A list of all available public images will appear.
To view information about a specific image, click
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
To get a list of available images using the CLI, run this command:
yc compute image list --folder-id standard-images
Result:
+----------------------+-------------------------------------+--------------------------+----------------------+--------+
| ID | NAME | FAMILY | PRODUCT IDS | STATUS |
+----------------------+-------------------------------------+--------------------------+----------------------+--------+
...
| fdvk34al8k5n******** | centos-7-1549279494 | centos-7 | dqni65lfhvv2******** | READY |
| fdv7ooobjfl3******** | windows-2016-gvlk-1548913814 | windows-2016-gvlk | dqnnc72gj2is******** | READY |
| fdv4f5kv5cvf******** | ubuntu-1604-lts-1549457823 | ubuntu-1604-lts | dqnnb6dc7640******** | READY |
...
+----------------------+-------------------------------------+--------------------------+----------------------+--------+
- Get an IAM token used for authentication in the examples:
- Guide for users with a Yandex account.
- How to get a token for a service account.
- How to get a token for a federated account.
- Get the list of public images from Yandex Cloud using the list REST API method for the Image resource or the ImageService/List gRPC API call. In the request, specify the following parameters:
- Specify
standard-images
as the folder ID. - The folder contains many images, so specify
pageSize=1000
or use the obtained value ofnextPageToken
to get the next page.
- Specify
Write the result to a file, e.g., output.json
:
export IAM_TOKEN=CggaATEVAgA...
curl \
--header "Authorization: Bearer ${IAM_TOKEN}" \
"https://compute.api.cloud.yandex.net/compute/v1/images?folderId=standard-images&pageSize=1000" > output.json
You can also view information about all available public images in Cloud Marketplace.