1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. securitycenter
  5. FolderNotificationConfig
Google Cloud v8.14.0 published on Wednesday, Jan 15, 2025 by Pulumi

gcp.securitycenter.FolderNotificationConfig

Explore with Pulumi AI

A Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.

Note: In order to use Cloud SCC resources, your organization must be enrolled in SCC Standard/Premium. Without doing so, you may run into errors during resource creation.

To get more information about FolderNotificationConfig, see:

Example Usage

Scc Folder Notification Config Basic

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  folder:
    type: gcp:organizations:Folder
    properties:
      parent: organizations/123456789
      displayName: folder-name
  sccFolderNotificationConfig:
    type: gcp:pubsub:Topic
    name: scc_folder_notification_config
    properties:
      name: my-topic
  customNotificationConfig:
    type: gcp:securitycenter:FolderNotificationConfig
    name: custom_notification_config
    properties:
      configId: my-config
      folder: ${folder.folderId}
      location: global
      description: My custom Cloud Security Command Center Finding Notification Configuration
      pubsubTopic: ${sccFolderNotificationConfig.id}
      streamingConfig:
        filter: category = "OPEN_FIREWALL" AND state = "ACTIVE"
Copy

Create FolderNotificationConfig Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new FolderNotificationConfig(name: string, args: FolderNotificationConfigArgs, opts?: CustomResourceOptions);
@overload
def FolderNotificationConfig(resource_name: str,
                             args: FolderNotificationConfigArgs,
                             opts: Optional[ResourceOptions] = None)

@overload
def FolderNotificationConfig(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             config_id: Optional[str] = None,
                             folder: Optional[str] = None,
                             pubsub_topic: Optional[str] = None,
                             streaming_config: Optional[FolderNotificationConfigStreamingConfigArgs] = None,
                             description: Optional[str] = None)
func NewFolderNotificationConfig(ctx *Context, name string, args FolderNotificationConfigArgs, opts ...ResourceOption) (*FolderNotificationConfig, error)
public FolderNotificationConfig(string name, FolderNotificationConfigArgs args, CustomResourceOptions? opts = null)
public FolderNotificationConfig(String name, FolderNotificationConfigArgs args)
public FolderNotificationConfig(String name, FolderNotificationConfigArgs args, CustomResourceOptions options)
type: gcp:securitycenter:FolderNotificationConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. FolderNotificationConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. FolderNotificationConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. FolderNotificationConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. FolderNotificationConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. FolderNotificationConfigArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var folderNotificationConfigResource = new Gcp.SecurityCenter.FolderNotificationConfig("folderNotificationConfigResource", new()
{
    ConfigId = "string",
    Folder = "string",
    PubsubTopic = "string",
    StreamingConfig = new Gcp.SecurityCenter.Inputs.FolderNotificationConfigStreamingConfigArgs
    {
        Filter = "string",
    },
    Description = "string",
});
Copy
example, err := securitycenter.NewFolderNotificationConfig(ctx, "folderNotificationConfigResource", &securitycenter.FolderNotificationConfigArgs{
	ConfigId:    pulumi.String("string"),
	Folder:      pulumi.String("string"),
	PubsubTopic: pulumi.String("string"),
	StreamingConfig: &securitycenter.FolderNotificationConfigStreamingConfigArgs{
		Filter: pulumi.String("string"),
	},
	Description: pulumi.String("string"),
})
Copy
var folderNotificationConfigResource = new FolderNotificationConfig("folderNotificationConfigResource", FolderNotificationConfigArgs.builder()
    .configId("string")
    .folder("string")
    .pubsubTopic("string")
    .streamingConfig(FolderNotificationConfigStreamingConfigArgs.builder()
        .filter("string")
        .build())
    .description("string")
    .build());
Copy
folder_notification_config_resource = gcp.securitycenter.FolderNotificationConfig("folderNotificationConfigResource",
    config_id="string",
    folder="string",
    pubsub_topic="string",
    streaming_config={
        "filter": "string",
    },
    description="string")
Copy
const folderNotificationConfigResource = new gcp.securitycenter.FolderNotificationConfig("folderNotificationConfigResource", {
    configId: "string",
    folder: "string",
    pubsubTopic: "string",
    streamingConfig: {
        filter: "string",
    },
    description: "string",
});
Copy
type: gcp:securitycenter:FolderNotificationConfig
properties:
    configId: string
    description: string
    folder: string
    pubsubTopic: string
    streamingConfig:
        filter: string
Copy

FolderNotificationConfig Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The FolderNotificationConfig resource accepts the following input properties:

ConfigId
This property is required.
Changes to this property will trigger replacement.
string
This must be unique within the organization.
Folder
This property is required.
Changes to this property will trigger replacement.
string
Numerical ID of the parent folder.
PubsubTopic This property is required. string
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
StreamingConfig This property is required. FolderNotificationConfigStreamingConfig
The config for triggering streaming-based notifications. Structure is documented below.
Description string
The description of the notification config (max of 1024 characters).
ConfigId
This property is required.
Changes to this property will trigger replacement.
string
This must be unique within the organization.
Folder
This property is required.
Changes to this property will trigger replacement.
string
Numerical ID of the parent folder.
PubsubTopic This property is required. string
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
StreamingConfig This property is required. FolderNotificationConfigStreamingConfigArgs
The config for triggering streaming-based notifications. Structure is documented below.
Description string
The description of the notification config (max of 1024 characters).
configId
This property is required.
Changes to this property will trigger replacement.
String
This must be unique within the organization.
folder
This property is required.
Changes to this property will trigger replacement.
String
Numerical ID of the parent folder.
pubsubTopic This property is required. String
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
streamingConfig This property is required. FolderNotificationConfigStreamingConfig
The config for triggering streaming-based notifications. Structure is documented below.
description String
The description of the notification config (max of 1024 characters).
configId
This property is required.
Changes to this property will trigger replacement.
string
This must be unique within the organization.
folder
This property is required.
Changes to this property will trigger replacement.
string
Numerical ID of the parent folder.
pubsubTopic This property is required. string
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
streamingConfig This property is required. FolderNotificationConfigStreamingConfig
The config for triggering streaming-based notifications. Structure is documented below.
description string
The description of the notification config (max of 1024 characters).
config_id
This property is required.
Changes to this property will trigger replacement.
str
This must be unique within the organization.
folder
This property is required.
Changes to this property will trigger replacement.
str
Numerical ID of the parent folder.
pubsub_topic This property is required. str
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
streaming_config This property is required. FolderNotificationConfigStreamingConfigArgs
The config for triggering streaming-based notifications. Structure is documented below.
description str
The description of the notification config (max of 1024 characters).
configId
This property is required.
Changes to this property will trigger replacement.
String
This must be unique within the organization.
folder
This property is required.
Changes to this property will trigger replacement.
String
Numerical ID of the parent folder.
pubsubTopic This property is required. String
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
streamingConfig This property is required. Property Map
The config for triggering streaming-based notifications. Structure is documented below.
description String
The description of the notification config (max of 1024 characters).

Outputs

All input properties are implicitly available as output properties. Additionally, the FolderNotificationConfig resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
ServiceAccount string
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
ServiceAccount string
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
id String
The provider-assigned unique ID for this managed resource.
name String
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
serviceAccount String
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
id string
The provider-assigned unique ID for this managed resource.
name string
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
serviceAccount string
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
id str
The provider-assigned unique ID for this managed resource.
name str
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
service_account str
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
id String
The provider-assigned unique ID for this managed resource.
name String
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
serviceAccount String
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.

Look up Existing FolderNotificationConfig Resource

Get an existing FolderNotificationConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: FolderNotificationConfigState, opts?: CustomResourceOptions): FolderNotificationConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[str] = None,
        description: Optional[str] = None,
        folder: Optional[str] = None,
        name: Optional[str] = None,
        pubsub_topic: Optional[str] = None,
        service_account: Optional[str] = None,
        streaming_config: Optional[FolderNotificationConfigStreamingConfigArgs] = None) -> FolderNotificationConfig
func GetFolderNotificationConfig(ctx *Context, name string, id IDInput, state *FolderNotificationConfigState, opts ...ResourceOption) (*FolderNotificationConfig, error)
public static FolderNotificationConfig Get(string name, Input<string> id, FolderNotificationConfigState? state, CustomResourceOptions? opts = null)
public static FolderNotificationConfig get(String name, Output<String> id, FolderNotificationConfigState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ConfigId Changes to this property will trigger replacement. string
This must be unique within the organization.
Description string
The description of the notification config (max of 1024 characters).
Folder Changes to this property will trigger replacement. string
Numerical ID of the parent folder.
Name string
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
PubsubTopic string
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
ServiceAccount string
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
StreamingConfig FolderNotificationConfigStreamingConfig
The config for triggering streaming-based notifications. Structure is documented below.
ConfigId Changes to this property will trigger replacement. string
This must be unique within the organization.
Description string
The description of the notification config (max of 1024 characters).
Folder Changes to this property will trigger replacement. string
Numerical ID of the parent folder.
Name string
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
PubsubTopic string
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
ServiceAccount string
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
StreamingConfig FolderNotificationConfigStreamingConfigArgs
The config for triggering streaming-based notifications. Structure is documented below.
configId Changes to this property will trigger replacement. String
This must be unique within the organization.
description String
The description of the notification config (max of 1024 characters).
folder Changes to this property will trigger replacement. String
Numerical ID of the parent folder.
name String
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
pubsubTopic String
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
serviceAccount String
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
streamingConfig FolderNotificationConfigStreamingConfig
The config for triggering streaming-based notifications. Structure is documented below.
configId Changes to this property will trigger replacement. string
This must be unique within the organization.
description string
The description of the notification config (max of 1024 characters).
folder Changes to this property will trigger replacement. string
Numerical ID of the parent folder.
name string
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
pubsubTopic string
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
serviceAccount string
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
streamingConfig FolderNotificationConfigStreamingConfig
The config for triggering streaming-based notifications. Structure is documented below.
config_id Changes to this property will trigger replacement. str
This must be unique within the organization.
description str
The description of the notification config (max of 1024 characters).
folder Changes to this property will trigger replacement. str
Numerical ID of the parent folder.
name str
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
pubsub_topic str
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
service_account str
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
streaming_config FolderNotificationConfigStreamingConfigArgs
The config for triggering streaming-based notifications. Structure is documented below.
configId Changes to this property will trigger replacement. String
This must be unique within the organization.
description String
The description of the notification config (max of 1024 characters).
folder Changes to this property will trigger replacement. String
Numerical ID of the parent folder.
name String
The resource name of this notification config, in the format folders/{{folder}}/notificationConfigs/{{config_id}}.
pubsubTopic String
The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]".
serviceAccount String
The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic.
streamingConfig Property Map
The config for triggering streaming-based notifications. Structure is documented below.

Supporting Types

FolderNotificationConfigStreamingConfig
, FolderNotificationConfigStreamingConfigArgs

Filter This property is required. string

Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators AND and OR. Parentheses are supported, and OR has higher precedence than AND. Restrictions have the form and may have a - character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are:

  • = for all value types.
  • , <, >=, <= for integer values.

  • :, meaning substring matching, for strings. The supported value types are:
  • string literals in quotes.
  • integer literals without quotes.
  • boolean literals true and false without quotes. See Filtering notifications for information on how to write a filter.

Filter This property is required. string

Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators AND and OR. Parentheses are supported, and OR has higher precedence than AND. Restrictions have the form and may have a - character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are:

  • = for all value types.
  • , <, >=, <= for integer values.

  • :, meaning substring matching, for strings. The supported value types are:
  • string literals in quotes.
  • integer literals without quotes.
  • boolean literals true and false without quotes. See Filtering notifications for information on how to write a filter.

filter This property is required. String

Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators AND and OR. Parentheses are supported, and OR has higher precedence than AND. Restrictions have the form and may have a - character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are:

  • = for all value types.
  • , <, >=, <= for integer values.

  • :, meaning substring matching, for strings. The supported value types are:
  • string literals in quotes.
  • integer literals without quotes.
  • boolean literals true and false without quotes. See Filtering notifications for information on how to write a filter.

filter This property is required. string

Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators AND and OR. Parentheses are supported, and OR has higher precedence than AND. Restrictions have the form and may have a - character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are:

  • = for all value types.
  • , <, >=, <= for integer values.

  • :, meaning substring matching, for strings. The supported value types are:
  • string literals in quotes.
  • integer literals without quotes.
  • boolean literals true and false without quotes. See Filtering notifications for information on how to write a filter.

filter This property is required. str

Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators AND and OR. Parentheses are supported, and OR has higher precedence than AND. Restrictions have the form and may have a - character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are:

  • = for all value types.
  • , <, >=, <= for integer values.

  • :, meaning substring matching, for strings. The supported value types are:
  • string literals in quotes.
  • integer literals without quotes.
  • boolean literals true and false without quotes. See Filtering notifications for information on how to write a filter.

filter This property is required. String

Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators AND and OR. Parentheses are supported, and OR has higher precedence than AND. Restrictions have the form and may have a - character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are:

  • = for all value types.
  • , <, >=, <= for integer values.

  • :, meaning substring matching, for strings. The supported value types are:
  • string literals in quotes.
  • integer literals without quotes.
  • boolean literals true and false without quotes. See Filtering notifications for information on how to write a filter.

Import

FolderNotificationConfig can be imported using any of these accepted formats:

  • folders/{{folder}}/notificationConfigs/{{config_id}}

  • {{folder}}/{{config_id}}

When using the pulumi import command, FolderNotificationConfig can be imported using one of the formats above. For example:

$ pulumi import gcp:securitycenter/folderNotificationConfig:FolderNotificationConfig default folders/{{folder}}/notificationConfigs/{{config_id}}
Copy
$ pulumi import gcp:securitycenter/folderNotificationConfig:FolderNotificationConfig default {{folder}}/{{config_id}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.