Advisory Notifications API . organizations . locations . notifications

Instance Methods

close()

Close httplib2 connections.

get(name, languageCode=None, x__xgafv=None)

Gets a notification.

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

Lists notifications under a given parent.

list_next()

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
get(name, languageCode=None, x__xgafv=None)
Gets a notification.

Args:
  name: string, Required. A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{projects}/locations/{location}/notifications/{notification}. (required)
  languageCode: string, ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A notification object for notifying customers about security and privacy issues.
  "createTime": "A String", # Output only. Time the notification was created.
  "messages": [ # A list of messages in the notification.
    { # A message which contains notification details.
      "attachments": [ # The attachments to download.
        { # Attachment with specific information about the issue.
          "csv": { # A representation of a CSV file attachment, as a list of column headers and a list of data rows. # A CSV file attachment. Max size is 10 MB.
            "dataRows": [ # The list of data rows in a CSV file, as string arrays rather than as a single comma-separated string.
              { # A representation of a single data row in a CSV file.
                "entries": [ # The data entries in a CSV file row, as a string array rather than a single comma-separated string.
                  "A String",
                ],
              },
            ],
            "headers": [ # The list of headers for data columns in a CSV file.
              "A String",
            ],
          },
          "displayName": "A String", # The title of the attachment.
        },
      ],
      "body": { # A message body containing text. # The message content.
        "text": { # A text object containing the English text and its localized copies. # The text content of the message body.
          "enText": "A String", # The English copy.
          "localizationState": "A String", # Status of the localization.
          "localizedText": "A String", # The requested localized copy (if applicable).
        },
      },
      "createTime": "A String", # The Message creation timestamp.
      "localizationTime": "A String", # Time when Message was localized
    },
  ],
  "name": "A String", # The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}.
  "notificationType": "A String", # Type of notification
  "subject": { # A subject line of a notification. # The subject line of the notification.
    "text": { # A text object containing the English text and its localized copies. # The text content.
      "enText": "A String", # The English copy.
      "localizationState": "A String", # Status of the localization.
      "localizedText": "A String", # The requested localized copy (if applicable).
    },
  },
}
list(parent, languageCode=None, pageSize=None, pageToken=None, view=None, x__xgafv=None)
Lists notifications under a given parent.

Args:
  parent: string, Required. The parent, which owns this collection of notifications. Must be of the form "organizations/{organization}/locations/{location}" or "projects/{project}/locations/{location}". (required)
  languageCode: string, ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
  pageSize: integer, The maximum number of notifications to return. The service may return fewer than this value. If unspecified or equal to 0, at most 50 notifications will be returned. The maximum value is 50; values above 50 will be coerced to 50.
  pageToken: string, A page token returned from a previous request. When paginating, all other parameters provided in the request must match the call that returned the page token.
  view: string, Specifies which parts of the notification resource should be returned in the response.
    Allowed values
      NOTIFICATION_VIEW_UNSPECIFIED - Not specified, equivalent to BASIC.
      BASIC - Server responses only include title, creation time and Notification ID. Note: for internal use responses also include the last update time, the latest message text and whether notification has attachments.
      FULL - Include everything.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response of ListNotifications endpoint.
  "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
  "notifications": [ # List of notifications under a given parent.
    { # A notification object for notifying customers about security and privacy issues.
      "createTime": "A String", # Output only. Time the notification was created.
      "messages": [ # A list of messages in the notification.
        { # A message which contains notification details.
          "attachments": [ # The attachments to download.
            { # Attachment with specific information about the issue.
              "csv": { # A representation of a CSV file attachment, as a list of column headers and a list of data rows. # A CSV file attachment. Max size is 10 MB.
                "dataRows": [ # The list of data rows in a CSV file, as string arrays rather than as a single comma-separated string.
                  { # A representation of a single data row in a CSV file.
                    "entries": [ # The data entries in a CSV file row, as a string array rather than a single comma-separated string.
                      "A String",
                    ],
                  },
                ],
                "headers": [ # The list of headers for data columns in a CSV file.
                  "A String",
                ],
              },
              "displayName": "A String", # The title of the attachment.
            },
          ],
          "body": { # A message body containing text. # The message content.
            "text": { # A text object containing the English text and its localized copies. # The text content of the message body.
              "enText": "A String", # The English copy.
              "localizationState": "A String", # Status of the localization.
              "localizedText": "A String", # The requested localized copy (if applicable).
            },
          },
          "createTime": "A String", # The Message creation timestamp.
          "localizationTime": "A String", # Time when Message was localized
        },
      ],
      "name": "A String", # The resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}.
      "notificationType": "A String", # Type of notification
      "subject": { # A subject line of a notification. # The subject line of the notification.
        "text": { # A text object containing the English text and its localized copies. # The text content.
          "enText": "A String", # The English copy.
          "localizationState": "A String", # Status of the localization.
          "localizedText": "A String", # The requested localized copy (if applicable).
        },
      },
    },
  ],
  "totalSize": 42, # Estimation of a total number of notifications.
}
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.