Getting the folder ID
Written by
Updated at November 14, 2024
Management console
CLI
API
-
Go to the management console
and select the appropriate folder from the list on the left. On the page that opens, the folder ID is shown on top, next to the folder name. -
To copy the ID, hover over it and click
.
You can also get the folder ID from the folder page URL in the management console:
https://console.yandex.cloud/folders/<folder_ID>
If you do not 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: b1gd129pp9ha********
...
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 |
+----------------------+--------------------+------------------+--------+
| b1gd129pp9ha******** | my-folder | | ACTIVE |
| b1g66mft1vop******** | 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 b1glku4lgd6g********
To get the list of folders with IDs, use the list REST API method for the Folder resource or the FolderService/List gRPC API call.