Viewing roles assigned to a function
Written by
CLI
API
If you don't have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To view roles assigned to a function, run the command:
yc serverless function list-access-bindings <function name>
Result:
+------------------------------+--------------+-----------------------+
| ROLE ID | SUBJECT TYPE | SUBJECT ID |
+------------------------------+--------------+-----------------------+
| serverless.functions.invoker | system | allAuthenticatedUsers |
+------------------------------+--------------+-----------------------+
You can view roles assigned to a function using the listAccessBindings API method.
Note
Roles assigned to a folder or cloud are automatically inherited by the function. However, they don't appear in the list of assigned roles. Learn more about viewing roles.