Skip to main content

notification_configs

Creates, updates, deletes, gets or lists a notification_configs resource.

Overview

Namenotification_configs
TypeResource
Idgoogle.securitycenter.notification_configs

Fields

NameDatatypeDescription
namestringThe relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket".
descriptionstringThe description of the notification config (max of 1024 characters).
pubsubTopicstringThe Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
serviceAccountstringOutput only. The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
streamingConfigobjectThe config for streaming-based notifications, which send each event as soon as it is detected.

Methods

NameAccessible byRequired ParamsDescription
folders_notification_configs_getSELECTfoldersId, notificationConfigsIdGets a notification config.
folders_notification_configs_listSELECTfoldersIdLists notification configs.
organizations_notification_configs_getSELECTnotificationConfigsId, organizationsIdGets a notification config.
organizations_notification_configs_listSELECTorganizationsIdLists notification configs.
projects_notification_configs_getSELECTnotificationConfigsId, projectsIdGets a notification config.
projects_notification_configs_listSELECTprojectsIdLists notification configs.
folders_notification_configs_createINSERTfoldersIdCreates a notification config.
organizations_notification_configs_createINSERTorganizationsIdCreates a notification config.
projects_notification_configs_createINSERTprojectsIdCreates a notification config.
folders_notification_configs_deleteDELETEfoldersId, notificationConfigsIdDeletes a notification config.
organizations_notification_configs_deleteDELETEnotificationConfigsId, organizationsIdDeletes a notification config.
projects_notification_configs_deleteDELETEnotificationConfigsId, projectsIdDeletes a notification config.
folders_notification_configs_patchUPDATEfoldersId, notificationConfigsIdUpdates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter
organizations_notification_configs_patchUPDATEnotificationConfigsId, organizationsIdUpdates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter
projects_notification_configs_patchUPDATEnotificationConfigsId, projectsIdUpdates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

SELECT examples

Lists notification configs.

SELECT
name,
description,
pubsubTopic,
serviceAccount,
streamingConfig
FROM google.securitycenter.notification_configs
WHERE foldersId = '{{ foldersId }}';

INSERT example

Use the following StackQL query and manifest file to create a new notification_configs resource.

/*+ create */
INSERT INTO google.securitycenter.notification_configs (
foldersId,
name,
description,
pubsubTopic,
streamingConfig
)
SELECT
'{{ foldersId }}',
'{{ name }}',
'{{ description }}',
'{{ pubsubTopic }}',
'{{ streamingConfig }}'
;

UPDATE example

Updates a notification_configs resource.

/*+ update */
UPDATE google.securitycenter.notification_configs
SET
name = '{{ name }}',
description = '{{ description }}',
pubsubTopic = '{{ pubsubTopic }}',
streamingConfig = '{{ streamingConfig }}'
WHERE
foldersId = '{{ foldersId }}'
AND notificationConfigsId = '{{ notificationConfigsId }}';

DELETE example

Deletes the specified notification_configs resource.

/*+ delete */
DELETE FROM google.securitycenter.notification_configs
WHERE foldersId = '{{ foldersId }}'
AND notificationConfigsId = '{{ notificationConfigsId }}';