Enables one role of a User: grants it, or re-enables it if it was disabled. The User's other roles are not affected.
SIGNER is ACTIVE immediately and needs team. ADMIN and POLICY_AUTHOR need authorizationInfo, and are PENDING_ACTIVE until enough Admins approve with users.approveRoleChange.
Fails with FAILED_PRECONDITION if the role is already ACTIVE or PENDING_ACTIVE, if the User is DISABLED (use users.enable first), or while the User has a pending change.
HTTP request
POST https://mpc.googleapis.com/v1beta/{name=projects/*/locations/*/instances/*/users/*}:enableRole
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. The name of the User. Format: projects/{project}/locations/{location}/instances/{instance}/users/{user} |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "role": enum ( |
| Fields | |
|---|---|
role |
Required. The role to enable. |
team |
Optional. The resource name of the Team the User joins. Required if |
authorizationInfo |
Optional. The calling Admin's signature over a UserSigningPayload with an ENABLE role change for |
Response body
If successful, the response body contains an instance of User.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.