GoSpace Manager

Version v0.11.0

Manage Google Workspace resources using a developer-friendly CLI written in Go

update

Updates a file’s metadata and/or content. This method supports patch semantics.

Synopsis

Implements the API documented at https://developers.google.com/drive/api/v3/reference/files/update

gsm files update [flags]

Options

      --appProperties strings              A collection of arbitrary key-value pairs which are private to the requesting app.
                                           Entries with null values are cleared in update and copy requests.
      --copyRequiresWriterPermission       Whether the options to copy, print, or download this file, should be disabled for readers and commenters.
      --description string                 A short description of the file.
      --fields string                      Fields allows partial responses to be retrieved.
                                           See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
      --fileId string                      The ID of the file
      --folderColorRgb string              The color for a folder as an RGB hex string.
                                           The supported colors are published in the folderColorPalette field of the About resource.
                                           If an unsupported color is specified, the closest color in the palette will be used instead.
  -h, --help                               help for update
      --includePermissionsForView string   Specifies which additional view's permissions to include in the response.
                                           Only 'published' is supported.
      --indexableText string               Text to be indexed for the file to improve fullText queries.
                                           This is limited to 128KB in length and may contain HTML elements.
      --keepRevisionForever                Whether to set the 'keepForever' field in the new head revision.
                                           This is only applicable to files with binary content in Google Drive.
                                           Only 200 revisions for the file can be kept forever.
                                           If the limit is reached, try deleting pinned revisions.
      --localFilePath string               Path to a file or folder on the local disk.
      --mimeType string                    The target MIME type of the file.
                                           Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided.
                                           The value cannot be changed unless a new revision is uploaded.
                                           
                                           If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible.
                                           The supported import formats are published in the About resource.
      --modifiedTime string                The last time the file was modified by anyone (RFC 3339 date-time).
                                           Note that setting modifiedTime will also update modifiedByMeTime for the user.
      --name string                        The name of the file. This is not necessarily unique within a folder.
                                           Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.
      --ocrLanguage string                 A language hint for OCR processing during image import (ISO 639-1 code).
      --originalFilename string            The original filename of the uploaded content if available, or else the original value of the name field.
                                           This is only available for files with binary content in Google Drive.
      --parent string                      The single parent of the file.
      --properties strings                 A collection of arbitrary key-value pairs which are visible to all apps.
                                           Entries with null values are cleared in update and copy requests.
      --readOnly                           Whether the content of the file is read-only.
                                           If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
      --readOnlyReason string              Reason for why the content of the file is restricted.
                                           This is only mutable on requests that also set readOnly=true.
      --starred                            Whether the user has starred the file.
      --thumbnailImage string              The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
      --thumbnailMimeType string           The MIME type of the thumbnail.
      --trashed                            Whether the file has been trashed, either explicitly or from a trashed parent folder.
                                           Only the owner may trash a file.
                                           The trashed item is excluded from all files.list responses returned for any user who does not own the file.
                                           However, all users with access to the file can see the trashed item metadata in an API response.
                                           All users with access can copy, download, export, and share the file.
      --useContentAsIndexableText          Whether users with only writer permission can modify the file's permissions.
                                           Not populated for items in shared drives.
      --viewedByMeTime string              The last time the file was viewed by the user (RFC 3339 date-time).
      --writersCanShare                    Whether users with only writer permission can modify the file's permissions.
                                           Not populated for items in shared drives.

Options inherited from parent commands

      --compressOutput         By default, GSM outputs "pretty" (indented) objects. By setting this flag, GSM's output will be compressed. This may or may not improve performance in scripts.
      --config string          config file (default is $HOME/.config/gsm/.gsm.yaml)
      --delay int              This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable.
      --dwdSubject string      Specify a subject used for DWD impersonation (overrides value in config file)
      --log string             Set the path of the log file. Default is either ~/gsm.log or defined in your config file
      --maxElapsedTime int     This is the maximum total time that will be spent retrying a request in minutes. (default 15)
      --maxRetryInterval int   This is the maximum interval that will be used between retry attempts in seconds. (default 320)
      --redirectPort int       This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback (default 8081)
      --retryOn ints           Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error
      --streamOutput           Setting this flag will cause GSM to output slice values to stdout one by one, instead of one large object

SEE ALSO