Getting the folder ID
Written by
Management console
CLI
API
-
Select the folder on the management console home page. This page displays information about all the folders in the selected cloud. If necessary, switch to another cloud.
-
You can retrieve the folder ID from the folder page URL in the management console:
https://console.cloud.yandex.com/folders/b1gd129pp9ha0vnvf5g7
Where
b1gd129pp9ha0vnvf5g7
is the folder ID.
If you don't have the Yandex Cloud command line interface yet, install and initialize it.
If you know the folder name, get its ID using the get
command:
yc resource-manager folder get my-folder
Result:
id: b1gd129pp9ha0vnvf5g7
...
If you don't, get a list of folders with IDs for the default cloud:
yc resource-manager folder list
Result:
+----------------------+--------------------+------------------+--------+
| ID | NAME | LABELS | STATUS |
+----------------------+--------------------+------------------+--------+
| b1gd129pp9ha0vnvf5g7 | my-folder | | ACTIVE |
| b1g66mft1vopnevbn57j | default | | ACTIVE |
+----------------------+--------------------+------------------+--------+
To view the list of folders in a different cloud, specify the folder ID in cloud-id
:
yc resource-manager folder list --cloud-id b1glku4lgd6g31h5onqs