Method: projects.locations.instances.users.create

Creates a new User in an instance. The server assigns the User ID.

user.roles may be empty or contain only SIGNER, which is ACTIVE immediately. ADMIN and POLICY_AUTHOR can't be granted here, because they need Admin approval: create the User, then grant them with users.enableRole. A request with either fails with INVALID_ARGUMENT.

HTTP request

POST https://mpc.googleapis.com/v1beta/{parent=projects/*/locations/*/instances/*}/users

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent instance where the User will be created. Format: projects/{project}/locations/{location}/instances/{instance} It takes the form projects/{project}/locations/{location}/instances/{instance}.

Query parameters

Parameters
requestId

string

Optional. An idempotency key. Because User IDs are server-generated, a client must set this to retry a create safely. If a request with the same requestId was already completed, the server returns the User it created.

Must be a UUID4 and not the zero UUID.

Request body

The request body contains an instance of User.

Response body

If successful, the response body contains a newly created instance of User.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.