Updating a service account

    You can edit the description of a service account via the CLI or API. For now, the management console only allows you to change the name of a service account.

    You can use the management console to immediately add or remove roles of a service account for the folder it belongs to. To assign the service account a role for another resource, use the CLI or API by following the instructions in Assigning roles to a service account.

    1. Go to the folder that the service account belongs to.
    2. Go to the Service accounts tab.
    3. Click image next to the service account and select Edit service account.
    4. Change the name of your service account.
    5. Add or remove roles assigned to the service account. The roles will be assigned for the folder where the service account was created.
    6. Click Save.
    1. See the description of the update service account command:

      $ yc iam service-account update --help
      
    2. Select a service account (for example, my-robot):

      $ yc iam service-account list
      +----------------------+------------------+-------------------------------+
      |          ID          |       NAME       |          DESCRIPTION          |
      +----------------------+------------------+-------------------------------+
      | aje6o61dvog2h6g9a33s | my-robot         |                               |
      | aje9sda1ufvqcmfksd3f | blabla           | bla bla bla is my description |
      +----------------------+------------------+-------------------------------+
      
    3. Change the service account parameters, such as name and description:

      yc iam service-account update my-robot \
          --new-name my-service-account \
          --description "this is my 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 length of the name is 63 characters.

    To update the service account, use the update method for the ServiceAccount resource.