GoSpace Manager

Version v0.11.0

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

createContact

Create a new contact and return the person resource for that contact.

Synopsis

Implements the API documented at https://developers.google.com/people/api/rest/v1/people/createContact

gsm people createContact [flags]

Options

      --addressMeAs string               The type of pronouns that should be used to address the person.
                                         The value can be custom or one of these predefined values:
                                           - male
                                           - female
                                           - other
      --addresses strings                A person's physical address.
                                         May be a P.O. box or street address.
                                         All fields are optional.
                                         May be used multiple times in the for of "formattedValue=...;type=...;poBox...", etc.
                                         You may use the following fields:
                                         primary          - True if the field is the primary field; false if the field is a secondary field.
                                         formattedValue   - The unstructured value of the address.
                                         				   If this is not set by the user it will be automatically constructed from structured values.
                                         type             - The type of the address.
                                                            The type can be custom or one of these predefined values:
                                                              - home
                                                              - work
                                                              - other
                                         poBox            - The P.O. box of the address.
                                         streetAddress    - The street address.
                                         extendedAddress	 - The extended address of the address; for example, the apartment number.
                                         city             - The city of the address.
                                         region           - The region of the address; for example, the state or province.
                                         postalCode	     - The postal code of the address.
                                         country          - The country of the address.
                                         countryCode	     - The ISO 3166-1 alpha-2 country code of the address.
      --biographyContentType string      The content type of the biography.
                                         CONTENT_TYPE_UNSPECIFIED  - Unspecified.
                                         TEXT_PLAIN                - Plain text.
                                         TEXT_HTML                 - HTML text.
      --biographyValue string            The short biography.
      --birthdayDay int                  Day of month.
                                         Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant.
      --birthdayMonth int                Month of year.
                                         Must be from 1 to 12, or 0 if specifying a year without a month and day.
      --birthdayText string              A free-form string representing the user's birthday.
      --birthdayYear int                 Year of date.
                                         Must be from 1 to 9999, or 0 if specifying a date without a year.
      --calendarUrls strings             The person's calendar URLs.
                                         Can be used multiple times in the form of "url=...,type=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         url      - The calendar URL.
                                         type     - The type of the calendar URL.
                                                    The type can be custom or one of these predefined values:
                                                      - home
                                                      - work
                                                      - other
      --clientData strings               The person's client data.
                                         Arbitrary client data that is populated by clients. Duplicate keys and values are allowed.
                                         Can be used multiple times in the form of "key=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         key      - The client specified key of the client data.
                                         value    - The client specified value of the client data.
      --emailAddresses strings           The person's email addresses.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary    - True if the field is the primary field; false if the field is a secondary field.
                                         value      - The email address.
                                         type       - The type of the email address.
                                                      The type can be custom or one of these predefined values:
                                                        - home
                                                        - work
                                                        - other
                                         displayName  - The display name of the email.
      --events strings                   The person's events.
                                         Can be used multiple times in the form of "year=...,month=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         year     - Year of date.
                                                    Must be from 1 to 9999, or 0 if specifying a date without a year.
                                         month    - Month of year.
                                                    Must be from 1 to 12, or 0 if specifying a year without a month and day.
                                         day      - Day of month.
                                                    Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant.
                                         type     - The type of the event.
                                                    The type can be custom or one of these predefined values:
                                                      - anniversary
                                                      - other
      --externalIds strings              The person's external IDs.
                                         Can be used multiple times in the form of "value=...,type=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The value of the external ID.
                                         type     - The type of the external ID.
                                                    The type can be custom or one of these predefined values:
                                                      - account
                                                      - customer
                                                      - loginId
                                                      - network
                                                      - organization
      --familyName string                The family name.
      --fields string                    Fields allows partial responses to be retrieved.
                                         See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
      --fileAses strings                 The person's file-ases.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The file-as value
      --genderValue string               The gender for the person.
                                         The gender can be custom or one of these predefined values:
                                           - male
                                           - female
                                           - unspecified
      --givenName string                 The given name.
  -h, --help                             help for createContact
      --honorificPrefix string           The honorific prefixes, such as Mrs. or Dr.
      --honorificSuffix string           The honorific suffixes, such as Jr.
      --imClients strings                The person's instant messaging clients.
                                         Can be used multiple times in the form of "primary=...,username=...", etc.
                                         You may use the following fields:
                                         primary   - True if the field is the primary field; false if the field is a secondary field.
                                         username  - The user name used in the IM client.
                                         type      - The type of the IM client.
                                                     The type can be custom or one of these predefined values:
                                                       - home
                                                       - work
                                         			  - other
                                         protocol  - The protocol of the IM client.
                                                     The protocol can be custom or one of these predefined values:
                                                       - aim
                                                       - msn
                                                       - yahoo
                                                       - skype
                                                       - qq
                                                       - googleTalk
                                                       - icq
                                                       - jabber
                                                       - netMeeting
      --interests strings                The person's interests.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The interest; for example, stargazing.
      --locales strings                  The person's locale preferences.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The well-formed IETF BCP 47 language tag representing the locale.
      --locations strings                The person's locations.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary       - True if the field is the primary field; false if the field is a secondary field.
                                         value         - The free-form value of the location.
                                         type          - The type of the location.
                                                         The type can be custom or one of these predefined values:
                                                           - desk
                                         			      - grewUp
                                         current       - Whether the location is the current location.
                                         buildingId    - The building identifier.
                                         floor         - The floor name or number.
                                         floorSection  - The floor section in floor_name.
                                         deskCode      - The individual desk location.
      --memberships strings              The person's group memberships.
                                         Can be used multiple times in the form of "primary=...,contactGroupResourceName=...", etc.
                                         You may use the following fields:
                                         primary                          - True if the field is the primary field; false if the field is a secondary field.
                                         contactGroupResourceName         - The resource name for the contact group, assigned by the server.
                                         								   An ASCII string, in the form of contactGroups/{contactGroupId}.
                                         								   Only contactGroupResourceName can be used for modifying memberships.
                                         								   Any contact group membership can be removed, but only user group or "myContacts" or "starred" system groups memberships can be added.
                                         								   A contact must always have at least one contact group membership.
      --middleName string                The middle name(s).
      --miscKeywords strings             The person's miscellaneous keywords.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The value of the miscellaneous keyword.
                                         type     - The miscellaneous keyword type.
                                                    Allowed values are:
                                                      - TYPE_UNSPECIFIED             - Unspecified.
                                                      - OUTLOOK_BILLING_INFORMATION  - Outlook field for billing information.
                                                      - OUTLOOK_DIRECTORY_SERVER     - Outlook field for directory server.
                                                      - OUTLOOK_KEYWORD              - Outlook field for keyword.
                                                      - OUTLOOK_MILEAGE              - Outlook field for mileage.
                                                      - OUTLOOK_PRIORITY             - Outlook field for priority.
                                                      - OUTLOOK_SENSITIVITY          - Outlook field for sensitivity.
                                                      - OUTLOOK_SUBJECT              - Outlook field for subject.
                                                      - OUTLOOK_USER                 - Outlook field for user.
                                                      - HOME                         - Home.
                                                      - WORK                         - Work.
                                                      - OTHER                        - Other.
      --nicknames strings                The person's nicknames.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The nickname.
                                         type     - The type of a nickname.
                                                    Allowed values are:
                                         			 - DEFAULT         - Generic nickname.
                                                      - ALTERNATE_NAME  - Alternate name person is known by.
      --occupations strings              The person's occupations.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The occupation; for example, carpenter.
      --organizations strings            The person's past or current organizations.
                                         Can be used multiple times in the form of "primary=...,type=...", etc.
                                         You may use the following fields:
                                         primary         - True if the field is the primary field; false if the field is a secondary field.
                                         type            - The type of the organization.
                                                           The type can be custom or one of these predefined values:
                                                             - work
                                         			        - school
                                         startDateYear   - Year of date.
                                                           Must be from 1 to 9999, or 0 if specifying a date without a year.
                                         startDateMonth  - Month of year.
                                                           Must be from 1 to 12, or 0 if specifying a year without a month and day.
                                         startDateDay    - Day of month.
                                                           Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant.
                                         endDateYear     - Year of date.
                                                           Must be from 1 to 9999, or 0 if specifying a date without a year.
                                         endDateMonth    - Month of year.
                                                           Must be from 1 to 12, or 0 if specifying a year without a month and day.
                                         endDateDay      - Day of month.
                                                           Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant.
                                         current         - True if the organization is the person's current organization; false if the organization is a past organization.
                                         name            - The name of the organization.
                                         phoneticName    - The phonetic name of the organization.
                                         department      - The person's department at the organization.
                                         title           - The person's job title at the organization.
                                         jobDescription  - The person's job description at the organization.
                                         symbol          - The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym.
                                         domain          - The domain name associated with the organization; for example, google.com.
                                         location        - The location of the organization office the person works at.
      --personFields string              A field mask to restrict which fields on each person are returned.
                                         Multiple fields can be specified by separating them with commas.
                                         Defaults to all fields if not set.
                                         Valid values are:
                                         addresses
                                         ageRanges
                                         biographies
                                         birthdays
                                         calendarUrls
                                         clientData
                                         coverPhotos
                                         emailAddresses
                                         events
                                         externalIds
                                         genders
                                         imClients
                                         interests
                                         locales
                                         locations
                                         memberships
                                         metadata
                                         miscKeywords
                                         names
                                         nicknames
                                         occupations
                                         organizations
                                         phoneNumbers
                                         photos
                                         relations
                                         sipAddresses
                                         skills
                                         urls
                                         userDefined
      --phoneNumbers strings             The person's phone numbers.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The phone number.
                                         type     - The type of the phone number.
                                                    The type can be custom or one of these predefined values:
                                                      - home
                                                      - work
                                                      - mobile
                                                      - homeFax
                                                      - workFax
                                                      - otherFax
                                                      - pager
                                                      - workMobile
                                                      - workPager
                                                      - main
                                                      - googleVoice
                                                      - other
      --phoneticFamilyName string        The family name spelled as it sounds.
      --phoneticFullName string          The full name spelled as it sounds.
      --phoneticGivenName string         The given name spelled as it sounds.
      --phoneticHonorificPrefix string   The honorific prefixes spelled as they sound.
      --phoneticHonorificSuffix string   The honorific suffixes spelled as they sound.
      --phoneticMiddleName string        The middle name(s) spelled as they sound.
      --relations strings                The person's relations.
                                         Can be used multiple times in the form of "primary=...,person=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         person   - The name of the other person this relation refers to.
                                         type     - The person's relation to the other person.
                                                    The type can be custom or one of these predefined values:
                                                      - spouse
                                                      - child
                                                      - mother
                                                      - father
                                                      - parent
                                                      - brother
                                                      - sister
                                                      - friend
                                                      - relative
                                                      - domesticPartner
                                                      - manager
                                                      - assistant
                                                      - referredBy
                                                      - partner
      --sipAddresses strings             The person's SIP addresses.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The SIP address in the RFC 3261 19.1 SIP URI format.
                                         type     - The type of the SIP address.
                                                    The type can be custom or or one of these predefined values:
                                                      - home
                                                      - work
                                                      - mobile
                                                      - other
      --skills strings                   The person's skills.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The skill; for example, underwater basket weaving.
      --sources string                   A mask of what source types to return.
                                         DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT  - Workspace domain shared contact.
                                         DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE  - Workspace domain profile.
                                         READ_SOURCE_TYPE_PROFILE              - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.
                                         READ_SOURCE_TYPE_CONTACT              - Returns SourceType.CONTACT.
                                         READ_SOURCE_TYPE_DOMAIN_CONTACT       - Returns SourceType.DOMAIN_CONTACT.
      --unstructuredName string          The free form name value.
      --urls strings                     The person's associated URLs.
                                         Can be used multiple times in the form of "primary=...,value=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         value    - The URL.
                                         type     - The type of the URL.
                                                    The type can be custom or one of these predefined values:
                                                      - home
                                                      - work
                                                      - blog
                                                      - profile
                                                      - homePage
                                                      - ftp
                                                      - reservations
                                                      - appInstallPage: website for a Currents application.
                                                      - other
      --userDefined strings              The person's user defined data.
                                         Can be used multiple times in the form of "primary=...,type=...", etc.
                                         You may use the following fields:
                                         primary  - True if the field is the primary field; false if the field is a secondary field.
                                         key      - The end user specified key of the user defined data.
                                         value    - The end user specified value of the user defined data.

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