Creating and updating profiles
or
where [profile_name]
is an optional name of the profile being created or updated.
The first step of the interactive scenario is different in the init
and profile create
commands:
Init
Profile Create
Outputs a list of existing profiles (if any) and prompts you to make a choice: Create a new or update the configuration of an existing profile:
Please choose profile to configure:
[1] Create a new profile
[2] test
[3] local
If you enter the name of an existing profile at this point, the YDB CLI proceeds to updating its parameters as if an option with the name of this profile was selected at once.
If no profile name is specified in the command line, it is requested:
Please enter configuration profile name to create or re-configure:
Next, you’ll be prompted to sequentially perform the following actions with each connection parameter that can be saved in the profile:
- Don’t save
- Use current value (this option is available when updating an existing profile)
Creating a new mydb1
profile:
Run the command:
ydb config profile create mydb1
Specify the or don’t save this parameter for the profile:
Enter the DB name or don’t save this parameter for the profile:
Pick desired action to configure database:
[1] Set a new database value
[2] Don't save database for profile "mydb1"
Please enter your numeric choice:
In the last step, you’ll be prompted to activate the created profile to be used by default. Choose ‘n’ (No) until you read the article about :