import osfrom gcore import Gcoreclient = Gcore( api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted)role_assignment_update_delete = client.cloud.users.role_assignments.update( assignment_id=123, role="ClientAdministrator", user_id=777,)print(role_assignment_update_delete.assignment_id)
Copy
Ask AI
{ "assignment_id": 123}
User Role Assignments
Update role assignment
Modify an existing role assignment for a user.
PATCH
/
cloud
/
v1
/
users
/
assignments
/
{assignment_id}
Python
Copy
Ask AI
import osfrom gcore import Gcoreclient = Gcore( api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted)role_assignment_update_delete = client.cloud.users.role_assignments.update( assignment_id=123, role="ClientAdministrator", user_id=777,)print(role_assignment_update_delete.assignment_id)