Configure your cloud
When a user registers with Yandex Cloud, a cloud is created for the user. The cloud is a separate workspace with this user as the owner. The default
folder and default
network will be created in the cloud.
The owner can create new folders and resources in this cloud, and manage access rights to them.
Create a folder
-
In the management console
, select the appropriate cloud in the list on the left. -
At the top right, click
Create folder. -
Enter the folder name. The naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
(Optional) Enter a description of the folder.
-
Select Create a default network. This will create a network with subnets in each availability zone. Within this network, a default security group will be created, inside which all network traffic is allowed.
-
Click Create.
-
View the description of the create folder command:
$ yc resource-manager folder create --help
-
Create a new folder:
-
with a name and without a description:
$ yc resource-manager folder create \ --name new-folder
The folder naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
with a name and description:
$ yc resource-manager folder create \ --name new-folder \ --description "my first folder with description"
-
Update a folder
The management console only allows you to change the name of a folder. To change its description, use the CLI or API.
- On the home page
of the management console, select the folder. This page displays folders for the selected cloud. If necessary, switch to another cloud. - Click
next to the folder and select Edit. - Enter a new name for the folder.
- Click Save.
-
View 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. Otherwise, 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>
: Name of the service, such ascompute
.<RESOURCE>
: Resource category, e.g.,instance
.<RESOURCE-ID>
: 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, e.g., 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 folder naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.