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

The following fields are returned by SELECT queries:

Successful response

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 triggering streaming-based notifications. (id: StreamingConfig)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
folders_notification_configs_getselectfoldersId, notificationConfigsIdGets a notification config.
projects_notification_configs_getselectprojectsId, notificationConfigsIdGets a notification config.
organizations_notification_configs_getselectorganizationsId, notificationConfigsIdGets a notification config.
folders_notification_configs_listselectfoldersIdpageToken, pageSizeLists notification configs.
projects_notification_configs_listselectprojectsIdpageToken, pageSizeLists notification configs.
organizations_notification_configs_listselectorganizationsIdpageToken, pageSizeLists notification configs.
folders_notification_configs_createinsertfoldersIdconfigIdCreates a notification config.
projects_notification_configs_createinsertprojectsIdconfigIdCreates a notification config.
organizations_notification_configs_createinsertorganizationsIdconfigIdCreates a notification config.
folders_notification_configs_patchupdatefoldersId, notificationConfigsIdupdateMask Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter
projects_notification_configs_patchupdateprojectsId, notificationConfigsIdupdateMask Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter
organizations_notification_configs_patchupdateorganizationsId, notificationConfigsIdupdateMask Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter
folders_notification_configs_deletedeletefoldersId, notificationConfigsIdDeletes a notification config.
projects_notification_configs_deletedeleteprojectsId, notificationConfigsIdDeletes a notification config.
organizations_notification_configs_deletedeleteorganizationsId, notificationConfigsIdDeletes a notification config.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
foldersIdstring
notificationConfigsIdstring
organizationsIdstring
projectsIdstring
configIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets a notification config.

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

INSERT examples

Creates a notification config.

INSERT INTO google.securitycenter.notification_configs (
data__name,
data__description,
data__pubsubTopic,
data__streamingConfig,
foldersId,
configId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ pubsubTopic }}',
'{{ streamingConfig }}',
'{{ foldersId }}',
'{{ configId }}'
RETURNING
name,
description,
pubsubTopic,
serviceAccount,
streamingConfig
;

UPDATE examples

Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

UPDATE google.securitycenter.notification_configs
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__pubsubTopic = '{{ pubsubTopic }}',
data__streamingConfig = '{{ streamingConfig }}'
WHERE
foldersId = '{{ foldersId }}' --required
AND notificationConfigsId = '{{ notificationConfigsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
description,
pubsubTopic,
serviceAccount,
streamingConfig;

DELETE examples

Deletes a notification config.

DELETE FROM google.securitycenter.notification_configs
WHERE foldersId = '{{ foldersId }}' --required
AND notificationConfigsId = '{{ notificationConfigsId }}' --required;