class Alerts extends Resource (View source)

The "alerts" collection of methods.

Typical usage is:

 $alertcenterService = new Google\Service\AlertCenter(...);
 $alerts = $alertcenterService->alerts;

Methods

batchDelete(BatchDeleteAlertsRequest $postBody, array $optParams = [])

Performs batch delete operation on alerts. (alerts.batchDelete)

batchUndelete(BatchUndeleteAlertsRequest $postBody, array $optParams = [])

Performs batch undelete operation on alerts. (alerts.batchUndelete)

delete(string $alertId, array $optParams = [])

Marks the specified alert for deletion. An alert that has been marked for deletion is removed from Alert Center after 30 days. Marking an alert for deletion has no effect on an alert which has already been marked for deletion. Attempting to mark a nonexistent alert for deletion results in a NOT_FOUND error. (alerts.delete)

get(string $alertId, array $optParams = [])

Gets the specified alert. Attempting to get a nonexistent alert returns NOT_FOUND error. (alerts.get)

getMetadata(string $alertId, array $optParams = [])

Returns the metadata of an alert. Attempting to get metadata for a non- existent alert returns NOT_FOUND error. (alerts.getMetadata)

listAlerts(array $optParams = [])

Lists the alerts. (alerts.listAlerts)

undelete(string $alertId, UndeleteAlertRequest $postBody, array $optParams = [])

Restores, or "undeletes", an alert that was marked for deletion within the past 30 days. Attempting to undelete an alert which was marked for deletion over 30 days ago (which has been removed from the Alert Center database) or a nonexistent alert returns a NOT_FOUND error. Attempting to undelete an alert which has not been marked for deletion has no effect. (alerts.undelete)

Details

BatchDeleteAlertsResponse batchDelete(BatchDeleteAlertsRequest $postBody, array $optParams = [])

Performs batch delete operation on alerts. (alerts.batchDelete)

Parameters

BatchDeleteAlertsRequest $postBody
array $optParams

Optional parameters.

Return Value

BatchDeleteAlertsResponse

Exceptions

Exception

BatchUndeleteAlertsResponse batchUndelete(BatchUndeleteAlertsRequest $postBody, array $optParams = [])

Performs batch undelete operation on alerts. (alerts.batchUndelete)

Parameters

BatchUndeleteAlertsRequest $postBody
array $optParams

Optional parameters.

Return Value

BatchUndeleteAlertsResponse

Exceptions

Exception

AlertcenterEmpty delete(string $alertId, array $optParams = [])

Marks the specified alert for deletion. An alert that has been marked for deletion is removed from Alert Center after 30 days. Marking an alert for deletion has no effect on an alert which has already been marked for deletion. Attempting to mark a nonexistent alert for deletion results in a NOT_FOUND error. (alerts.delete)

Parameters

string $alertId

Required. The identifier of the alert to delete.

array $optParams

Optional parameters.

Return Value

AlertcenterEmpty

Exceptions

Exception

Alert get(string $alertId, array $optParams = [])

Gets the specified alert. Attempting to get a nonexistent alert returns NOT_FOUND error. (alerts.get)

Parameters

string $alertId

Required. The identifier of the alert to retrieve.

array $optParams

Optional parameters.

Return Value

Alert

Exceptions

Exception

AlertMetadata getMetadata(string $alertId, array $optParams = [])

Returns the metadata of an alert. Attempting to get metadata for a non- existent alert returns NOT_FOUND error. (alerts.getMetadata)

Parameters

string $alertId

Required. The identifier of the alert this metadata belongs to.

array $optParams

Optional parameters.

Return Value

AlertMetadata

Exceptions

Exception

ListAlertsResponse listAlerts(array $optParams = [])

Lists the alerts. (alerts.listAlerts)

Parameters

array $optParams

Optional parameters.

Return Value

ListAlertsResponse

Exceptions

Exception

Alert undelete(string $alertId, UndeleteAlertRequest $postBody, array $optParams = [])

Restores, or "undeletes", an alert that was marked for deletion within the past 30 days. Attempting to undelete an alert which was marked for deletion over 30 days ago (which has been removed from the Alert Center database) or a nonexistent alert returns a NOT_FOUND error. Attempting to undelete an alert which has not been marked for deletion has no effect. (alerts.undelete)

Parameters

string $alertId

Required. The identifier of the alert to undelete.

UndeleteAlertRequest $postBody
array $optParams

Optional parameters.

Return Value

Alert

Exceptions

Exception