ReferenceAPIAccess Service
Create principal
POST
principalId?stringThe last part of its name: a lowercase letter, then lowercase letters, digits and hyphens, at most 63 in all.
application/json- body
A user or a service account, which calls the API with its keys.
name?stringprincipals/{principal}
type?stringFormat
enumValue in
"PRINCIPAL_TYPE_UNSPECIFIED""PRINCIPAL_TYPE_USER""PRINCIPAL_TYPE_SERVICE_ACCOUNT"displayName?stringemail?stringUsers only.
disabled?booleanOutput only: DisablePrincipal and EnablePrincipal set it.
roleBindings?array<>Output only: GrantRole and RevokeRole change them.
createTime?stringFormat
date-timeOK
application/json- response
principal?A user or a service account, which calls the API with its keys.
curl -X POST 'http://localhost:8080/v1/principals' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "principal": { "name": "string", "type": "PRINCIPAL_TYPE_UNSPECIFIED", "displayName": "string", "email": "string", "disabled": true, "roleBindings": [ { "role": "ROLE_UNSPECIFIED", "workspace": "string" } ], "createTime": "2019-08-24T14:15:22Z" }}