Edit service account
To change the description of a service account, use the CLI or API. The management console only allows you to change the name of the service account at this time.
You can use the management console to immediately add or remove roles of a service account for the folder it belongs to. To assign a role for another resource to a service account, use the CLI or API following the instructions Assign role to service account.
- Select the folder.
- Select the Service accounts tab.
- Click next to the service account and select Edit service account.
- Change the name of your service account.
- Add or remove roles assigned to the service account. The roles will be assigned for the folder where the service account was created.
- Click Save.
Edit a service account in your default folder:
yc iam service-account update <SERVICE-ACCOUNT-NAME>|<SERVICE-ACCOUNT-ID> \ [--new-name <NEW-NAME>] \ [--description <NEW-DESCRIPTION>] \
<SERVICE-ACCOUNT-NAME>is the name of the service account you want to change. You can enter a service account by its name or identifier.
<SERVICE-ACCOUNT-ID>is the service account identifier.
<NEW-NAME>is the new name of the service account.
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 name length is 63 characters.
<NEW-DESCRIPTION>is the new description of the service account.
For example, you can rename a service account:
yc iam service-account update old-name \ --new-name new-name
If the service account belongs to a different folder, you can specify the folder using the
yc iam service-account update old-name \ --new-name new-name \ --folder-name yet-another-folder
To edit the service account, use the
Update method for the