notification_configs
Creates, updates, deletes, gets or lists a notification_configs
resource.
Overview
Name | notification_configs |
Type | Resource |
Id | google.securitycenter.notification_configs |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The 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". |
description | string | The description of the notification config (max of 1024 characters). |
pubsubTopic | string | The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]". |
serviceAccount | string | Output only. The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic. |
streamingConfig | object | The config for streaming-based notifications, which send each event as soon as it is detected. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
folders_notification_configs_get | SELECT | foldersId, notificationConfigsId | Gets a notification config. |
folders_notification_configs_list | SELECT | foldersId | Lists notification configs. |
organizations_notification_configs_get | SELECT | notificationConfigsId, organizationsId | Gets a notification config. |
organizations_notification_configs_list | SELECT | organizationsId | Lists notification configs. |
projects_notification_configs_get | SELECT | notificationConfigsId, projectsId | Gets a notification config. |
projects_notification_configs_list | SELECT | projectsId | Lists notification configs. |
folders_notification_configs_create | INSERT | foldersId | Creates a notification config. |
organizations_notification_configs_create | INSERT | organizationsId | Creates a notification config. |
projects_notification_configs_create | INSERT | projectsId | Creates a notification config. |
folders_notification_configs_delete | DELETE | foldersId, notificationConfigsId | Deletes a notification config. |
organizations_notification_configs_delete | DELETE | notificationConfigsId, organizationsId | Deletes a notification config. |
projects_notification_configs_delete | DELETE | notificationConfigsId, projectsId | Deletes a notification config. |
folders_notification_configs_patch | UPDATE | foldersId, notificationConfigsId | Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter |
organizations_notification_configs_patch | UPDATE | notificationConfigsId, organizationsId | Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter |
projects_notification_configs_patch | UPDATE | notificationConfigsId, projectsId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.securitycenter.notification_configs (
foldersId,
name,
description,
pubsubTopic,
streamingConfig
)
SELECT
'{{ foldersId }}',
'{{ name }}',
'{{ description }}',
'{{ pubsubTopic }}',
'{{ streamingConfig }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: description
value: string
- name: pubsubTopic
value: string
- name: serviceAccount
value: string
- name: streamingConfig
value:
- name: filter
value: string
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 }}';