GoSpace Manager

Version v0.11.0

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

batch

Batch patches groups’ settings using a CSV file as input.

Synopsis

Implements the API documented at https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups/patch

gsm groupSettings patch batch [flags]

Options

      --allowExternalMembers int                        Identifies whether members external to your organization can join the group.
                                                        true   - Workspace users external to your organization can become members of this group.
                                                        false  - Users not belonging to the organization are not allowed to become members of this group.
      --allowExternalMembers_ALL string                 Same as allowExternalMembers but value is applied to all lines in the CSV file
      --allowWebPosting int                             Allows posting from web.
                                                        true   - Allows any member to post to the group forum.
                                                        false  - Members only use Gmail to communicate with the group.
      --allowWebPosting_ALL string                      Same as allowWebPosting but value is applied to all lines in the CSV file
      --archiveOnly int                                 Allows the group to be archived only.
                                                        true   - Group is archived and the group is inactive. New messages to this group are rejected. The older archived messages are browseable and searchable.
                                                                   - If true, the whoCanPostMessage property is set to NONE_CAN_POST.
                                                                   - If reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST.
                                                        false  - The group is active and can receive messages.
                                                        		   - When false, updating whoCanPostMessage to NONE_CAN_POST, results in an error.
      --archiveOnly_ALL string                          Same as archiveOnly 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)
      --customFooterText int                            Set the content of custom footer text.
                                                        The maximum number of characters is 1000.
      --customFooterText_ALL string                     Same as customFooterText but value is applied to all lines in the CSV file
      --customReplyTo int                               An email address used when replying to a message if the replyTo property is set to REPLY_TO_CUSTOM.
                                                        This address is defined by an account administrator.
                                                        When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds a custom email address used when replying to a message.
                                                        If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a text value or an error is returned.
      --customReplyTo_ALL string                        Same as customReplyTo but value is applied to all lines in the CSV file
      --defaultMessageDenyNotificationText int          When a message is rejected, this is text for the rejection notification sent to the message's author.
                                                        By default, this property is empty and has no value in the API's response body.
                                                        The maximum notification text size is 10,000 characters.
      --defaultMessageDenyNotificationText_ALL string   Same as defaultMessageDenyNotificationText 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 ';'
      --enableCollaborativeInbox int                    Specifies whether a collaborative inbox will remain turned on for the group.
      --enableCollaborativeInbox_ALL string             Same as enableCollaborativeInbox but value is applied to all lines in the CSV file
      --favoriteRepliesOnTop int                        Indicates if favorite replies should be displayed above other replies.
                                                        true   - Favorite replies will be displayed above other replies.
                                                        false  - Favorite replies will not be displayed above other replies.
      --favoriteRepliesOnTop_ALL string                 Same as favoriteRepliesOnTop 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
      --groupUniqueId int                               The group's email address.
  -h, --help                                            help for batch
      --ignoreDeprecated int                            Ignore deprecated fields.
      --ignoreDeprecated_ALL                            Same as ignoreDeprecated but value is applied to all lines in the CSV file
      --includeCustomFooter int                         Whether to include custom footer.
      --includeCustomFooter_ALL string                  Same as includeCustomFooter but value is applied to all lines in the CSV file
      --includeInGlobalAddressList int                  Enables the group to be included in the Global Address List. For more information, see the help center.
                                                        true   - Group is included in the Global Address List.
                                                        false  - Group is not included in the Global Address List.
      --includeInGlobalAddressList_ALL string           Same as includeInGlobalAddressList but value is applied to all lines in the CSV file
      --isArchived int                                  Allows the Group contents to be archived.
                                                        true   - Archive messages sent to the group.
                                                        false  - Do not keep an archive of messages sent to this group.
                                                                 If false, previously archived messages remain in the archive.
      --isArchived_ALL string                           Same as isArchived but value is applied to all lines in the CSV file
      --membersCanPostAsTheGroup int                    Enables members to post messages as the group.
                                                        true   - Group member can post messages using the group's email address instead of their own email address.
                                                                 Message appear to originate from the group itself.
                                                                 Note: When true, any message moderation settings on individual users or new members do not apply to posts made on behalf of the group.
                                                        false  - Members can not post in behalf of the group's email address.
      --membersCanPostAsTheGroup_ALL string             Same as membersCanPostAsTheGroup but value is applied to all lines in the CSV file
      --messageModerationLevel int                      Moderation level of incoming messages.
                                                        [MODERATE_ALL_MESSAGES|MODERATE_NON_MEMBERS|MODERATE_NEW_MEMBERS|MODERATE_NONE]
                                                        MODERATE_ALL_MESSAGES  - All messages are sent to the group owner's email address for approval. If approved, the message is sent to the group.
                                                        MODERATE_NON_MEMBERS   - All messages from non group members are sent to the group owner's email address for approval. If approved, the message is sent to the group.
                                                        MODERATE_NEW_MEMBERS   - All messages from new members are sent to the group owner's email address for approval. If approved, the message is sent to the group.
                                                        MODERATE_NONE          - No moderator approval is required. Messages are delivered directly to the group.
      --messageModerationLevel_ALL string               Same as messageModerationLevel but value is applied to all lines in the CSV file
      --path string                                     Path of the import file (CSV)
      --primaryLanguage int                             The primary language for group.
                                                        For a group's primary language use the language tags from the Workspace languages found at Workspace Email Settings API Email Language Tags.
      --primaryLanguage_ALL string                      Same as primaryLanguage but value is applied to all lines in the CSV file
      --replyTo int                                     Specifies who the default reply should go to.
                                                        [REPLY_TO_CUSTOM|REPLY_TO_SENDER|REPLY_TO_LIST|REPLY_TO_OWNER|REPLY_TO_IGNORE|REPLY_TO_MANAGERS]
                                                        REPLY_TO_CUSTOM    - For replies to messages, use the group's custom email address.
                                                        					   - When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds the custom email address used when replying to a message.
                                                        						 If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a value.
                                                        						 Otherwise an error is returned.
                                                        
                                                        REPLY_TO_SENDER    - The reply sent to author of message.
                                                        REPLY_TO_LIST      - This reply message is sent to the group.
                                                        REPLY_TO_OWNER     - The reply is sent to the owners of the group. This doesn't include the group's managers.
                                                        REPLY_TO_IGNORE    - Group users individually decide where the message reply is sent.
                                                        REPLY_TO_MANAGERS  - This reply message is sent to the group's managers, which includes all managers and the group owner.
      --replyTo_ALL string                              Same as replyTo but value is applied to all lines in the CSV file
      --sendMessageDenyNotification int                 Allows a member to be notified if the member's message to the group is denied by the group owner.
                                                        true   - When a message is rejected, send the deny message notification to the message author.
                                                                 The defaultMessageDenyNotificationText property is dependent on the sendMessageDenyNotification property being true.
                                                        
                                                        false  - When a message is rejected, no notification is sent.
      --sendMessageDenyNotification_ALL string          Same as sendMessageDenyNotification but value is applied to all lines in the CSV file
      --skipHeader                                      Whether to skip the first row (header)
      --spamModerationLevel int                         Specifies moderation levels for messages detected as spam.
                                                        [ALLOW|MODERATE|SILENTLY_MODERATE|REJECT]
                                                        ALLOW              - Post the message to the group.
                                                        MODERATE           - Send the message to the moderation queue. This is the default.
                                                        SILENTLY_MODERATE  - Send the message to the moderation queue, but do not send notification to moderators.
                                                        REJECT             - Immediately reject the message.
      --spamModerationLevel_ALL string                  Same as spamModerationLevel but value is applied to all lines in the CSV file
      --whoCanApproveMembers int                        Specifies who can approve members who ask to join groups.
                                                        This permission will be deprecated once it is merged into the new whoCanModerateMembers setting.
                                                        [ALL_MEMBERS_CAN_APPROVE]ALL_MANAGERS_CAN_APPROVE]ALL_OWNERS_CAN_APPROVE|NONE_CAN_APPROVE]
      --whoCanApproveMembers_ALL string                 Same as whoCanApproveMembers but value is applied to all lines in the CSV file
      --whoCanAssistContent int                         Specifies who can moderate metadata.
                                                        [ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE]
      --whoCanAssistContent_ALL string                  Same as whoCanAssistContent but value is applied to all lines in the CSV file
      --whoCanBanUsers int                              Specifies who can deny membership to users.
                                                        This permission will be deprecated once it is merged into the new whoCanModerateMembers setting.
                                                        [ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE]
      --whoCanBanUsers_ALL string                       Same as whoCanBanUsers but value is applied to all lines in the CSV file
      --whoCanContactOwner int                          Specifies who can contact the group owner.
                                                        [ALL_IN_DOMAIN_CAN_CONTACT|ALL_MANAGERS_CAN_CONTACT|ALL_MEMBERS_CAN_CONTACT|ANYONE_CAN_CONTACT]
      --whoCanContactOwner_ALL string                   Same as whoCanContactOwner but value is applied to all lines in the CSV file
      --whoCanDiscoverGroup int                         Specifies the set of users for whom this group is discoverable.
                                                        [ANYONE_CAN_DISCOVER|ALL_IN_DOMAIN_CAN_DISCOVER|ALL_MEMBERS_CAN_DISCOVER]
      --whoCanDiscoverGroup_ALL string                  Same as whoCanDiscoverGroup but value is applied to all lines in the CSV file
      --whoCanJoin int                                  Permission to join group.
                                                        [ANYONE_CAN_JOIN|ALL_IN_DOMAIN_CAN_JOIN|INVITED_CAN_JOIN|CAN_REQUEST_TO_JOIN]
                                                        ANYONE_CAN_JOIN         - Any Internet user, both inside and outside your domain, can join the group.
                                                        ALL_IN_DOMAIN_CAN_JOIN  - Anyone in the account domain can join. This includes accounts with multiple domains.
                                                        INVITED_CAN_JOIN        - Candidates for membership can be invited to join.
                                                        CAN_REQUEST_TO_JOIN     - Non members can request an invitation to join.
      --whoCanJoin_ALL string                           Same as whoCanJoin but value is applied to all lines in the CSV file
      --whoCanLeaveGroup int                            Specifies who can leave the group.
                                                        [ALL_MANAGERS_CAN_LEAVE|ALL_MEMBERS_CAN_LEAVE|NONE_CAN_LEAVE]
      --whoCanLeaveGroup_ALL string                     Same as whoCanLeaveGroup but value is applied to all lines in the CSV file
      --whoCanModerateContent int                       Specifies who can moderate content.
                                                        [ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE]
      --whoCanModerateContent_ALL string                Same as whoCanModerateContent but value is applied to all lines in the CSV file
      --whoCanModerateMembers int                       Specifies who can manage members.
                                                        [ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE]
      --whoCanModerateMembers_ALL string                Same as whoCanModerateMembers but value is applied to all lines in the CSV file
      --whoCanPostMessage int                           Permissions to post messages.
                                                        [NONE_CAN_POST|ALL_MANAGERS_CAN_POST|ALL_MEMBERS_CAN_POST|ALL_OWNERS_CAN_POST|ALL_IN_DOMAIN_CAN_POST|ANYONE_CAN_POST]
                                                        NONE_CAN_POST           - The group is disabled and archived. No one can post a message to this group.
                                                                                    - When archiveOnly is false, updating whoCanPostMessage to NONE_CAN_POST, results in an error.
                                                                                    - If archiveOnly is reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST.
                                                        ALL_MANAGERS_CAN_POST   - Managers, including group owners, can post messages.
                                                        ALL_MEMBERS_CAN_POST    - Any group member can post a message.
                                                        ALL_OWNERS_CAN_POST     - Only group owners can post a message.
                                                        ALL_IN_DOMAIN_CAN_POST  - Anyone in the account can post a message.
                                                        ANYONE_CAN_POST         - Any Internet user who outside your account can access your Google Groups service and post a message.
      --whoCanPostMessage_ALL string                    Same as whoCanPostMessage but value is applied to all lines in the CSV file
      --whoCanViewGroup int                             Permissions to view group messages.
                                                        [ANYONE_CAN_VIEW|ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_OWNERS_CAN_VIEW]
                                                        ANYONE_CAN_VIEW         - Any Internet user can view the group's messages.
                                                        ALL_IN_DOMAIN_CAN_VIEW  - Anyone in your account can view this group's messages.
                                                        ALL_MEMBERS_CAN_VIEW    - All group members can view the group's messages.
                                                        ALL_MANAGERS_CAN_VIEW   - Any group manager can view this group's messages.
                                                        ALL_OWNERS_CAN_VIEW     - Any group owner can view this group's messages.
      --whoCanViewGroup_ALL string                      Same as whoCanViewGroup but value is applied to all lines in the CSV file
      --whoCanViewMembership int                        Permissions to view membership.
                                                        [ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_MANAGERS_CAN_VIEW]
                                                        ALL_IN_DOMAIN_CAN_VIEW  - Anyone in the account can view the group members list.
                                                                                  If a group already has external members, those members can still send email to this group.
                                                        ALL_MEMBERS_CAN_VIEW    - The group members can view the group members list.
                                                        ALL_MANAGERS_CAN_VIEW   - The group managers can view group members list.
      --whoCanViewMembership_ALL string                 Same as whoCanViewMembership 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