1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-11 23:49:35 +00:00
gcloud-help/gcloud/alpha/scc/notifications/create
2024-02-29 10:17:22 +00:00

119 lines
4.8 KiB
Text

NAME
gcloud alpha scc notifications create - create a Security Command Center
notification config
SYNOPSIS
gcloud alpha scc notifications create NOTIFICATION_CONFIG_ID
--pubsub-topic=PUBSUB_TOPIC [--description=DESCRIPTION]
[--filter=FILTER] [--location=LOCATION; default="global"]
[--folder=FOLDER | --organization=ORGANIZATION | --project=PROJECT]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Create a Security Command Center notification config.
Notification configs that are created with Security Command Center API V2
and later include a location attribute. If a location is not specified, the
default global location is used. For example, the following Notification
config name has location=global attribute:
organizations/123/locations/global/notificationConfigs/my-config.
EXAMPLES
Create a notification config test-config under organization 123 for
findings for pubsub-topic projects/test-project/topics/notification-test
with a filter on resource name:
$ gcloud alpha scc notifications create test-config \
--organization=123 \
--pubsub-topic=projects/test-project/topics/notification-test \
--filter="resource_name: \"a\""
Create a notification config test-config under folder 456 for findings for
pubsub-topic projects/test-project/topics/notification-test with a filter
on resource name:
$ gcloud alpha scc notifications create test-config --folder=456 \
--pubsub-topic=projects/test-project/topics/notification-test \
--filter="resource_name: \"a\""
Create a notification config test-config under project 789 for findings for
pubsub-topic projects/test-project/topics/notification-test with a filter
on resource name:
$ gcloud alpha scc notifications create test-config --project=789 \
--pubsub-topic=projects/test-project/topics/notification-test \
--filter="resource_name: \"a\""
Create a notification config test-config under organization 123 for
findings for pubsub-topic projects/test-project/topics/notification-test
with a filter on resource name and location=eu
$ gcloud alpha scc notifications create test-config --project=789 \
--pubsub-topic=projects/test-project/topics/notification-test \
--filter="resource_name: \"a\"" --location=eu
POSITIONAL ARGUMENTS
NOTIFICATION_CONFIG_ID
The ID of the notification config. Formatted as
"organizations/123/notificationConfigs/456" or just "456".
REQUIRED FLAGS
--pubsub-topic=PUBSUB_TOPIC
The Pub/Sub topic which will receive notifications. Its format is
"projects/[project_id]/topics/[topic]".
OPTIONAL FLAGS
--description=DESCRIPTION
The text that will be used to describe a notification configuration.
--filter=FILTER
Filter to be used for notification config.
--location=LOCATION; default="global"
When data residency controls are enabled, this attribute specifies the
location in which the resource is located and applicable. The location
attribute can be provided as part of the fully specified resource name
or with the --location argument on the command line. The default
location is global.
The default location on this command is unrelated to the default
location that is specified when data residency controls are enabled for
Security Command Center.
At most one of these can be specified:
--folder=FOLDER
Folder where the notification config resides. Formatted as
folders/456 or just 456.
--organization=ORGANIZATION
Organization where the notification config resides. Formatted as
organizations/123 or just 123.
--project=PROJECT
Project (ID or number) where the notification config resides.
Formatted as projects/789 or just 789.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
API REFERENCE
This command uses the Security Command Center API. For more information,
see Security Command Center API.
(https://cloud.google.com/security-command-center/docs/reference/rest)
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist. These variants are also available:
$ gcloud scc notifications create
$ gcloud beta scc notifications create