Managing profile parameters
You can manage your profile parameters in the following ways:
- Add or change a profile parameter.
- Delete a profile parameter.
- Run a command with parameters from another profile.
Add or change a profile parameter
To add or change a profile parameter, use the command:
yc config set <parameter_name> <parameter_value>
For example, change the default folder:
-
Change the default folder (the
folder-id
parameter):yc config set folder-id b1g5bhjofg7o********
-
Link an organization to a profile:
yc config set organization-id bpfaidqca8vd********
-
Make sure the parameters have actually changed:
yc config list
Result:
token: y0_AgAAA...Njwvs7N4 cloud-id: b1gj9ja2h4ct******** folder-id: b1g5bhjofg7o******** organization-id: bpfaidqca8vd********
View the full list of profile parameters. You can also change your profile parameters using the profile wizard.
Delete a profile parameter
To delete a profile parameter, use the command:
yc config unset <parameter_name>
For example, unlink the default organization from a profile:
-
Unlink the default organization (the
organization-id
parameter):yc config unset organization-id
-
Make sure the parameter has been actually deleted:
yc config list
Result:
token: y0_AgAAA...Njwvs7N4 cloud-id: b1gj9ja2h4ct******** folder-id: b1g5bhjofg7o********
Run a command with parameters from another profile
To run the command with the parameters of a different profile, add the --profile <profile_name>
parameter to the command.
For example, view the test
profile parameters without activating it:
yc config list --profile test
Result:
token: y0_AgAAA...Kjwgs7h3
cloud-id: b15jlj22h4ct********
folder-id: b1grb2jo7g7o********