Python
from gcore import Gcore client = Gcore( api_key="My API Key", ) role_assignment = client.cloud.users.role_assignments.create( role="ClientAdministrator", user_id=777, ) print(role_assignment.id)
{ "assigned_by": 123, "client_id": 123, "created_at": "2019-06-25T08:42:42Z", "id": 12, "project_id": 123, "role": "ClientAdministrator", "updated_at": "2019-06-25T08:42:42Z", "user_id": 123 }
Assign a role to an existing user in the specified scope.
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef
apikey
apikey 1234$abcdef
OK
The response is of type object.
object
Was this page helpful?