ListAssignableKeyScopes
GET/v1/me/assignable-key-scopes
ListAssignableKeyScopes returns the scopes a management key can carry, for
the surfaces that render a scope picker while creating one: an
organization-wide key, or with project_id set, a key for that project.
Every assignable scope is listed, in a stable order, whether or not this
caller could grant it; grantable marks the ones IssueMyKey would accept
from this caller now, so a picker can disable the rest instead of offering
a choice that is refused on submit.
The gate is the one IssueMyKey applies to the same key -- type API_KEY_TYPE_MANAGEMENT, this customer_id, and this project_id ("default" when it is empty) -- and not role administration: a caller who could create the key gets the list, and one who could not gets the refusal IssueMyKey would return -- PERMISSION_DENIED, or FAILED_PRECONDITION for an API key without its own api_keys.create grant. The built-in User Admin role, which creates keys but cannot read roles, is answered.
Request
Responses
- 200
Success