contacts
Creates, updates, deletes, gets or lists a contacts
resource.
Overview
Name | contacts |
Type | Resource |
Id | google.essentialcontacts.contacts |
Fields
The following fields are returned by SELECT
queries:
- projects_contacts_get
- folders_contacts_get
- organizations_contacts_get
- projects_contacts_list
- folders_contacts_list
- organizations_contacts_list
Successful response
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 (google-datetime) | Output only. 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. |
Successful response
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 (google-datetime) | Output only. 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. |
Successful response
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 (google-datetime) | Output only. 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. |
Successful response
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 (google-datetime) | Output only. 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. |
Successful response
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 (google-datetime) | Output only. 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. |
Successful response
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 (google-datetime) | Output only. 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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_contacts_get | select | projectsId , contactsId | Gets a single contact. | |
folders_contacts_get | select | foldersId , contactsId | Gets a single contact. | |
organizations_contacts_get | select | organizationsId , contactsId | Gets a single contact. | |
projects_contacts_list | select | projectsId | pageSize , pageToken | Lists the contacts that have been set on a resource. |
folders_contacts_list | select | foldersId | pageSize , pageToken | Lists the contacts that have been set on a resource. |
organizations_contacts_list | select | organizationsId | pageSize , pageToken | Lists the contacts that have been set on a resource. |
projects_contacts_create | insert | projectsId | Adds a new contact for 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_patch | update | projectsId , contactsId | updateMask | Updates a contact. Note: A contact's email address cannot be changed. |
folders_contacts_patch | update | foldersId , contactsId | updateMask | Updates a contact. Note: A contact's email address cannot be changed. |
organizations_contacts_patch | update | organizationsId , contactsId | updateMask | Updates a contact. Note: A contact's email address cannot be changed. |
projects_contacts_delete | delete | projectsId , contactsId | Deletes a contact. | |
folders_contacts_delete | delete | foldersId , contactsId | Deletes a contact. | |
organizations_contacts_delete | delete | organizationsId , contactsId | Deletes a contact. | |
projects_contacts_compute | exec | projectsId | notificationCategories , pageSize , pageToken | 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. | |
folders_contacts_compute | exec | foldersId | notificationCategories , pageSize , pageToken | 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 | notificationCategories , pageSize , pageToken | 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. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
contactsId | string | |
foldersId | string | |
organizationsId | string | |
projectsId | string | |
notificationCategories | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_contacts_get
- folders_contacts_get
- organizations_contacts_get
- projects_contacts_list
- folders_contacts_list
- organizations_contacts_list
Gets a single contact.
SELECT
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
FROM google.essentialcontacts.contacts
WHERE projectsId = '{{ projectsId }}' -- required
AND contactsId = '{{ contactsId }}' -- required;
Gets a single contact.
SELECT
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
FROM google.essentialcontacts.contacts
WHERE foldersId = '{{ foldersId }}' -- required
AND contactsId = '{{ contactsId }}' -- required;
Gets a single contact.
SELECT
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
FROM google.essentialcontacts.contacts
WHERE organizationsId = '{{ organizationsId }}' -- required
AND contactsId = '{{ contactsId }}' -- required;
Lists the contacts that have been set on a resource.
SELECT
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
FROM google.essentialcontacts.contacts
WHERE projectsId = '{{ projectsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
Lists the contacts that have been set on a resource.
SELECT
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
FROM google.essentialcontacts.contacts
WHERE foldersId = '{{ foldersId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
Lists the contacts that have been set on a resource.
SELECT
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
FROM google.essentialcontacts.contacts
WHERE organizationsId = '{{ organizationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_contacts_create
- folders_contacts_create
- organizations_contacts_create
- Manifest
Adds a new contact for a resource.
INSERT INTO google.essentialcontacts.contacts (
data__email,
data__notificationCategorySubscriptions,
data__languageTag,
projectsId
)
SELECT
'{{ email }}',
'{{ notificationCategorySubscriptions }}',
'{{ languageTag }}',
'{{ projectsId }}'
RETURNING
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
;
Adds a new contact for a resource.
INSERT INTO google.essentialcontacts.contacts (
data__email,
data__notificationCategorySubscriptions,
data__languageTag,
foldersId
)
SELECT
'{{ email }}',
'{{ notificationCategorySubscriptions }}',
'{{ languageTag }}',
'{{ foldersId }}'
RETURNING
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
;
Adds a new contact for a resource.
INSERT INTO google.essentialcontacts.contacts (
data__email,
data__notificationCategorySubscriptions,
data__languageTag,
organizationsId
)
SELECT
'{{ email }}',
'{{ notificationCategorySubscriptions }}',
'{{ languageTag }}',
'{{ organizationsId }}'
RETURNING
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState
;
# Description fields are for documentation purposes
- name: contacts
props:
- name: projectsId
value: string
description: Required parameter for the contacts resource.
- name: foldersId
value: string
description: Required parameter for the contacts resource.
- name: organizationsId
value: string
description: Required parameter for the contacts resource.
- name: email
value: string
description: >
Required. The email address to send notifications to. The email address does not need to be a Google Account.
- name: notificationCategorySubscriptions
value: array
description: >
Required. The categories of notifications that the contact will receive communications for.
- name: languageTag
value: string
description: >
Required. The preferred language for notifications, as a ISO 639-1 language code. See [Supported languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) for a list of supported languages.
UPDATE
examples
- projects_contacts_patch
- folders_contacts_patch
- organizations_contacts_patch
Updates a contact. Note: A contact's email address cannot be changed.
UPDATE google.essentialcontacts.contacts
SET
data__email = '{{ email }}',
data__notificationCategorySubscriptions = '{{ notificationCategorySubscriptions }}',
data__languageTag = '{{ languageTag }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND contactsId = '{{ contactsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState;
Updates a contact. Note: A contact's email address cannot be changed.
UPDATE google.essentialcontacts.contacts
SET
data__email = '{{ email }}',
data__notificationCategorySubscriptions = '{{ notificationCategorySubscriptions }}',
data__languageTag = '{{ languageTag }}'
WHERE
foldersId = '{{ foldersId }}' --required
AND contactsId = '{{ contactsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState;
Updates a contact. Note: A contact's email address cannot be changed.
UPDATE google.essentialcontacts.contacts
SET
data__email = '{{ email }}',
data__notificationCategorySubscriptions = '{{ notificationCategorySubscriptions }}',
data__languageTag = '{{ languageTag }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND contactsId = '{{ contactsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
email,
languageTag,
notificationCategorySubscriptions,
validateTime,
validationState;
DELETE
examples
- projects_contacts_delete
- folders_contacts_delete
- organizations_contacts_delete
Deletes a contact.
DELETE FROM google.essentialcontacts.contacts
WHERE projectsId = '{{ projectsId }}' --required
AND contactsId = '{{ contactsId }}' --required;
Deletes a contact.
DELETE FROM google.essentialcontacts.contacts
WHERE foldersId = '{{ foldersId }}' --required
AND contactsId = '{{ contactsId }}' --required;
Deletes a contact.
DELETE FROM google.essentialcontacts.contacts
WHERE organizationsId = '{{ organizationsId }}' --required
AND contactsId = '{{ contactsId }}' --required;
Lifecycle Methods
- projects_contacts_compute
- projects_contacts_send_test_message
- folders_contacts_compute
- folders_contacts_send_test_message
- organizations_contacts_compute
- organizations_contacts_send_test_message
Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources.
EXEC google.essentialcontacts.contacts.projects_contacts_compute
@projectsId='{{ projectsId }}' --required,
@notificationCategories='{{ notificationCategories }}',
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}';
Allows a contact admin to send a test message to contact to verify that it has been configured correctly.
EXEC google.essentialcontacts.contacts.projects_contacts_send_test_message
@projectsId='{{ projectsId }}' --required
@@json=
'{
"contacts": "{{ contacts }}",
"notificationCategory": "{{ notificationCategory }}"
}';
Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources.
EXEC google.essentialcontacts.contacts.folders_contacts_compute
@foldersId='{{ foldersId }}' --required,
@notificationCategories='{{ notificationCategories }}',
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}';
Allows a contact admin to send a test message to contact to verify that it has been configured correctly.
EXEC google.essentialcontacts.contacts.folders_contacts_send_test_message
@foldersId='{{ foldersId }}' --required
@@json=
'{
"contacts": "{{ contacts }}",
"notificationCategory": "{{ notificationCategory }}"
}';
Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources.
EXEC google.essentialcontacts.contacts.organizations_contacts_compute
@organizationsId='{{ organizationsId }}' --required,
@notificationCategories='{{ notificationCategories }}',
@pageSize='{{ pageSize }}',
@pageToken='{{ pageToken }}';
Allows a contact admin to send a test message to contact to verify that it has been configured correctly.
EXEC google.essentialcontacts.contacts.organizations_contacts_send_test_message
@organizationsId='{{ organizationsId }}' --required
@@json=
'{
"contacts": "{{ contacts }}",
"notificationCategory": "{{ notificationCategory }}"
}';