Users, REST: User.Update
Update an existing user.
HTTP request
PATCH https://rest-assistant.api.cloud.yandex.net/users/v1/users/{userId}
Path parameters
Request message for updating an existing user.
Field |
Description |
userId |
string Required field. ID of the user to update. |
Body parameters
{
"updateMask": "object",
"name": "string",
"description": "string",
"expirationConfig": {
"expirationPolicy": "string",
"ttlDays": "string"
},
"labels": "object"
}
Request message for updating an existing user.
Field |
Description |
updateMask |
object (field-mask) Required field. A comma-separated names off ALL fields to be updated. If |
name |
string New name for the user. |
description |
string New description for the user. |
expirationConfig |
New expiration configuration for the user. |
labels |
object (map<string, string>) New set of labels for the user. |
ExpirationConfig
Field |
Description |
expirationPolicy |
enum (ExpirationPolicy)
|
ttlDays |
string (int64) |
Response
HTTP Code: 200 - OK
{
"id": "string",
"folderId": "string",
"name": "string",
"description": "string",
"source": "string",
"createdBy": "string",
"createdAt": "string",
"updatedBy": "string",
"updatedAt": "string",
"expirationConfig": {
"expirationPolicy": "string",
"ttlDays": "string"
},
"expiresAt": "string",
"labels": "object"
}
Field |
Description |
id |
string Unique identifier of the user. |
folderId |
string ID of the folder that the user belongs to. |
name |
string Name of the user. |
description |
string Description of the user. |
source |
string |
createdBy |
string Identifier of the subject who created this user. |
createdAt |
string (date-time) Timestamp representing when the user was created. String in RFC3339 To work with values in this field, use the APIs described in the |
updatedBy |
string Identifier of the subject who last updated this user. |
updatedAt |
string (date-time) Timestamp representing the last time this user was updated. String in RFC3339 To work with values in this field, use the APIs described in the |
expirationConfig |
Configuration for the expiration of the user, defining when and how the user will expire. |
expiresAt |
string (date-time) Timestamp representing when the user will expire. String in RFC3339 To work with values in this field, use the APIs described in the |
labels |
object (map<string, string>) Set of key-value pairs that can be used to organize and categorize the user. |
ExpirationConfig
Field |
Description |
expirationPolicy |
enum (ExpirationPolicy)
|
ttlDays |
string (int64) |