Notifications
Filtering Notifications
You can use the notifications filter to search and filter notifications in the Turbot Guardrails Console or using GraphQL queries.
- The
notificationsfilter supports the standardsortandlimitkeywords - You can search standard Guardrails metadata properties such as
timestamp,actor. Note that you cannot searchtitlebecause notifications do not have a title. - The
typekeyword can filter on any specific notification type. - Use the
notificationTypekeyword to filter on the general type of notifications. This will filter all create, update, and delete notifications of a given class. Supported values are:resourceactionpolicySettingpolicyValuecontrolgrantactiveGrant
- You can filter the scope with Hierarchy Scope Filters. Note that these are implicitly set when filtering the notifications page in the Guardrails Console.
Notification Types
The type keyword accepts any of the specific notification types listed below. These represent individual lifecycle events for each entity type in Guardrails.
| Category | Notification Type | Description |
|---|---|---|
| Resource | resource_created | A new resource was discovered or created in Guardrails. |
resource_updated | A resource's configuration or metadata changed. | |
resource_deleted | A resource was removed from Guardrails. | |
resource_discovered | A resource was first discovered by a discovery control. | |
| Control | control_created | A control was instantiated for a resource. |
control_updated | A control changed state (e.g., ok → alarm). Only fires when the state actually changes. A re-evaluation that produces the same state does not generate a notification. | |
control_deleted | A control was removed. | |
control_notify | A control emitted a notification during its run. | |
| Policy Setting | policy_setting_created | A new policy setting was created at some level of the hierarchy. |
policy_setting_updated | An existing policy setting was modified. | |
policy_setting_deleted | A policy setting was removed. | |
| Policy Value | policy_value_created | A calculated policy value was resolved for the first time. |
policy_value_updated | A calculated policy value changed (e.g., due to a setting change or resource update). | |
policy_value_deleted | A calculated policy value was removed. | |
| Grant | grant_created | A permission grant was created. |
grant_updated | A permission grant was modified. | |
grant_deleted | A permission grant was removed. | |
grant_activated | A permission grant was activated for use. | |
grant_deactivated | A permission grant was deactivated. | |
| Active Grant | active_grant_created | A grant activation record was created (the grant is now live in the cloud provider). |
active_grant_deleted | A grant activation record was removed. |
You can combine multiple specific types in a comma-separated list: type:resource_created,resource_updated.
The notificationType keyword (described above) is a shorthand that matches all lifecycle events for a category, for example, notificationType:resource matches resource_created, resource_updated, resource_deleted, and resource_discovered.
For more about how activities and notifications surface in the Guardrails Console, see Activities.
Supported keywords are:
resourcelevelresourceTyperesourceTypeIdresourceTypeLevelcontrolTypecontrolTypeIdcontrolTypeLevelpolicyTypepolicyTypeIdpolicyTypeLevel
Note the following limitations:
- Tag filters do not work with notifications.
- Full text search does not work with notifications.
- You cannot use
$.to search and filter notifications.
Examples
| Aim | Filter text |
|---|---|
| Notifications for resources, newest first | notificationType:resource sort:-timestamp |
| The last 100 deletion notifications of any type | notificationType:resourceDeleted,policySettingDeleted,policyValueDeleted,controlDeleted,actionDeleted,scheduledActionDeleted,grantDeleted,activeGrantsDeleted,favoriteDeleted,watchDeleted sort:-timestamp limit:100 |
| Recent permissions activity | notificationType:activeGrant,grant sort:-timestamp |
| Notifications for a resource and its descendants for the last 2 hours | resource:162675146433353 timestamp:>T-2h sort:-timestamp |
| Notifications for a resource only (NOT its descendants) | resource:162675146433353 level:self sort:-timestamp |
Control notifications related to AWS > S3 > Bucket > Approved | notificationType:control controlType:tmod:@turbot/aws-s3#/control/types/bucketApproved sort:-timestamp |
Policy notifications for all AWS > S3 > Approved policies and sub-policies | notificationType:policyValue,policySetting policyType:tmod:@turbot/aws-s3#/policy/types/bucketApproved sort:-timestamp |
| Notifications for a specific actor (user) with its profileId | actorIdentityId:162674901433086 |