Files API, gRPC: FileService.Update
Update an existing file.
gRPC request
rpc Update (UpdateFileRequest) returns (File)
UpdateFileRequest
{
"fileId": "string",
"updateMask": "google.protobuf.FieldMask",
"name": "string",
"description": "string",
"expirationConfig": {
"expirationPolicy": "ExpirationPolicy",
"ttlDays": "int64"
},
"labels": "string"
}
Request message for updating an existing file.
Field |
Description |
fileId |
string Required field. ID of the file to update. |
updateMask |
Required field. Field mask specifying which fields to update. |
name |
string New name for the file. |
description |
string New description for the file. |
expirationConfig |
New expiration configuration for the file. |
labels |
string New set of labels for the file. |
ExpirationConfig
Field |
Description |
expirationPolicy |
enum ExpirationPolicy
|
ttlDays |
int64 |
File
{
"id": "string",
"folderId": "string",
"name": "string",
"description": "string",
"mimeType": "string",
"createdBy": "string",
"createdAt": "google.protobuf.Timestamp",
"updatedBy": "string",
"updatedAt": "google.protobuf.Timestamp",
"expirationConfig": {
"expirationPolicy": "ExpirationPolicy",
"ttlDays": "int64"
},
"expiresAt": "google.protobuf.Timestamp",
"labels": "string"
}
Field |
Description |
id |
string Unique identifier of the file. |
folderId |
string ID of the folder that the file belongs to. |
name |
string Name of the file. |
description |
string Description of the file. |
mimeType |
string MIME type of the file, indicating the file's format (e.g., "application/pdf") |
createdBy |
string Identifier of the subject who created this file. |
createdAt |
Timestamp representing when the file was created. |
updatedBy |
string Identifier of the subject who last updated this file. |
updatedAt |
Timestamp representing the last time this file was updated. |
expirationConfig |
Configuration for the expiration of the file, defining when and how the file will expire. |
expiresAt |
Timestamp representing when the file will expire. |
labels |
string Set of key-value pairs that can be used to organize and categorize the file. |
ExpirationConfig
Field |
Description |
expirationPolicy |
enum ExpirationPolicy
|
ttlDays |
int64 |