Essential Contacts API . organizations . contacts

Instance Methods

close()

Close httplib2 connections.

compute(parent, notificationCategories=None, pageSize=None, pageToken=None, x__xgafv=None)

Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources.

compute_next()

Retrieves the next page of results.

create(parent, body=None, x__xgafv=None)

Adds a new contact for a resource.

delete(name, x__xgafv=None)

Deletes a contact.

get(name, x__xgafv=None)

Gets a single contact.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

Lists the contacts that have been set on a resource.

list_next()

Retrieves the next page of results.

patch(name, body=None, updateMask=None, x__xgafv=None)

Updates a contact. Note: A contact's email address cannot be changed.

sendTestMessage(resource, body=None, x__xgafv=None)

Allows a contact admin to send a test message to contact to verify that it has been configured correctly.

Method Details

close()
Close httplib2 connections.
compute(parent, notificationCategories=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources.

Args:
  parent: string, Required. The name of the resource to compute contacts for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id} (required)
  notificationCategories: string, The categories of notifications to compute contacts for. If ALL is included in this list, contacts subscribed to any notification category will be returned. (repeated)
    Allowed values
      NOTIFICATION_CATEGORY_UNSPECIFIED - Notification category is unrecognized or unspecified.
      ALL - All notifications related to the resource, including notifications pertaining to categories added in the future.
      SUSPENSION - Notifications related to imminent account suspension.
      SECURITY - Notifications related to security/privacy incidents, notifications, and vulnerabilities.
      TECHNICAL - Notifications related to technical events and issues such as outages, errors, or bugs.
      BILLING - Notifications related to billing and payments notifications, price updates, errors, or credits.
      LEGAL - Notifications related to enforcement actions, regulatory compliance, or government notices.
      PRODUCT_UPDATES - Notifications related to new versions, product terms updates, or deprecations.
      TECHNICAL_INCIDENTS - Child category of TECHNICAL. If assigned, technical incident notifications will go to these contacts instead of TECHNICAL.
  pageSize: integer, Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `next_page_token` in the response indicates that more results might be available. If not specified, the default page_size is 100.
  pageToken: string, Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters should be identical to those in the previous call.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for the ComputeContacts method.
  "contacts": [ # All contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources.
    { # A contact that will receive notifications from Google Cloud.
      "email": "A String", # Required. The email address to send notifications to. The email address does not need to be a Google Account.
      "languageTag": "A String", # 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.
      "name": "A String", # Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}
      "notificationCategorySubscriptions": [ # Required. The categories of notifications that the contact will receive communications for.
        "A String",
      ],
      "validateTime": "A 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": "A String", # The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.
    },
  ],
  "nextPageToken": "A String", # If there are more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token` and the rest of the parameters the same as the original request.
}
compute_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
create(parent, body=None, x__xgafv=None)
Adds a new contact for a resource.

Args:
  parent: string, Required. The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # A contact that will receive notifications from Google Cloud.
  "email": "A String", # Required. The email address to send notifications to. The email address does not need to be a Google Account.
  "languageTag": "A String", # 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.
  "name": "A String", # Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}
  "notificationCategorySubscriptions": [ # Required. The categories of notifications that the contact will receive communications for.
    "A String",
  ],
  "validateTime": "A 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": "A String", # The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A contact that will receive notifications from Google Cloud.
  "email": "A String", # Required. The email address to send notifications to. The email address does not need to be a Google Account.
  "languageTag": "A String", # 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.
  "name": "A String", # Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}
  "notificationCategorySubscriptions": [ # Required. The categories of notifications that the contact will receive communications for.
    "A String",
  ],
  "validateTime": "A 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": "A String", # The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.
}
delete(name, x__xgafv=None)
Deletes a contact.

Args:
  name: string, Required. The name of the contact to delete. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id} (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Gets a single contact.

Args:
  name: string, Required. The name of the contact to retrieve. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id} (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A contact that will receive notifications from Google Cloud.
  "email": "A String", # Required. The email address to send notifications to. The email address does not need to be a Google Account.
  "languageTag": "A String", # 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.
  "name": "A String", # Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}
  "notificationCategorySubscriptions": [ # Required. The categories of notifications that the contact will receive communications for.
    "A String",
  ],
  "validateTime": "A 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": "A String", # The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists the contacts that have been set on a resource.

Args:
  parent: string, Required. The parent resource name. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id} (required)
  pageSize: integer, Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of `next_page_token` in the response indicates that more results might be available. If not specified, the default page_size is 100.
  pageToken: string, Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters should be identical to those in the previous call.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for the ListContacts method.
  "contacts": [ # The contacts for the specified resource.
    { # A contact that will receive notifications from Google Cloud.
      "email": "A String", # Required. The email address to send notifications to. The email address does not need to be a Google Account.
      "languageTag": "A String", # 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.
      "name": "A String", # Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}
      "notificationCategorySubscriptions": [ # Required. The categories of notifications that the contact will receive communications for.
        "A String",
      ],
      "validateTime": "A 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": "A String", # The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.
    },
  ],
  "nextPageToken": "A String", # If there are more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token` and the rest of the parameters the same as the original request.
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a contact. Note: A contact's email address cannot be changed.

Args:
  name: string, Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # A contact that will receive notifications from Google Cloud.
  "email": "A String", # Required. The email address to send notifications to. The email address does not need to be a Google Account.
  "languageTag": "A String", # 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.
  "name": "A String", # Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}
  "notificationCategorySubscriptions": [ # Required. The categories of notifications that the contact will receive communications for.
    "A String",
  ],
  "validateTime": "A 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": "A String", # The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.
}

  updateMask: string, Optional. The update mask applied to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A contact that will receive notifications from Google Cloud.
  "email": "A String", # Required. The email address to send notifications to. The email address does not need to be a Google Account.
  "languageTag": "A String", # 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.
  "name": "A String", # Output only. The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}
  "notificationCategorySubscriptions": [ # Required. The categories of notifications that the contact will receive communications for.
    "A String",
  ],
  "validateTime": "A 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": "A String", # The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.
}
sendTestMessage(resource, body=None, x__xgafv=None)
Allows a contact admin to send a test message to contact to verify that it has been configured correctly.

Args:
  resource: string, Required. The name of the resource to send the test message for. All contacts must either be set directly on this resource or inherited from another resource that is an ancestor of this one. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for the SendTestMessage method.
  "contacts": [ # Required. The list of names of the contacts to send a test message to. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id}
    "A String",
  ],
  "notificationCategory": "A String", # Required. The notification category to send the test message for. All contacts must be subscribed to this category.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}