Updating a folder
The management console only allows you to change the name of a folder. To change its description, use the CLI or API.
Management console
CLI
API
- Select the folder on the Home page of the management console. This page displays folders for the selected cloud. If necessary, switch to another cloud.
- Click next to the folder and select Rename.
- Enter a new name for the folder.
- Click Rename.
-
See the description of the update folder command:
$ yc resource-manager folder update --help
-
If you know the folder ID or name, proceed to the next step. If not, use one of these methods to get them:
-
Get a list of folders:
$ yc resource-manager folder list +----------------------+--------------------+--------+--------+-------------+ | ID | NAME | LABELS | STATUS | DESCRIPTION | +----------------------+--------------------+--------+--------+-------------+ | b1gppulhhm2aaufq9eug | yet-another-folder | | ACTIVE | | | b1gvmob95yysaplct532 | default | | ACTIVE | | +----------------------+--------------------+--------+--------+-------------+
-
If you know the ID of the resource that belongs to the required folder, you can get the folder ID from the information about that resource:
$ yc <SERVICE-NAME> <RESOURCE> get <RESOURCE-ID>
where:
<SERVICE-NAME>
is the name of the service, such ascompute
.<RESOURCE>
is the category of the resource, such asinstance
.<RESOURCE-ID>
is the resource ID.
For example, the
fhmp74bfis2aim728p2a
VM belongs to theb1gpvjd9ir42nsng55ck
folder:$ yc compute instance get fhmp74bfis2ais728p2a id: fhmp74bfis2ais728p2a folder_id: b1gpvjd9ia42nsng55ck ...
-
-
Change the folder parameters, such as name and description. You can specify the folder to update by its name or ID.
$ yc resource-manager folder update default \ --new-name myfolder \ --description "this is my default-folder"
The command will rename the
default
folder tomyfolder
and update its description.- The name must be unique within the folder.
- The name may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter. The last character can't be a hyphen.
- The maximum length of the name is 63 characters.