GoSpace Manager

Version v0.11.0

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

batch

Batch updates shared drives using a CSV file as input

Synopsis

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

gsm drives update batch [flags]

Options

      --adminManagedRestrictions int       Whether administrative privileges on this shared drive are required to modify restrictions
      --adminManagedRestrictions_ALL       Same as adminManagedRestrictions but value is applied to all lines in the CSV file
      --backgroundImageFile int            An image file and cropping parameters from which a background image for this shared drive is set.
                                           This is a write only field; it can only be set on drive.drives.update requests that don't set themeId.
                                           When specified, all fields of the backgroundImageFile must be set.
                                           Specify in the following format:
                                           '--backgroundImageFile "id=...;width=...;xCoordinate=...;yCoordinate=..."'
                                           Use ALL of the following parameters:
                                           id:           The ID of an image file in Google Drive to use for the background image.
                                           width:        The width of the cropped image in the closed range of 0 to 1.
                                                         This value represents the width of the cropped image divided by the width of the entire image.
                                                         The height is computed by applying a width to height aspect ratio of 80 to 9.
                                                         The resulting image must be at least 1280 pixels wide and 144 pixels high.
                                           xCoordinate:  The X coordinate of the upper left corner of the cropping area in the background image.
                                                         This is a value in the closed range of 0 to 1.
                                                         This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
                                           yCoordinate:  The Y coordinate of the upper left corner of the cropping area in the background image.
                                                         This is a value in the closed range of 0 to 1.
                                                         This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
      --backgroundImageFile_ALL string     Same as backgroundImageFile but value is applied to all lines in the CSV file
      --batchThreads int                   Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16)
      --colorRgb int                       The color of this shared drive as an RGB hex string.
                                           It can only be set on a drive.drives.update request that does not set themeId.
      --colorRgb_ALL string                Same as colorRgb but value is applied to all lines in the CSV file
      --copyRequiresWriterPermission int   Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters.
                                           When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive
      --copyRequiresWriterPermission_ALL   Same as copyRequiresWriterPermission but value is applied to all lines in the CSV file
      --delimiter string                   Delimiter to use for CSV columns. Must be exactly one character. Default is ';'
      --domainUsersOnly int                Whether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs.
                                           This restriction may be overridden by other sharing policies controlled outside of this shared drive
      --domainUsersOnly_ALL                Same as domainUsersOnly but value is applied to all lines in the CSV file
      --driveId int                        The ID of the shared drive
      --driveMembersOnly int               Whether access to items inside this shared drive is restricted to its members
      --driveMembersOnly_ALL               Same as driveMembersOnly but value is applied to all lines in the CSV file
      --fields int                         Fields allows partial responses to be retrieved.
                                           See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
      --fields_ALL string                  Same as fields but value is applied to all lines in the CSV file
  -h, --help                               help for batch
      --name int                           The name of this shared drive
      --name_ALL string                    Same as name but value is applied to all lines in the CSV file
      --path string                        Path of the import file (CSV)
      --skipHeader                         Whether to skip the first row (header)
      --themeId int                        The ID of the theme from which the background image and color will be set.
                                           The set of possible driveThemes can be retrieved from a drive.about.get response.
                                           When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set.
                                           This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile.
      --themeId_ALL string                 Same as themeId but value is applied to all lines in the CSV file
      --useDomainAdminAccess int           Issue the request as a domain administrator
      --useDomainAdminAccess_ALL           Same as useDomainAdminAccess but value is applied to all lines in the CSV file

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