Users: insert

Requires authorization

Creates a User resource in the specified project using the data included in the request. Try it now.

Request

HTTP request

POST https://www.googleapis.com/clouduseraccounts/beta/projects/project/global/users

Parameters

Parameter name Value Description
Path parameters
project string Project ID for this request.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/cloud.useraccounts
https://www.googleapis.com/auth/cloud-platform

Request body

In the request body, supply a Users resource with the following properties:

Property name Value Description Notes
Required Properties
name string Name of the resource; provided by the client when the resource is created.
owner string Email address of account's owner. This account will be validated to make sure it exists. The email can belong to any domain, but it must be tied to a Google account.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "clouduseraccounts#operation",
  "id": unsigned long,
  "creationTimestamp": string,
  "name": string,
  "zone": string,
  "clientOperationId": string,
  "operationType": string,
  "targetLink": string,
  "targetId": unsigned long,
  "status": string,
  "statusMessage": string,
  "user": string,
  "progress": integer,
  "insertTime": string,
  "startTime": string,
  "endTime": string,
  "error": {
    "errors": [
      {
        "code": string,
        "location": string,
        "message": string
      }
    ]
  },
  "warnings": [
    {
      "code": string,
      "message": string,
      "data": [
        {
          "key": string,
          "value": string
        }
      ]
    }
  ],
  "httpErrorStatusCode": integer,
  "httpErrorMessage": string,
  "selfLink": string,
  "region": string
}
Property name Value Description Notes
kind string [Output Only] Type of the resource. Always compute#operation for Operation resources.
id unsigned long [Output Only] Unique identifier for the resource; defined by the server.
creationTimestamp string [Output Only] Creation timestamp in RFC3339 text format.
name string [Output Only] Name of the resource.
zone string [Output Only] URL of the zone where the operation resides.
clientOperationId string [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
operationType string [Output Only] Type of the operation, such as insert, compute.instanceGroups.update, or compute.instanceGroups.delete.
targetId unsigned long [Output Only] Unique target ID which identifies a particular incarnation of the target.
status string [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
statusMessage string [Output Only] An optional textual description of the current status of the operation.
user string [Output Only] User who requested the operation, for example: user@example.com.
progress integer [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.
insertTime string [Output Only] The time that this operation was requested. This is in RFC3339 text format.
startTime string [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
endTime string [Output Only] The time that this operation was completed. This is in RFC3339 text format.
error object [Output Only] If errors are generated during processing of the operation, this field will be populated.
error.errors[] list [Output Only] The array of errors encountered while processing this operation.
error.errors[].code string [Output Only] The error type identifier for this error.
error.errors[].location string [Output Only] Indicates the field in the request which caused the error. This property is optional.
error.errors[].message string [Output Only] An optional, human-readable error message.
warnings[] list [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
warnings[].code string [Output Only] The warning type identifier for this warning.
warnings[].message string [Output Only] Optional human-readable details for this warning.
warnings[].data[] list [Output Only] Metadata for this warning in key: value format.
warnings[].data[].key string [Output Only] A key for the warning data.
warnings[].data[].value string [Output Only] A warning data value corresponding to the key.
httpErrorStatusCode integer [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
httpErrorMessage string [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
region string [Output Only] URL of the region where the operation resides. Only applicable for regional resources.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Compute Engine Documentation