contacts
Creates, updates, deletes, gets or lists a contacts
resource.
Overview
Name | contacts |
Type | Resource |
Id | google.essentialcontacts.contacts |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id} |
email | string | Required. The email address to send notifications to. The email address does not need to be a Google Account. |
languageTag | string | Required. The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages. |
notificationCategorySubscriptions | array | Required. The categories of notifications that the contact will receive communications for. |
validateTime | string | The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago. |
validationState | string | Output only. The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
folders_contacts_get | SELECT | contactsId, foldersId | Gets a single contact. |
folders_contacts_list | SELECT | foldersId | Lists the contacts that have been set on a resource. |
organizations_contacts_get | SELECT | contactsId, organizationsId | Gets a single contact. |
organizations_contacts_list | SELECT | organizationsId | Lists the contacts that have been set on a resource. |
projects_contacts_get | SELECT | contactsId, projectsId | Gets a single contact. |
projects_contacts_list | SELECT | projectsId | Lists the contacts that have been set on a resource. |
folders_contacts_create | INSERT | foldersId | Adds a new contact for a resource. |
organizations_contacts_create | INSERT | organizationsId | Adds a new contact for a resource. |
projects_contacts_create | INSERT | projectsId | Adds a new contact for a resource. |
folders_contacts_delete | DELETE | contactsId, foldersId | Deletes a contact. |
organizations_contacts_delete | DELETE | contactsId, organizationsId | Deletes a contact. |
projects_contacts_delete | DELETE | contactsId, projectsId | Deletes a contact. |
folders_contacts_patch | UPDATE | contactsId, foldersId | Updates a contact. Note: A contact's email address cannot be changed. |
organizations_contacts_patch | UPDATE | contactsId, organizationsId | Updates a contact. Note: A contact's email address cannot be changed. |
projects_contacts_patch | UPDATE | contactsId, projectsId | Updates a contact. Note: A contact's email address cannot be changed. |
folders_contacts_compute | EXEC | foldersId | Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources. |
folders_contacts_send_test_message | EXEC | foldersId | Allows a contact admin to send a test message to contact to verify that it has been configured correctly. |
organizations_contacts_compute | EXEC | organizationsId | Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources. |
organizations_contacts_send_test_message | EXEC | organizationsId | Allows a contact admin to send a test message to contact to verify that it has been configured correctly. |
projects_contacts_compute | EXEC | projectsId | Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources. |
projects_contacts_send_test_message | EXEC | projectsId | Allows a contact admin to send a test message to contact to verify that it has been configured correctly. |
SELECT
examples
Lists the contacts that have been set on a resource.
SELECT
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
FROM google.essentialcontacts.contacts
WHERE foldersId = '{{ foldersId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new contacts
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.essentialcontacts.contacts (
foldersId,
email,
notificationCategorySubscriptions,
validateTime,
languageTag
)
SELECT
'{{ foldersId }}',
'{{ email }}',
'{{ notificationCategorySubscriptions }}',
'{{ validateTime }}',
'{{ languageTag }}'
;
- name: your_resource_model_name
props:
- name: validationState
value: string
- name: email
value: string
- name: notificationCategorySubscriptions
value:
- string
- name: validateTime
value: string
- name: languageTag
value: string
- name: name
value: string
UPDATE
example
Updates a contacts
resource.
/*+ update */
UPDATE google.essentialcontacts.contacts
SET
email = '{{ email }}',
notificationCategorySubscriptions = '{{ notificationCategorySubscriptions }}',
validateTime = '{{ validateTime }}',
languageTag = '{{ languageTag }}'
WHERE
contactsId = '{{ contactsId }}'
AND foldersId = '{{ foldersId }}';
DELETE
example
Deletes the specified contacts
resource.
/*+ delete */
DELETE FROM google.essentialcontacts.contacts
WHERE contactsId = '{{ contactsId }}'
AND foldersId = '{{ foldersId }}';